From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function? Date: Sat, 19 Jul 2014 11:17:15 +0300 Message-ID: <83lhrp69v8.fsf@gnu.org> References: <87ha2f5gp8.fsf@web.de> <838unr6ttu.fsf@gnu.org> <871ttj5dfi.fsf@web.de> <837g3b6ob7.fsf@gnu.org> <874myfatyo.fsf@web.de> <831ttj6lu5.fsf@gnu.org> <87zjg79dhw.fsf@web.de> <83wqba6cpe.fsf@gnu.org> <8761iujg2a.fsf@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1405757906 7380 80.91.229.3 (19 Jul 2014 08:18:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jul 2014 08:18:26 +0000 (UTC) Cc: 18051@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 19 10:18:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X8PqT-00008I-5S for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jul 2014 10:18:17 +0200 Original-Received: from localhost ([::1]:53486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8PqS-0002Uz-NH for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jul 2014 04:18:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8PqK-0002TJ-Hf for bug-gnu-emacs@gnu.org; Sat, 19 Jul 2014 04:18:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X8PqE-0008C9-BF for bug-gnu-emacs@gnu.org; Sat, 19 Jul 2014 04:18:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8PqE-0008C5-8Q for bug-gnu-emacs@gnu.org; Sat, 19 Jul 2014 04:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X8PqD-0008IO-Pg for bug-gnu-emacs@gnu.org; Sat, 19 Jul 2014 04:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Jul 2014 08:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18051 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18051-submit@debbugs.gnu.org id=B18051.140575785331853 (code B ref 18051); Sat, 19 Jul 2014 08:18:01 +0000 Original-Received: (at 18051) by debbugs.gnu.org; 19 Jul 2014 08:17:33 +0000 Original-Received: from localhost ([127.0.0.1]:58939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X8Ppk-0008Hg-Nb for submit@debbugs.gnu.org; Sat, 19 Jul 2014 04:17:33 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:51225) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X8Pph-0008HO-B8 for 18051@debbugs.gnu.org; Sat, 19 Jul 2014 04:17:30 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N8Y003009G2UC00@a-mtaout20.012.net.il> for 18051@debbugs.gnu.org; Sat, 19 Jul 2014 11:17:22 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8Y003GX9OYMB60@a-mtaout20.012.net.il>; Sat, 19 Jul 2014 11:17:22 +0300 (IDT) In-reply-to: <8761iujg2a.fsf@web.de> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91657 Archived-At: > From: Michael Heerdegen > Cc: 18051@debbugs.gnu.org > Date: Sat, 19 Jul 2014 03:25:01 +0200 > > over the current sorting, I would much prefer having all the dot > files at the end. (I don't know if this is possible with ls.) If 'ls' cannot do that, I think we should have this in Dired. > > But if 'ls' supports that, so should ls-lisp. > > It depends on "locale" settings. I tried some settings of the LC_ALL > variable. With "C" or "POSIX", I get the same sorting as with ls-lisp. > OTOH, with "en_US.utf8" or "de_DE.utf8" I get the sorting I described, > with dot files merged with the other files. AFAICT, 'ls' uses strcoll. I don't see how can that effectively ignore the leading dot, but maybe I'm missing something. OTOH, if the UTF-8 codeset says the leading dot should be ignored, then ls-lisp should do the same by default, at least when the locale's codeset is UTF-8. Can you see the answer in 'ls' sources? Does just "en_US" or "en_US.8859-1" change the order? > > > (2) -v sorting (sorting versions correctly) > > > > Isn't this what "ls -v" does? If so, and if ls-lisp doesn't currently > > support that, patches to add such support are welcome. > > ls -v sorts backup versions in their natural order (which is not the > lexicographic order). Yes, would be good to have that in ls-lisp, and > should not be too hard. I can give it a try when I get the time. Thanks. > I'm not sure what would have to be done about the locale depend part. Assuming it's indeed the locale thing, Emacs doesn't yet support locale-specific sorting. But we could do that in some ad-hoc manner anyway.