Skip to content
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

Magit is perhaps overly insistent about some keybindings #4902

Closed
dabrahams opened this issue Mar 12, 2023 · 3 comments
Closed

Magit is perhaps overly insistent about some keybindings #4902

dabrahams opened this issue Mar 12, 2023 · 3 comments
Labels
support User needs some help

Comments

@dabrahams
Copy link
Contributor

I'm using the technique shown here to globally bind C-return to other-window. It uses emulation-mode-map-alists to get the absolute highest precedence for the keybinding. As far as I can tell that should work, but if I put the cursor on a diff hunk in the magit status buffer and hit C-return, I get magit-diff-visit-worktree-file (found in magit-hunk-section-map). I don't see any guidance about how to change that in the manual. Is there a way?

@tarsius
Copy link
Member

tarsius commented Mar 12, 2023

It uses emulation-mode-map-alists to get the absolute highest precedence for the keybinding.

If you want that, you have to use overriding-terminal-local-map instead, as shown here: https://www.gnu.org/software/emacs/manual/html_node/elisp/Searching-Keymaps.html.

@dabrahams
Copy link
Contributor Author

Thanks for the hint!

@dabrahams
Copy link
Contributor Author

For the record, setting bindings in overriding-terminal-local-map works for a while, but then something (I'm not sure what) mysteriously sets it to nil.

@tarsius tarsius added the support User needs some help label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support User needs some help
Projects
None yet
Development

No branches or pull requests

2 participants