Minibuffer and input method
I really like typesetting with unicode math symbols. I use them in my notes, sometimes even in LaTeX as we get the unicode-math package.
To input unicode symbols in Emacs I use the unicode-math package and before that my own-grown input method. The input method is bound
to a buffer so when you switch (intentionally or not) to another buffer typing \alpha
will not result in a pretty α being rendered.
I can live with this. Except when switching to the minibuffer!
The minibuffer better be aware of my current input method! So be it!
(defun minibuffer-input-method-initialize ()
"Initialize input method from `minibuffer-selected-window'."
(let* ((win (minibuffer-selected-window))
(buf (and win (window-buffer win))))
(when buf
(activate-input-method (buffer-local-value 'current-input-method buf)))))
(use-package emacs
:ensure nil
...
:hook ((minibuffer-setup-hook . minibuffer-input-method-initialize)))