From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Fix alphabetic sorting for headlines, tags Date: Sat, 10 Feb 2018 14:02:16 +0100 Message-ID: <87r2ptc813.fsf@nicolasgoaziou.fr> References: <20180206100705.32256-1-seb@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]:55556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekUnM-0000xZ-4T for emacs-orgmode@gnu.org; Sat, 10 Feb 2018 08:02:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekUnL-0002wu-D1 for emacs-orgmode@gnu.org; Sat, 10 Feb 2018 08:02:20 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:54195) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ekUnL-0002wI-6f for emacs-orgmode@gnu.org; Sat, 10 Feb 2018 08:02:19 -0500 In-Reply-To: <20180206100705.32256-1-seb@wirrsal.net> ("Sebastian =?utf-8?Q?Reu=C3=9Fe=22's?= message of "Tue, 6 Feb 2018 11:07:05 +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 Hello, Sebastian Reu=C3=9Fe writes: > * org.el (org-sort-entries): Use collated sorting. > (org-tags-sort-function): Use collated sorting. > (org-string-collate-greaterp): Add helper-function to use as defcustom > option, since there is no =E2=80=98string-collate-greaterp=E2=80=99 in Em= acs. Thank you. However, Org 9.X still supports Emacs 24, so we cannot use `string-collate-lessp without degrading gracefully to `string-lessp' in these Emacsen. We could add `org-string-collate-lessp' to "org-compat.el", which would be an alias for `string-collate-lessp' on Emacs 25+ and to `string-lessp' otherwise. > +(defun org-string-collate-greaterp (s1 s2 &optional locale ignore-case) > + "Return t if S1 is greater than S2 in collation order. Return non-nil if... We would also need tests for that feature. WDYT? Regards, --=20 Nicolas Goaziou