Subject: Re: bug#78944: 31.0.50; Minibuffer completion

From: Stefan Monnier <[email-masked]>
Date: Tue, 22 Jul 2025 20:23:08 -0400

>> Maybe the patch below?  It doesn't actually fix the problem, but with
>> Dani's recipe it adds a message
>>
>>     Switched from style ‘partial-completion’ back to ‘basic’
>>
>> at the end of the minibuffer, to try and explain what's going on.
>
> Could we please avoid adding side-effects like message printing to the
> functions `completion-all-completions`, `completion-try-completion' and
> the underlying `completion--nth-completion`?

These are supposed to be "pure", indeed, so I agree it's not ideal.
The information is only available in there and there's no convenient
"place" to stash that info in the return value.

> I'd lean to not adding complications, or side-effects to this API.

You might be right, but I'm not sure yet.

> Messages are better printed on a higher level, on the level of
> completion commands.

Clearly, yes, but I don't know how to do that here.

> In case the message is really needed at least guard it behind
> an option?

Do you have some concrete case where it gets in the way?

        Stefan