[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: |
Mon, 22 Nov 2021 19:44:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello,
Ihor Radchenko <yantar92@gmail.com> writes:
> Commit messages are also important, especially years later. I updated
> the commit message in the attached new version of the patch.
Note I'm not saying commit messages are not important. I just won't
spend energy on the wording there.
>> 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/!!!"
Of course. Any regexp will fail somehow.
> 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))
Historically, Org only focused on ASCII. But it makes sense to extend
the allowed punctuation characters, indeed.
This is orthogonal to OP's issue, however.
>> 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.
This is simply the first example that crossed my mind. My point is that
changing the regexp substantially may not be rewarding, ultimately.
> +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.
LGTM!
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/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, 2021/11/20
- 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 <=
- 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