From: Drew Adams <drew.adams@oracle.com>
To: Spencer Baugh <sbaugh@janestreet.com>,
"67210@debbugs.gnu.org" <67210@debbugs.gnu.org>
Subject: bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match
Date: Thu, 16 Nov 2023 01:29:19 +0000 [thread overview]
Message-ID: <SJ0PR10MB5488787D68BC75375418ACADF3B0A@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <ierr0kqu5lg.fsf@igm-qws-u22796a.mail-host-address-is-not-set>
Good question! Dunno whether it's ever come
up before.
___
FWIW, this is the behavior back at least as
far as Emacs 20. It may _always_ have been
the behavior for `completing-read'; dunno.
__
(FWIW2, it's NOT the Icicles behavior, with
Icicle mode turned on. In that case the
initial input doesn't match any candidates,
and since REQUIRE is non-nil RET won't exit
the minibuffer.
I don't recall why I chose that the behavior,
or even whether I did so consciously, but it
does make sense to me.)
__
FWIW3. ("foobar" . 3) is a reasonable INIT
value in that example only in the sense that
a user _could_ hit `C-k' and then `RET', to
use the input "foo".
Why might that be done? Far-fetched, no
doubt, but trailing text after point (which
is after "foo") could perhaps serve some
other purpose in some context, e.g., as a
tip or emphasis or instructions or ...
But even in such a context, I can't see why
the input of "foobar" would be accepted.
(But see FWIW4, next, for an alternative POV.)
___
FWIW4, I can see an argument being made that
when you use the INIT value you're no longer
completing - regardless of how you might edit
that text - so args REQUIRE and COLLECTION
have no significance.
That's not the way I'd like to look at it, but
I can imagine that it might be the original
rationale, or at least it might be argued today.
next prev parent reply other threads:[~2023-11-16 1:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 20:25 bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match Spencer Baugh
2023-11-16 1:29 ` Drew Adams [this message]
2023-11-16 14:47 ` Spencer Baugh
2023-11-16 17:13 ` Drew Adams
2023-11-16 5:38 ` Eli Zaretskii
2023-11-16 15:04 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 16:36 ` Spencer Baugh
2023-11-16 18:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-17 16:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-17 17:18 ` Spencer Baugh
2023-11-17 17:35 ` Stefan Monnier 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=SJ0PR10MB5488787D68BC75375418ACADF3B0A@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=67210@debbugs.gnu.org \
--cc=sbaugh@janestreet.com \
/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.