From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IEpIApRgd2B4rgAAgWs5BA (envelope-from ) for ; Wed, 14 Apr 2021 23:37:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gG6iN5Ngd2BBGwAAB5/wlQ (envelope-from ) for ; Wed, 14 Apr 2021 21:37:23 +0000 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 0A5D012781 for ; Wed, 14 Apr 2021 23:37:23 +0200 (CEST) Received: from localhost ([::1]:40974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWnCL-0002PU-Km for larch@yhetil.org; Wed, 14 Apr 2021 17:37:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWnBs-0002Om-Ae for emacs-orgmode@gnu.org; Wed, 14 Apr 2021 17:36:52 -0400 Received: from mout01.posteo.de ([185.67.36.65]:56637) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWnBp-00012B-FR for emacs-orgmode@gnu.org; Wed, 14 Apr 2021 17:36:52 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 721401A0230 for ; Wed, 14 Apr 2021 23:36:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1618436202; bh=F/nEbTiIb3YtG13F9sCJTN++tv8aMsKRLPrrvw/fH1c=; h=From:To:Subject:Date:From; b=pOFgezmh+h4WVTzvSd1JbWBeHWgLXVawnyixzQ++mHwWU3oBvkoeEsVn4Z6rU6sXW VZQG+M3bpljK4fz+djQ49dE2WMzc5CR4GXFy/rGJZqKw4EkRFfdh8tRqYejXPWr4K3 HBEBjem9O5z09iutfRN55kdH7AgMeWAv31TbSGvM9yZTDlJRN+b5eV40vJkZbek4s7 ba82PPIuOWL+X+83/SrnZSmlUGCQk0xiSbXN4uOoARy6vs/TIf3HdGKYhmDCE8+48O VfxfufPnqFV0o9QjdrFvJ4g6ymTB0kUBuBFhdqUZQy5IPBMFHku92V2X9fh0nEeVjI acOTVFpyRf6hw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FLG523bVbz6tmR for ; Wed, 14 Apr 2021 23:36:38 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: Re: [Patch] to correctly sort the items with emphasis marks in a list References: <87a6qg1rjx.fsf@posteo.net> <874kgft7n1.fsf@nicolasgoaziou.fr> <87blanxb1z.fsf@posteo.net> <87v98usaqt.fsf@nicolasgoaziou.fr> <87pmz29xjf.fsf@posteo.net> <877dl6atpj.fsf@posteo.net> <87y2dkrdzl.fsf@posteo.net> Date: Wed, 14 Apr 2021 23:36:37 +0200 In-Reply-To: <87y2dkrdzl.fsf@posteo.net> ("Juan Manuel =?utf-8?Q?Mac=C3=AD?= =?utf-8?Q?as=22's?= message of "Wed, 14 Apr 2021 19:07:58 +0200") Message-ID: <87a6q0mtui.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618436243; 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:dkim-signature; bh=/sJ6xlJ5kx5Cohc3TT7jIwWDdwgxAbtxkWD1oEA/yj8=; b=YJskrP5f6QjkKwg/rKEOXBN0WQg1IuTaMURJaaMXiZszfwzzdJ93QdAfb4fPLj3/uEmitU iHQOYhKrRi38YUemguapcCVOb9nhZ25T1jMF5votFxpKrrfFCvez56iX9fsi5CjBMQyTPP pR3trHAoOfPz5n4xL6Ud5LpD/8FqvAkUnKhguoxacJChpofg1ZnU77P1HMBwgGLs8UGVtB H95O427wFVGh/K14R9rQHjvHpkIjDydEhvv9se44k7skoLT3R5IVFBwqzi7K9LZd/JvoJd Qe60fWgyn2o8UICdnPvrsnbsNALePpsP87E5wLF/QYUJjktLsCkvSTxz3/s/rA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618436243; a=rsa-sha256; cv=none; b=ei19xyB2jwBBvmVTMQlVJHxi0IfS44SDmTP2O4DYq0qbGRP6qLrleP9xIJyCzlH8KpNXnT GF1lhVPHVu4g0J83/X37RPboVhOd8G8lM+RoJ9fd/KaqpcNIcsgPSwjMxSlOq/u27GNVjw bf5XQV4laQAWs+7/RLXiNLQ1vEtReeIbduZENh5QtUXB/ahpwA8kTgYdvVG1TBk5oo8kSw pqpgiArXXq4ddJHtRkcDoHpJtgphb94+rVsRq102tPDaWa2kXjrc4eUbcGdpyYmhuCijgZ NlS/Sra+3TVPHVE3fR2wVXe3cZeDDjONZ0Y85DALjhBxi1GwTBLbk6g4JyJcrA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pOFgezmh; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pOFgezmh; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 0A5D012781 X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: FGkuNXwe/5NP Hello again, Since I have an old Emacs version (24.5.1) on my Raspberry, I've done a few more tests. The situation is the following: 1. On Arch Linux and Emacs 27.2: - The system locales are set to "es_ES.UTF-8". When, inside Emacs, I do M-x getenv RET LANG RET, I get "es_ES.UTF-8". org-sort-list a -> wrong result; - Launching Emacs from terminal with LANG=3Des_ES.UTF-8 \ etc... org-sort-list a -> wrong result again. 2. On Fedora 32 (virtual machine) and Emacs 27.1 - Everything as in the previous case. 3. On Raspian stretch and Emacs 24.5.1: - The system locales are set to "es_ES.UTF-8" as well. When, inside a normal Emacs session, I do M-x getenv RET lang RET, I get "es_ES.UTF-8". org-sort-list a -> wrong result; - Launching Emacs from terminal with LANG=3Des_ES.UTF-8 \ etc... In this case the list is ordered correctly, but I observe that similar forms with or without emphasis are not always ordered in the same way. Sometimes the non-emphasized forms are ordered before and sometimes they are ordered after (?). I don't know if I'm missing something... Best regards, Juan Manuel Juan Manuel Mac=C3=ADas writes: > Hi Maxim, > > Thanks again. In my case, I keep getting the wrong result. In addition > to the test I did in a virtual machine with Fedora, I use Arch Linux in > my every day computers, with locales correctly (I hope) configured as > es_ES.UTF-8 (there was a typo in my previous mail, sorry: > 'en_ES.UTF-8'). In my /etc/locale.conf file I have: > > LANG=3Des_ES.UTF-8 > LC_ADDRESS=3Des_ES.UTF-8 > LC_IDENTIFICATION=3Des_ES.UTF-8 > LC_MEASUREMENT=3Des_ES.UTF-8 > LC_MONETARY=3Des_ES.UTF-8 > LC_NAME=3Des_ES.UTF-8 > LC_NUMERIC=3Des_ES.UTF-8 > LC_PAPER=3Des_ES.UTF-8 > LC_TELEPHONE=3Des_ES.UTF-8 > LC_TIME=3Des_ES.UTF-8 > > And with locale -a, I get a list of enabled locales: > > C > en_US.utf8 > es_ES.utf8 > POSIX > > However, I keep getting the wrong result :-( (Arch, Emacs 27.2). > > Even with > > LANG=3Den_EN.UTF-8 \ > emacs -nw -Q -L ~/src/org-mode/lisp/ -L ~/src/org-mode/contrib/lisp/ \ > list.org > > Maybe the problem is on Arch's side (?), although it was also reproducible > in the test I did with Fedora in virtual machine and Emacs 27. > > Best regards, > > Juan Manuel > > Maxim Nikulin writes: > >> On 14/04/2021 02:08, Juan Manuel Mac=C3=ADas wrote: >>> The situation is that with locales configured for Spanish from Spain >>> (en_ES.UTF-8) the list is not ordered correctly, unless those three >>> spaces from org-sort-remove-invisible are removed. But I couldn't say >>> why or if that would be appropriate as a patch... >> >> Did not you get a warning like the following one? >> >> (process:220): Gtk-WARNING **: 15:17:45.066: Locale not supported by C >> library. >> Using the fallback 'C' locale. >> >>> Regarding the collation rule of forms with emphasis, at least in Spanish >>> these should come after the non-emphasized forms. I don't know if this >>> is a general rule also for other languages (at least it seems more >>> natural that the forms without emphasis are placed before). >> >> LANG=3Des_ES.UTF-8 \ >> emacs -Q -L ~/src/org-mode/lisp/ -L ~/src/org-mode/contrib/lisp/ \ >> list.org >> >> - a >> - /a/ >> - v >> - /v/ >> >> So it works accordingly to your expectation. Emacs 25.2.2, >> Ubuntu-18.04 container. >> >> I have generated es_ES.UTF-8 locale using >> >> dpkg-reconfigure locales >> >> Depending on linux distribution you run, the locale may be ready to >> use or not. I tend to think that in minimal environment of virtual >> machine it was missed. >> >> I had an idea to add a test for sorting of items including emphasized >> ones but test-org-list/sort forces C locale. Maybe it was done to >> avoid failures due to missed locale. >> >> >