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: Fri, 18 Jul 2014 09:53:49 +0300 Message-ID: <838unr6ttu.fsf@gnu.org> References: <87ha2f5gp8.fsf@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1405666530 8710 80.91.229.3 (18 Jul 2014 06:55:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jul 2014 06:55:30 +0000 (UTC) Cc: 18051@debbugs.gnu.org To: michael_heerdegen@web.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 18 08:55:22 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 1X824g-0005q9-2k for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jul 2014 08:55:22 +0200 Original-Received: from localhost ([::1]:48312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X824f-0003zu-PZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jul 2014 02:55:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X824V-0003yv-7q for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 02:55:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X824N-0006WA-OI for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 02:55:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X824N-0006VY-JT for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 02:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X824M-0002mE-DR for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 02:55: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: Fri, 18 Jul 2014 06:55:02 +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.140566644910604 (code B ref 18051); Fri, 18 Jul 2014 06:55:02 +0000 Original-Received: (at 18051) by debbugs.gnu.org; 18 Jul 2014 06:54:09 +0000 Original-Received: from localhost ([127.0.0.1]:57866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X823V-0002ky-4L for submit@debbugs.gnu.org; Fri, 18 Jul 2014 02:54:09 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:42928) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X823R-0002kO-Nw for 18051@debbugs.gnu.org; Fri, 18 Jul 2014 02:54:06 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N8W00900APCJC00@mtaout25.012.net.il> for 18051@debbugs.gnu.org; Fri, 18 Jul 2014 09:49:34 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8W000YNAYMSB90@mtaout25.012.net.il>; Fri, 18 Jul 2014 09:49:34 +0300 (IDT) In-reply-to: <87ha2f5gp8.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:91624 Archived-At: > From: Michael Heerdegen > Date: Fri, 18 Jul 2014 08:22:43 +0200 > > Some users will want to configure the sorting predicate used by ls-lisp, > for example, to get a natural sorting of version numbers, or to sort in > files whose names start with a dot as if they had no dot, etc. > > Currently, sorting is even hardcoded because `ls-lisp-string-lessp' is a > defsubst. If it was a normal function, one could advice it. > > Or, with some more efforts, sorting order could be made configurable via > options, and the -v switch could be implemented. ls-lisp emulates the Unix and GNU 'ls'. So I will generally oppose to introducing any option into it that cannot be had with an external 'ls' program, as long as the latter is the main method of getting a Dired buffer. (If Emacs ever decides that ls-lisp becomes the main method, and will use it by default on all supported platforms, this objection will no longer be valid, of course.) An alternative to what you want would be a Dired-level feature, which then will be available also to those who don't use ls-lisp.