0

I simply want to get the list of shortcuts.

For example, when my cursor is in Treemacs, I press '?' and then mini-buffer opens which show all available shortcuts. But same thing isn't true for other major modes like 'eww' etc.
I simply don't want to navigate to documentation everytime.

I use 'helm' if it helps!

Thank you!

0
1

Normally I use C-h m (M-x describe-mode) for this task.

The opened *Help* buffer lists currently used modes, and then short information on each of the modes, starting with the major one and usually providing a list of available key bindings.

Additionally, in some major modes, ? and/or C-h output the most - expectedly - useful key bindings.

Also, there's a very useful M-x describe-keymap command, available since Emacs 28.1 (current development snapshot 28.0.50). I often use it when I'd like to explore a particular keymap without going to the source (so not only the currently active major-mode's bindings). For example, M-x describe-keymap <RET> dired-mode-map.

P.S. You might also find it helpful to take a look at C-h ? for the list of the most useful help bindings.
C-h m is currently listed as the first one (in my setup).

6
  • describe-keymap is not available in vanilla emacs-27.2? At least, not in my vanilla 27.2. Aug 28 '21 at 11:35
  • @FranBurstall function describe-keymap was added on 24th of Aug 2019, so it should be available in Emacs >= 26.3. See help-fns.el blame with the changes to this function during the last 2 years.
    – Y. E.
    Aug 28 '21 at 13:15
  • I found 'helm-descbinds' helpful which was recommended in the link mentioned by Tyler in his comment.
    – deepanshu
    Aug 28 '21 at 15:22
  • @Y.E. describe-keymap was added 2 years ago to help-fns.el on the master branch but never made it to the 27 branch: check github.com/emacs-mirror/emacs/blob/emacs-27/lisp/help-fns.el. Aug 29 '21 at 23:07
  • @FranBurstall yeah, that's a long journey for such a useful command. Anyway, 28.1 is going to be released soon, so not so long to wait for those who uses the latest stable release.
    – Y. E.
    Aug 31 '21 at 12:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.