all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Joseph Turner <joseph@breatheoutbreathe.in>
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 17:05:30 -0500	[thread overview]
Message-ID: <jwva5oltbdy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <875xz98975.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Wed, 31 Jan 2024 11:33:31 -0800")

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

Oh, sorry, I got confused.  Indeed, you're wrapping the REQUIRE-MATCH
arg, not the PRED arg I was ranting about.  Duh!

It would be OK for `emacs-29`, indeed.  Eli?  Stefan?  Any objection?

In the mean time, could you update the docs to clarify the behavior.
E.g. currently the docstring of `read-file-name` says:

    - a function, which will be called with the input as the
      argument.  [...]

which could be understood to suggest it really receives the contents of
the minibuffer (i.e. the quoted file name) rather than the value we'd
extract from it (the unquoted file name).


        Stefan






  reply	other threads:[~2024-01-31 22:05 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
2024-01-31 22:05         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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=jwva5oltbdy.fsf-monnier+emacs@gnu.org \
    --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.