From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Fix alphabetic sorting for headlines, tags Date: Sun, 11 Feb 2018 17:25:33 +0100 Message-ID: <87bmgvbiiq.fsf@nicolasgoaziou.fr> References: <20180206100705.32256-1-seb@wirrsal.net> <87r2ptc813.fsf@nicolasgoaziou.fr> <87sha7g4rz.fsf@wirrsal.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekuRd-0006N2-Jw for emacs-orgmode@gnu.org; Sun, 11 Feb 2018 11:25:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekuRc-0007kX-Du for emacs-orgmode@gnu.org; Sun, 11 Feb 2018 11:25:37 -0500 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:45451) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ekuRc-0007il-4a for emacs-orgmode@gnu.org; Sun, 11 Feb 2018 11:25:36 -0500 In-Reply-To: <87sha7g4rz.fsf@wirrsal.net> ("Sebastian =?utf-8?Q?Reu=C3=9Fe?= =?utf-8?Q?=22's?= message of "Sun, 11 Feb 2018 12:11:12 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Sebastian =?utf-8?Q?Reu=C3=9Fe?= Cc: emacs-orgmode@gnu.org Sebastian Reu=C3=9Fe writes: > I also considered adding a regression test for non-ASCII chars to > =C2=ABtest-org/sort-entries=C2=BB, but for stable results, one would have= to > enforce some canonical locale. Unfortunately, it=E2=80=99s not possible to > change the locale at Emacs run-time; Emacs only seems to call > =C2=ABsetlocale()=C2=BB once during initialization, so =C2=ABwcscoll()=C2= =BB always collates > according to the initial value of =C2=ABLC_COLLATE=C2=BB. A regression te= st would > thus require changes to the Makefile, and tests might yield different > results when run from inside an existing Emacs process, so I left the > =C2=ABsort-entries=C2=BB test as is. It should be possible to redefine `string-collate-lessp', using `cl-letf' so that is uses different locales as the optional argument. WDYT? The patch looks good. Thank you. It would be good to add an entry in ORG-NEWS about it, however. Then we can improve `org-table-sort-lines' accordingly. It can be done in another patch, tho.