From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GKqTNl/temOPLAAAbAwnHQ (envelope-from ) for ; Mon, 21 Nov 2022 04:15:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SO+bNl/temPugAEAauVa8A (envelope-from ) for ; Mon, 21 Nov 2022 04:15:43 +0100 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 820AB2FEB6 for ; Mon, 21 Nov 2022 04:15:43 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owxGg-0001Qh-N2; Sun, 20 Nov 2022 22:14:46 -0500 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 1owxGb-0001Ps-9O for emacs-orgmode@gnu.org; Sun, 20 Nov 2022 22:14:41 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owxGY-0007cG-Iq for emacs-orgmode@gnu.org; Sun, 20 Nov 2022 22:14:40 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 33862240101 for ; Mon, 21 Nov 2022 04:14:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669000475; bh=k7JA+tkjoKx8Rqv3fbcbdT9YoUaVDW9r+7Yk1+EktFE=; h=From:To:Cc:Subject:Date:From; b=WwxmTsm20Frl7POZmbCnWuqYsiWlQVvA8n5oKntz7mANwkHdNxDF6nGOxrKyLHnSI h/glTvNYGMEvkHz4UsJp4oDlK9t0qwbzlg66FopdWx1ooBJguGACX6o50a8v67wAf0 h/wPv4iJGlwkTEUojAZk8eoScmDtCW2nRL9wBH0CzWKgvU0AQlSTThp/pnNWLXkgwK +Fd2RUmntraJhhiSOB9MJlo3jbQ/9HCUj2DG22MZJ/ZlNpU8gj/xst9iR3PzdSj30P YYxomUruuRbNGQPJxAqVs8EPma+nZdlZl85qOidcxHQAfuBQQ8EJahD55qWRACFiy+ NneeTE0mVx93A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NFstx3jH6z6tmB; Mon, 21 Nov 2022 04:14:33 +0100 (CET) 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: <87ilkulwdy.fsf@localhost> <87y1tpejfm.fsf@localhost> <87wn7wdfis.fsf@localhost> <87pmdil0m0.fsf@localhost> Date: Mon, 21 Nov 2022 03:15:15 +0000 Message-ID: <87k03pj8vw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+larch=yhetil.org@gnu.org 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=1669000543; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2Bj0/PT19LJ0CIewJXfz7iOt34btuzHuS4b9rf3qKic=; b=ftx+P3AOdAAC6goqFx8L9sUOhvveVvy1VvG06qnoALPlFwdjC/QOs7MMZbz4zW1+4YKpA0 fzjU3HF6ie8n0Cpna5lwhUMfCpnBmQjMhyRquWO8wPJSwSGWGZ0J0iS9QVrtlKcnQbxa8l b1nvrlLNGDPD0TBaN8/p4qYdKISq5aTWaEgQ0bF1QnmYgv4WHUOI8p3YRQOgw9fohHI3O2 wSOAN1/CHTT8WwqT+r4HARgKnYWsPtn6bWlLhhhMDrLLeIvUR65DmWI8BObNlIqqlGyv9b hjo+8z8EsFqYDopn+U9mTYspq+YfPiFz1JbV2sLEFjksZOVeOPb6w+pHN9tQsQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669000543; a=rsa-sha256; cv=none; b=AWahK/U0DzShBgzJ59OAIFGFL95op3wmJtisIraACzxKzLY3RpKG5mj1aPlcb/CfnoMb70 OEBsidWVrV8bMYVZ6c/6TFH8k2WmC4grbdkzYocBmJhFVtycUoNRA8W9EcNFrZthNdQTYq W6hq0ISa2XhfmxfTna/cFz4hwLhdR/M+KdcnBcV94KgeKsQsrLx0UyAveBbjkh0Yta2kUi 8duzFT46vUWa8bDCKT6iP6FZpYaVgDqEB1HROS4NyNJ+CeDQ6nE6zdIQTtPQ/sNgJTL4qs ETxfk++zhSdkb8nXGjetUN/Zo+VpGA5VuAbvniEGlvxI/254a60NZaPHLO9PDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=WwxmTsm2; dmarc=pass (policy=none) header.from=posteo.net; 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.50 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=WwxmTsm2; dmarc=pass (policy=none) header.from=posteo.net; 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: 820AB2FEB6 X-Spam-Score: -3.50 X-Migadu-Scanner: scn1.migadu.com X-TUID: fugJyRNl0adn Max Nikulin writes: >> However, I am not sure if ignoring locale is something we really want. >> WDYT? > > I think we should keep `string-collate-lessp' in the > `org-table-sort-lines' implementation. Users expect sorting accordingly > to their locales. However it is better to add a warning to > `org-table-sort-lines' docstring and to the manual that caseless sort > depends on its implementation in libc, so currently it does not work in > clang/llvm and so e.g. on MacOS. Sounds reasonable. Note that not only `org-table-sort-lines' is using `string-collate-lessp'. The full list of functions potentially affected by libc sorting is: 1. Bibliography order in `org-cite-basic-export-bibliography' (via org-cite-basic--sort-keys -> org-cite-basic--field-less-p) 2. `org-sort-list' 3. `org-table-sort-lines' 4. `org-set-tags' (tag order), when `org-tags-sort-function' is set to "Alphabetical" or "Reverse alphabetical". 5. `org-sort-entries' 6. Agenda sorting, when alphabetical sorting is involved 7. `org-map-entries' I am not 100% sure where we should add the information to docstring/manual and where we should not. > Concerning the test, I would split the current testcase into 2 parts > depending on WITH-CASE argument, check if caseless collation is > available and skip the related test otherwise. How can we check the availability? > As to the thread linked to the bug report > https://lists.gnu.org/archive/html/emacs-devel/2022-07/msg00940.html > "case-insensitive string comparison." Tue, 19 Jul 2022 13:27:50 -0400, > there is a link > https://stackoverflow.com/questions/319426/how-do-i-do-a-case-insensitive-string-comparison > unrelated to the issue, but comments and answers there describe a lot of > pitfalls and explain why string comparison ignoring case is not trivial. > (It is a Sisyphean task in some sense, I like the comment on 3 sigmas.) Indeed. Also, see https://nullprogram.com/blog/2014/06/13/. However, what we are concerned about here is consistency. Not the pitfalls per se. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at