emacs-orgmode
[Top][All Lists]
Advanced

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

[PATCH] ANSI color on example blocks and fixed width elements


From: Nathaniel Nicandro
Subject: [PATCH] ANSI color on example blocks and fixed width elements
Date: Wed, 05 Apr 2023 07:03:43 -0500
User-agent: mu4e 1.8.13; emacs 30.0.50

Hello,

Attached is the patch.  Without this patch, ANSI escape sequences
generated by the output of a source block will be left in the buffer
without any fontification.  With this patch, the escaped text is nicely
colored and escape sequences hidden using overlays.

It works for Emacs versions which have the `PRESERVE-SEQUENCES` argument
to the `ansi-color-apply-on-region` function.  It's a bit slow due to
the use of overlays.  My implementation of this feature in Emacs-Jupyter
supports older versions of Emacs without that argument, it relies on a
custom version of that function though and uses text properties instead
of overlays.

Let me know what else could be done on my end to get this patch in.
Thanks.

Attachment: ansi-color-example-blocks-and-fixed-width.patch
Description: ANSI color patch


-- 
Nathaniel

reply via email to

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