From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Human-readable file sorting Date: Sat, 20 Feb 2016 10:53:24 +0200 Message-ID: <83si0npxtn.fsf@gnu.org> References: <87povs41xg.fsf@gnus.org> <87bn7c3yms.fsf@gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455958437 22550 80.91.229.3 (20 Feb 2016 08:53:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Feb 2016 08:53:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 20 09:53:56 2016 Return-path: Envelope-to: ged-emacs-devel@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 1aX3IY-00041G-Hb for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 09:53:54 +0100 Original-Received: from localhost ([::1]:59296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX3IX-0005uO-Sv for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 03:53:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX3IP-0005qV-Qv for emacs-devel@gnu.org; Sat, 20 Feb 2016 03:53:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aX3IL-00023t-Ab for emacs-devel@gnu.org; Sat, 20 Feb 2016 03:53:45 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX3IL-00023p-7B; Sat, 20 Feb 2016 03:53:41 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1137 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aX3IK-0003P7-DP; Sat, 20 Feb 2016 03:53:40 -0500 In-reply-to: <87bn7c3yms.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 20 Feb 2016 13:26:51 +1100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200288 Archived-At: > From: Lars Ingebrigtsen > Date: Sat, 20 Feb 2016 13:26:51 +1100 > > The practical way to implement this is to provide a `file-string-lessp' > function that can be configured to sort the way the user prefers, > defaulting to human readable sorting, and then we adjust > `directory-files' and other file-ey commands to call that instead of > `string-lessp'. 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. Names I can suggest include "logical", "intuitive", and "numerical". Btw, ls-lisp by default doesn't use string-lessp, it uses string-collate-lessp.