Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH

From: Eli Zaretskii <[email-masked]>
Date: Wed, 23 Aug 2023 14:29:00 +0300

> Date: Tue, 22 Aug 2023 22:04:06 +0000
> From:  Heime via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 
> The completing-read function in Emacs allows you to create a simple 
> interactive prompt where the user can type to complete a string based
> on a given collection.  REQUIRE-MATCH determines whether the input 
> must match an item in the collection.
> 
> I find the design of completing-read as half-baked because INITIAL-VALUE 
> always works as an independent entity, always unaware of COLLECTION and 
> REQUIRE-MATCH

"Half-baked" is a harsh qualification.  I don't think it makes your
arguments more attractive or convincing, so my advice is to avoid such
derogatory epithets on issues which you have just recently learned and
about which you might still be missing quite a lot.

In any case, from where I stand, any significant changes in the API of
completing-read that are backward incompatible are out of the question
at this stage, and if this discussion leads to a conclusion that an
incompatible API could be useful, it will have to be a separate API.

> Thus, there exists no capabilities for possible interactions that could 
> influence how the completion works.
> 
> For instance, suppose you want INITIAL-INPUT to be takes from collection,
> and then have cycling start from a certain element after INITIAL-INPUT
> is displayed.  You can't.  The only thing you can do is select an option
> by automatically completing as much as possible.  
> 
> As for the cycling part, no proper functionality has been introduced.  INITIAL-INPUT
> is there just to insert something to the minibuffer without any regard to possible 
> restriction that one might want imposed on it and what gets displayed after INITIAL-VALUE.  

Adding Stefan.