[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUI
From: |
Stefan Monnier |
Subject: |
bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH |
Date: |
Wed, 23 Aug 2023 17:27:56 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> The normal/recommended call looks like:
>>
>> (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
>> (completing-read (format-prompt "Grapheme" "alpha")
>> cseq nil t nil nil "alpha"))
>>
>> [ Yes, it's a bit cumbersome: hysterical raisins :-( ] - Stefan
>
> Correct. The solution involves an unwieldy parameter configurations, and
> possibly
> using convoluted workarounds to achieve the desired behavior. This scenario
> implies
> that using the function as intended requires a level of effort,
> understanding, and
> manipulation that goes beyond direct usage.
Agreed. That argues in favor of introducing a new function. But that
new function would be so similar to `completing-read` that it will lead
to users wondering when to use which or why there are two unless we mark
`completing-read` as obsolete, which would in turn cause a lot of
warnings in a lot of packages and code churn.
So, we've been hesitating to make this change for a while, not sure
which choice is least bad.
But at this point do you consider the behavior of
(let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
(completing-read (format-prompt "Grapheme" "alpha")
cseq nil t nil nil "alpha"))
to be a good solution for your original problem?
[ BTW, to me the main benefit of a new function is that we could try
and make it so that the user can choose between a UI where the default
is not inserted in the initial minibuffer (as in the above code), or
one where it is (presumably pre-selected so you can delete it with
a simple DEL), as is common in many other applications. ]
Stefan
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Heime, 2023/08/22
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Eli Zaretskii, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Heime, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Stefan Monnier, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Heime, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Stefan Monnier, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Heime, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Stefan Monnier, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Heime, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH,
Stefan Monnier <=
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Drew Adams, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Gregory Heytings, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Stefan Monnier, 2023/08/23
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Gregory Heytings, 2023/08/24
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Heime, 2023/08/24
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Juri Linkov, 2023/08/25
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Stefan Monnier, 2023/08/24
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Gregory Heytings, 2023/08/26
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Eli Zaretskii, 2023/08/31
- bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH, Heime, 2023/08/24