Subject: Re: [sup-talk] Error: no "view" mailcap rules found for type "text/plain"

From: Christer Edwards <[email-masked]>
Date: Wed, 16 Feb 2011 07:46:49 -0700

Excerpts from Philippe LeCavalier's message of 2011-02-16 07:07:19 -0700:
> Here's mine. I just started building it but it's something...BTW Did you look into the mime-decode.rb hook?
> 
> cat ../../.mailcap
> application/zip; squeeze '%s'
> application/pdf; /usr/bin/xpdf '%s'
> application/msexcel; gnumeric '%s'
> application/html; firefox '%s'
> application/vnd.openxmlformats-officedocument.wordprocessingml.document; abiword '%s'
> 
> Not certain the last one is 'proper' but it works.

I tried adding this contents to my file, but I'm still getting the error when selecting an html email attachment:

Couldn't execute view command, viewing as text.

In response to another suggestion, I have not tried the mime hook. I haven't quite been able to make sense of it yet.

Christer
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Philippe LeCavalier <[email-masked]>
Date: Wed, 16 Feb 2011 09:07:19 -0500

Hi Christer.
Excerpts from Christer Edwards's message of Wed Feb 16 01:42:46 -0500 2011:
[...] 
> I wonder if anyone might share their .mailcap file

cat ../../.mailcap

-- 
Thanks,
Phil

---

From: Christer Edwards <[email-masked]>
Date: Tue, 15 Feb 2011 23:42:46 -0700

I finally managed to find the run-mailcap binary (mime-types package),
but I'm still getting issues with rendering HTML email properly. I get
the error in the subject line as well as another (can't reproduce
without quitting sup).

I wonder if anyone might share their .mailcap file, or suggest any
alternative methods for stripping out the nonsense HTML markup and just
leaving me with plain text.

Thank you,
Christer

---

From: Mark Alexander <[email-masked]>
Date: Wed, 16 Feb 2011 11:26:24 -0500

> leaving me with plain text.

I use this line in my .mailcap to run w3m on html attachments:

text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Christer Edwards <[email-masked]>
Date: Wed, 16 Feb 2011 09:39:56 -0700

> text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html

This works! I'm not used to w3m, but at least it renders things
properly. Maybe I'll tinker with some other options (lynx, etc).

Thanks for putting me on the right track!

Christer

---

From: Philippe LeCavalier <[email-masked]>
Date: Wed, 16 Feb 2011 10:28:46 -0500

Hi Christer.
> Couldn't execute view command, viewing as text.
I think sup always tries to display HTML inline but without the mime-decode.rb hook it will fail(just a guess). Despite the error the
mailcap entry for firefox(assuming you have firefox, if not substitute for sensible-browser) should open.

All mime-decode does is make use of w3m to display the html encoding inline. So you'll need the w3m package for that to work.