0

evil-collection is mostly quite useful - but occasionally the default settings shadow my global bindings and I seem to need to restart emacs to remove the binding.

I bit up against this problem with the bindings for gnus.

The problematic binding is

 ","         'gnus-summary-best-unread-article

Set by

  (evil-collection-define-key 'normal 'gnus-summary-mode-map

in evil-collection-gnus-setup.

How can I get rid of this binding without restarting emacs?

What I've tried

I tried both these function calls:

(evil-define-minor-mode-key 'normal 'gnus-summary-mode-map "," nil)
(evil-define-key 'normal 'gnus-summary-mode-map " " nil)

1 Answer 1

1

I use this to re-map Evil collection keys, this is just a small snippet:

(with-eval-after-load 'evil-collection
  (evil-collection-define-key 'normal 'gnus-summary-mode-map
    "," nil))

To get rid of the key binding without restarting Emacs, just evaluate the evil-collection-define-key part.

1
  • Thanks. This answer gave me enough certainty to some more digging. In the case of gnus there were a few different modes. So I did M-x eval-expression major-mode and found out that I needed to define a binding in gnus-group-mode-map.
    – Att Righ
    Mar 18, 2023 at 23:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.