justbur / emacs-which-key

Emacs package that displays available keybindings in popup
GNU General Public License v3.0
1.74k stars 87 forks source link

which-key does not work during read-key-sequence #284

Closed minad closed 3 years ago

minad commented 3 years ago

Example:

(setq map (make-sparse-keymap))
(define-key map "xa" #'ignore)
(define-key map "xb" #'ignore)

(let ((overriding-terminal-local-map map)
      (which-key-show-transient-maps t))
  (read-key-sequence nil))

Which key shows the help view "x +prefix", but after pressing additional keys the help view is not updated. And it even stays alive. This seems to be a conflict between the transient keymap installed by which-key and the one already being present?

See also https://github.com/justbur/emacs-which-key/issues/223

justbur commented 3 years ago

Confirmed, thanks

bdarcus commented 3 years ago

I just wanted to offer a gentle bump for this issue. Would be great if it could be addressed.

The new menu description support is a great addition, BTW!

minad commented 3 years ago

UPDATE: I assume that this issue is fixed if one passes the COMMAND-LOOP=t argument to read-key-sequence.

justbur commented 3 years ago

@minad Are you suggesting that I need to add that argument or that it should be added in your original code?

minad commented 3 years ago

Original code, I close this!