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: Arash Esbati
Subject: Re: completing-read depricated initial-input
Date: Thu, 23 Jun 2022 13:58:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Emanuel Berg <incal@dataswamp.org> writes:

> Tassilo Horn wrote:
>
>> 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?

Because you asked?  I parsed your question exactly the same way Tassilo
did.

> IMO this is the best way of doing it:
>
> (let ((name "Danger"))
>   (read-string (format "name: [%s] " name) nil nil name) )

I think the current standard in Emacs is like this:

(let ((name "Danger"))
  (read-string (format "Name (default %s): " name)
               nil nil name))

Best, Arash



reply via email to

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