Re: viewing the result of piping a message in mutt

2011-02-03 Thread Joost Kremers
On Thu, Feb 03, 2011 at 09:03:29AM +1100, Brian Salter-Duke wrote:
> On Wed, Feb 02, 2011 at 01:27:34PM +0100, Joost Kremers wrote:
> > when i pipe a message through an external command, the output is written to 
> > a
> > file. is there a way to have the output displayed in mutt itself, similar to
> > viewing attachments in-line?
> 
> It is a function of the external command. It seems that is writing to a
> file. So change the external command to write to STOUT.

well i'll be damned... i thought the program i was calling wrote its output to
stdout. turns out that's not the case. thanks for the pointer. :-)


-- 
Joost Kremers, PhD
University of Göttingen
Institute for German Philology
Käte-Hamburger-Weg 3
37073 Göttingen, Germany
Tel. +49 551 39 4467


Re: Open html messages with Firefox

2011-02-03 Thread Paul Tansom
** Gabriel Chavez  [2011-02-02 17:31]:
> On Wed, Feb 02, 2011 at 04:46:40PM +, Paul Tansom wrote:
> > ** Gabriel Chavez  [2011-02-02 16:21]:
> > > I've been looking around for a way to open my html emails with Firefox
> > > but I still don't know how to do it. Is there a way to do it?
> > ** end quote [Gabriel Chavez]
> > 
> > I was sure I had a configuration in my .muttrc directory (I've split into
> > multiple files in a directory), but I must be mis-remembering! It works out 
> > of
> > the box on my Ubuntu install, and the magic looks to be in the mailcap
> > configuration file in /etc, although you can also do it with a local 
> > .mailcap
> > in your home directory. The relevant line in my config is:
> > 
> > text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; 
> > nametemplate=%s.html
> > 
> > although you could specify Firefox directly if you like, rather than using 
> > the
> > system default. My default is Firefox, except when Chrome updates and I 
> > have to
> > put some of the settings back (regular enough that I have a script for it!).
> > 
> I tried but it doesn't not work. I read the mutt documentation and
> tried also:
> text/html;  firefox -remote 'openURL(%s)' ; test=RunningX
> 
> But it does not work. I get the following error message:
> mailcap entry for type text/html not found 
> 
> I don't get if I use command-line program like lynx.
> Maybe it's a problem with the display variable? I'll keep looking.
** end quote [Gabriel Chavez]

Try:

text/html;  /usr/bin/firefox -remote 'openURL(%s)' ; test=test -n "$DISPLAY"

I've not tested without the full path to firefox (and check yours is the same).
using:

test=RunningX

failed for me because I didn't have that utility, which seems to be a separate
downloadable C program.

-- 
Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001
==
Registered in England  |  Company No: 4905028  |  Registered Office:
Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU