GNU bug report logs - #78944
31.0.50; Minibuffer completion

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Wed, 2 Jul 2025 17:43:01 UTC

Severity: normal

Found in version 31.0.50

Full log


Message #11 received at 78944 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78944 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo <at> gmail.com>
Subject: Re: bug#78944: 31.0.50; Minibuffer completion
Date: Wed, 02 Jul 2025 16:15:50 -0400
>> Starting from 'emacs -Q', type this:
>>   M-x a u - f i - m o <TAB>
>> 
>> When I do it here, the minibuffer text completes to 'auto-fil-mode'
>> and the cursor goes just after the 'l'.
>> 
>> But, if I type '?' at that point, I see that 'auto-fill-mode' is the
>> only completion alternative available.  And '<TAB>' picks it as
>> expected.
>> 
>> So, why didn't the initial <TAB> pick the only possible completion alternative?

Because, between the two don't use the same completion style.

From `au-fi-mo[]`, the `basic` completion style finds no match, so we
fallback on the `partial-completion` style which finds 2 matches
(`auto-fill-mode` and `auto-image-file-mode`).

From `auto-fil[]-mode`, OTOH, the `basic` completion style does find
a match (`auto-fill-mode`), so we don't fallback on
`partial-completion`.

If you were looking for `auto-fill-mode`, this misfeature of the
`completion-styles` system is harmless (tho silly), but if you were
looking for `auto-image-file-mode` it can be a lot more annoying.
It's been with us since Emacs-24 so in practice it doesn't seem to be
too often problematic, but ... yeah ...

That's the best way I could find to satisfy the requirement from Richard
that prefix completion should work as before while at the same time
satisfying my requirement that `partial-completion` be enabled by default.


        Stefan





This bug report was last modified 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.