GNU bug report logs - #77718
31.0.50; completion styles substring and flex are broken

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Thu, 10 Apr 2025 22:23:02 UTC

Severity: normal

Found in version 31.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 77718 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, 77718-done <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#77718: 31.0.50; completion styles substring and flex are broken
Date: Fri, 02 May 2025 10:30:15 +0200
On Thu, 01 May 2025 13:59:48 -0400 Spencer Baugh <sbaugh <at> janestreet.com> wrote:

> Stephen Berman <stephen.berman <at> gmx.net> writes:
>> For the other regression, here is a reproducer:
>>
>> 0. mkdir /tmp/{Test,retest}
>> 1. emacs -Q --eval "(custom-set-variables                        \
>>    '(completion-category-overrides '((file (styles substring)))) \
>>    '(read-file-name-completion-ignore-case t))"
>> 2. Type `C-x d /tmp/tes TAB': this completes to /tmp/test/
>> 3. Type TAB again: Emacs dings and shows "[no match]"
>>
>> If you repeat this recipe in emacs-30, then after the TAB in step 3, this
>> completion is shown: /tmp/Test/. and typing TAB again pops up the
>> *Completions* buffer displaying the two completions ../ and ./
>>
>> While the result in emacs-30 seems suboptimal, since it omits the
>> possible completion /tmp/retest/, still it's better than "[no match]".
>>
>> A workaround for both emacs-30 and master is to enter at step 2 `C-x d
>> /tmp/*tes TAB'. This shows the completion /tmp/*test/, then hitting TAB
>> again shows /tmp/*test/., and hitting TAB a third time pops up the
>> *Completions* buffer showing the four completions Test/../, Test/./,
>> retest/../, and retest/./
>>
>> Steve Berman
>
> Thanks for the prompt and detailed report.  Does the attached patch fix
> this issue for you?

Yes, with that patch my reproducer now gives the same results on master
as on emacs-30, i.e., the patch fixes the regression; thanks!

What about the other regression I mentioned?  Have you looked at that
and tried the fix for it I included?  If there are no objections to that
patch, I'd like to install it on master.  Or if there are problems with
it, I'd welcome a better fix.

Steve Berman




This bug report was last modified today.

Previous Next


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