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


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 77718 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, stephen.berman <at> gmx.net
Subject: Re: bug#77718: 31.0.50; completion styles substring and flex are
 broken
Date: Tue, 15 Apr 2025 17:50:44 -0400
>> Why?  `substitute-in-file-name` presumably already takes care of that:
>>
>>     (substitute-in-file-name "/foo/$NOTAVAR/bar")
>>     => "/foo/$NOTAVAR/bar"
>
> To support completing file names that look like environment variables,
> without the need to quote $ by duplicating it.

I don't understand: the example I show above suggests you can do that
without doing anything special.

[ Also, I'm not sure it's worth the trouble anyway: dollars in file names
  are fairly rare, so having to double them in those rare cases where they
  occur is not a big deal.  In any case, it seems orthogonal to the
  problem at hand.  ]

>>> Tests are updated: we no longer duplicate $s in file names,
>>> since that's not necessary.
>> AFAIK it is still needed for the (null action) case.
> Why would that be?  I believe quoting $ should no longer be necessary.

Say I have a file

    ~/tmp/foo$HOME.txt

and I do

    C-x C-f ~/tmp/foo TAB

AFAIK it needs to complete to

    ~/tmp/foo$$HOME.txt

otherwise the file name returned by `read-file-name` will be

    ~/tmp/foo/home/monnier.txt

> Indeed, I will, just avoiding that for now while iterating on the patch.

+1


        Stefan





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.