From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian =?utf-8?Q?Reu=C3=9Fe?= Subject: Re: [PATCH] Fix alphabetic sorting for headlines, tags Date: Mon, 12 Feb 2018 09:44:03 +0100 Message-ID: <87mv0eiomk.fsf@wirrsal.net> References: <20180206100705.32256-1-seb@wirrsal.net> <87r2ptc813.fsf@nicolasgoaziou.fr> <87sha7g4rz.fsf@wirrsal.net> <87bmgvbiiq.fsf@nicolasgoaziou.fr> 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]:48079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1el9ib-0003I8-G7 for emacs-orgmode@gnu.org; Mon, 12 Feb 2018 03:44:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1el9iY-0002Ci-Na for emacs-orgmode@gnu.org; Mon, 12 Feb 2018 03:44:09 -0500 Received: from wirrsal.net ([188.68.36.149]:54238 helo=mail.wirrsal.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1el9iY-0002B9-DC for emacs-orgmode@gnu.org; Mon, 12 Feb 2018 03:44:06 -0500 In-reply-to: <87bmgvbiiq.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Nicolas Goaziou writes: > 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 h= ave to >> enforce some canonical locale. Unfortunately, it=E2=80=99s not possibl= e 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= test 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? That would work. Though it does tie up the test with an implementation-detail. Still, probably better than no regression test at all. The test will error out if the data for the chosen locale isn=E2=80=99t a= ctually present on the system. I chose the =C2=ABen_US=C2=BB locale in the hopes = that this will frequently be installed. I=E2=80=99ll leave it up to you to decide w= hether that is acceptable. > The patch looks good. Thank you. It would be good to add an entry in > ORG-NEWS about it, however. Added. > Then we can improve `org-table-sort-lines' accordingly. It can be done > in another patch, tho. That=E2=80=99s a good idea, I=E2=80=99ll look into it if I have some time= by the end of the week. Kind regards, SR --=20 Insane cobra split the wood Trader of the lowland breed Call a jittney, drive away In the slipstream we will stay