On Tue, 06 Jul 1999, Hal Burgiss wrote:

> Trying to view html mail and I get a NS message to the effect of:
> 
>  No Such File: /tmp/mutt....
> 
> Correct there is no such file -- anywhere. I have tmpdir set to /tmp in
> .muttrc. I don't see that mutt is creating any temp files in this
> situation? 
> 
> I've changed mailcap to '-remote openFile(%s)', since openURL()
> seemed to always want a http:// URL. This works fine as long as it
> points to a valid file.

The problem with "netscape -remote openFile" is, that this command
terminates before the file is read in completely. IMHO this is a bug
in netscape.

Mutt works correctly here: Mutt creates the temp file, then it starts
the command (netscape), then it waits for the started command to
terminate and after this Mutt removes the temp file.

When netscape terminates before reading the file completely in, this
means, that Mutt has removed the file before is read and you got the
above message.

Work around for this problem:

Add a sleep 10 after the netscape call in your mailcap like this:

text/html; (netscape -remote 'openFile(%s)' || netscape %s)\; sleep 10; \
       test=test -n "$DISPLAY"

This is ugly, but normally these 10 seconds should be enough for
netscape to read the file.

Alternatively you can tell Mutt to always wait for a key press before
removing the file by adding an exit 1 like this:

text/html; (netscape -remote 'openFile(%s)' || netscape %s)\; exit 1; \
       test=test -n "$DISPLAY"

This tells Mutt to ask for a key press (because netscape seems to be
terminated with an error) before removing the file.

Another alternative is to "set wait_key" in your muttrc. This should
activate waiting for a key press after every external command. But in
most situations this is annoying, so I prefer to "unset wait_key" and
to add an "exit 1", when I want Mutt to wait for a key press in some
special case.

Ciao

        Roland

-- 
 * [EMAIL PROTECTED] * http://www.spinnaker.de/ *
 PGP: 1024/DD08DD6D   2D E7 CC DE D5 8D 78 BE  3C A0 A4 F1 4B 09 CE AF

Reply via email to