Comments (8)
Transient doesn't allow entering any keys (including M-x
) other than the ones shown in the popup dialog.
You could try customising god-exempt-major-modes
(which currently includes magit-popup-mode
) and see if that helps.
from god-mode.
@darth10 Wait, but god-exempt-major-modes
will not allow me to control Magit popups with God, will it?
from god-mode.
Given the way transient works, I doubt it, but it's worth a shot.
I've tried it out, and that doesn't work.
A more important question would be whether God mode is actually needed to control transient UI popups.
IMHO the popups generally have single key bindings, so you wouldn't gain a lot through God mode.
from god-mode.
I think the main reason is accessibility. If someone uses God to avoid RSI, or recover from RSI, they might prefer to use ESC g
instead of C-g
(given that m
is M-
), and the like. Another reason is consistency; once one gets used to God, they do not need to context switch.
from god-mode.
That makes sense for C-g
vs. ESC g
, but for any other bindings, transient will print an Unbound suffix: ...
message.
Maybe some more examples of what you're trying to achieve would be helpful here.
Is it just ESC g
that you need?
from god-mode.
Here is a real-world example:
Working in Org, I wanted to export a document as an HTML fragment.
I hit c e
in God mode. Then, in the transient window:
- actual:
C-b C-v h H
- expected:
b v ESC h H
(noC-
, no RSI, no context switch)
More generally, these transient UIs can (and do) have C-
-bound shortcuts.
from god-mode.
That's a great example, but c e in org-mode
invokes org-export-dispatch
(ox.el
) which doesn't use transient 😄
Coming back to transient specifically, have you tried customising transient-map
to fit your workflow?
(define-key transient-map (kbd "<escape> g") 'transient-quit-one) ;; ESC g
I understand this is hard to do for every command you intend to use, but it's even harder to implement in God mode for every popup dialog mode that Emacs supports.
For example, for org-export-dispatch
, since the popup buffer uses read-char-exclusive
to read keys in org-export--dispatch-action
, there's nothing to hook God mode into for the purpose of adding modifier keys.
Transient on the other hand uses keymaps, so might be a bit more straightforward to implement.
Evil doesn't support transient UI buffers though (see emacs-evil/evil-magit#77).
Regardless, God mode needs be aware of every popup mode out there to have 100% consistency in all popups.
There was some potential in using set-transient-map
in #113, but that has been abandoned as it wouldn't support Magit.
I'll explore how this can be implemented cleanly, but it could take a while.
from god-mode.
have you tried customising
To be honest, customizing a single key binding is not what I am after. Instead, I would like to see a solution that would always work reliably in all buffers, with no exceptions.
from god-mode.
Related Issues (20)
- The function "my-god-mode-update-modeline" does not work reliably HOT 4
- Fix mode line suggested in README resulting in unreadable mode line HOT 3
- god-mode-all doesn't work in shell-mode HOT 4
- Keybinds recommendation
- Use Eldev HOT 1
- Add customisation to disable sticky `god-literal-key` HOT 13
- Idea: One-shot god-mode HOT 3
- [Idea] Disabling god mode after certain functions/key-presses HOT 5
- Have a discussion page for this project? HOT 1
- Extending god-mode system wide outside of Emacs HOT 13
- feature request: make describe-key work with god-mode HOT 10
- Make ESC just enter god-mode HOT 3
- Conflict with lispy-mode HOT 3
- Shifted key translation HOT 5
- Customize option to disable head icon showing on mode-line HOT 7
- god-mode doesn't work in *scratch* buffer
- god-mode does not work with "un-initialized" `projectile-mode-map` HOT 17
- binding for <C-tab> doesn't work in god-mode HOT 10
- Org-mode header navigation. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from god-mode.