Subject: Re: bug#77546: Acknowledgement (Regression in defaults: Re: Enhance 'icomplete-vertical-mode' customization options.)

From: Rahul Martim Juliato <[email-masked]>
Date: Mon, 07 Apr 2025 19:44:06 -0300

João Távora <[email-masked]> writes:
>
> Ican take a look at this, but please give me a minimal Emacs -Q
> recipe to see this icomplete-in-buffer vertical thing working in

Sure!

I tried to shave it down to basics. Still a bit long though:

emacs -Q \
  --eval "(setq tab-always-indent 'complete)" \
  --eval "(setq icomplete-in-buffer t)" \
  --eval "(setq icomplete-prospects-height 10)" \
  --eval "(setq icomplete-scroll t)" \
  --eval "(setq icomplete-vertical-in-buffer-adjust-list t)" \
  --eval "(setq icomplete-vertical-render-prefix-indicator t)" \
  --eval "(setq icomplete-vertical-selected-prefix-indicator \"> \")" \
  --eval "(setq icomplete-vertical-unselected-prefix-indicator \"  \")" \
  --eval "(icomplete-mode 1)" \
  --eval "(icomplete-vertical-mode 1)" \
  --eval "(define-key icomplete-minibuffer-map (kbd \"C-n\") #'icomplete-forward-completions)" \
  --eval "(define-key icomplete-minibuffer-map (kbd \"C-p\") #'icomplete-backward-completions)" \
  --eval "(advice-add #'completion-at-point :after #'minibuffer-hide-completions)"

I use this, with tab tab to complete and C-p / C-n
to scroll the list.

You could omit this if you use C-M-i:
  --eval "(setq tab-always-indent 'copmplete)"

And this, as they are new options provided by the patch and these are defaults:
  --eval "(setq icomplete-vertical-selected-prefix-indicator \"> \")" \
  --eval "(setq icomplete-vertical-unselected-prefix-indicator \"  \")" \  

This defaults to 2, and will show only one candidate as you described,
change at will:
  --eval "(setq icomplete-prospects-height 10)" \

-- 

Rahul