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 #71 received at 64656 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 64656 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#64656: 29.0.91; Doc of minibuffer histories and
 completing-read - automatic addition of completions to DEFAULT list
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.

>   . 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,
and 'file_name_completion' reverses it.

>   . 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'?
Probably not worth the trouble.  Better to declare the value nil of
`completions-sort' as unsupported.

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.




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.