GNU bug report logs -
#64656
29.0.91; Doc of minibuffer histories and completing-read - automatic addition of completions to DEFAULT list
Previous Next
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
View this message in rfc822 format
> From: Juri Linkov <juri <at> linkov.net>
> Cc: drew.adams <at> oracle.com, 64656 <at> debbugs.gnu.org
> Date: Fri, 10 Nov 2023 09:45:02 +0200
>
> >> A recipe is to customize `completions-sort' to nil ("No sorting"),
> >> then first call `M-& ls -U RET' and afterwards `C-x C-f TAB TAB'
> >> and compare the contents of two buffers *Async Shell Command*
> >> and *Completions*. The order of files is reversed.
> >
> > OK, I see it now, thanks.
> >
> > But IMO this raises several issues:
> >
> > . completions-sort affects all completions, not just completions of
> > file names, right? So why the change only for file names?
>
> I'm trying various completions after customizing completions-sort to nil,
> so currently noticed a problem in the completions of file names.
So you agree that the problem is wider than that?
> > . who said that the order we get file names from readdir is the
> > "unsorted order", and not its reverse?
>
> 'readdir' returns the order of the file system,
That is not true in general. For example, on MS-Windows, it returns
the file names in alphabetical order. In general, we don't know what
is the relation between the order in which readdir returns file names
and the order of the file entries in the directory on disk, as that is
an implementation detail.
> > . in any case, I think we should reverse only when completions-sort
> > is nil, because otherwise we could adversely affect the sorting
> > performed on the results
>
> This means bringing 'Qcompletions_sort' to 'file_name_completion'?
Yes.
> Probably not worth the trouble.
Why not? It's just a single simple test.
> Better to declare the value nil of `completions-sort' as
> unsupported.
I don't see why.
> Anyway this was just an experiment to see how useful is the
> no sorting option for completions.
>
> And the conclusion is that it's useful only for part of completion types,
> and not useful for others. It's useless for obarray and file names.
I added Stefan to this discussion, in case he has an opinion or
comments.
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.