[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: |
Sun, 26 May 2013 07:38:30 +0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) |
Eli Zaretskii <eliz@gnu.org> 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.
That's what I figured, but had to ask anyway. Thanks for the reply.
Anyway, instead of writing a hacky fix + a bunch of new tests, I ended
up finding a better fix instead (and changing existing tests).
>> To put it differently, the goal is to make the buffer look a certain way,
>> so I'd like to be able to check that it does look that way.
>
> That's hard to do automatically, unless you use external software that
> grabs screen portions. Rendering is just one of the aspects, there's
> also alignment, decorations, remnants from previous redisplay cycles,
> etc.
I think it's a shame, because out of all (?) text editors, Emacs is the
best positioned to enable human-readable UI tests, because of how often
people use text properties to do visuals.
Testing UI look in graphical applications has to involve screen grabs,
at least on some level.
>> (For my current purpose, it would be fine if that render-to-string
>> function disregarded eyecandy text-properties, like `face', but in the
>> general case, being able to compare them, too, would be handy.)
>
> Removing properties from strings is a feature we do have.
Sure. That's not what I was asking. If render-to-string included those
text properties, that would be fine, too.
- Render a buffer or string to a simpler string?, Dmitry Gutov, 2013/05/25
- Re: Render a buffer or string to a simpler string?, Eli Zaretskii, 2013/05/25
- Re: Render a buffer or string to a simpler string?, Dmitry Gutov, 2013/05/25
- Re: Render a buffer or string to a simpler string?, Eli Zaretskii, 2013/05/25
- Re: Render a buffer or string to a simpler string?,
Dmitry Gutov <=
- Re: Render a buffer or string to a simpler string?, Eli Zaretskii, 2013/05/26
- Re: Render a buffer or string to a simpler string?, Dmitry Gutov, 2013/05/26
- Re: Render a buffer or string to a simpler string?, Eli Zaretskii, 2013/05/26
- Re: Render a buffer or string to a simpler string?, Dmitry Gutov, 2013/05/26
- Message not available
- Re: Render a buffer or string to a simpler string?, esabof, 2013/05/26
- Re: Render a buffer or string to a simpler string?, Dmitry Gutov, 2013/05/26
- Re: Render a buffer or string to a simpler string?, Stefan Monnier, 2013/05/26
- Re: Render a buffer or string to a simpler string?, Dmitry Gutov, 2013/05/26
- Message not available
- Re: Render a buffer or string to a simpler string?, esabof, 2013/05/26
- Re: Render a buffer or string to a simpler string?, Eli Zaretskii, 2013/05/26