From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iBNTB2Gbl2GMfwAAgWs5BA (envelope-from ) for ; Fri, 19 Nov 2021 13:41:05 +0100 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 WOzgAmGbl2HjSgAAbx9fmQ (envelope-from ) for ; Fri, 19 Nov 2021 12:41:05 +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 789BC1C2FC for ; Fri, 19 Nov 2021 13:41:04 +0100 (CET) Received: from localhost ([::1]:38634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo3CQ-0000Yb-QC for larch@yhetil.org; Fri, 19 Nov 2021 07:41:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo39F-0000Mn-GJ for emacs-orgmode@gnu.org; Fri, 19 Nov 2021 07:37:45 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:44487) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo39C-0002pw-K6 for emacs-orgmode@gnu.org; Fri, 19 Nov 2021 07:37:45 -0500 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 708AF1C0007; Fri, 19 Nov 2021 12:37:34 +0000 (UTC) From: Nicolas Goaziou To: Ihor Radchenko Subject: Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on =?utf-8?Q?=E2=80=98org-emphasis-regexp-components=E2=80=99?= References: <87o86mw86r.fsf@localhost> <87fsrxkahq.fsf@nicolasgoaziou.fr> <87fsrxa1j5.fsf@localhost> <878rxoa6lk.fsf@localhost> <87tug93b2a.fsf@localhost> <87y25l8wvs.fsf@nicolasgoaziou.fr> <87r1bd39ny.fsf@localhost> <8735nsv9qo.fsf@nicolasgoaziou.fr> <87mtm09xzf.fsf@localhost> Date: Fri, 19 Nov 2021 13:37:33 +0100 In-Reply-To: <87mtm09xzf.fsf@localhost> (Ihor Radchenko's message of "Fri, 19 Nov 2021 19:38:28 +0800") Message-ID: <87zgq02ueq.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, RCVD_IN_MSPIKE_H2=-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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Nikulin , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" 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=1637325664; 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=WKQ5uPXdGhxMoP4RI7dnyDCRkzX3G/bvsOFdyBkmnlM=; b=bNDbeNH184aY2XTD9hafHRy2sq+2B6TTfUdUYdZSrKizT9vJKZGw8K8D0hcrhcMHze2G6z FWJYpPiwrbyVmzBqfz3v2ifOtVBu+/aw+cyvce7a1hxjAe5oESwJCwNTj8G1SJ3LCO58G6 cgP5z7KjQrj9gc9y+N0sCc62jm/ggVEXaYiLlmrL53BDfCMKs7BUY+2ubiDlBWArzmnzDs O+4t4X9cPEciwHqh09S1Wp3O7LS2cyA3RUfhgtaFpzmo9MZ3cRbSg9PD4GTb+2ySUGQv9i ggfgcKNoHGqLI33LxdxCPYkBLmXTjsY1/saQPToxOmtLMMAaLwBABqEEZ2eJhw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637325664; a=rsa-sha256; cv=none; b=lAi1yCS/Q4QcX6gTx1slUCuij2WM+GL92jq51BoKJ4GjkPh/PwRpATsSoS6wTdYlmb9wvd +8xU0dA0I4yJq5AH3m5qAFvYlDiK09sQJnZ6953ahpOVkuFUbdJVoVso3RZyw7N7E11VDW 5E8dAWRArkMvfSx/toDMd9LSvtZ0Gpa9w9SYdWnzoQ8RyGc/E5Bh/XixzEu14r0UYwB9bP jYaWgtXk/zmW56zVtkdiq5XmjMwIOrQkmcm562lw/ECaDbEQtD38ESN5ndw9N8wesnQkMq 7AwcWx4i1nkHcGbHqe6Isgu+R0mlFO5H7tKaNVpXKTDkKtNWUpmfICNsKw/5Tw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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.96 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 789BC1C2FC X-Spam-Score: -2.96 X-Migadu-Scanner: scn0.migadu.com X-TUID: Meyg+v2J4qIh Hello, Ihor Radchenko writes: > * doc/org-manual.org (Emphasis and Monospace): Advice users to insert > zero width space when Org does not parse emphasized text correctly. > --- [...] > +Sometimes, Org mode has difficulties recognising markup. It usually > +happens when markup marker symbols are present inside verbatim or code > +blocks: I disagree with the wording. Org mode has no difficulties recognizing markup nor does it parses text incorrectly. This is similar to the well known surprise: #+begin_example * something #+end_example Here, we are simply fooled by the fontification process. Otherwise, the patch looks good to me. > + ;; Verify that we are at the right object. > + (let ((object (save-excursion > + (save-match-data > + (goto-char (match-beginning 2)) > + (org-element-context))))) > + (and (memq (org-element-type object) > + '(bold italic verbatim code strike-through)) > + (eq (match-beginning 2) > + (org-element-property :begin object)))))) I sympathize with the idea. As long as fontification does not rely on the parser, we will face issues like the one at stake. So, ultimately, Org will hopefully move in that direction. However, I'm not convinced making such local changes is going to help us in the long run. It may be more fruitful to think this evolution globally, as it involves a fair bit of rewriting of the fontification process. For example, it may only be necessary to parse the part of the Org document being fontified only once, and then apply all fontification functions to the resulting tree rather than have each of them calling the parser, like the above. In any case, I think fontification deserves a dedicated thread, in addition to some love. Regards, -- Nicolas Goaziou