emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasi


From: Ihor Radchenko
Subject: Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’
Date: Thu, 18 Nov 2021 20:55:45 +0800

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> My intuition says that the current parser behaviour is not correct. It
>> would make more sense to prioritise link over italics. However, it would
>> require a major change in the parser - instead of a single pass, the
>> parser may parse different types of objects sequentially. The emphasis
>> objects should come last avoiding the markers to have different parents.
>>
>> Nicolas, WDYT?
>
> I disagree. Priority should be given to the first object being started.
> This is, IMO, the only sane way to handle syntax.

Multi-pass may indeed over-complicate the syntax.
However, it is not clear then how to handle situations like

/A link [[https://orgmode.org/?oops=true][Org Mode]]
or
/A code ~user/?my-user-variable~ with slash/
or
/A verbatim =text/.= with slash/

Should we modify the closing-re for emphasis?

>> (seq (not space)
>>      (group ,mark)
>>      (or (any space ?- ?. ?, ?\; ?: ?! ?? ?' ?\" ?\) ?\} ?\\ ?\[)
>>          line-end))

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]