-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve :pre-body hook semantics or add new hook #359
Comments
@abo-abo ping |
Please PR with the first approach. |
OK, thanks for prompt response. |
Arrange for :body-pre callback to be called in case a hydra gets activated by directly calling its head (e.g. `my-hydra/my-command`). fixes abo-abo#359
Arrange for :body-pre callback to be called in case a hydra gets activated by directly calling its head (e.g. `my-hydra/my-command`). fixes abo-abo#359
Arrange for :body-pre callback to be called in case a hydra gets activated by directly calling its head (e.g. `my-hydra/my-command`). fixes abo-abo#359
Thanks. I need an Emacs Copyright assignment for changes over 15 lines. Are you willing to get it? |
Yes, I am willing to get it. Already sent an email to GNU. Will keep you posted here. |
Assignment paperwork is done, here is the final signed document: https://pub.madand.net/gnu/Kmit.1505691.GNU.EMACS.pdf Please let me know if anything more needs to be done for this PR to be merged. |
@abo-abo ping |
Hi there, @abo-abo. |
@abo-abo ping |
@abo-abo |
The code from
:pre-body
hook is called only when a hydra is activated byhydra-something/body
command, but it is ignored when the hydra is activated implicitly by directly calling one of its heads (e.g.hydra-something/my-command
).In Spacemacs we have a thin abstraction on top of Hydra called a Transient State. And it is very common to activate transient state by directly calling one of its sub-commands (hydra heads), thus bypassing a call to
hydra-something/body
. I discovered this peculiarity of:pre-body
while investigating a Spacemacs issue syl20bnr/spacemacs#13176.I see 3 possible solutions for the above issue:
:pre-body
hook semantics, so it is also called when a hydra is activated by direct call to its head.:pre-hydra
) with the described semantics and let:pre-body
be as before.:pre
and:pre-body
hooks.If you choose 1 or 2, I am ready to make a PR.
Looking forward for your feedback @abo-abo.
The text was updated successfully, but these errors were encountered: