GNU bug report logs - #65348
INITIAL-INPUT in completing-read repeats same entry twice consecutively

Previous Next

Package: emacs;

Reported by: Heime <heimeborgia <at> protonmail.com>

Date: Thu, 17 Aug 2023 00:48:01 UTC

Severity: normal

Tags: notabug

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Drew Adams <drew.adams <at> oracle.com>
To: Heime <heimeborgia <at> protonmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: "65348 <at> debbugs.gnu.org" <65348 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#65348: INITIAL-INPUT in completing-read repeats
 same entry twice consecutively
Date: Fri, 18 Aug 2023 15:16:52 +0000
> > You can have it there. It does work.
> 
> But you are designating it as deprecated, which makes
> others think that something awful is going to happen to it.

Agreed.  Better to not deprecate it and just explain
the pros and the cons.  However, Emacs deprecated it
long ago...

Deprecation shouldn't be used for this kind of
_stylistic choice_.  For that, when those deciding
agree on what's the best style, and they agree that
it's helpful to pass along their suggestion in the
interest of consistency (for example), then it can
be advertised as a stylistic _convention_.

IMHO, there was never any call for this to be
branded as "deprecated".  I said so at the time,
but other voices prevailed.  History.
___


[FWIW, Icicles considers it not deprecated.  The doc
 string of `completing-read' in Icicle mode has this:

  INITIAL-INPUT is considered deprecated by vanilla
  Emacs, but not by Icicles.  If INITIAL-INPUT is
  nil and DEF is non-nil, the user can use
  `next-history-element' to yank DEF into the
  minibuffer.

 In addition, with Icicles users can choose the
 behavior they prefer wrt inserting the DEFAULT
 value, showing it in the prompt, and selecting it
 if inserted.

 See https://www.emacswiki.org/emacs/Icicles_-_Customization_and_General_Tips#icicle-default-value.

 ]

> The introduction of HIST is only making a good
> function quite terrible to use, becoming an
> over-engineering piece of junk to avoid.

Useless to claim, without saying why you think so.
And you're quite wrong here, FWIW.  HIST is your
friend.

[But minibuffer history too can be improved for users:
 https://www.emacswiki.org/emacs/Icicles_-_History_Enhancements.
 ]

> > > I find using INITIAL quite useful because the
> > > user sees something filled up.

Yes.  More importantly, it's there for you to edit.

As with everything else, inserting it isn't always
a plus or always a minus, and different users can
find it a plus or minus in the same context.

Callers of `completing-read' can decide whether it
makes sense (they think) to insert.  And users
should be able to override the caller's choice.

> Having the user yank it from the default to the
> minibuffer is a bother

Having it inserted automatically can also be a
bother.  Different contexts (different calls to
`completing-read') can call for different behavior,
and different users can, and do, have different
ideas about what behavior is more bothersome.

This bug report was last modified 1 year and 276 days ago.

Previous Next


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