You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rigpa maps the Enter key to entering a lower level in the current editing tower, overriding the handling in the underlying major mode. In many major modes, there is a more natural interpretation of the Enter key provided by evil-mode or evil-collection for that mode -- e.g. typically non-editing buffers like popups, dired buffers, Magit buffers, etc, where we would like Enter to "visit" or "choose" something. To restore this preferred handling of the Enter key, Rigpa currently manuallyremaps the Enter key to the preferred command in known cases - in other words, overriding its own override of the keybinding for that major mode - so that the Enter key behaves the way we expect in such buffers.
This is not a real solution. Besides requiring manual work to add these double-overrides (and needing to know about such cases), it also doesn't always work. In Magit, for instance, the same keybindings in different parts of the buffer seem to be bound to different commands (e.g. in the stashes section vs the commits section). I'm not sure how that is accomplished, but it means that a simple manual double-override is not possible here, and Enter does not do what we expect in Magit (workaround: temporarily go to Emacs state (e.g. via C-z) and then hit Enter).
In principle, it would be great if we could simply defer to a lower-priority keymap. That is, in resolving a keybinding, Emacs has a prioritized list of keymaps, and it consults them in order until a binding for the input keys is found. It would be great if we could say something like "if major mode = Magit, then I abstain from specifying the binding - please continue consulting other keymaps". Otherwise, is there another standard way in Emacs to do something like this?
The text was updated successfully, but these errors were encountered:
Rigpa maps the Enter key to entering a lower level in the current editing tower, overriding the handling in the underlying major mode. In many major modes, there is a more natural interpretation of the Enter key provided by
evil-mode
orevil-collection
for that mode -- e.g. typically non-editing buffers like popups, dired buffers, Magit buffers, etc, where we would like Enter to "visit" or "choose" something. To restore this preferred handling of the Enter key, Rigpa currently manually remaps the Enter key to the preferred command in known cases - in other words, overriding its own override of the keybinding for that major mode - so that the Enter key behaves the way we expect in such buffers.This is not a real solution. Besides requiring manual work to add these double-overrides (and needing to know about such cases), it also doesn't always work. In Magit, for instance, the same keybindings in different parts of the buffer seem to be bound to different commands (e.g. in the stashes section vs the commits section). I'm not sure how that is accomplished, but it means that a simple manual double-override is not possible here, and Enter does not do what we expect in Magit (workaround: temporarily go to Emacs state (e.g. via
C-z
) and then hit Enter).In principle, it would be great if we could simply defer to a lower-priority keymap. That is, in resolving a keybinding, Emacs has a prioritized list of keymaps, and it consults them in order until a binding for the input keys is found. It would be great if we could say something like "if major mode = Magit, then I abstain from specifying the binding - please continue consulting other keymaps". Otherwise, is there another standard way in Emacs to do something like this?
The text was updated successfully, but these errors were encountered: