--- Begin Message ---
Subject: |
29.0.50; inconsistent sort order with ls-lisp-version-lessp |
Date: |
Sat, 04 Jun 2022 08:21:48 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hi,
I encounter an inconsistent sort result. The position of "01.0" and/or
"01.2" seems wrong.
$ cat /tmp/test.el
(require 'ls-lisp)
(print (sort (vector "01.0" "10" "010" "01.2")
(lambda (x y)
(ls-lisp-version-lessp x y))))
$ emacs -Q --batch -l /tmp/test.el
["01.0" "10" "010" "01.2"]
$
In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo
version 1.16.0)
of 2022-05-26 built on LAPTOP-89LTAUNV
Repository revision: 531688a19e2125b20c2efa032e02b9cebbedb397
Repository branch: master
Windowing system distributor 'Microsoft Corporation', version 11.0.12010000
System Description: Ubuntu 22.04 LTS
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#55787: 29.0.50; inconsistent sort order with ls-lisp-version-lessp |
Date: |
Sun, 05 Jun 2022 12:48:54 +0300 |
> From: TAKAHASHI Yoshio <yfb02119@nifty.com>
> Cc: 55787@debbugs.gnu.org
> Date: Sun, 05 Jun 2022 18:38:10 +0900
>
> Eli-san,
>
> > Please see if you get a more reasonable behavior. (I'm not
> > sure you will see exactly the same order as in "ls -lv", though; not
> > sure why.)
>
> As you menthined in earler mail, the specification of strverscmp is not
> documented clearly. I believe your fix generates reasonable listing
> order. I appreciate your fix. Thank you!
Thanks, I'm therefore closing this bug.
--- End Message ---