[Top][All Lists]

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

Re: [External] : Re: completing-read depricated initial-input

From: Emanuel Berg
Subject: Re: [External] : Re: completing-read depricated initial-input
Date: Mon, 27 Jun 2022 00:42:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Drew Adams wrote:

>>>>> Automatic insertion of the default value
>>>>> can be useful and preferred by some users.
>>>>> Let users choose.
>>>> Make that an option
>>> I detailed just such an option.
>> But then you'd need initial-input even less?
> I've already explained that a default value is something
> different from an initial-input value - they have different
> behavior and thus different uses - and why that remains true
> even if someone chooses to automatically insert the
> default value.
> And I posted some of the doc, which makes clear
> that the option values that insert the default
> value do so only when the INIT-VALUE is a no-op:
>   When [the option] is non-nil and non-t,
>   and the initial-input argument is nil or "", 
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
>   the default value can be inserted into the
>   minibuffer as the initial input.
> E.g., if you set the option to `insert-end' then
> the default value is inserted (with point after
> it) *ONLY IF* there's no INIT-VALUE to insert.
> This inserts the default value, `jjj':
> (completing-read "q: " '(aaa bbb ccc ddd)
>                  nil nil "" nil "jjj")
>                           ^       ^
>                         init    default

Yeah but you see yourself how that looks? You a collector of
nils and empty strings now?

The suggestion where you can have a function to do whatever is
the best ...

Meanwhile the standard interface will be simplified and
unclear concepts with unclear purposes will be pruned as well
as the necessity to have all those nils, empty strings
etc everywhere just to do a basic thing.

underground experts united

reply via email to

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