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: Sun, 26 May 2013 01:46:52 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Sat, 25 May 2013 23:36:52 +0400
>> 
>> Is there an easy way to convert a string with `line-prefix' and,
>> optionally, `prefix' and `display' properties to a string without those
>> properties corresponding to how the former string is going to be
>> displayed?
>
> Why do you need that?  What do you need to accomplish that needs such
> a strange feature?

Write an automated test (with ERT) that would be easy to read and modify
later.

I could, for example, compare against a string artificially constructed
with `ert-propertized-string', but it requires more effort, it's easy to
get wrong, and it would not express the intended feature.

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.

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



reply via email to

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