From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 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 07:38:40 +0200 [thread overview]
Message-ID: <8334x6qmu7.fsf@gnu.org> (raw)
In-Reply-To: <ierr0kqu5lg.fsf@igm-qws-u22796a.mail-host-address-is-not-set> (message from Spencer Baugh on Wed, 15 Nov 2023 15:25:15 -0500)
> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Wed, 15 Nov 2023 15:25:15 -0500
>
>
> 1. emacs -Q
> 2. (completing-read ":" '("foo") nil t '("foobar" . 3))
> 3. RET
> 4. See "foobar", i.e. "foobar" was accepted as input despite not being
> in the collection we're completing over.
>
> I believe this is because
> (completion-try-completion "foobar" '("foo") nil 3)
> returns t, which completion--do-completion interprets as meaning that
> the input string is an "Exact and unique match."
>
> That t is returned because
> (completion-emacs22-try-completion "foobar" '("foo") nil 3)
> returns t.
>
> So perhaps completion--do-completion is wrong in assuming that a t
> return value from completion-try-completion indicates an "Exact and
> unique match."?
>
> Or perhaps completion-emacs22-try-completion is violating the spec of
> completion-try-completion, and should be returning nil in this case?
Adding Stefan to the discussion, as he probably has an opinion about
this.
next prev parent reply other threads:[~2023-11-16 5:38 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
2023-11-16 14:47 ` Spencer Baugh
2023-11-16 17:13 ` Drew Adams
2023-11-16 5:38 ` Eli Zaretskii [this message]
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=8334x6qmu7.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=67210@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--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.