[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56380: 29.0.50; completing-read: INITIAL-INPUT arg
From: |
Lars Ingebrigtsen |
Subject: |
bug#56380: 29.0.50; completing-read: INITIAL-INPUT arg |
Date: |
Tue, 05 Jul 2022 13:33:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes:
> The docstring of `completing-read' says the argument INITIAL-INPUT is
> deprecated - yet there are over 30 nontrivial uses in Emacs' own Elisp
> sources. So, although we currently don't want that this argument is
> used just to insert a default input, it's sometimes not possible to
> avoid using it.
[...]
> + for POSITION.) Don't use this argument to insert a default value --
> + use DEF for that. You can use INITIAL-INPUT, for example, to insert
> + a prefix common to all completion candidates. See
> + `minibuffer-with-setup-hook' for a general method to prepare the
> + minibuffer.
It's an improvement on the original text, but this makes it sound like
inserting a common prefix is something callers are expected to do. (But
instead it's a super rare special case that virtually nobody would
actually do in practice.) So I'd rather just remove that sentence about
what you can use INITIAL-INPUT for.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no