emacs-orgmode
[Top][All Lists]
Advanced

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

Re: CDATA auto aggregation


From: David Lukeš
Subject: Re: CDATA auto aggregation
Date: Thu, 29 Sep 2022 13:58:51 +0200

Diego Rodriguez <diego.vincent.rodriguez@gmail.com> writes:

> Where does this CDATA tag gets added automatically and how can I modify this 
> behavior?

Do you have auto-formatting on save configured in Emacs -- perhaps even
via a starter kit like Doom Emacs, so that you're only half aware of it?
And are you by any chance on macOS, which ships with the tidy program
(HTML Tidy) by default? Or failing that, did you install it manually?

To cut a long-story short: HTML auto-formatting on save runs tidy, which
mangles the HTML in various ways, including this CDATA thing. This also
happens in buffers with generated Org export output.

I posted the long version to the mailing list in February:
https://list.orgmode.org/CAEPTPEwOZjJLX1jyFmVR6jarsocyuD=Zf7HJ1i9G4SfWk4mUpQ@mail.gmail.com/

I suggested a patch, but it probably got buried in the noise:
https://list.orgmode.org/20220228140750.75761-1-dafydd.lukes@gmail.com/

Instead, I see that another fix was merged yesterday (for different
reasons AFAICS, but it should help with this auto-formatting issue too):
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d7a55bbd537314d2776b082bd92a1a08b3edc84e

This should be enough for HTML exports, but two more tweaks are needed
for ODT exports in ox-odt.el -- see my original patch. Or use
https://github.com/kjambunathan/org-mode-ox-odt, which has already
incorporated them.

Tim Cross <theophilusx@gmail.com> writes:

> We probably should consider moving the existing ox-html to an ox-xhtml
> and implementing a new ox-html that is based on html5.

+1 on that, although obviously, I'm aware it's quite a chore.

Best,

David



reply via email to

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