[Top][All Lists]

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

Re: completing-read depricated initial-input

From: Emanuel Berg
Subject: Re: completing-read depricated initial-input
Date: Thu, 23 Jun 2022 12:10:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Tassilo Horn wrote:

>>>>> I agree that there are cases where INITIAL-INPUT still
>>>>> has its place, but as I said, I remember the reason for
>>>>> phasing it out was different than stylistic preferences.
>>>> What other reason can there be? [...]
>>> Improved user experience?
>> Why/how so?
> You have to delete the initial input if it's not what you
> want or if you want to see the other possibilities.
> So basically all occurrences where INITIAL-INPUT is used as
> a kind of default value are better handled with the
> DEF argument.

I know but ... why are you telling me this?

IMO this is the best way of doing it:

(let ((name "Danger"))
  (read-string (format "name: [%s] " name) nil nil name) )

> The only places where I can see it's useful is when all
> possible completions have a common prefix [...]

It is useful there but only in terms on relying on completion
over a huge set of pretty much similar symbol names which is
a situation that shouldn't be encouraged to begin with, and
neither should completion BTW. And, alltho, as Merlin the
Great Wizard was fond of saying, there is no right or wrong,
just what is and what isn't, it still holds that two wrongs
don't make one right.

underground experts united

reply via email to

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