Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to effectively use the self-documenting system of Emacs?

Tags:

emacs

I am a newbie on Emacs. I was going to learn how to close a buffer, so I typed M-x apropos-documentation RET close buffer. Then I got a lot of useless information.

Given the above senario, what's the right way to find what I wanna know using the self-documenting system?

Or the self-documenting system is useless compared to Google in the modern day?

like image 881
TomCaps Avatar asked Jun 06 '12 10:06

TomCaps


2 Answers

So a basic terminology problem tripped you up here. I would say that Emacs doesn't help here by not catering for this case in the glossary, and naming the relevant menu item "Close" and binding it to a different function to the C-xk sequence (which would be to avoid prompting you again). I note that the tooltip for that menu item does at least indicate the "kill" terminology, however, which certainly would have assisted your search.

That mismatch was always going to cause problems for searching with apropos, but the self-documentation in Emacs goes beyond that. Really, the tutorial or user manual should have been your next step. (The tutorial should be your first step, in fact.)

Any of the following would have found you the answer fairly quickly, even without knowing the "kill" term.

  • Go through the tutorial: C-ht
  • Look for "buffer" in the manual's contents page: C-hr
  • Search the manual's index C-hrI buffers RET
    (admittedly searching for buffer (singular) provides more cluttered results)
  • Search the keybindings: C-hbM-x occur RET buffer RET
    (occur is a bit more advanced, but C-s would work too)
  • C-hk click the "File" -> "Close" menu item
    (which is not the same binding as C-xk as commented on above; but this would also have shown the "kill" terminology)

I think it's a bit of a shame that the accepted answer for a question entitled "How to effectively use the self-documenting system of Emacs?" is one which steers you away from those systems, as once you know your way around them you'll rarely need anything other than Emacs' own documentation.

like image 130
phils Avatar answered Sep 27 '22 19:09

phils


You are better off with Google until you know the terminology and maybe even after that. I've used the emacs documentation system a lot, but mainly for looking up something which I already knew about, or something for which I already knew the exact terminology.

If you are unsure how to search for something in the documentation then Google is much more effective, because it also takes synoyms into account and it finds questions similar to yours from forums and stuff. It does not only apply to Emacs, but to any other software as well. Regardless of the software I always try a Google search first, because in most cases Google throws out the answer much more quickly than browsing the documentation,

like image 37
Tom Avatar answered Sep 27 '22 20:09

Tom