I'm trying to use a hydra to dispatch among a selection of motions. See this minimal example:

(defhydra hydra/test (:color blue)
  "This is a test hydra"
  ("n" evil-next-line))

(evil-define-motion hydra/test/motion-proxy (&rest args)

(global-set-key (kbd "M-RET") #'hydra/test/motion-proxy)

Unfortunately, this motion does not compose with evil operators. For example, d M-RET n does move to the next line, but does not delete any text.

How can I work around this?

  • 5
    This question should be upvoted if only for the title :-)
    – NickD
    Jan 9, 2018 at 3:28
  • If you are interested, the key-guide library can be used to list available options after pressing some evil operator key. Unfortunately, I did not find time to add more explanations after (partly) creating the 'development notes' (i.e. the github README). The difference with which-key is that you can custom 'design' the pop-up. A difference with hydra is that hydra uses its own keymap. Apr 13, 2023 at 18:22

1 Answer 1


unfortunately i think this cannot work. evil commands like d (evil-delete) manually read a key sequence to obtain a motion, bypassing emacs' normal key maps.

  • So what you're saying is that I'd need to advise `evil-delete‘ to make it work. :P
    – PythonNut
    Dec 14, 2016 at 20:34
  • i am not sure that will work; i think evil commands evaluate the motions themselves. Dec 14, 2016 at 20:50

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.