From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4ED3ADY4QGMG2wAAbAwnHQ (envelope-from ) for ; Fri, 07 Oct 2022 16:31:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oMpJADY4QGPIawAAG6o9tA (envelope-from ) for ; Fri, 07 Oct 2022 16:31:18 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AA43938D87 for ; Fri, 7 Oct 2022 16:31:17 +0200 (CEST) Received: from localhost ([::1]:60760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogoNf-0000Af-Si for larch@yhetil.org; Fri, 07 Oct 2022 10:31:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogm5p-0000A8-3c for emacs-orgmode@gnu.org; Fri, 07 Oct 2022 08:04:41 -0400 Received: from ciao.gmane.io ([116.202.254.214]:41952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogm5g-00079f-6g for emacs-orgmode@gnu.org; Fri, 07 Oct 2022 08:04:40 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ogm5d-00082v-Db for emacs-orgmode@gnu.org; Fri, 07 Oct 2022 14:04:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: test-org-table/sort-lines: Failing test on macOS Date: Fri, 7 Oct 2022 19:04:19 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-2.699, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665153077; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ly2Tse3LXLLDkYsTYs1m2fyk7aCAg6yCbJPGr2KSNnw=; b=S0zuy9NLIQLmfQ2BoIl5CMuizzE2/pU/O+htiXV9lG0znJE4Oj3aDL3Jqa6bAYLrcmcx+P FakGQsuigkiKtQ9zSjmRpBOnCF+iETgt+HBigzmf8Jk0nAn8X5Qu0kPXxDyiHPlNYQk4Eb ZiP5x9Vnhu4GHTEJ2gOphpZSIHqxzgbmAJxSgZ4j62+xY/QYqXmHfJ166VJ4xMFG8Yaswz 05CBatU1egkUwi3htTbcnj39UqSfN6B9iQKoJfjkrQjNBNyfXZGNmzEwzj2610MiIp2Pv7 Na6szpqajAYCFnwjdSCpV9/wUdNTcka87OMuqOp9lpgpSFge9vG0wKn1VzhQ7w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665153077; a=rsa-sha256; cv=none; b=U3j5C1YwaQ2TQxMV08sjuwzk18/T6svKRIr8PHp+vXRXoq5STmsPj2sYCIRoqm+UUNE9qB Jiy8EG1mOEtKgAC6vu9Nnq+3RvoMUTjjr/e3R9StZ7ukGhluThPmCgHNOGIYzMA734CyVz dAlR8WkYeRDV7/lUfmWRtv5s9kAfA2XcAtgh3CpBj8GP1VjaztRfLIAZTog6JgXRBpRabC gxPRUpvMKpS8fTtAaoxSGn14EVpnDqbd0wOS4xjeRx0i3R12J+gDV8Xi1/QvIuE2UR9kye AUmG7LlO4FK2VaERX0P9B3B9kqAGqD+BsfRVNcwDP/WqeaxvypDHkscMA9T0JA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.33 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: AA43938D87 X-Spam-Score: 4.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: vO8s3r6+vYmy On 07/10/2022 03:15, Rudolf Adamkovič wrote: > > If I understand, "a" should be less than "B" when under "C" locale when > ignoring case (nil) , right? Yet, I get the following: > > (string-collate-lessp "a" "B" "C" nil) ; => nil When case is not ignored (4th argument is nil) locale-dependent collation rules are used, so you get the expected result. $ printf 'a\nB\n' | LC_COLLATE=C sort B a $ printf 'a\nB\n' | LC_COLLATE=en_US.UTF-8 sort a B > [FYI: If I replace nil with t, the procedure returns nil too.] > > Tested on Emacs 29 (adaa2fc90e) and Org 9.5.5 (580f28614). Strange. Emacs-26, Linux (string-collate-lessp "a" "B" "C" t) t If libc is sane (assuming that sort is linked to the same libc) printf 'a\nb\n' | LC_COLLATE=C sort printf 'b\na\n' | LC_COLLATE=C sort printf 'A\nB\n' | LC_COLLATE=C sort printf 'B\nA\n' | LC_COLLATE=C sort printf 'a\nb\n' | LC_COLLATE=C.UTF-8 sort printf 'b\na\n' | LC_COLLATE=C.UTF-8 sort printf 'A\nB\n' | LC_COLLATE=C.UTF-8 sort printf 'B\nA\n' | LC_COLLATE=C.UTF-8 sort then you might face an Emacs bug. P.S. Example of a subtle issue with sorting: significant space added to some locales like es_ES & Co, pl_PL: Maxim Nikulin. Re: [Patch] to correctly sort the items with emphasis marks in a list. Fri, 16 Apr 2021 21:59:51 +0700. https://list.orgmode.org/s5c8p9$97n$1@ciao.gmane.io