From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Human-readable file sorting Date: Mon, 22 Feb 2016 13:58:29 +1100 Message-ID: <87lh6dzc16.fsf@gnus.org> References: <87povs41xg.fsf@gnus.org> <87bn7c3yms.fsf@gnus.org> <83si0npxtn.fsf@gnu.org> <87si0nlirx.fsf@gnus.org> <8360xjpq91.fsf@gnu.org> <87oabbli5g.fsf@gnus.org> <831t87pnjo.fsf@gnu.org> <87d1rqkdx1.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456110135 1641 80.91.229.3 (22 Feb 2016 03:02:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Feb 2016 03:02:15 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 22 04:02:06 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 1aXglB-00046H-EO for ged-emacs-devel@m.gmane.org; Mon, 22 Feb 2016 04:02:05 +0100 Original-Received: from localhost ([::1]:46301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXglB-0002Vc-12 for ged-emacs-devel@m.gmane.org; Sun, 21 Feb 2016 22:02:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXgiG-0005eB-9S for emacs-devel@gnu.org; Sun, 21 Feb 2016 21:59:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXgiB-0002TD-B2 for emacs-devel@gnu.org; Sun, 21 Feb 2016 21:59:04 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:56624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXgiB-0002T5-5A; Sun, 21 Feb 2016 21:58:59 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aXghm-00005k-Mt; Mon, 22 Feb 2016 03:58:35 +0100 In-Reply-To: (Richard Stallman's message of "Sun, 21 Feb 2016 18:36:00 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aXghm-00005k-Mt MailScanner-NULL-Check: 1456714717.34681@kv/zxdxdaGn+3aJwV1njWQ X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 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:200424 Archived-At: Richard Stallman writes: > Then we should have a global variable that specifies which function > to use to compare file names. Its value could be 'string-lessp' or > 'string-natural-lessp' or something else. Its name could be > 'file-name-comparison-function'. > > Then we want some user interface to make it easy to choose one of > those two functions as the value of 'file-name-comparison-function'. Yes, I agree. But Eli pointed out (I think :-)) that this setting may actually be something that will (or should) affect more than file name sorting. I think that may be a good idea, but I'm not sure. This is a problem that mostly rears its head when dealing with file names, which very commonly use embedded numbers. I can't (off the top of my head) remember other situations where you get a list of strings that may have embedded numbers, and you want to have them sorted and displayed? If somebody had examples where that happens, I think we should go for a non-file-specific setting. Otherwise, we should do this setting for file names only. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no