unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gregory Heytings <gregory@heytings.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Daniel Mendler <mail@daniel-mendler.de>,
	Eli Zaretskii <eliz@gnu.org>,
	60264@debbugs.gnu.org
Subject: bug#60264: 29.0.60; Strange file completion candidates for shadowed file paths
Date: Fri, 23 Dec 2022 17:38:08 +0000	[thread overview]
Message-ID: <fbbe4bba5ae19380dcde@heytings.org> (raw)
In-Reply-To: <jwv4jtmi5bw.fsf-monnier+emacs@gnu.org>


>>> 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.
>

It's a bug indeed, but a very old one, it's also present in Emacs 
24-25-26-27-28.






  reply	other threads:[~2022-12-23 17:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 20:57 bug#60264: 29.0.60; Strange file completion candidates for shadowed file paths Daniel Mendler
2022-12-23  7:13 ` Eli Zaretskii
2022-12-23  8:02   ` Daniel Mendler
2022-12-23 14:08   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-23 17:38     ` Gregory Heytings [this message]
2022-12-27  0:16       ` Gregory Heytings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fbbe4bba5ae19380dcde@heytings.org \
    --to=gregory@heytings.org \
    --cc=60264@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=mail@daniel-mendler.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).