unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Arash Esbati <arash@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Drew Adams <drew.adams@oracle.com>,
	56380@debbugs.gnu.org
Subject: bug#56380: 29.0.50; completing-read: INITIAL-INPUT arg
Date: Tue, 05 Jul 2022 14:49:58 +0200	[thread overview]
Message-ID: <86edyzg1vt.fsf@gnu.org> (raw)
In-Reply-To: <87v8sb4ww7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 05 Jul 2022 13:33:12 +0200")

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	other threads:[~2022-07-05 12:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 12:18 bug#56380: 29.0.50; completing-read: INITIAL-INPUT arg Michael Heerdegen
2022-07-05 11:33 ` Lars Ingebrigtsen
2022-07-05 12:49   ` Arash Esbati [this message]
2022-07-05 14:50     ` 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=86edyzg1vt.fsf@gnu.org \
    --to=arash@gnu.org \
    --cc=56380@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=larsi@gnus.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /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).