From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SG60K6o7f2CpJwAAgWs5BA (envelope-from ) for ; Tue, 20 Apr 2021 22:38:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aJlAJ6o7f2BSZwAAbx9fmQ (envelope-from ) for ; Tue, 20 Apr 2021 20:38:02 +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 292B02B07D for ; Tue, 20 Apr 2021 22:38:02 +0200 (CEST) Received: from localhost ([::1]:50610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYx8D-0003H1-Cw for larch@yhetil.org; Tue, 20 Apr 2021 16:38:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYx7r-0003Gv-8K for emacs-orgmode@gnu.org; Tue, 20 Apr 2021 16:37:39 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:48273) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYx7o-0005ph-TS for emacs-orgmode@gnu.org; Tue, 20 Apr 2021 16:37:38 -0400 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 561181C0009; Tue, 20 Apr 2021 20:37:33 +0000 (UTC) From: Nicolas Goaziou To: Maxim Nikulin 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> <87lf9fa3ak.fsf@posteo.net> <87sg3n8f33.fsf@posteo.net> <87tuo2d670.fsf@nicolasgoaziou.fr> <87r1j6b6ku.fsf@nicolasgoaziou.fr> <87a6pt9hyd.fsf@nicolasgoaziou.fr> Mail-Followup-To: Maxim Nikulin , emacs-orgmode@gnu.org Date: Tue, 20 Apr 2021 22:37:31 +0200 In-Reply-To: (Maxim Nikulin's message of "Tue, 20 Apr 2021 22:51:47 +0700") Message-ID: <874kg0ae0k.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.197; envelope-from=mail@nicolasgoaziou.fr; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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: , Cc: emacs-orgmode@gnu.org 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=1618951082; 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; bh=78iQjnwUkZv+pDv4Hne/pPWQZQ1VhDppPoJVIy4vvDc=; b=Kx4DqKx7Zrluqi32i4CCUDGsBqMUyYPg4A+K+5kM72UQBO/4wNFPQHin9UAwVN29Zp6KzF wNPBj4WTWR0LSkE05vRVTdxxcuD1tBaW2mrRjITLgLYbxHneMMFxrPqMVlgLwNs+OdXitY QvolgfTSxPkUtyR8t9j1zNHOIf/UTrwvtgMVCaIlduDVaSoF4zj6qGxN4S53kcXNeBc0vV JO70aXjLmu5nm3e1Ch3fSbPlc7ElNsFE4XD9nlJfP5rsSK/ImhkZNEPqDV2II8BhdbIeay /i4NkjklySzxnTAhyjU+6NZA/ZFzpGLt9Ipp6SEOZGsvBRrHBvVh4BraCHq+rQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618951082; a=rsa-sha256; cv=none; b=f7u+RmD0tu9KX3IZntV5Xr9EZqRRTsR5WJlw+MfmqTEkxibxsYRM8gnJWVX4yaejHbjDPm DByYfHr+R4HwDbHoVZJ3yyygKfb9Cmx4AdjN/D/8whu7uUotONszkKgka7IlDIikol3iIn 8FozLP3hKcJVssqd7k/rcsFY+G5+80kWZplO6bXswlXEve1mcIECLfKmlczTkywas8vbEu EhC3nVe0g26azMGVxblVZXH08QAlRIKcSL2vwVBkAmGf3fw4dkp+VUN7DKvcEmetc8GY+g JzTIJ9MoaO2m3mMHtxkkt+jXfxduYASPraD3UBertSkxpQyUtfXs2i5oT4vWlQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: 292B02B07D X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: hzPnjgQzqiuQ Hello, Maxim Nikulin writes: > Surprisingly there are still cases when the old approach works better: > > (let ((s (org-sort-remove-invisible > "A /wrapping [[https://orgmode.org/?a=b&c=d#e][link]] emphasis/"))) > (set-text-properties 0 (length s) nil s) > s) > "A wrapping [[https://orgmode.org?a=b&c=d#e][link]] emphasis/" > > I expect "A wrapping link emphasis". Yet, your expectations are wrong. There is no link in the text above. Emphasized text starts at "/wrapping" and ends before "/?". Granted, this is a situation where the Org syntax is not very intuitive. Anyway, the new function is more accurate. Maybe we should require a space after punctuation following emphasized text. I don't know. This is orthogonal to the current discussion. > In the meanwhile I have tried > > (benchmark-run 1 (org-sort-list t ?a)) > > in a file (1100 lines) obtained using I don't think performance is really an issue. Of course, the suggested function is clearly slower than the current one. Regards, -- Nicolas Goaziou