I would like to use emacs to "render" text to an output file.
Is there a way to export the buffer with all font-locking to a file?
(The exact format may not matter HTML or terminal-escaped colors would both be fine).
Some options I'm aware of but aren't quite what I'm after.
Cairo SVG screenshot...
- Being a screenshot makes this less useful for writing a whole text buffer, although in theory and off screen buffer could be made very tall I suppose.
- SVG isn't so easy to manipulate (search, convert into other text format).
Terminal screenshot...
- Again, it's limited to a "screen", not so convenient to dump an entire buffer.
.. Of course it's possible to do tricks like capturing regions and joining them together, this can work but isn't trivial and seems like a last resort.
Are there any solutions that export the entire buffer as it's displayed on-screen?