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 14:35:23 +0200 Message-ID: <831t87pnjo.fsf@gnu.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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455971766 19230 80.91.229.3 (20 Feb 2016 12:36:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Feb 2016 12:36:06 +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 13:36:01 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 1aX6lV-0004Ds-6E for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 13:36:01 +0100 Original-Received: from localhost ([::1]:60542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX6lU-0003d3-FG for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 07:36:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX6lC-0003cR-TV for emacs-devel@gnu.org; Sat, 20 Feb 2016 07:35:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aX6l8-0006Nv-Qz for emacs-devel@gnu.org; Sat, 20 Feb 2016 07:35:42 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX6l8-0006Np-M1; Sat, 20 Feb 2016 07:35:38 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1504 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aX6l8-0007xI-2M; Sat, 20 Feb 2016 07:35:38 -0500 In-reply-to: <87oabbli5g.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 20 Feb 2016 22:45:31 +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:200303 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Sat, 20 Feb 2016 22:45:31 +1100 > > Eli Zaretskii writes: > > >> > 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. > >> > >> Well, this is the function that's supposed to sort file names in the > >> order requested by the user > > > > I think it's supposed to sort strings while treating numeric parts of > > them specially. Its usage domain is wider than just file names. > > No no. This is the function that all Emacs things that want to sort > file names should use. It's okay to sort file names using a comparison function that can be used with strings that are not file names. But if you call it "file-SOMETHING", then it will look weird if someone uses it to sort strings that are not file names.