GNU bug report logs -
#50811
28.0.50; Misleading Docstring for read-string function
Previous Next
Reported by: Codruț Constantin Gușoi <mail <at> codrut.pro>
Date: Sun, 26 Sep 2021 08:29:01 UTC
Severity: minor
Tags: moreinfo, notabug
Found in version 28.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 50811 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello Larsi
But why, I don't see the benefit?
That's exactly the behaviour I need for renaming a file, for example; a prompt pre-filled with the current filename. It's the same UX as in every other program that does this sort of functionality and the extra keypress makes it harder to use.
This is more like a styleguide for emacs lips development what you're describing, I hope you won't change the function behaviour in the future, it's working well as it is right now.
Cheers,
Codruț
www.codrut.pro
-------- Original Message --------
On 27 Sep 2021, 07:22, Lars Ingebrigtsen wrote:
> Codruț Constantin Gușoi <mail <at> codrut.pro> writes:
>
>> If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
>> This argument has been superseded by DEFAULT-VALUE and should normally be nil
>> in new code. It behaves as INITIAL-CONTENTS in `read-from-minibuffer' (which
>> see).
>> ```
>>
>> This is misleading since INITIAL-INPUT behaves differently from DEFAULT-VALUE:
>
> The doc string isn't claiming that INITIAL-INPUT behaves like
> DEFAULT-VALUE -- it says that you shouldn't use INITIAL-INPUT.
>
> The point is that we want to move away from pre-filled prompts in Emacs,
> and instead put the default in the "future history", i.e., say
>
> (read-string "PROMPT " nil nil "B")
>
> and then the user should `M-n' to edit the default.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
[Message part 2 (text/html, inline)]
This bug report was last modified 3 years and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.