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: Stefan Monnier
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 14:51:54 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>   . completions-sort affects all completions, not just completions of
>     file names, right?  So why the change only for file names?

AFAICT many completion tables completely disregard the order in their
output, presuming that it will be reordered later if/when needed.
Clearly `file-name-all-completions` is among them, which is what the
patch proposes to fix.

>   . who said that the order we get file names from readdir is the
>     "unsorted order", and not its reverse?

Nobody, indeed.  Under GNU/Linux with an `ext4` filesystem, the `ls -U`
order is basically random (ext4's htrees use some a hash-based directory
structure), so reversing it doesn't make much difference (unless you
explicitly compare it with `ls -U`).  But for those filesystems that use
a directory structure where files are naturally sorted in a meaningful
way (like alphabetical), returning the directory's order or the reverse
is a lot more noticeable.

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

I don't see how/why.


        Stefan






reply via email to

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