From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: michael_heerdegen@web.de, Philip Kaludercic <philipk@posteo.net>,
68815@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#68815: Unexpected behavior with read-file-name and functional REQUIRE-MATCH argument
Date: Wed, 31 Jan 2024 11:33:31 -0800 [thread overview]
Message-ID: <875xz98975.fsf@breatheoutbreathe.in> (raw)
In-Reply-To: <jwvo7d18wql.fsf-monnier+emacs@gnu.org>
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> They should wrap PRED so as to pass the arg through
>>> `substitute-in-file-name` (or otherwise arrange to make sure PRED is
>>> called with an unquoted file name).
>> Thank you for the clear instructions! Does the attached patch do the
>> right thing?
>
> I theory, I think it's correct, yes.
>
> Whether the rest of the code handles it correctly OTOH is a different
> question. E.g. I have the impression that currently the
> `read-file-name-internal` completion table presumes the PRED argument
> takes an already-unquoted file name.
What other code would this patch affect?
I see that `completion--file-name-table' uses `substitute-in-file-name',
but I don't understand how this patch would affect completion table.
> Also, performance can be a concern (in many cases it makes more sense
> to make the caller pass the unquoted name rather than force it to quote
> the name only for PRED to unquote it).
The REQUIRE-MATCH function is only called once when the user attempts to
exit the minibuffer. Would you please explain the performance concern?
Thank you!
Joseph
next prev parent reply other threads:[~2024-01-31 19:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 9:00 bug#68815: Unexpected behavior with read-file-name and functional REQUIRE-MATCH argument Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-30 13:08 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-31 6:11 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-31 13:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-31 19:33 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-01-31 22:05 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-31 22:34 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-06 21:08 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-31 22:44 ` Stefan Kangas
2024-02-01 6:59 ` Eli Zaretskii
2024-02-01 7:04 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-01 7:39 ` Stefan Kangas
2024-02-01 7:59 ` Eli Zaretskii
2024-02-01 22:26 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875xz98975.fsf@breatheoutbreathe.in \
--to=bug-gnu-emacs@gnu.org \
--cc=68815@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joseph@breatheoutbreathe.in \
--cc=michael_heerdegen@web.de \
--cc=monnier@iro.umontreal.ca \
--cc=philipk@posteo.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.