[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Human-readable file sorting
From: |
Eli Zaretskii |
Subject: |
Re: Human-readable file sorting |
Date: |
Sat, 20 Feb 2016 13:36:58 +0200 |
> From: Lars Ingebrigtsen <address@hidden>
> Cc: address@hidden
> Date: Sat, 20 Feb 2016 22:32:02 +1100
>
> Eli Zaretskii <address@hidden> writes:
>
> > Please don't call that function `file-string-lessp', or anything that
> > has "file" in it. This sorting order has nothing to do with files.
>
> Well, this is the function that's supposed to sort file names in the
> order requested by the user
I think it's supposed to sort strings while treating numeric parts of
them specially. Its usage domain is wider than just file names.
> > Btw, ls-lisp by default doesn't use string-lessp, it uses
> > string-collate-lessp.
>
> Hm, interesting...
>
> (sort '("11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp)
> => ("11" "1 1" "1.1" "12" "1 2" "1.2")
You will see that 'ls' in a UTF-8 locale does the same.
- Re: dired and ls, (continued)
- Re: dired and ls (was: Human-readable file sorting), Eli Zaretskii, 2016/02/20
- Re: dired and ls, John Wiegley, 2016/02/20
- Re: dired and ls, Eli Zaretskii, 2016/02/20
- Re: dired and ls, John Wiegley, 2016/02/20
- Re: dired and ls, Lars Ingebrigtsen, 2016/02/20
- Re: Human-readable file sorting, Eli Zaretskii, 2016/02/20
- Re: Human-readable file sorting, Lars Ingebrigtsen, 2016/02/20
- Re: Human-readable file sorting,
Eli Zaretskii <=
- Re: Human-readable file sorting, Lars Ingebrigtsen, 2016/02/20
- Re: Human-readable file sorting, Eli Zaretskii, 2016/02/20
- Re: Human-readable file sorting, Lars Ingebrigtsen, 2016/02/20
- Re: Human-readable file sorting, Richard Stallman, 2016/02/21
- Re: Human-readable file sorting, Lars Ingebrigtsen, 2016/02/21
- Re: Human-readable file sorting, Richard Stallman, 2016/02/22
- Re: Human-readable file sorting, Pierpaolo Bernardi, 2016/02/22
- Re: Human-readable file sorting, Eli Zaretskii, 2016/02/22
- Re: Human-readable file sorting, Richard Stallman, 2016/02/23
- Re: Human-readable file sorting, Eli Zaretskii, 2016/02/23