Subject: Re: bug#73820: 31.0.50; [Feature Request]how to hide *Completions* buffer when icomplete-in-buffer is not nil

From: Eshel Yaron <[email-masked]>
Date: Wed, 16 Oct 2024 09:37:19 +0200

Hi,

Eli Zaretskii <[email-masked]> writes:

>> Cc: [email-masked], "[email-masked]" <[email-masked]>
>> From: Sean Whitton <[email-masked]>
>> Date: Wed, 16 Oct 2024 09:23:52 +0800
>> 
>> On Tue 15 Oct 2024 at 07:43pm +03, Juri Linkov wrote:
>> 
>> >> I would like to use `icomplete-mode`/`icomplete-vertical-mode` with
>> >>
>> >>  (setq icomplete-in-buffer t)
>> >>
>> >>  but I don't want to display the `*Completions*` buffer.
>> >>
>> >>  How about adding a new value for `completion-auto-help` to achieve this?
>> >
>> > As suggested in https://debbugs.gnu.org/67661#114
>> > this is currently achievable by
>> >
>> >   (advice-add 'completion-at-point :after #'minibuffer-hide-completions)
>> >
>> > But adding a new option is also an option.
>> 
>> Right.  This is also stated in NEWS.
>
> If this is important enough, it should be in the doc string.  So I've
> now added this tip to the doc string, and I'm therefore closing this
> bug.

Hmm, I'm not sure that that's really such a good recommendation.  Adding
this advice breaks M-: completion, for example.  I think a more refined
solution is due, if this is to be considered a supported use case...
Namely, I suggest implementing icomplete-in-buffer as a
completion-in-region-function, like some other in-buffer completion
frontends are implemented.

Best,

Eshel