Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] run-mailcap weirdness
@ 2008-10-26 18:48 Decklin Foster
  2008-10-28  2:17 ` William Morgan
  0 siblings, 1 reply; 2+ messages in thread
From: Decklin Foster @ 2008-10-26 18:48 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-28  2:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-26 18:48 [sup-talk] run-mailcap weirdness Decklin Foster
2008-10-28  2:17 ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox