From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id yE0sLAdCfGfwywAAe85BDQ:P1 (envelope-from ) for ; Mon, 06 Jan 2025 20:50:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id yE0sLAdCfGfwywAAe85BDQ (envelope-from ) for ; Mon, 06 Jan 2025 21:50:15 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Y9zm4DAa; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736196615; 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=JNkyWO1pfKZpCVvRmCKS1j2TnCr35mFwEWtUpD4NSWs=; b=O0IFjoENrhP1HM3NEq1xxnYvRxE4KIBlU1xE+YKjKmpnaVrzT///RP/aLYkjSPDn+oENhM apWfoxKm3470xPG0dUaSN+wUgJ8KHF5WA0K/Bk/tbgw9PzXlyt4srhybdftfX68q7gWA3V 3JwbIFwXfJGlNRRESF0eo2EYt20wpnp4TV0iCGha8u6QMvjJX+KmNzr2Krqsz5nXyBGeBN BxCySvSCCwMWn5DwS7aZyZBFN5O2xzsvrrB0Y66jDiftv/M2jqOymho38FW6+Q7L7U6xng vt6b1MjO2fvPfWt2TKGVQC5/EYonJfdaipPJWnXxwnkgg5CCu1nwQfw7uCXJrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Y9zm4DAa; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736196615; a=rsa-sha256; cv=none; b=UQkU+9HGfBvjfivJkRAZDW7Lupe+YvNrAwchjqOTg7Ri+R7MM2QynVOuAjlQB7efMysvH/ sBMuxf6GpEvcSabDE9IaefzZZBK10AkB+eHpZPmgoT139mVfvcJVZQip627bhFID2lDQfV KMIY31sr02JRmvSRzcLxTJUUPb1WHs5C3utz/YOOAuKmwPWE+rl6d5AeHIA4Nu+vEjV4ZG R2z3Xbm6utP7hoBTGT1mG+ccje5e0bIfdGGS8Alpdr++k/C/GHq1lFOubwmYlo3qMT3csy n1547nvDPZjuIMT3/nATQBUgUKhWZgcabXGer9lsQG0yfzUqusuBTFazvnWLUg== 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 5F6CD25958 for ; Mon, 06 Jan 2025 21:50:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUu2W-0001uv-U0; Mon, 06 Jan 2025 15:49:32 -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 1tUu2T-0001ue-2x for emacs-orgmode@gnu.org; Mon, 06 Jan 2025 15:49:29 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUu2P-0007yr-R4 for emacs-orgmode@gnu.org; Mon, 06 Jan 2025 15:49:28 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5d90a5581fcso7414220a12.1 for ; Mon, 06 Jan 2025 12:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736196564; x=1736801364; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JNkyWO1pfKZpCVvRmCKS1j2TnCr35mFwEWtUpD4NSWs=; b=Y9zm4DAaoV5pmvh3/g6ok09VQM0IXiqE815BlgGBSBOOYCwStq4lsH/63OESsA/FAz QddmpFi4WX4TPh2VC+I19NVGjqVEuguxrOI6QG+8kEF8FbMogf0sOocpPgwN5HKDIRYX MXdOmUVrg+3kxGg9cyzJt24OKMOK2V22xCQkq5MQMff89zVafnxZba26ONQ+C8856XIK ODEaUODMFKyfgS9IB4vXp3Y9iY9Ab9s5zItkRoQ7ugVlG/NmGV9ZoGr5vaYU0uV6NnDh VOEmcBmejDHrJ1uGboFEL8bUmD4++HXyhbVoDxJxEhSshjM6yOUE4xhVF8iZt+nLEiD8 JX7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736196564; x=1736801364; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JNkyWO1pfKZpCVvRmCKS1j2TnCr35mFwEWtUpD4NSWs=; b=HysUUK8TLtj6Hg5NUKg1Fi376cBJQ12Wn+eBzZUaGP+ipKhyboXcWS9r/AkeLmm9Gw P19jRDlVTjn8nj6wojDbKeTs8ncKz7gxlWIqYOqXWrhuJ/qgpe5/m2u9qOcIGG9MLC3k P8Tk+23P5cvte7J6OnQhNnmrqxoz/DQ2GEIuTlIw8CCjLEJm2j821jxlJpViXIcLPbUT H5pBFfVdD7j0PvjpSJCqJC8uazS2ystnn6wT5oTIuMyqKtGrENuqByQA1FIuDIxHqyZo 7+rQYN1MSJ52BvMIoa/unPx4t5L9qxVxovV61D2PY8k23ccZfaQD+8qRe4EaxqOwRZo/ QiUg== X-Forwarded-Encrypted: i=1; AJvYcCVEPIKltgQMKfGHMaE/ROmCyHR9ojXhrr54fmtPxlZpTfl4yPPBETWnsLeURSV7v2WdNOonrmap9VHwb4vf@gnu.org X-Gm-Message-State: AOJu0YxVnR6MmY8DJyNwCLlwaXjXM0EHgMOg36Uy48cabbY1oIyrwpgs U9o5FFPz0BS+Hpxi3IXL1YoodZuPgHIQW7wrki7EBxh5a6An4LxRmV/zqNw2LqcuMd6lqR0d3EC h4PWMugIK1uw5poM3ZPnxENt1evI= X-Gm-Gg: ASbGncsrxs6qpDdtA5oDEHBlWajeeQLgy71KKqPcY2K7z4dDCOJP3hA0EepcjMmxV89 hZqByjNp2142lfBiaTDdz39aH3e9nvnA7wd6/N9iJke+4icwsxRFKkwNUo/1SGBrGbmcI8A== X-Google-Smtp-Source: AGHT+IEZmXLLFTd+QL1BV/2EGPEW7HdK4lbW+W9u8SJpeVtkiSRn4oGORyApF+nBmnWZJQ9KLVYY6fszt7ZpN3d93lA= X-Received: by 2002:a05:6402:84c:b0:5d3:bab1:513f with SMTP id 4fb4d7f45d1cf-5d81dda83f8mr61525657a12.18.1736196563744; Mon, 06 Jan 2025 12:49:23 -0800 (PST) MIME-Version: 1.0 References: <87ilkulwdy.fsf@localhost> <87y1tpejfm.fsf@localhost> <87wn7wdfis.fsf@localhost> <87pmdil0m0.fsf@localhost> <87k03pj8vw.fsf@localhost> <87leo3dc42.fsf@localhost> <87a5c3hjko.fsf@localhost> In-Reply-To: <87a5c3hjko.fsf@localhost> From: Michael Brand Date: Mon, 6 Jan 2025 21:49:11 +0100 Message-ID: Subject: Re: test-org-table/sort-lines: Failing test on macOS To: Ihor Radchenko Cc: Max Nikulin , emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=michael.ch.brand@gmail.com; helo=mail-ed1-x52f.google.com 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, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -3.45 X-Spam-Score: -3.45 X-Migadu-Queue-Id: 5F6CD25958 X-TUID: R8owkNItlJoL On Mon, Jan 6, 2025 at 7:38=E2=80=AFPM Ihor Radchenko = wrote: > There was a transient problem on main. Now, make test should run. Now I see, fixed a few minutes before my post, thank you. This reveals that the test failure discussed here is the same on main as on bugfix. In the following I will use the term "bifurcation" as short for: Using ~(string-collate-lessp "a" "B" nil t)~ for the purpose of telling whether the parameter to ignore case has an effect on ~string-collate-lessp~ or not and to choose the right expected test result (the currently implemented case-insensitive or the to be added case-sensitive) for a test result involving ~string-collate-lessp~. > AFAIU, this is more complex. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59275 looks complicated to me too, but just the very narrow sub-subject of bifurcation seems quite simple to me and I don't agree. > We cannot have a simple test for all possible locales. Why is bifurcation not doing it? > Or did you find one? To my understanding it is bifurcation. > My conclusion from bug#59275 discussion is that simple tries like > (string-collate-lessp "a" "B" locale t) > will not work. I have read a large part of bug#59275 but missed what you mean by will not work. Probably not work for this and that, but for the purpose of just bifurcation I expect ~(string-collate-lessp "a" "B" null t)~ to be sufficient. > Especially for non-US locales. I expect bifurcation to work with _any_ existing or future locale. ~(org-test-string-collate-lessp-ignore-case-supported-p)~ simply measures whether the parameter for ignore case of ~string-collate-lessp~ has an effect in the locale of the current scope, in any locale, libc etc., regardless of how complicated their impact on this matter is. Although it is not necessary for bifurcation alone, the locale in the scope of #+begin_src emacs-lisp ;; Sort alphabetically. Enforce the C locale for consistent results. (let ((original-string-collate-lessp (symbol-function 'string-collate-les= sp))) (cl-letf (((symbol-function 'string-collate-lessp) (lambda (s1 s2 &optional _locale ignore-case) (funcall original-string-collate-lessp s1 s2 "C" ignore-case)))) #+end_src in test-org-table/sort-lines is even clearly defined and a very well known and simple one. I don't have any concern about bifurcation. I would even go further and suspect that my patch not just fixes the tests but (as a side effect, not as my goal) obsoletes the current "Enforce the C locale for consistent results". My patch _neutralizes_ the ignore case behavior of ~string-collate-lessp~. Contrary, the current implementation tries to _fixate_ at least the ignore case behavior of ~string-collate-lessp~ which is not possible for some cases according to its docstring.