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

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Mon, 4 Jul 2022 12:20:02 UTC

Severity: wishlist

Found in version 29.0.50

Full log


Message #10 received at 56380 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Arash Esbati <arash <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Drew Adams <drew.adams <at> oracle.com>, 56380 <at> debbugs.gnu.org
Subject: Re: bug#56380: 29.0.50; completing-read: INITIAL-INPUT arg
Date: Tue, 05 Jul 2022 13:33:12 +0200
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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 2 years and 346 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.