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: Tue, 27 Dec 2022 00:16:13 +0000	[thread overview]
Message-ID: <314db4a90e6f7bf32684@heytings.org> (raw)
In-Reply-To: <fbbe4bba5ae19380dcde@heytings.org>


This bug was an opportunity to take another journey in the completion 
routines.  Call me a masochist.

The bug here (with the "C-x C-f //etc//s TAB" recipe) is that, in 
completion--twq-all, qboundary is set to 1 instead of 7, because 
(completion--sifn-requote 1 "//etc//s") returns 1 although 
(completion--sifn-requote 1 "~/etc//s") returns 7, because 
(string-prefix-p "/" (substitute-in-file-name "~/")) is nil although 
(string-prefix-p "/" (substitute-in-file-name "//")) is t.

And now I'm lost, because I don't see any safe way to correct that bug. 
completion--sifn-requote seems to work "as designed", and introducing a 
specific treatment for this case would break the "treat 
substitute-in-file-name as a black box as much as possible" rule. 
Perhaps the fix should go into completion--twq-all instead, but again I 
don't see how to do that in a safe way.

Stefan, do you see anything in your legendary crystal ball?






      reply	other threads:[~2022-12-27  0:16 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
2022-12-27  0:16       ` Gregory Heytings [this message]

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=314db4a90e6f7bf32684@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).