Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > Thanks for the update, and apologies in advance for being bold, as > I have some additional comments about it.
Constructive critics and suggestions are always welcome. And we do not have pressing deadlines here :) >> * doc/org-manual.org (Emphasis and Monospace): Advice users to insert >> zero width space when Org does not parse emphasized text correctly. > > Org _does_ parse emphasized text correctly. It may be seen as > unintuitive, but it's really a fontification problem. Anyway, this is > just a commit message… Agree. It just that the example in the patch _feels_ wrong considering intuitive definition of verbatim borrowed from LaTeX. Commit messages are also important, especially years later. I updated the commit message in the attached new version of the patch. > Thinking about it a bit more, you might be right: we may slightly change > the closing part of the emphasis regexp, e.g.: > > (seq > (not space) > (group ,mark) > (or (any space ?- ?') > (and (any ?. ?, ?\; ?: ?! ?? ?\" ?\) ?\} ?\\ ?\[) (or space line-end)) > line-end)) > > The logic behind this is that in regular text, we assume usual > punctuation rules apply. This will fail for "*Bold*?!" or "/Italics/!!!" Also, is there any reason why we are not simply using punctuation character class instead of listing punctuation chars explicitly (and only for English)? What about "_你叫什么名字_?" Maybe just (seq (not space) (group ,mark) (0+ (in punctuation)) (or space line-end)) > My concern is that the more complicated is the rule, the more difficult > it is to predict. Also, we introduce new corner case, e.g., > > Woot! I just released Org *10*.0! > > So, I'm not totally convinced it is worth the trouble. I am not sure if "Org *10*.0" is a good general example. It is probably one of those cases when users want fine control over emphasis and must use zero width space. Best, Ihor
>From 9ad522e8d1f1184ef097611fc30b326b08d5b432 Mon Sep 17 00:00:00 2001 Message-Id: <9ad522e8d1f1184ef097611fc30b326b08d5b432.1637486504.git.yanta...@gmail.com> From: Ihor Radchenko <yanta...@gmail.com> 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 to force Org ignore emphasis markers. --- doc/org-manual.org | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/org-manual.org b/doc/org-manual.org index 1d0213934..19f42fc77 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -10818,6 +10818,18 @@ ** Emphasis and Monospace ~org-fontify-emphasized-text~ to ~nil~. To narrow down the list of available markup syntax, you can customize ~org-emphasis-alist~. +Sometimes, when marked text also contains the marker character itself, +the result may be unsettling. For example, + +#+begin_example +/One may expect this whole sentence to be italicized, but the +following ~user/?variable~ contains =/= character, which effectively +stops emphasis there./ +#+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