0
;; emacs -Q (emacs version 29.1, emacs-mac)

(package-initialize)
(unless package-archive-contents (package-refresh-contents))
(package-install-selected-packages)
(setq use-package-always-ensure t) 

(use-package evil :config (evil-mode 1))

(defun test () (interactive) (message "test"))
(define-minor-mode dummy-mode "" nil " Dummy" '())

(general-define-key
 :states 'normal
 :keymaps 'dummy-mode-map
 "C-j" #'test)

Here is what I did (make sure you never enter evil insert-state while doing this):

  • eval the above code
  • keeping evil-mode in normal-state, enter dummy-mode
  • press C-j (it doesn't run test, because the binding is not setup)
  • enter insert-state, and then return to normal-state
  • press C-j (now it does run test)

Could this be a bug? I would like my bindings to work without needing to enter insert-state.

1
  • Sounds like a bug, although unclear if it's in general.el or in evil. But unless you can prove that it's a bug in Evil, I think it will likely be closed because outwardly it looks like a bug in the other mode (even if it's actually not — to prove you have to create a minimal testcase that uses evil-only functional and shows the bug). So I suggest you to start by reporting to general.el (or create a min. testcase for Evil). Idk what else to say here… Unless on this post stumbles upon a general.el's maintainer (which is unlikely), I don't think there's anything else to answer here.
    – Hi-Angel
    Feb 13 at 19:45

0

Your Answer

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

Browse other questions tagged or ask your own question.