embark
embark copied to clipboard
Allow default action to use menu description
which-key
is getting support for simple menus, but the default command (per here) is shown in lieu of the menu description.
See @minad's suggestion here:
https://github.com/oantolin/embark/issues/207#issuecomment-864489351
Before overwriting the RET keybinding with the current command, Embark could look up the command in the keymap. If it is a menu-item, use that. If the command does not exist, just use the plain command, which of course looks more ugly. But not much can be done about that.
The problem here is that we need a reverse keymap lookup or one needs to scan the entire keymap for the menu items. It needs a little effort, but I think it is worth it. (EDIT: this is easier than I thought given map-keymap.)
Unrelated - we may also want to update the completing-read prompter to show the menu-item descriptions additionally to the binding and command. Maybe we are already doing this, I have to check. (EDIT: we already support this for consult narrowing)