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

evil-define-minor-mode-key not working in certain cases #834

Open
julian-hoch opened this issue Sep 1, 2024 · 0 comments
Open

evil-define-minor-mode-key not working in certain cases #834

julian-hoch opened this issue Sep 1, 2024 · 0 comments

Comments

@julian-hoch
Copy link
Contributor

Hi, I am trying to set up some keybindings for the minor mode 'vtable-header-mode' (used by activities.el when using activites-list), and I am facing the issue that I cannot seem to get the 'k' key to work.

This is what I am trying:

    (evil-define-minor-mode-key 'normal 'vtable-header-mode
      (kbd "h") 'vtable-previous-column
      (kbd "l") 'vtable-next-column
      (kbd "j") 'evil-next-line
      (kbd "k") 'evil-previous-line)

Everything works except for the 'k' key - this is still bound as follows:

k runs the command #[257 "\300�!\207" [#<subr F616e6f6e796d6f75732d6c616d626461anonymouslambda16>] 3 "

(fn OBJECT)" (byte-code "\300 C\207" [vtable-current-object] 1)]

I suspect activities.el does something non-standard, and this is why I cannot rebind it?

Oh and a related question - I managed to screw up my emacs state by first trying:
evil-define-minor-mode-key 'normal 'vtable-header-mode-map
This lead to my keybindings being bound globally I think, and I could not use the 'h' and 'l' keys anymore at all! I had to restart emacs to get back to a working state, since I could not figure out a way to undo that.
I think the default behaviour should be to not bind a key if the mode map is invalid, what do you think?
And, is there is a way to restore the previous (default) keybindings after a mistake like this?

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

1 participant