tumashu / ivy-posframe

ivy-posframe is a ivy extension, which let ivy use posframe to show its candidate menu, ivy-posframe is a **GNU ELPA** package.
414 stars 26 forks source link

it doesn't work well with postfix input-methods like german-postfix #113

Open spiderbit opened 3 years ago

spiderbit commented 3 years ago

german-postfix generates german umlauts with letter combinations. So the ae creates the a with dots the same with ue, oe and sz.

Now ivy and ido when I press the first button and basically all of emacs just shows the first letter when I type it so that is expected behavior no confusion about that, but somehow if I press M-x with ivy-posframe activated it don't shows the first letter till I press the next letter, which then leads to confusion (did I hit the letter or not, you get no response from typing), I thought short that ivy is so processor-hungry that it lags on my old netbook because of it.

Steps to reproduce:

  1. have ivy and ivy-posframe configured and active
  2. M-x set-input-method german-postfix
  3. M-x a

Expected behavior: The a with underline appears at the prompt.

Actual behavior: No a appears, till you enter another letter.

tumashu commented 3 years ago

try (setq ivy-posframe-hide-minibuffer nil) may help you,

let ivy-posframe work well with quail seem to not a simple task...

spiderbit commented 3 years ago

Well but that is no real solution, not even a workaround, because it only shows then the letters correct in the minibuffer but not in the box.

Can you tell me the hook name then I could deactivate the input method in that window as workaround? Which still would not be ideal because this box comes also for user input so if I have some org-capture or something and want to insert a german word, I would have to manually change the input back or something, but it would be better than now.

spiderbit commented 3 years ago

Ok with minibuffer-setup-hook you can deactivate input method, that's a good starting point / workaround. Still not ideal because in the actual minibuffer it supports umlauts and if I want to create a file with find-file as example with a umlaut I can't type it.

tumashu commented 3 years ago
(defun my-quail-self-insert-command (func)
  (funcall func)
  (when (and (minibufferp)
             ivy-posframe-mode)
    (ivy-posframe--add-prompt 'ignore)))

(advice-add 'quail-self-insert-command :around #'my-quail-self-insert-command)

maybe useful .... I do not know.