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
Conflict [uim-mode] [latex-mode]: Prefix key C-c overshadowed. #539
Comments
You have a pretty detailed description but you left out how to install (and where to get) uim-mode. Is it the one from here? The installation looks pretty complicated, is it possible you can show the problem without uim-mode? |
On arch linux uim-el is packaged directly in the official uim package and on ubuntu there seems to be a uim-el package. |
I installed The problem is likely related to the way uim-mode defines key bindings (uim-keymap.el): ((and uim-emacs (>= emacs-major-version 22)) ;;; GNU Emacs-22 or later
(define-key uim-mode-map [t] 'uim-process-input)
(define-key uim-preedit-map [t] 'uim-process-input)
(define-key uim-mode-map [27] 'uim-process-input) The I don't see a real need for yasnippet to put bindings on |
Yeah, using it without prior knowledge would be difficult. The settings including keybindings would have been done outside of emacs (uim-pref-gtk3 is available in my setup), though enabling the minor mode is probably enough. But i don't even understand how emacs would not see the keybinding. Or more specifically how the grabbed input via |
This is tricky indeed, but how else can you implement snippet keybindings that activate/deactivate themselves according to |
I see 2 possibilities:
Oops, the buffer local value isn't used for the minor mode keymap. Need to think a bit more... |
I've implemented something like this. Instead of a buffer local variable put all the keybindings in the map and |
Ok, when replicating the bug as described above with the minor-key branch @npostavs I get the following behaviour:
It seems, that the way uim grabs the input is quite invasive. |
@Araeos is this fixed in uim-el now? |
Reproduction
uim (universal input method) is required for reproduction.
Copy this custom snippet (notice the binding) in /tmp/yasnippet-bug/yasnippets/latex-mode/jd
Then executing this (in this order at least) yields the overshadowing of many keybindings.
Description
According to my little understanding uim tries to read all input using its keymap (uim-mode keymap) in minor-mode-map-alist in order to send some key to the uim process. In this way I can use shortcuts for uim as well as emacs keybindings like C-c C-c(in Auctex).
This itself works well, but combined with the mentioned yasnippet it stops working. To be exact, all key sequences with the prefix key C-c stop working as if they were not defined. This includes all Auctex bindings beginning with C-c.
Now I gathered from the code that uim uses the minor-mode-map-alist while yasnippet uses emulation-mode-map-alists and since the snippet (above) uses the prefix key C-c it seems to overshadow all global and minor mode key bindings.
Observations
I am know this is quite specific and could very well not be a bug, but I hope this helps anyone.
The text was updated successfully, but these errors were encountered: