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

embark-prefix-help-command hides bindings for menu items #724

Open
djr7C4 opened this issue Jun 20, 2024 · 1 comment
Open

embark-prefix-help-command hides bindings for menu items #724

djr7C4 opened this issue Jun 20, 2024 · 1 comment

Comments

@djr7C4
Copy link

djr7C4 commented Jun 20, 2024

This occurs for example with some lsp-mode bindings such as lsp-rename. This is bound by default in lsp-command-map to "rr" (lsp-command-map is bound to lsp-keymap-prefix in lsp-mode-map). These show "menu-item" instead of the key binding in embark-prefix-help-command.

In other words, there will be a line when embark-prefix-help-command is run that shows

menu-item    lsp-rename-maybe

when

r r    lsp-rename

is what I would prefer.

The reason is that embark--formatted-bindings contains the code

(concat
 (if (eq (car-safe def) 'menu-item)
     "menu-item"
   (key-description key)))

in the loop that populates the commands variable.

Part of the issue is with embark--command-name which contains

((eq (car-safe cmd) 'menu-item) (eval (cadr cmd)))

in the cond. I have this patched locally and could put together a pull request but I'm not sure what behavior is needed. I personally only care about the key bindings (and not menu items) but perhaps you want to preserve the menu items in embark-prefix-help-command so these should be split into two separate candidates.

@bradhowes
Copy link

I think this is also related to an issue I encountered: executing C-x 8 C-h does not show the key translations when prefix-help-command is set to embark-prefix-help-command in my configuration. I am still trying to incorporate Embark into my workflow so this is not a big issue for me, but it did take me some time to figure out where in my configuration I had lost the full output of C-x 8 C-h.

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

No branches or pull requests

2 participants