From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gGgDKJpfZ2B4pwAAgWs5BA (envelope-from ) for ; Fri, 02 Apr 2021 20:16:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gADlIZpfZ2CjNwAA1q6Kng (envelope-from ) for ; Fri, 02 Apr 2021 18:16:58 +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 E918D2894E for ; Fri, 2 Apr 2021 20:16:57 +0200 (CEST) Received: from localhost ([::1]:49110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSOLo-0003Uv-5l for larch@yhetil.org; Fri, 02 Apr 2021 14:16:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSOKc-0003QU-5x for emacs-orgmode@gnu.org; Fri, 02 Apr 2021 14:15:47 -0400 Received: from mout01.posteo.de ([185.67.36.65]:38015) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSOKW-0006mh-02 for emacs-orgmode@gnu.org; Fri, 02 Apr 2021 14:15:41 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id AE13D16005F for ; Fri, 2 Apr 2021 20:15:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1617387331; bh=r6DctUNHlbhL3LMNwdFIwV0kqKHBPaOiCX0ComG+cY4=; h=From:To:Subject:Date:From; b=nc90FJWjMDttvA8JXkSzzesKwNsw3yZDYYH3qPhoFbPohrDtHtOYHgSdYdsULT7Lc 06jILztFYnWpncvcqmZEP0Is3LENk4clWCLMr+1htdXvmaXYQKUMvaRCruSF3jgSqJ Im1HZw5746Zt0bCYW4w9pZqXSVhikIe95yB/lQNt5No+04ts5PFbmRebXY13JaRhGV 9gdUg/1yg3GeNLc6mHTRaGV0tYA3sXDct6yPB/FBTI4dPYBVLZ8Ho26k8QgHdB+1xp Pix/pIJlio7tVbaqLNioUWlvj26X54LJE2DIdiFNqN9Rql5ZLtDAVcn7QIdsAp/mvA agi5Nd0wsZSnw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FBpBW0ykqz9rxD for ; Fri, 2 Apr 2021 20:15:30 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: [Patch] to correctly sort the items with emphasis marks in a list Date: Fri, 02 Apr 2021 20:15:30 +0200 Message-ID: <87a6qg1rjx.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@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, 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=1617387418; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=U5NS2R0pmjWnewoQmrtH2flsw4tA9lr2VjKYpTE/Fcc=; b=mtzY3/Epgt0hJ9yskOjoQ4RAHUhI9UybRlOqfH/rnDJ2MwG1c49sNPbtKhn9lRgEk7x6R+ mKwyLqx3JLqI9+bpdhZkoJBD1cC2wXSQuL2+PnnSl1x7gDwmHcxxKJtVmUS9srsJBSw/ud BAbzyNihQetUytHpbC9Z/V3yIGiYjIUxcxcqqKehxtMgEkS4p9kIq3BZ3p2e72feqzBAxC 8uE4Cf13XLiQypoXiJ+e4cYTba6uo4me7HxABpr8TP9WLl4KLLPrSna2SFWXeahWgwSe1Q 1ZerbTPh2R/mErTqGL22GxBUG7QBWVfhqyTAIQDH3jFGaM8tmgbR64fJqyUxxA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617387418; a=rsa-sha256; cv=none; b=MbCUDbnKbw+sNsoANh34jZ/T/dXgbZQ6RKnxmWNiMXgpLqgQTt7R+Ts9WClxGfSFCCPUqa mxJhjHtJVOSq6kAyxNRHXETR9Wn4MMd/kaufod2ydBNTcHBjlDrDURzQMML+stR2COqTxg Xd37PcRfGoJuBig4LF5dg7GPJYRkvEZ9RA9trRxCu0yVwNSc3acOowq4JLyy3VMFRnmfvu Ibwbd6uUORgBAJXJpCB8A2XhZtCkSplahMFSRDYw2fhy+3IYWvmKzXsX2c15CMaXUV9VH9 cWh6pZsIMxz9ohQKGHxvE5kMvRVNlJnS2SUfyiF9CbaYcey9FT+pIXveR9TTbQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=nc90FJWj; 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: -1.63 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=nc90FJWj; 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: E918D2894E X-Spam-Score: -1.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: uPLRzKi9mJ7D --=-=-= Content-Type: text/plain Hi all, I have noticed that a couple of (spurious?) spaces in a `format' expression of `org-sort-remove-invisible' is causing `org-sort-list' not to sort correctly (alphabetically) the items that contain emphasis marks in a plain list. I propose this very simple patch to fix that problem. Best regards, Juan Manuel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=org-sort-remove-invisible_remove_spaces.patch diff --git a/lisp/org.el b/lisp/org.el index 04da1afcd..d10cc2f5c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8114,7 +8114,7 @@ Optional argument WITH-CASE means sort case-sensitively." (replace-regexp-in-string org-verbatim-re (lambda (m) (format "%s " (match-string 4 m))) (replace-regexp-in-string - org-emph-re (lambda (m) (format " %s " (match-string 4 m))) + org-emph-re (lambda (m) (format "%s" (match-string 4 m))) (org-link-display-format s) t t) t t)) --=-=-=--