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 OBGbB4AifGO6LQAAbAwnHQ (envelope-from ) for ; Tue, 22 Nov 2022 02:14:40 +0100 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 cFuhBoAifGPgAgEAG6o9tA (envelope-from ) for ; Tue, 22 Nov 2022 02:14:40 +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 B72B144E6D for ; Tue, 22 Nov 2022 02:14:39 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxHrE-0006rw-G2; Mon, 21 Nov 2022 20:13:52 -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 1oxHrB-0006rg-D4 for emacs-orgmode@gnu.org; Mon, 21 Nov 2022 20:13:49 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxHr8-0006qm-IO for emacs-orgmode@gnu.org; Mon, 21 Nov 2022 20:13:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CAAFB240026 for ; Tue, 22 Nov 2022 02:13:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669079623; bh=S8HK7SAe/4wWXsHfabFbHn4T034Uo0nDU8YLJcO7DlA=; h=From:To:Cc:Subject:Date:From; b=IsDh+2DFwCTZoVJcKPWOOVqiiHpV6eiydijOp7FqIPKfhs7sCtLGBNGSsw2rdTpp/ pwkxXraurJ8fgrjqk6vvrLB2QwEDuiM7tZ0gtIZvzotbAg8xoKqnTaKB5PeBXpXRGG aadXv2WUXnPSwOqU8NOdR39icDI0gIYqwVYcR8k8AW6aY3RD1oIqhz89yFfKDlDjaP rfG7DseHEDnY4KMEMfoJDPGweCBevrFV3CJdDUpcPhRJRRZUcjsofvh9nX2Y8SdY6m rdrvbJcu/53eFXNGVnzwVnsnMVHnkYnn17AUaXbnEiJBrvsQfKQjznqKysWiyaKgWv A3Z9zIjOLUm8w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NGR923rFpz6tmF; Tue, 22 Nov 2022 02:13:42 +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> <87k03pj8vw.fsf@localhost> Date: Tue, 22 Nov 2022 01:14:21 +0000 Message-ID: <87leo3dc42.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, 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=1669079679; 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=38KQDHmSTF3119FF3rEcLmjgBdKZediqpevqBLj4eh0=; b=Yr9oZYKhh6oEcSkiULR23jWrLdWGdnVlKt2pASgoGBLSPu3v7wHCSUpCWZFEPGCoTnnx3u QC0LAnJcqb/a1FS5z2jajMg7eb/mTUTc7BhV6q9TGdSRyDt+763PFg6kNRKAHBigm9P30l 2odUEG9kBu3o96byvMpCuOvhWcRThMvBQry2bYmgZmaHhVWkICMqsDRVnUDmH0lbAbpcms 5NNw/EdXCWxiQ55xN4IaIqIy0zziE5Ei/45gIdNmryx+ToFOFsfw3lMlqXFX9tv9Kv5UO3 dJb13r/IMdR3ZecdBLpSUtjhxJoPTP5Uw02NITOTGCSpaC7hf7NjmMPySdAYBw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669079679; a=rsa-sha256; cv=none; b=VBS1Ja0qiDcNYWmHm6+ylO64leCQZwd86OypglznD/HzqOSPHJtIFczYnnCSn2Bn/649F9 p1D9aHnhkaCqRmgIGbuYExMtwaSjcaER6lAHhGN3RgtTuy4oWAH+8TygDqR0PICIjsSupm GW48QRpnBgrlsDUML+to7AnMiK8lpKT7csVCjUyCOEX9jY21PAn5GTn2bwhgzE/OrQLmCX sOcsf+kud7fyGE3PJfDWPOllqOfnZrKE1APhdLr4InRDGy0e8DLDcq4CQDKDMTHSr78Hab putWP/BUObvtcR2Zddwm7h2AFlcEWoPMXu6pYA1yD4XSjKUu9sTWEAK8139qFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=IsDh+2DF; 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: -2.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=IsDh+2DF; 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: B72B144E6D X-Spam-Score: -2.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: iNnc9XWTD+3G Max Nikulin writes: >> 2. `org-sort-list' >> 5. `org-sort-entries' > `downcase' is used, not proper case folding, so a potential issue `downcase' is used to determine user input about sorting type. Not for sorting itself. >> 4. `org-set-tags' (tag order), when `org-tags-sort-function' is set to >> "Alphabetical" or "Reverse alphabetical". > > IGNORE-CASE argument is not used, perhaps `downcase' is hidden in the code. I feel like we are slightly miscommunicating here. I mostly tried to list the uses of libc-sensitive sorting. Not specifically cases when we try to ignore the case. The problem is not limited to case-sensitive comparisons. Some systems may fail to implement specific locales and thus sorting may downgrade to simple string-lessp. No `downcase' is hidden anywhere there. >> 6. Agenda sorting, when alphabetical sorting is involved > > `string-lessp' and `downcase' so even more severe locale-related issues > might be expected. Could you please elaborate? >> 7. `org-map-entries' > > Unsure which predicate is used. It is a similar scenario with agenda. `org-map-entries' uses `org-make-tags-matcher', which calls `org-op-to-function' when user wants to select property values via />= criterion. `org-op-to-function' calls `org-string<' or similar that, in turn, uses `string-collate-lessp' with nil IGNORE-CASE argument. >> I am not 100% sure where we should add the information to >> docstring/manual and where we should not. > > If footnotes in the manual had fixed labels then I would suggest > reference the same footnote in the manual and in the docstrings. > Perhaps, a new subsection should be added to info "(org) Miscellaneous" > and "see info node ..." should be added to all involved docstrings. Sounds reasonable. >>> 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? > > (string-collate-lessp "a" "B" "C" t) Thanks! >> Indeed. Also, see https://nullprogram.com/blog/2014/06/13/. However, >> what we are concerned about here is consistency. Not the pitfalls per >> se. > > Achieving consistency across Org code requires additional efforts. Well. Just using `string-lessp' would make things very consistent. Easily and with no efforts. The question though is what is the right thing to do for users while also keeping consistency. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at