bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56380: 29.0.50; completing-read: INITIAL-INPUT arg


From: Arash Esbati
Subject: bug#56380: 29.0.50; completing-read: INITIAL-INPUT arg
Date: Tue, 05 Jul 2022 14:49:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Lars Ingebrigtsen <larsi@gnus.org> writes:

> 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.

Or say that it should be used in rare cases like a common prefix or a
cons cell for the history argument.  The docstring would be then more in
line with the reference manual (the common prefix part has be to be
added to the reference manual, but that is doable.)

https://www.gnu.org/software/emacs/manual/html_node/elisp/Initial-Input.html

Best, Arash





reply via email to

[Prev in Thread] Current Thread [Next in Thread]