From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yKmVEXuul2GirAAAgWs5BA (envelope-from ) for ; Fri, 19 Nov 2021 15:02:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id jC9EDXuul2GOfAAA1q6Kng (envelope-from ) for ; Fri, 19 Nov 2021 14:02:35 +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 CE6C61B91 for ; Fri, 19 Nov 2021 15:02:34 +0100 (CET) Received: from localhost ([::1]:46904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo4TJ-0003SV-3o for larch@yhetil.org; Fri, 19 Nov 2021 09:02:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo4JE-000181-Uu for emacs-orgmode@gnu.org; Fri, 19 Nov 2021 08:52:14 -0500 Received: from [2a00:1450:4864:20::530] (port=37662 helo=mail-ed1-x530.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo4J4-00011V-Fn for emacs-orgmode@gnu.org; Fri, 19 Nov 2021 08:52:00 -0500 Received: by mail-ed1-x530.google.com with SMTP id e3so43042551edu.4 for ; Fri, 19 Nov 2021 05:51:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=eSV0nmGTu8Y5XmWIk/w5W2t9/43d7cBcc8F4HYIR/ro=; b=DvXVb7+VmvWmlNGOLuyY2E6EuTh3Fyg1jkyJD3PftLzWGTiSTx//EwJ6aVnkSSCdJL mqwIv8K5X5lIdsYMYjRDhP89KBftIGJj28VQWScn+h+072d0SKjpxDjAuxFzkQrDIBe9 hybrbC76C29MYgEfWyO/iVkXSNAX88I1kkgg41xaBD/vScfoOHQRq0xq2UynuuuokdkD XfBvc+KC9lABc+QRzkFCE15rcD9EWHDzR4EX6kVCYoWpT/Urv7rA0YAVE4VL6/AGh4Xa z5kV/bVs+smAw7COamGWt6UumjyMHw8fIz30awYPx3Chg/qdtVNe8ME1+Nehi8dYpz8t KflA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=eSV0nmGTu8Y5XmWIk/w5W2t9/43d7cBcc8F4HYIR/ro=; b=TXzFFxdtwRa+WWQAfGGPknMqEv6WIHj6oeWWzKoV37M0zs9+KdESwq3ldGd4SCkOw1 qvVBxSkyMb0pcWyb8x2nnfJRYBugdsiOYnvFg6x3CHRXVu3V9sce0hln0wUifyHNOBp+ uaoAFcOGqm2T7KFObyUeH7qWHV1HuRCpLbTg643y5NZBG54p4PhCWzLHdPft/7WcObS/ PSaMoJ+ujRXkqr+06y2dWOfgkdZH9hZGwkzg0mgwGePq2YrClkS4g90Iy/gcRAmxfOae a3MfK4ZErYXPjJepvpzASaDsQqSDs8wzYwYTF6lbTmaSXk8BcoONLQh4fUj3XqiMzsDe x0qw== X-Gm-Message-State: AOAM532pEdWbltvqENFehXBc7e1Wyxu9lea0eIitaqhaY2N/NDRaMHyD NivCvO8Bslsh8iayQaHUvD4= X-Google-Smtp-Source: ABdhPJwwSEWKX2CiUUE2D3TSow2AenbMpvNtiHzB2KyOzjysDnxbXp6soEZpnVXy5wmqSwibP7/Iew== X-Received: by 2002:a50:da0a:: with SMTP id z10mr24727882edj.298.1637329917140; Fri, 19 Nov 2021 05:51:57 -0800 (PST) Received: from localhost ([91.210.107.150]) by smtp.gmail.com with ESMTPSA id hb10sm1277419ejc.9.2021.11.19.05.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 05:51:56 -0800 (PST) From: Ihor Radchenko To: Nicolas Goaziou Subject: Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on =?utf-8?Q?=E2=80=98org-emphasis-regexp-components=E2=80=99?= In-Reply-To: <87zgq02ueq.fsf@nicolasgoaziou.fr> 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> <87zgq02ueq.fsf@nicolasgoaziou.fr> Date: Fri, 19 Nov 2021 21:53:16 +0800 Message-ID: <87h7c89rqr.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::530 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=yantar92@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637330555; 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:dkim-signature; bh=eSV0nmGTu8Y5XmWIk/w5W2t9/43d7cBcc8F4HYIR/ro=; b=hOlmhQVC9ZbkgGu8cCtIqmC0NmcKQRzXJmuM/qfG5hGzcAbWpOt6IOD45+MEE+rFgZuYDe nfGnLCJcuDyi4TZJFHEuMwBg/WjjZQqoCl/AEy2E7e1Ggka6NmatoSd2Fzuz4nsAnjf9kv Y6X8tEk7ctJOkJetkcPEoWuY+Khhc4EK94PHSijs59eNcF6IwwWwyUgg2ekmq/j4HJYFlD IZs2OS7MYyGWBTl05k/hBibTYAm406uMiWuWaGrO2ysGIxfw2acRERlkT/FmmiKaw1iEni h900r8AxbObtHzF4nEtYch9ys4Ddq8LGI57GHlcU5H+6nDcFKE7aQB38iTDRmA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637330555; a=rsa-sha256; cv=none; b=hQuSyJP5yB1XR5Aygu1rDIWeYVwucEX6MaEKCVqoEy7JSDJAgnm8Y7CZ0tKKHmZbh9GmX+ NDEGtnMa6HJfR8yMlzjuHjRw3S1zF4IiGbx0O1LRLy+4CnmXHMiXmkMv5w7ks5/QV5ady1 Yv+ly1XnhzTzqAwBxTr/aobqpobF5KerR14Jp6XWTKn4SD8I/fQLqfsnkLFOCpF01DSRO1 pSYdSLvhTgEvyGAbrztXrlQo0oy0gIrn/7CAb00EWmWLExksNHMzV2+BTP7N9xrky4JI2X e+uDfWgRmkqhKBZZADQMHDaR1fJCXw40TSNSKJkEIsNsz5bCUBBZDLDH79c0ng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DvXVb7+V; dmarc=pass (policy=none) header.from=gmail.com; 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.57 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DvXVb7+V; dmarc=pass (policy=none) header.from=gmail.com; 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: CE6C61B91 X-Spam-Score: -3.57 X-Migadu-Scanner: scn1.migadu.com X-TUID: Wha/AcxmMgj5 --=-=-= Content-Type: text/plain Nicolas Goaziou writes: >> +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. I updated the patch. If you have no objections on the new wording, I will push it to main. >> + ;; 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. Ok. I will create a new discussion thread on fontification. Best, Ihor --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org-manual.org-Clarify-how-to-handle-markup-ambiguit.patch >From a1a497a80578669ef1e96700aa592aadd8d0d7ec Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Fri, 19 Nov 2021 19:27:56 +0800 Subject: [PATCH] org-manual.org: Clarify how to handle markup ambiguity * doc/org-manual.org (Emphasis and Monospace): Advice users to insert zero width space when Org does not parse emphasized text correctly. --- doc/org-manual.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/org-manual.org b/doc/org-manual.org index a38dbec4a..9615209a1 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -10818,6 +10818,17 @@ ** Emphasis and Monospace ~org-fontify-emphasized-text~ to ~nil~. To narrow down the list of available markup syntax, you can customize ~org-emphasis-alist~. +=*=, =/=, =_=, ===, and =~= symbols inside =verbatim= or ~code~ can +sometimes produce unexpected markup. For example, + +#+begin_example +/The whole line is supposed to be marked italic, but the following +~user/?variable~ contains italics =/= marker and confuses Org parser/. +#+end_example + +You can use zero width space to help Org sorting out the ambiguity. +See [[*Escape Character]] for more details. + ** Subscripts and Superscripts :PROPERTIES: :DESCRIPTION: Simple syntax for raising/lowering text. -- 2.32.0 --=-=-=--