[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: Wed, 22 Jun 2022 05:46:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Po Lu 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? I can't think of any
> non-stylistic reason to discourage using that argument.

Maybe stop thinking about it and instead let your subconscious
figure it out for you?

Anyway this is what I think is the best interface:

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

You then see:

name: [Danger] _

So if you hit RET you get the default (the suggestion), i.e.
"Danger", if you print you print and if you want to edit
"Danger" hit M-n and it's inserted only pint isn't moved.

underground experts united

reply via email to

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