Closed jhonnyseven closed 9 years ago
Opening B doesn't cause a switch-frame event
This might be an Emacs bug.
Adding hydra-disable or hydra-keyboard-quit to server-switch-hook don't exit the hydra in A, but at least you can use B normally.
None of the hooks work for me. But C-g does, which is the typical user's reaction when something doesn't work. So we're a little inconvenienced, but it's not a disaster.
I'd rather not mess with the hooks, but if you find one that works, I can add it to hydra-default-pre
.
C-g has the same effect as hydra-disable
in server-switch-hook
here.
The behaviour is that the hydra hint in A disappears and non-head keys work normally. However hydra-head keys re-enter the hydra.
Is there some way to exit the hydra for good other than using one of the exit heads?
C-g has the same effect as hydra-disable in server-switch-hook here.
Not for Emacs 24.5.2. I have a complete exit with C-g, but zero effect for server-switch-hook
.
Is there some way to exit the hydra for good other than using one of the exit heads?
C-g should always exit any hydra for good.
24.4.1 here.
C-g in the hydra's frame exits the hydra. C-g in other frames does what I described above, i.e. hydra comes back when I hit some head-key.
PS. How do I get that pretty C-g markup? Couldn't find it in the help.
24.4.1 here.
OK, I see what you mean and I can reproduce it on 24.5.2 as well.
C-g in the hydra's frame exits the hydra. C-g in other frames does what I described above, i.e. hydra comes back when I hit some head-key.
C-g sets overriding-terminal-local-map
to nil, which is how you turn off a hydra.
But this variable is terminal-local.
I didn't even know about this type of var before. If I set it in one terminal, it doesn't change in the other.
setq-default
doesn't work. So I don't really know what can be done at the moment.
PS. How do I get that pretty C-g markup? Couldn't find it in the help.
Like this:
<kbd>C-g</kbd>
Pressing any key in the new terminal should now cancel the hydra permanently.
This is while using emacs in terminal. To reproduce:
An amaranth Hydra can only exit through a blue head
Opening B doesn't cause a
switch-frame
event, so that's why that handler doesn't exit the hydra. There are however at least two hooks that get run when B is opened,server-visit-hook
andserver-switch-hook
.Adding
hydra-disable
orhydra-keyboard-quit
toserver-switch-hook
don't exit the hydra in A, but at least you can use B normally.