From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Codruț Constantin Gușoi" <mail@codrut.pro>
Cc: 50811@debbugs.gnu.org
Subject: bug#50811: 28.0.50; Misleading Docstring for read-string function
Date: Mon, 27 Sep 2021 06:22:21 +0200 [thread overview]
Message-ID: <877df2ps02.fsf@gnus.org> (raw)
In-Reply-To: <_54OEp0LYzdxgXLLnOGpPKIfp0dH3AVBE0pzUGBTFZW_r1v5IQw7Vf4Ij-ugCTXUw-UVAneeffL-Kt1PV2XuwrSeFXFllKCypAD2pZ1cQZs=@codrut.pro> ("Codruț Constantin Gușoi"'s message of "Sun, 26 Sep 2021 08:28:05 +0000")
Codruț Constantin Gușoi <mail@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
next prev parent reply other threads:[~2021-09-27 4:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-26 8:28 bug#50811: 28.0.50; Misleading Docstring for read-string function mail--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-27 4:22 ` Lars Ingebrigtsen [this message]
2021-09-27 4:35 ` mail--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-27 4:40 ` Lars Ingebrigtsen
2021-09-27 4:56 ` mail--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-27 5:02 ` Lars Ingebrigtsen
2021-09-27 15:22 ` bug#50811: [External] : " Drew Adams
2021-09-27 15:17 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877df2ps02.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=50811@debbugs.gnu.org \
--cc=mail@codrut.pro \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).