Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emaps-describe-keymap-bindings: Add support for multiple keymaps #3

Open
GuiltyDolphin opened this issue Sep 12, 2016 · 1 comment
Open

Comments

@GuiltyDolphin
Copy link
Owner

Being able to describe multiple keymaps at once would be nice, though likely only through direct calls ((keymap &rest keymaps)).

It'd probably be fine just to display one keymap after the other (textually).

  • Possible future feature: allow collapsing/expanding keymaps.
@GuiltyDolphin
Copy link
Owner Author

GuiltyDolphin commented Mar 19, 2018

Here's a thought on why this might be useful.

Say you wanted to view all the keymaps active for your current major/minor mode combination - it might be handy to be able to run a function (e.g., emaps-describe-keymap-bindings-current-major-minor-mode) then have it bring up a buffer with a list of (collapsible) keymaps for the current major and minor modes. Each of these would have a view similar to what would display with emaps-describe-keymap-bindings.

Note on describe-bindings

Format

describe-bindings provides a buffer with the following format:

Key translations:
key             binding
---             -------

...

^L
`X-minor-mode' Minor Mode Bindings:
key             binding
---             -------

...

^L
`Y-minor-mode' Minor Mode Bindings:
key             binding
---             -------

...

^L
Major Mode Bindings:
key             binding
---             -------

...

^L
Global Bindings:
key             binding
---             -------

...

^L
Function key map translations:
key             binding
---             -------

...

^L
Input decoding map translations:
key             binding
---             -------

...

[back]

(Where ^L is the literal character)

It seems the format of each section is therefore:

Title:
key             binding
---             -------

...

Spacing

There are newlines between some sets of bindings (within sections), I believe this is done by longest common prefix.

Displays even for empty/non-existent keymaps

describe-bindings seems to display sections for minor modes that have empty/non-existent keymaps. For example, there is a section for auto-complete-mode:

^L
`auto-complete-mode' Minor Mode Bindings:
key             binding
---             -------

Which is empty, and there is no keymap for auto-complete-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant