-
Notifications
You must be signed in to change notification settings - Fork 274
Description
Hello,
(This may be related to #433 but really not sure)
Ever since this evil-snipe commit it seems that
(evil-collection-translate-key '(normal motion) '(evil-snipe-local-mode-map evil-snipe-override-local-mode-map)
"s" "k"
"S" "K"
"K" "S"
"k" "s")doesn't work as intended : after this call is executed, I expect s to move the cursor up (evil-previous-line, I use an alternate keyboard layout), but instead it calls evil-snipe-s still. It used to work before this commit
Worse, when I try to C-h k s, I see evil-snipe-s, but no associated binding is showing (I use helpful.el, and the "Key bindings" section is empty

(Instead, I expected evil-previous-line, which is mapped to evil-motion-state-map s)
Digging a little bit, I noticed 2 things :
-
the
evil-snipechange means that now the initial binding is done toevil-get-minor-mode-keymap
https://github.com/emacs-evil/evil/blob/f20d442ff006aa5a6dc48ac654906b48b95107fd/evil-core.el#L1154
instead ofevil-get-auxiliary-keymap
https://github.com/emacs-evil/evil/blob/f20d442ff006aa5a6dc48ac654906b48b95107fd/evil-core.el#L1116 -
And
evil-collection--translate-keyonly fetches thelookup-mapthroughevil-get-auxiliary-keymap
evil-collection/evil-collection.el
Lines 603 to 605 in a24168f
(if state (evil-get-auxiliary-keymap keymap state t t) keymap))))
So maybe evil-collection--translate-key needs to be modified to also be able to lookup in that particular map ? I don't really know if it's going to be the solution (nor how to do that properly).
I don't know if the get-minor-mode-keymap and get-auxiliary keymap functions of evil are actually fetching the same keymap or not; and I don't know how those keymaps affect the key resolution logic of Emacs, so sorry if this shot in the dark is totally wrong (and I'd be happy to learn a little bit more; seeing "No binding" in helpful.el after a C-h k is a troubling experience)
Thanks for creating that function in the first place though, it's really a time saver