On Wed, Jul 07, 1999 at 01:27:31PM +0200, Roland Rosenfeld wrote:
> 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.
I had sort of figured this out as I indicated in an earlier post.
> 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"
Could you explain what is really going here? Why the two calls to
netscape sparated by ||? Why the \ after the ) to protect the ;?
Are the alternatives whether netscape is already running or not?
The manual explains some of the rules for mailcap entries, but it
does not seem to cover the complete works. I keep seeing something
new like this one.
Cheers, Brian.
> 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
--
Associate Professor Brian Salter-Duke (Brian Duke)
Chemistry, Faculty of Science, IT and Education, Northern Territory University,
Darwin, NT 0909, Australia. Phone 08-89466702. Fax 08-89466847
[EMAIL PROTECTED] http://www.smps.ntu.edu.au/chemistry/compchem.html