help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Render a buffer or string to a simpler string?


From: Stefan Monnier
Subject: Re: Render a buffer or string to a simpler string?
Date: Sun, 26 May 2013 13:16:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> We lack such a feature currently.  Display rendering is a C-level
> operation, whose result is not a string, but an array of structures
> called "glyphs" which are passed to the terminal back end for drawing
> on the screen.  So you need primitives (which don't exist) to produce
> Lisp strings out of those glyphs.

Maybe we could provide some way to "render to Elisp", which would
provide access to the glyph matrix somehow (probably exporting it as,
say, an array of "glyphs").  I'd imagine an interface along the lines of
"(render-to-lisp START END &optional WINDOW)" to render a particular
region of the current buffer as it would be displayed in WINDOW.

Obviously, some ERT tests could use such a feature, but things like
htmlfontify could probably also make use of it.


        Stefan




reply via email to

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