Subject: [sup-talk] run-mailcap weirdness

From: [email-masked] (Decklin Foster)
Date: Sun, 26 Oct 2008 14:48:41 -0400

Viewing HTML attachments fails for me. It turns out that Debian's mailcap
falls over if standard output is not a terminal (see below).

I don't know if this is right, but removing the redirection makes it work
for me (I've committed this to decklins-clone at Gitorious). What was the
original rationale for /dev/null-ing this? I noticed if you set the mailcap
command to something that just prints text (no pager) it blips by
instantaneously in Sup. So, unless we can snarf the output for logging
purposes, maybe it is better to just let it reach the terminal?

Example mailcap lossage:

$ echo hello | /usr/bin/run-mailcap --debug=1 --action=view text/plain:- >/dev/null
 - parsing parameter "--action=view"
 - parsing parameter "text/plain:-"
 - file "-" does not exist -- assuming mime-type specification of "text/plain"
 - Reading mailcap file "/home/decklin/.mailcap"...
 - Reading mailcap file "/etc/mailcap"...
Processing file "-" of type "text/plain" (encoding=none)...
 - checking mailcap entry "text/plain; less '%s'; needsterminal"
 - program to execute: less '%s'
 - no terminal available for rule (needsterminal)
 - checking mailcap entry "text/plain; more '%s'; needsterminal"
 - program to execute: more '%s'
 - no terminal available for rule (needsterminal)
 - checking mailcap entry "text/*; less '%s'; needsterminal"
 - program to execute: less '%s'
 - no terminal available for rule (needsterminal)
 - checking mailcap entry "text/*; more '%s'; needsterminal"
 - program to execute: more '%s'
 - no terminal available for rule (needsterminal)
Error: no "view" rule for type "text/plain" passed its test case
       (for more information, add "--debug=1" on the command line)

-- 
things change.
decklin at red-bean.com

---

From: [email-masked] (William Morgan)
Date: Mon, 27 Oct 2008 19:17:08 -0700

Reformatted excerpts from Decklin Foster's message of 2008-10-26:
> instantaneously in Sup.

The original rationale was to stop it from screwing up the screen, but
I'd rather have it work in the first place.

I've merged in your commit. Thanks!
-- 
William <wmorgan-sup at masanjin.net>