Suppose I do a certain keystroke sequence in emacs, and nothing happens, even though I expect there to be a keybinding that would do something. This could be because:

  • The keybinding is not actually present.
  • The keybinding is invoking the command, but for some reason the command isn't having the expected effect.

How can I tell which of these it is? (The specific example is that I'm doing meta-q, which is supposed to be bound to the command fill-paragraph, but nothing seems to happen.)


You can determine which command a keybinding calls with C-h k then the keybinding.

In your example, you would enter C-h k M-q, which will tell you that M-q runs fill-paragraph (or at least it does by default in most modes). If there's no command associated with the keybinding, Emacs will tell you so in the echo area.


You can try using (view-lossage) (bound to C-h l by default) to see if your terminal even recognizes keystrokes. Some terminals might have problems with certain keystrokes. This shouldn't be an issue if you're using a graphical display for emacs, but your window manager might grab some key combinations, and Emacs won't even know about them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy