From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Render a buffer or string to a simpler string?
Date: Sun, 26 May 2013 19:15:08 +0300 [thread overview]
Message-ID: <83zjvhpvjn.fsf@gnu.org> (raw)
In-Reply-To: <87sj19sqb2.fsf@yandex.ru>
> From: Dmitry Gutov <dgutov@yandex.ru>
> Cc: help-gnu-emacs@gnu.org
> Date: Sun, 26 May 2013 19:40:01 +0400
>
> Eli Zaretskii <eliz@gnu.org> writes:
> > Btw, the general problem you described -- "render to a string" -- is
> > not necessarily solvable even in principle. E.g., how do you express
> > in a string variable fonts and other face attributes that don't change
> > the text, only how it is displayed? what about pixel-granular
> > alignment we do with :align-to and similar display properties? what to
> > do with images and sounds? etc. etc.
>
> That's true, but it can be solved well enough to be useful for testing
> some classes of packages.
"Some classes" might not be enough for testing display.
> Pixel-granular alignment would probably be ignored, `face' properties
> would be either ignored, or just kept as-is in the rendered string.
Keeping the faces makes sense if they are automatically generated, but
not if they are put by explicit Lisp code, since then you just get
whatever the code put.
> >> 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.
> >
> > I don't understand this reasoning at all. Why do you think Emacs is
> > best positioned for this? And what have human-readable UI tests to do
> > with this; I thought you were talking about _automated_ tests?
>
> A human has to write these tests, and then come back later, be able to
> read and modify them. Try doing that efficiently with screen grabs.
UI testing people do that all the time: you compare the grab with some
baseline.
> >> Testing UI look in graphical applications has to involve screen grabs,
> >> at least on some level.
> >
> > When Emacs runs on a graphical terminal, it acts as a graphical
> > application.
>
> The only means of building interface widgets exposed to Elisp are text
> properties, AFAIK. They do include some graphical-only features, but
> those aren't used as often as one might expect.
Try looking at Customize, and you will see a different story.
next prev parent reply other threads:[~2013-05-26 16:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-25 19:36 Render a buffer or string to a simpler string? Dmitry Gutov
2013-05-25 20:58 ` Eli Zaretskii
2013-05-25 21:46 ` Dmitry Gutov
2013-05-26 2:50 ` Eli Zaretskii
2013-05-26 3:38 ` Dmitry Gutov
2013-05-26 15:11 ` Eli Zaretskii
2013-05-26 15:40 ` Dmitry Gutov
2013-05-26 16:15 ` Eli Zaretskii [this message]
2013-05-26 23:20 ` Dmitry Gutov
[not found] ` <mailman.418.1369584930.22516.help-gnu-emacs@gnu.org>
2013-05-26 17:08 ` esabof
2013-05-26 23:36 ` Dmitry Gutov
2013-05-26 17:16 ` Stefan Monnier
2013-05-26 23:28 ` Dmitry Gutov
[not found] ` <mailman.419.1369588606.22516.help-gnu-emacs@gnu.org>
2013-05-26 17:56 ` esabof
2013-05-27 2:47 ` Eli Zaretskii
2013-05-27 2:48 ` Dmitry Gutov
[not found] ` <mailman.445.1369622831.22516.help-gnu-emacs@gnu.org>
2013-05-27 11:59 ` esabof
[not found] ` <mailman.446.1369622948.22516.help-gnu-emacs@gnu.org>
2013-05-27 12:14 ` esabof
[not found] <mailman.381.1369510626.22516.help-gnu-emacs@gnu.org>
2013-05-25 20:45 ` Barry Margolin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zjvhpvjn.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).