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: Nicolas Goaziou
Subject: Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’
Date: Mon, 15 Nov 2021 10:56:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hello,

Ihor Radchenko <yantar92@gmail.com> writes:

> This commit may cause random failures when
> org-emphasis-regexp-components is changed by user.

This is not supported anyway.

> org-emph-re is calculated according to org-emphasis-regexp-components.
> Changing org-emphasis-regexp-components can make "(when (looking-at
> org-emph-re)" in parsers return nil. The emphasised text will still be
> fontified, but not available in the parsed buffer.

That’s exactly my point. The syntax is not meant to be configurable.
I wrote a patch also removing ‘org-emph-re’ depedency from
"org-element.el", but I was delayed. I just applied it.

> Maybe we need to move the logic for org-emph-re from org.el to
> org-element.el?

‘org-emph-re’ has some limitations which do not belong to syntax
definition. There’s no point in adding it in "org-element.el".

The grand scheme is to remove most "org.el" dependencies from
"org-element.el", and move the others.

> Also, there is org-emphasis-alist. It is even defcustom, but ignored by
> org-element.el.

This variable is a defcustom for the faces, not the markers. I.e., it is
not meant to add, remove, or change emphasis markup, but rather alter
how they appear. IMO, this should be removed altogether: it’s up to
a theme to set such a thing.

Regards,
-- 
Nicolas Goaziou



reply via email to

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