4

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)
  (hydra/test/body))

(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?

  • 2
    This question should be upvoted if only for the title :-) – NickD Jan 9 '18 at 3:28
0

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 '16 at 20:34
  • i am not sure that will work; i think evil commands evaluate the motions themselves. – wouter bolsterlee Dec 14 '16 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.