GNU bug report logs - #64656
29.0.91; Doc of minibuffer histories and completing-read - automatic addition of completions to DEFAULT list

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sat, 15 Jul 2023 23:36:01 UTC

Severity: minor

Found in version 29.0.91

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> linkov.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: "64656 <at> debbugs.gnu.org" <64656 <at> debbugs.gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: RE: [External] : Re: bug#64656: 29.0.91; Doc of minibuffer histories
 and completing-read - automatic addition of completions to DEFAULT
 list
Date: Mon, 13 Nov 2023 18:14:12 +0000
> > The problem reported by this bug report is that the order is random by
> > `C-h v M-n M-n' because it uses obarray.

No.  That is NOT the problem reported.  The problem
reported is:

1. Initial completions are added to `M-n' automatically,
   instead of just by a user adding them explicitly to
   DEFAULTS.

2. Given that BUG, _IF_ it won't be fixed, then the doc
   should at least make users aware of it and mention
   how to work around it.

Fixing #1 is preferable.  Fixing #2 is minimal damage
control, IF you won't fix #1.

> > There is no such problem for
> > `C-x C-f M-n M-n' because the list of default values is truncated
> > explicitly in `read-file-name-default' by
> >
> >   (minibuffer-with-setup-hook
> >       (lambda ()
> >         (setq-local minibuffer-default-add-function
> >           ...
> >
> > So maybe to use the same to truncate the list of default values
> > for `C-h f', `C-h v', `C-h o'?
> 
> But alas, this won't work for e.g. `C-h w', `C-h S',
> and other obarray completions.
> 
> So it's a lose-lose situation.

The loss is the introduction of automatically cramming
the completion domain ("initial completions") onto the
`M-n' queue.

Just let programmers themselves control what goes into
`M-n', using DEFAULTS.  IF anyone really wants to add
the completion domain to `M-n' it's trivial to do that,
by adding it to DEFAULTS.  AFAIK, no one had ever done
that, and no one requested the misfeature of adding the
domain to `M-n' automatically.

We should admit the mistake of introducing this forced
polluting of `M-n' and revert that misfeature.  Give
users back complete control of `M-n' through DEFAULTS -
that's what DEFAULTS is for, and its 100% sufficient
and flexible for doing the job.




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

Previous Next


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