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 #8 received at 50811 <at> debbugs.gnu.org (full text, mbox):
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
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.