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: Sun, 24 Aug 2014 17:54:18 +0300 Message-ID: <83zjeukkf9.fsf@gnu.org> References: <87ha2f5gp8.fsf@web.de> <87lhro7dp4.fsf@web.de> <83zjg44jzd.fsf@gnu.org> <87wqb8mqqv.fsf@web.de> <83y4vo4fbr.fsf@gnu.org> <87silwmo8h.fsf@web.de> <83wqb84e7l.fsf@gnu.org> <87iomsgsqg.fsf@gmx.de> <83tx6c44x7.fsf@gnu.org> <87egxggigj.fsf@gmx.de> <877g28w19r.fsf@gmx.de> <83sikvcbqr.fsf@gnu.org> <83r40fc876.fsf@gnu.org> <87wqa7uf7w.fsf@gmx.de> <83oavjc5jj.fsf@gnu.org> <87y4uixleg.fsf@gmx.de> <83sikpc3cd.fsf@gnu.org> <87ha147gd5.fsf@gmx.de> <83a96vmv80.fsf@gnu.org> <87a96vuph7.fsf@gmx.de> <8361hjm7pr.fsf@gnu.org> <8738cnuev3.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1408892125 7849 80.91.229.3 (24 Aug 2014 14:55:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Aug 2014 14:55:25 +0000 (UTC) Cc: michael_heerdegen@web.de, 18051@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 24 16:55:17 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 1XLZCO-0004BU-G0 for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Aug 2014 16:55:16 +0200 Original-Received: from localhost ([::1]:44415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLZCO-0000Dk-6C for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Aug 2014 10:55:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLZCF-0000Bb-MW for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2014 10:55:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLZCA-0004sQ-Ga for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2014 10:55:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLZCA-0004s7-Cz for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2014 10:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XLZC9-0003gi-OO for bug-gnu-emacs@gnu.org; Sun, 24 Aug 2014 10: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: Sun, 24 Aug 2014 14:55:01 +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.140889206214125 (code B ref 18051); Sun, 24 Aug 2014 14:55:01 +0000 Original-Received: (at 18051) by debbugs.gnu.org; 24 Aug 2014 14:54:22 +0000 Original-Received: from localhost ([127.0.0.1]:51059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLZBV-0003fi-M7 for submit@debbugs.gnu.org; Sun, 24 Aug 2014 10:54:22 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:56418) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLZBS-0003fU-VN for 18051@debbugs.gnu.org; Sun, 24 Aug 2014 10:54:19 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NAT00100FHOJP00@a-mtaout20.012.net.il> for 18051@debbugs.gnu.org; Sun, 24 Aug 2014 17:54:13 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NAT0019NG2CGI40@a-mtaout20.012.net.il>; Sun, 24 Aug 2014 17:54:13 +0300 (IDT) In-reply-to: <8738cnuev3.fsf@gmx.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:92639 Archived-At: > From: Michael Albinus > Cc: michael_heerdegen@web.de, 18051@debbugs.gnu.org > Date: Sat, 23 Aug 2014 22:32:00 +0200 > > >> > Btw, I wonder whether we should have a way to pass the locale string > >> > explicitly, instead of relying on $LC_COLLATE. > >> > >> We could add an optional argument to string-collate-*. But this would > >> break signature equivalence with string-lessp and string-equal, > >> respectively. > >> > >> Or we could introduce a global var, which shall be let-bound to the > >> locale string. > > > > Or have a new optional argument in string-lessp etc., or introduce a > > new set of APIs which will accept a locale, and have string-lessp > > etc. call them with that argument nil. > > An optional argument to string-lessp could be inconvenient. IMHO, the > most important use-case of string-lessp is being a PREDICATE of > sort. This does not support optional arguments. In those cases, we should add the same optional argument to the sort function. > Extended patch appended. Thanks. I wonder what should this do if the new locale cannot be instantiated/installed. As you wrote the code, it will silently use the current locale, but I wonder if that's TRT. Other than that, I think you should install this.