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: Sun, 21 Feb 2016 13:18:57 +1100 Message-ID: <878u2ekdpq.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> <87k2lzpijs.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456021185 3453 80.91.229.3 (21 Feb 2016 02:19:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Feb 2016 02:19:45 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Alexis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 21 03:19:35 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 1aXJcV-0001bs-9Q for ged-emacs-devel@m.gmane.org; Sun, 21 Feb 2016 03:19:35 +0100 Original-Received: from localhost ([::1]:37201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXJcU-00072p-9Z for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 21:19:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXJcO-0006y4-SY for emacs-devel@gnu.org; Sat, 20 Feb 2016 21:19:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXJcL-000736-MO for emacs-devel@gnu.org; Sat, 20 Feb 2016 21:19:28 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:41495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXJcL-00072t-Fu; Sat, 20 Feb 2016 21:19:25 -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 1aXJby-0004xc-3m; Sun, 21 Feb 2016 03:19:02 +0100 In-Reply-To: <87k2lzpijs.fsf@gmail.com> (Alexis's message of "Sun, 21 Feb 2016 01:23:19 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aXJby-0004xc-3m MailScanner-NULL-Check: 1456625943.47721@HAssrd0fbvqtbOIS/uIlmw 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:200350 Archived-At: Alexis writes: > But, having read all the other posts in this discussion, i'm still not > clear whether `logical-string-lessp` would use `string-collate-lessp` > "under the hood" (or at least follow the value of LC_COLLATE or its > closest equivalent)? i ask due to things like this: > > https://github.com/flexibeast/org-vcard/issues/18#issuecomment-92006062 I didn't know about `string-collate-lessp'. Looking at the code, it seems to end up calling wcscoll (gotta love C library function names). Which sorts according to the LC_COLLATE locale setting... Hm... I guess the numerical string sorting function could use that to sort the textual segments. Or perhaps there should be one with and one without? That is, the built-in sorting arsenal would be `unicode', `collate', `numerical', and `numerical-and-collate'? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no