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?

  • 4
    This question should be upvoted if only for the title :-)
    – NickD
    Jan 9, 2018 at 3:28

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, privacy policy and cookie policy

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