[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on
From: |
Nicolas Goaziou |
Subject: |
Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’ |
Date: |
Sat, 20 Nov 2021 19:25:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello,
Ihor Radchenko <yantar92@gmail.com> writes:
> I updated the patch. If you have no objections on the new wording, I
> will push it to main.
Thanks for the update, and apologies in advance for being bold, as
I have some additional comments about it.
> * 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…
> +=*=, =/=, =_=, ===, and =~= symbols inside =verbatim= or ~code~ can
> +sometimes produce unexpected markup.
OK, but it's not limited to symbols within verbatim or code. What about
something like:
Sometimes, when marked text also contains the marker character itself,
the result may be unsettling.
...example follows (see below)...
> +#+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
The whole line is not supposed to be marked as italic, as long as we
follow Org syntax. And the parser is not confused at all. The user may
be, however.
I suggest:
/One may expect this whole sentence to be italicized, but the
following ~user/?variable~ contains =/= character, which effectively
stops emphasis there./
> +You can use zero width space to help Org sorting out the ambiguity.
> +See [[*Escape Character]] for more details.
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.
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.
Regards,
--
Nicolas Goaziou
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, (continued)
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Samuel Wales, 2021/11/16
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Max Nikulin, 2021/11/17
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Samuel Wales, 2021/11/17
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Ihor Radchenko, 2021/11/18
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Nicolas Goaziou, 2021/11/18
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Ihor Radchenko, 2021/11/18
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Nicolas Goaziou, 2021/11/19
- [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Ihor Radchenko, 2021/11/19
- Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Nicolas Goaziou, 2021/11/19
- Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Ihor Radchenko, 2021/11/19
- Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’,
Nicolas Goaziou <=
- Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Ihor Radchenko, 2021/11/21
- Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Nicolas Goaziou, 2021/11/22
- Re: [PATCH] Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Ihor Radchenko, 2021/11/23
- org parser and priorities of inline elements, Max Nikulin, 2021/11/27
- Re: org parser and priorities of inline elements, Nicolas Goaziou, 2021/11/27
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Max Nikulin, 2021/11/19
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Max Nikulin, 2021/11/20
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Ihor Radchenko, 2021/11/21
- Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’, Max Nikulin, 2021/11/21
- [PATCH] org.el: Warning for unsupported markers in `org-set-emphasis-alist', Max Nikulin, 2021/11/23