5

I am learning emacs and I think developing facility with emacs's built in help features would really smooth out the learning curve for learning keystrokes.

What is an efficient process, using emacs's built-in help functions, to find the name of a command and its keystroke?

For example, I've forgotten the key stroke for closing a frame. So I press C-h f and type in frame. I don't see any obvious candidates for the function that closes a frame, so I run a search on google.

Is there a better plan b than search google built into emacs? Alternatively, is there a better plan a than C-h f for finding the keystroke for a function whose name I cannot remember?

I've also installed helm.

Edit: All three suggestions were an improvement on my current emacs help doc search process, thanks!

Community
  • 1
  • 1
landon
  • 397
  • 3
  • 7

3 Answers3

5

Try apropos-command, bound to C-h a by default.

For example, C-h a frame RET shows commands containing the word frame.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
5

If you have helm, helm-M-x is a great way to find/execute commands and learn about keystrokes. It is a great replacement for the standard M-x. On the other hand if you know your keystroke, but want to find out which command corresponds to it, describe-key-briefly, typically on C-h c works great.

Andrzej Pronobis
  • 33,828
  • 17
  • 76
  • 92
4

I think Chris's apropos-command is generally a good approach, but if you want something slightly more compact, you can do:

M-x *frame TAB

or

C-h f *frame TAB

The first shows (in the *Completions* buffer) all commands with "frame" in their name, and the second does the same for functions. You can then use Isearch in the *Completions* buffer if the list is too long. You can also do

M-x *close*frame TAB

to see if there's a command whose name includes "close" and "frame" (in this order).

Stefan
  • 27,908
  • 4
  • 53
  • 82