Skip to content

Conversation

gguio
Copy link
Contributor

@gguio gguio commented Jun 26, 2025

What does it do?: right now when you type a command, let's say "a s", then god mode tries "C-a C-s" and that's it. This commit adds a fallback so if there is no binding for "C-a C-s" god mode will try for "C-a s" first and if there is no such a binding it will wait for next input.

Why I want it?: I have quite a lot of custom bindings like "C-a s" to choose persp or "C-a b i" to open ibuffer for a persp etc. Instead of remapping all my bindings (tedious) or type "b a SPC s" (b enters god mode on my setup), I though it would be cool to add fallback functionality as it is done in meow. Realization of the idea may have some flaws, I don't know how it works in meow exactly but for now it works for me.

Why I made a pr instead of just rewriting function in my init file?: I've already done that and I though that some other god-mode users may also find this functionality convenient.

Copy link
Collaborator

@darth10 darth10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @gguio.

Could you address my comment on the use of (t nil) clauses in cond forms?

Also, if it's not too much of a hassle, could you please add an ecukes test for this functionality?

@gguio
Copy link
Contributor Author

gguio commented Jun 26, 2025

Tried to add ecukes but test doesnt pass and I don't know why. Unfortunately I'm not proficient enough to debug this

@darth10
Copy link
Collaborator

darth10 commented Jun 26, 2025

Tried to add ecukes but test doesnt pass and I don't know why. Unfortunately I'm not proficient enough to debug this

That's all good. I can add those later.
Could you please revert the changes in features/support/env.el so we can merge this in for now?

@darth10 darth10 force-pushed the commands_fallback branch from 7dc7209 to d43e9a6 Compare July 14, 2025 23:37
@darth10 darth10 merged commit b09ad56 into emacsorphanage:master Jul 14, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants