From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#59275: Unexpected return value of `string-collate-lessp' on Mac Date: Mon, 21 Nov 2022 07:28:55 +0000 Message-ID: <877czokbpk.fsf@localhost> References: <87zgcsdfma.fsf@localhost> <83iljgib4w.fsf@gnu.org> <87h6z0cl6b.fsf@localhost> <837czwi6yp.fsf@gnu.org> <8735ajel7y.fsf@localhost> <83mt8rgill.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13285"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59275@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 21 08:29:22 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 1ox1F3-0003Cs-El for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Nov 2022 08:29:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ox1Em-0002bA-TA; Mon, 21 Nov 2022 02:29:04 -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 1ox1El-0002ad-0n for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 02:29:03 -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 1ox1Ek-0000a8-NN for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 02:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ox1Ek-0005GO-4S for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 02:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2022 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59275 X-GNU-PR-Package: emacs Original-Received: via spool by 59275-submit@debbugs.gnu.org id=B59275.166901570820188 (code B ref 59275); Mon, 21 Nov 2022 07:29:02 +0000 Original-Received: (at 59275) by debbugs.gnu.org; 21 Nov 2022 07:28:28 +0000 Original-Received: from localhost ([127.0.0.1]:45206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ox1EB-0005FY-R3 for submit@debbugs.gnu.org; Mon, 21 Nov 2022 02:28:28 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:33131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ox1E9-0005FK-HG for 59275@debbugs.gnu.org; Mon, 21 Nov 2022 02:28:26 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 13731240027 for <59275@debbugs.gnu.org>; Mon, 21 Nov 2022 08:28:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669015699; bh=3b8BqRW74Kr3uWyd9uBDGy8/l8VELqXBDie8WZ+W14c=; h=From:To:Cc:Subject:Date:From; b=k21TzTzS53fk+SWLAqsG+i6t7KeUPnbaxw9GLiT88bS40asZLey+NuhYCcUTCNxb8 IZi+UPE3vcPtHXyZCSYkFOT9++B6rwNX2ZwWqZPjFD3UyPlTlN8ZuqGCkVqi7ouvLc SGyCGKg7mVmv16HXL9a2f76D+FyWv7vVNKQnJrlTZpgxlhnq3zZPiL9+WNWCy47ww8 RqzPVTTJFE7F2iVbP8hbl9Lhl2XLmr4EhVXHorZTDy28TDBrgBsHc3/RMuB3NwBE1S BAV9HN5SV2ydHLQBdISrDyrZ3oz9QJXPuiHC+DEtgFmrUQRCkLhLKZ0PMKvvc0He0q wjEGHqo0/7Dqw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NFzWj4Zjsz6tmr; Mon, 21 Nov 2022 08:28:17 +0100 (CET) In-Reply-To: <83mt8rgill.fsf@gnu.org> 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:248499 Archived-At: Eli Zaretskii writes: >> Reliable sorting. >> In particular, I am looking for a better PREDICATE argument for >> `sort-subr' for case-sensitive and case-insensitive sorting of strings. > > In the strict order of Unicode codepoints? Use compare-strings. Thanks for the clarification. After further considerations, it looks like we should still use `string-collate-lessp' on Org side as it yields expected results if libc properly implements the collation. >> I'd like the warning to be even more prominent. > > You want to make it explicit that for systems where we use > string-lessp the IGNORE-CASE argument is ignored? Or do you want some > other change? Yes, I think. > Anyway, feel free to suggest some text to that effect. Maybe change If your system does not support a locale environment, this function behaves like `string-lessp'. to Some operating systems do not implement correct collation (in specific locale environments or at all). Then, this functions falls back to case-sensitive `string-lessp' and IGNORE-CASE argument is ignored. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at