[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: |
Drew Adams |
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 |
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.
- bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match, Spencer Baugh, 2023/11/15
- bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match,
Drew Adams <=
- bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match, Eli Zaretskii, 2023/11/16
- bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match, Stefan Monnier, 2023/11/16
- bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match, Spencer Baugh, 2023/11/16
- bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match, Stefan Monnier, 2023/11/16
- bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match, Stefan Monnier, 2023/11/17
- bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match, Spencer Baugh, 2023/11/17
- bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match, Stefan Monnier, 2023/11/17