emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Code block syntax highlighting in async export


From: David Lukeš
Subject: Re: Code block syntax highlighting in async export
Date: Mon, 3 Oct 2022 15:22:05 +0200

> I'll investigate if I can leverage any of the workarounds mentioned.

So, for batch processing, avoiding --batch or --script and just using
--load with a script that either ends by killing Emacs, or killing it
via an additional --eval, works, i.e. syntax highlighting uses colors.
This was suggested in [1]. As [2] points out, adding -nw removes the
colors, and so does adding --daemon (suggested in [3]), so don't do
either.

Enabling font-lock-mode manually and defining all the fontification
(see [4]) sounds like it would also work, but honestly, that's too
involved, so I didn't try it.

Using an external colorizer (as shown in [5]), seems like a good
alternative, if non-Emacs dependencies are acceptable.

These two last options can also be made to work with async export (my
original question), where you don't have control over how the batch
instance of Emacs is invoked.

> There’s a decent chance that `engrave-faces' (a package of mine that can now 
> be
> used for code blocks in LaTeX) will work in batch mode. Integrating it with
> `ox-html', `ox-ansii', and `ox-odt' are all (distantly) on my todo list.

Sounds great! If it will work in regular batch mode, then it should
work with async as well :)

Best,

David

[1] 
https://list.orgmode.org/orgmode/vZh_aXsUhlwNcRMF3miS6hNUo6xxUCFuzm4dwfCNQHcm4Ib53t8sJVVJ-PmYD4sRfoCvWRjtEG7L5rfN4pRe5nDxLFWxWEG8ZqcZ5YvJyDs=@protonmail.com/
[2] 
https://list.orgmode.org/orgmode/YmBR481ZMgZpA6svOfEMt3nYa8UPEKgvFUY5s8SpRWu2YdJz0pb0gPz8ajcTeKFbF7SD1fD9XibICa8Z-JdTiIqgjOlD1y4yg9uHCB176ZA=@protonmail.com/
[3] https://list.orgmode.org/orgmode/87a6923dbw.fsf@localhost/
[4] https://list.orgmode.org/AE5693F1-F63D-4383-8840-0FD2DBAAC5D6@gmail.com/
[5] https://linevi.ch/en/org-pygments.html



reply via email to

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