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: Dmitry Gutov
Subject: Re: Render a buffer or string to a simpler string?
Date: Mon, 27 May 2013 03:28:16 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> 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.

Right, I should be able to use that almost directly, even though I've no
idea what kind of values are contained in "glyphs". I'd just render to
glyphs both the buffer under test and a reference buffer, and compare
results.



reply via email to

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