unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] test: Fix HTML rendering test
Date: Wed, 24 Oct 2012 22:11:11 -0400	[thread overview]
Message-ID: <20121025021111.GW14861@mit.edu> (raw)
In-Reply-To: <873913joqz.fsf@betacantrips.com>

Quoth Ethan Glasser-Camp on Oct 24 at  9:59 pm:
> Austin Clements <amdragon@MIT.EDU> writes:
> 
> > The test designed to exercise Emacs' rendering of HTML emails
> > containing images inadvertently assumed w3m was available under Emacs
> > 23.  The real point of this test was to exercise Emacs 24's shr
> > renderer, so if shr isn't available, we now fall back to html2text,
> > which comes with Emacs.
> 
> Hi! I'm eager to apply any patch here that makes this better. But this
> one doesn't fix it for me (24.1.1, although it seems to work with
> 23.4.1). OUTPUT is "*\nsmiley " (no space after the asterisk or before
> the word smiley, but after). I see that this sed command is supposed to
> normalize things, but at least on my setup, it doesn't. I also see "nil"
> written to console, but I have no idea what that's about.

Emacs seems to have as many ways to convert HTML to text as there are
people trying to run this test.  What's the value of
mm-text-html-renderer for you in Emacs 24?

> More generally, I guess I don't understand exactly what this test is
> supposed to be exercising. The commit message says "the shr renderer",
> but what about it? In
> id:"1348941314-8377-4-git-send-email-amdragon@mit.edu" you write that
> using shr raised a void-variable error previously, so maybe we're making
> sure that error doesn't show up? In that case, even my semi-broken
> output is good enough.

Yes; this is essentially a regression test.  I would prefer not to
catch exceptions in this test because I think we'll eventually start
eating exceptions in body renderers to prevent them from breaking the
rest of the show buffer.  We could check that the output contains the
word "smiley" somewhere as evidence that it probably didn't crash.

> In a perfect world, test probably shouldn't succeed if shr isn't
> present, but should note that it wasn't run. Maybe the emacs lisp code
> can check for shr, and if it's not present, write "shr not present" to
> an output file, and the shell code can grep for that and then call
> test_skip if it sees it?

That's another possibility.  Unfortunately, skipped tests seem rather
heavyweight in the test infrastructure and get reported loudly, which
would affect anyone running the tests under Emacs 23.

> Still, I'm excited that you're working on this so please let's get it
> fixed!
> 
> Ethan

  reply	other threads:[~2012-10-25  2:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 20:06 [PATCH] test: Fix HTML rendering test Austin Clements
2012-10-25  1:59 ` Ethan Glasser-Camp
2012-10-25  2:11   ` Austin Clements [this message]
2012-10-25  8:06     ` Tomi Ollila
2012-10-25 13:28     ` Ethan Glasser-Camp

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://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121025021111.GW14861@mit.edu \
    --to=amdragon@mit.edu \
    --cc=ethan.glasser.camp@gmail.com \
    --cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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