GNU bug report logs - #60264
29.0.60; Strange file completion candidates for shadowed file paths

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Thu, 22 Dec 2022 20:59:02 UTC

Severity: normal

Found in version 29.0.60

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, 60264 <at> debbugs.gnu.org
Subject: bug#60264: 29.0.60; Strange file completion candidates for shadowed file paths
Date: Fri, 23 Dec 2022 09:08:37 -0500
>> 1. Start emacs -Q
>> 2. C-x C-f
>> 3. Delete the entire minibuffer input
>> 4. Enter /etc//s
>> 5. Press ?
>> 
>> You will see candidates like etc//sbin/. The candidates can get even
>> stranger. If you enter /etc//etc//etc/s then you will get candidates
>> like etc//etc//etc//sbin/. I can reproduce this bug on 27 and 29. I
>> haven't tried 28, but the issue should exist there too.
>
> I don't think it's a bug (look at what the minibuffer shows in those
> cases), perhaps just a minor aesthetic thing, but I'm adding Stefan in
> case he has comments.

He's right, that's a bug.  *Completions* normally only shows the list of
matching files in the final directory, so complete filenames.  It's even
more true here where the "excess" is not even really part of the file
name since it'll be stripped away by `substitute-in-file-name`.

E.g. if you replace "/etc//s" with "~//s" in the example, we show the
correct list.


        Stefan





This bug report was last modified 2 years and 171 days ago.

Previous Next


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