mklsls
June 14, 2022, 3:05pm
#1
What happened?
If a command name is too long, it is cut in the which key menu.
For example, in any .el
file, if you press SPC m d
, it shows these options
which are identical up to the three dots parts ...
What did you expect to happen?
Have some mechanism like a running text, popout or alt-text to show the rest of the command.
Steps to reproduce
Open any menu with long named commands.
System information
Loading data dump...
Press ? (or C-h if ? is bound) and you can search the active prefix in the minibuffer (using ivy/vertico/helm/etc).
1 Like
mklsls
June 14, 2022, 3:22pm
#3
Thanks Henrik! This is exactly what I am looking for.
Just to understand, the ?
menu show all the existing commands loaded in Emacs.
However, there isn’t a ?
menu version for only the current submenu (in this case, SPC m d
in elisp-mode
).
Best.
Not at all. The ?
menu shows commands under the current prefix. I.e. SPC m ? should list all keys bound under SPC m (recursively).
E.g. SPC m ? in emacs-lisp-mode
:
mklsls
June 14, 2022, 9:00pm
#5
I see you have only 11 options.
In my case I have 3449 options if I press SPC m ?
in the init.el
for example.
In a random org file I have 3815 options,
Have a look at your private config. I can’t reproduce that on vanilla Doom. I’ll have to look into it further another time; a little swamped atm.
mklsls
June 15, 2022, 1:12am
#7
Thanks! Maybe just throw me some pointers or variables to look at, and I’m glad to report back my findings. For the moment I don’t have anything related to which-key, consult or vertico in my private config.
FYI, I confirm that I also only have 11 options in elisp files. It looks like you have global key bindings bound to your minor mode binding.
mklsls
June 23, 2022, 12:24pm
#9
Thanks to both!
I’ve debugged my private config and disabled all the map!
calls just in case. I still have the problem.
What do you think could be triggering this strange behavior?
Best.
mklsls
June 23, 2022, 1:54pm
#10
I finally found it!
The malevolent lines were this
(setq which-key-use-C-h-commands t
prefix-help-command #'which-key-C-h-dispatch)
(defadvice! fix-which-key-dispatcher-a (fn &rest args)
:around #'which-key-C-h-dispatch
(let ((keys (this-command-keys-vector)))
(if (equal (elt keys (1- (length keys))) ?\?)
(let ((keys (which-key--this-command-keys)))
(embark-bindings (seq-take keys (1- (length keys)))))
(apply fn args))))
Basically, I wanted to have paging in the which-key menus. I copied this from the discord (Discord )
Maybe the effects of those lines should be clear in the docs.
Thanks for the help!
1 Like
system
closed
July 7, 2022, 1:55pm
#11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.