From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59275: Unexpected return value of `string-collate-lessp' on Mac Date: Tue, 22 Nov 2022 14:56:14 +0200 Message-ID: <83sfib172p.fsf@gnu.org> References: <87zgcsdfma.fsf@localhost> <83iljgib4w.fsf@gnu.org> <87h6z0cl6b.fsf@localhost> <837czwi6yp.fsf@gnu.org> <8735ajel7y.fsf@localhost> <83mt8rgill.fsf@gnu.org> <877czokbpk.fsf@localhost> <8335ac4eo5.fsf@gnu.org> <87ilj7dbms.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32915"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59275-done@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 22 13:57:47 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxSqR-0008N2-5d for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Nov 2022 13:57:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxSpr-00060b-Ek; Tue, 22 Nov 2022 07:57:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxSpk-0005yo-TR for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 07:57:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxSpi-0005NG-Qy for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 07:57:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxSpi-000676-NY for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 07:57:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Nov 2022 12:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 59275 X-GNU-PR-Package: emacs Mail-Followup-To: 59275@debbugs.gnu.org, eliz@gnu.org, yantar92@posteo.net Original-Received: via spool by 59275-done@debbugs.gnu.org id=D59275.166912176923410 (code D ref 59275); Tue, 22 Nov 2022 12:57:02 +0000 Original-Received: (at 59275-done) by debbugs.gnu.org; 22 Nov 2022 12:56:09 +0000 Original-Received: from localhost ([127.0.0.1]:50163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxSor-00065W-0r for submit@debbugs.gnu.org; Tue, 22 Nov 2022 07:56:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxSop-00064k-3b for 59275-done@debbugs.gnu.org; Tue, 22 Nov 2022 07:56:07 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxSoh-0005BP-MY; Tue, 22 Nov 2022 07:55:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UA1fAWsZgSuH33r7xo86lMVqdzQTx3ruK1sq2/bOngk=; b=Zl0OkQNw1rNU 33imF0fXIohOv1BH4Bk7lVWNzER6nj6Pnguco8YF3Km7vp9LHu3UtJyA0CBG9Hckvdxbn7fucbpoL qFmeP8gYQRQYCilkfnJpIvZ7Emwr1CNxWCniQGiZKy2BmoU8Fqilop5b6CIIluYzvId4Vx8XuXFWh et4sB2yoNP2IXJS9aL4RELMkdKYM5xe3bssJH8i41YhBHR0OuwKWSqbqtApiKzwmTFdv/jIgZGDJN XXMvfHsVwx6bBqUn0afMyxBuWlqum8t0OB33EFDnV4EkFd1cT+5nnGiBUxdxszNADRLleTbfUVDMv E0eTFv4cx5Iu7T4T2WWxEA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxSoh-0000jr-6E; Tue, 22 Nov 2022 07:55:59 -0500 In-Reply-To: <87ilj7dbms.fsf@localhost> (message from Ihor Radchenko on Tue, 22 Nov 2022 01:24:43 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248630 Archived-At: > From: Ihor Radchenko > Cc: 59275@debbugs.gnu.org > Date: Tue, 22 Nov 2022 01:24:43 +0000 > > > Once again: locale-specific collation order is inherently unpredictable in > > its results, and should only be used when the locale-specific order is a > > _must_, like when sorting people's names for a telephone directory. > > We use string collation for > > 1. Sorting bibliographies > 2. Sorting lists > 3. Sorting table lines > 4. Sorting tags > 5. Sorting headings > 6. Sorting entries in agendas > 7. As a criterion for agenda/tag filtering when comparison operator is > used on string property values (11.3.3 Matching tags and properties) > > 1-6 should follow the locale. I think only 1 and 6 are firmly in that category. For the others it depends on whether the results of the sorting are immediately displayed, or used for further processing. In the former case, using string-collate-lessp is semi-okay ("semi" because producing different results in different locales can still confuse users); in the latter case it is wrong, IMO, because you will cause unexpected results. > See the attached patch. Thanks, installed.