bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64656: 29.0.91; Doc of minibuffer histories and completing-read - au


From: Juri Linkov
Subject: 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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]