Subject: bug#61286: 28.2; No visible candidates after toggle icomplete-vertical-mode

From: Fernando de Morais <[email-masked]>
Date: Sun, 05 Feb 2023 09:01:03 -0300

Hello Eli,

Eli Zaretskii <[email-masked]> writes:

> That's because icomplete-vertical-mode adds its own function to
> icomplete-minibuffer-setup-hook, but when you invoke C-v in the
> minibuffer, that's too late: you already entered the minibuffer, so
> the minibuffer is not set up as icomplete-vertical-mode expects.
>
> To solve this, bind C-v to a command that does what
> icomplete--vertical-minibuffer-setup does, in addition to turning on
> icomplete-vertical-mode, and then it will work as you expect.  Like
> this:
>
>   (defun icvsetup ()
>     (interactive)
>     (setq-local icomplete-hide-common-prefix nil
> 		icomplete-prospects-height 25
> 		redisplay-adhoc-scroll-in-resize-mini-windows nil)
>     (icomplete-vertical-mode))
>
>   (progn
>       (with-eval-after-load 'icomplete
> 	(define-key icomplete-minibuffer-map (kbd "C-v") #'icvsetup)
> 	(customize-set-variable 'icomplete-show-matches-on-no-input t))
>       (icomplete-mode))
>
> IOW, this is a cockpit error, not a bug in Emacs.

Thanks for explaining the behavior of the `icomplete-vertical-mode'
setup.  I'll adjust my configurations accordingly.  🤝

-- 
Regards,
Fernando de Morais.