bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes r


From: Spencer Baugh
Subject: bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match
Date: Thu, 16 Nov 2023 09:47:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Drew Adams <drew.adams@oracle.com> writes:
> 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.

To be clear, this happens even without setting INIT, I just included
that to make the reproduction clearer.  Sorry for the ambguity.

i.e. doing

1. (completing-read ":" '("foo") nil t)
2. type in "foobar"
3. move point back to after "foo"
4. RET

also returns "foobar"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]