GNU bug report logs -
#56380
29.0.50; completing-read: INITIAL-INPUT arg
Previous Next
Full log
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Michael Heerdegen <michael_heerdegen <at> 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
This bug report was last modified 2 years and 347 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.