If I know an emacs command name, says, "goto-line"; what if I want to query whether if there are any key-sequences bound to this command ?
And vice versa, given a key sequence, how can I find its command name ?
emacs
If I know an emacs command name, says, "goto-line"; what if I want to query whether if there are any key-sequences bound to this command ?
And vice versa, given a key sequence, how can I find its command name ?
Best Solution
To just find key bindings for a command, you can use emacs help's "where-is" feature
If multiple bindings are set for the command they will all be listed.
For the inverse, given a key sequence, you can type
To get the command that would run.
You can get detailed information about a command, also any non-interactive function defined, by typing
Which will give you detailed information about a function, including any key bindings for it, and
will give you information about any (bound) variable. Key-maps are kept in variables, however the key codes are stored in a raw format. Try
C-h v isearch-mode-map
for an example.For more help on getting help, you can type