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

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

bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUI


From: Heime
Subject: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH
Date: Wed, 23 Aug 2023 11:57:55 +0000





Sent with Proton Mail secure email.

------- Original Message -------
On Wednesday, August 23rd, 2023 at 11:29 PM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Tue, 22 Aug 2023 22:04:06 +0000
> > From: Heime via "Bug reports for GNU Emacs,
> > the Swiss army knife of text editors" bug-gnu-emacs@gnu.org
> > 
> > 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.

How can we describe it - primitive - then.  What lots am I missing about 
the behaviour of INITIAL-VALUE being independent about the state of the 
other variables ?  And that entries in collection always start from index
zero when cycling is used.  I have found its capability limited, having
actually used it.

Nevertheless, if I am missing on things, I would be glad to be corrected 
so that I can change my code accordingly. 
 
> 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.

I expected that as the functionalities get enhanced, some deficiencies
also get pumped up.  Giving more control to the programmer about what 
gets displayed in the minibuffer.


 
> > 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.
>





reply via email to

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