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

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

Re: completing-read depricated initial-input


From: carlmarcos
Subject: Re: completing-read depricated initial-input
Date: Tue, 21 Jun 2022 11:51:07 +0200 (CEST)

Jun 21, 2022, 07:56 by help-gnu-emacs@gnu.org:

>
> Have been reading the docstring of `completing-read`.
>
> (completing-read PROMPT COLLECTION &optional PREDICATE REQUIRE-MATCH
> INITIAL-INPUT HIST DEF INHERIT-INPUT-METHOD)
>
> INITIAL-INPUT states that this feature is deprecated - it is best to pass nil
> for INITIAL-INPUT and supply the default value DEF instead.  
>
> When do you plan to remove the `INITIAL-INPUT` argument from 
> `completing-read`?
>
I differ with the plan to depricate `INITIAL-INPUT`.  This is because it is 
useful to immediately
show a value when using `completing-read`.  New users do not usually know many 
keybinding sequences such as `M-n` to show `DEF`.  Besides the utility of 
having an initial value that is different from a default.

Particularly when using `t` for `REQUIRE-MATCH`, it is useful to already have 
an initial value.  An alternative is to allow the first entry in the sequence 
to show up, but then continue with the second element in the list when the user 
wants to traverse through the remaining options.

For cases where `REQUIRE-MATCH` is `nil`, it is reasonable not to put anything 
in the user entry of `complete-read`.
 


reply via email to

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