hydra
hydra copied to clipboard
Cannot use SPC as a head ??
I am a complete newbie with hydra, so I must be doing something wrong. Here is my definition:
(defhydra itz-move-hydra ()
"move and select"
("SPC" set-mark-command)
("." forward-sentence)
("," backward-sentence)
("]" forward-sexp)
("[" backward-sexp)
("<return>" forward-paragraph)
(";" backward-paragraph)
("b" backward-word)
("l" forward-char)
("h" backward-char)
("j" next-line)
("k" previous-line)
("n" forward-list)
("p" backward-list)
("u" backward-up-list)
("w" forward-word)
("x" exchange-point-and-mark)
("q" nil))
When I bind this to a key, everything works - except the SPC
. Hitting space just inserts a space in the buffer and slays the hydra, as if the binding didn't exist.
I see that SPC is used in one of the examples, so it is at least expected to work ?!
This works for me with <SPC>
This works for me with
<SPC>
What version of emacs, @DieracDelta ?
I think I tried <SPC>
too ... and anyway, when I bind SPC
to any other command, it works OK, so I suspect this is something special about set-mark-command
.
I'm on emacs 26.3. Turns out both SPC
and <SPC>
work for me. Not too sure where your problem lies. Maybe something else in your config is messing things up? I'm also drawing the package from ELPA on nixos.
@nobrowser Your definition works as expected for me. It's likely a config issue.
You can test your hydra without config by doing:
git clone https://github.com/abo-abo/hydra/
cd hydra
make run
If it works, you can comment out parts of your config until it works as well.