From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mDIpKsUJQWN6sgAAbAwnHQ (envelope-from ) for ; Sat, 08 Oct 2022 07:25:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kAQjKsUJQWM7FAAAauVa8A (envelope-from ) for ; Sat, 08 Oct 2022 07:25:25 +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 5592F1019C for ; Sat, 8 Oct 2022 07:25:25 +0200 (CEST) Received: from localhost ([::1]:40122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oh2Ky-00039D-Ie for larch@yhetil.org; Sat, 08 Oct 2022 01:25:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oh2KI-00038h-5O for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 01:24:42 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:44856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oh2KG-0003Ga-Cf for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 01:24:41 -0400 Received: by mail-pj1-x1036.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so6327586pjl.3 for ; Fri, 07 Oct 2022 22:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qacTr4lYJ0mCMc/WUPB3NFHU+SOPBxaDb02UDVaItdA=; b=e2oeXn65Fctda8gKG2ifuE2bxCLPpV9iuVPYSZecKge8OX4afRBI1iiwAVNm4mhK+G nqG3ex8Rm+OLaOdR5qSwskUlXSHXsKZne1U6ZxeKdqhUR/W9XDfV41d9uj0256Y5r4Vs gc0qJzsy/FyOKtRTYm7H3MXQ241OQE20msCXgBD0jdB8CMzu0u7LzIF+P/lCVwTvb+Ie CEavtulrdw0xbLSszAf6VXl0nQTlGBHa6SVekaJrF/h3HcbfROglPQMNnMYb42BBs69W Yv9e908+c3UM7rEINe29Gh1ESDbGtdSVJn2VcmJcjB/luZYr7pAuS6C7oYwwR/HdJ/KD 43SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qacTr4lYJ0mCMc/WUPB3NFHU+SOPBxaDb02UDVaItdA=; b=ataeSKfyOIpHaerDU+0rpZtzA+f1IEiZZLcQAuoa+/4gnYi9YTz2CZo3KMJL5+963T rQo9sR0jshloxK7XGeAsJ+dzEd+2NMk46sjH9DeOyFM4n3jTHZFJymus4FxpbieDdrb4 QYXjXvg+LDC+aDMRegcdyMuzJCAgfTCS2RL+smb7qKBDtYo9hbuNpe3efiKOdM7aQihZ S9jCozROosXpqTjqe7pBboz6h00cIKY5+vRZpqERCYSdGEjbK/g0zTFLJ4pYnKIo8xhE 5x8DCYaZJ07HhMUI8pHQT2ctgDrx5RrU7Ha4azEsF5U+9rm9o6d6kYTuhAZl7qFUvqxI p2Cg== X-Gm-Message-State: ACrzQf2FURuK5WiCpoVULFNXBIekVh7WnQX+PEYAkCa6xl03OxXVWhTy YQEquzuVf3F+nbqKNF5PTug= X-Google-Smtp-Source: AMsMyM5XWCo2OIWBUWdjDr29tBoSZS2p7/BONVRPzSvsT2GFWC+NpsM0qJh3QGKLhxmgTkdOgiD5Bg== X-Received: by 2002:a17:902:c94b:b0:17f:5817:35e3 with SMTP id i11-20020a170902c94b00b0017f581735e3mr8340962pla.160.1665206678897; Fri, 07 Oct 2022 22:24:38 -0700 (PDT) Received: from localhost ([1.83.155.53]) by smtp.gmail.com with ESMTPSA id w141-20020a627b93000000b0056263bf7109sm2572909pfc.28.2022.10.07.22.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 22:24:38 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: test-org-table/sort-lines: Failing test on macOS In-Reply-To: References: Date: Sat, 08 Oct 2022 13:25:29 +0800 Message-ID: <87ilkulwdy.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1036.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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=1665206725; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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:dkim-signature; bh=qacTr4lYJ0mCMc/WUPB3NFHU+SOPBxaDb02UDVaItdA=; b=olQ3VRE31RsCE9Sr7Oc57BC9dMq7v5xwGiLXlA3/C8VCsAvrEhggre4H+EGIngk1YiNbnt sHL9a0O2+CF/2XTJK8xvv+Zt78lZH+kZXvwhs/dAs+V40mbWtZTiMhZ58vP3+wflI4EG7k kbrYkxfwZC8+/lcIqdAiueDPEU+gTRf3VLtZN+aFsfGJ10w0JyG9+l4jq+uSnxy4ewI0Sb 9gSlWItWQ9ij9h4brPvXI9pLZZhKswq/Ttp7UYAMDN7gyfCBb5nxwtN2MM1HGJhHfP9B5n yIuO2NYFsZk2HmrGs8dfUdnWtwD7gFXbU+4Yy5HAbCCqgDg47xj9WvrAAggAfw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665206725; a=rsa-sha256; cv=none; b=qhuBHOdLY3cXh9hwnzzkeechnLgq/NiP5BU+S6zjTJnGJhpmvpm9b6uwWD+ddCckz31KNK UvQqe0ea9Roq25E2yfGc6iwlTs4/Sjf8lLjNNzCkBuviu1w0RBAHO32mRsLQefIFLlIDse 7IalcADXBC+l/5MWVMBlKUZBtZ/Ks2Zs7iXedkBpe7TbfBiI8/fPSoBhfvyk7Q4RokNnoB ouybaxwHWT5uItUYEdceVd4XcKql646zC+iz5Ybjiz/O+1i+BXIKVbk1aaWGAt+qKJ8CQM 5BLFqPwRfoFOV33hlzRom3or7ZH56krAj5qu/dbYNYbUJRVNTESkaST+In0Y+A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=e2oeXn65; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.38 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=e2oeXn65; dmarc=pass (policy=none) header.from=gmail.com; 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: 5592F1019C X-Spam-Score: -3.38 X-Migadu-Scanner: scn1.migadu.com X-TUID: Z1svK6nhMML3 Max Nikulin writes: > On 07/10/2022 03:15, Rudolf Adamkovi=C4=8D wrote: >>=20 >> If I understand, "a" should be less than "B" when under "C" locale when >> ignoring case (nil) , right? Yet, I get the following: >>=20 >> (string-collate-lessp "a" "B" "C" nil) ; =3D> nil > > When case is not ignored (4th argument is nil) locale-dependent=20 > collation rules are used, so you get the expected result. > > $ printf 'a\nB\n' | LC_COLLATE=3DC sort > B > a > $ printf 'a\nB\n' | LC_COLLATE=3Den_US.UTF-8 sort > a > B Should we then modify the test to set locale explicitly? >> [FYI: If I replace nil with t, the procedure returns nil too.] >>=20 >> 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=3DC sort > printf 'b\na\n' | LC_COLLATE=3DC sort > printf 'A\nB\n' | LC_COLLATE=3DC sort > printf 'B\nA\n' | LC_COLLATE=3DC sort > printf 'a\nb\n' | LC_COLLATE=3DC.UTF-8 sort > printf 'b\na\n' | LC_COLLATE=3DC.UTF-8 sort > printf 'A\nB\n' | LC_COLLATE=3DC.UTF-8 sort > printf 'B\nA\n' | LC_COLLATE=3DC.UTF-8 sort > > then you might face an Emacs bug. IDK if it is related, but there was a recent (fixed) bug in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D55787 Note that Rudolf is using Emacs 29. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at