I’m relatively new to Emacs, I’ve been using it to a year now, manly for python/css/html. Just recently after Prot’s video about language input change I decided to use toggle-inpu-method, so I set it to
(keymap-global-set "M-o" 'toggle-input-method)
to switch between English and Bulgarian layouts.
However this doesn’t work in search (ivy/swiper) i.e. the changed lang input is not effective there (in the search field). My question is how to make the toggled layout work in, I guess, mini buffer?
Apologies for not speaking in exact Emacs jargon, I’m still learning
The first check here is usually to use C-h k in the same situation, e.g., M-x C-h k M-o. This will tell you that M-o is suddenly bound to another action, namely ivy-dispatching-done. Why? Because ivy-mode uses another keymap while you’re in the minibuffer.
You can check the current bindings via C-h b (describe-bindings), so in this case: M-x C-h b. This will show that the minibuffer-map contains M-o. The actual map in action is the ivy-minibuffer-map.
To add the behavior to ivy too, you would have to use:
Note that the same might hold for swiper, I’m not sure about that, as I’m a happy vertico+consult user and haven’t used Ivy and its ecosystem for quite some time
Thank you, that works nice Not sure how layout states are preserved (or not) but if I have the second layout switched for the main buffer and go to mini buffer (ivy), the layout state which I’m currently in is not transferred (preserved) for the mini buffer. Is this by design?