[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
https://dataswamp.org/~incal
- Re: completing-read depricated initial-input, (continued)
- Re: completing-read depricated initial-input, Jean Louis, 2022/06/23
- Re: completing-read depricated initial-input, Jean Louis, 2022/06/23
- RE: [External] : Re: completing-read depricated initial-input, Drew Adams, 2022/06/23
- Re: completing-read depricated initial-input, Arash Esbati, 2022/06/23
- Re: completing-read depricated initial-input, Christopher Dimech, 2022/06/23
- Re: completing-read depricated initial-input, Emanuel Berg, 2022/06/23
- Re: completing-read depricated initial-input, Po Lu, 2022/06/21
- Re: completing-read depricated initial-input,
Emanuel Berg <=
- Re: completing-read depricated initial-input, Christopher Dimech, 2022/06/22
- Re: completing-read depricated initial-input, Arash Esbati, 2022/06/23
- Re: completing-read depricated initial-input, Emanuel Berg, 2022/06/23
- Re: completing-read depricated initial-input, Tassilo Horn, 2022/06/23
- Re: completing-read depricated initial-input, Emanuel Berg, 2022/06/23
- Re: completing-read depricated initial-input, Tassilo Horn, 2022/06/23
- Re: completing-read depricated initial-input, carlmarcos, 2022/06/23
- Re: completing-read depricated initial-input, Emanuel Berg, 2022/06/23
- Re: completing-read depricated initial-input, Christopher Dimech, 2022/06/24
- Re: completing-read depricated initial-input, Emanuel Berg, 2022/06/23