On Mon, May 13, 2002 at 02:38:17PM +0200, Marco Fioretti wrote:
> > Marco,
> >
> >
> > This works for me:
> >
> > I do my terminal work in a gnome terminal. This has the advantage of
> > recognizing urls triggered by mouse over. To launch a browser, either
> > right click for the context sensitive menu or hold alt and left click.
> >
>
> I know, but this doesn't work with "Hidden" URLS, does it? (See my
> original example) That is why I was hoping to get w3m working, because
> it *displays* plain, well formatted ASCII, but *knows* which strings
> correspond to other hidden strings which are URLs. Would the gnome
> terminal open the right URL if given the "to know more click <HERE>"
> string?
>
> Again, I started looking after this because from Gary Johnson Mutt Page
> and previous postings here, it seems something that would surely work:
> did I miss something?
No, you didn't miss anything. There's never been a demand for that
feature by mutt users, so no one that I know of has ever addressed it.
I receive very little e-mail that is both formatted as HTML and contains
links that I have any interest in following. When I do receive such
e-mail and want to see it as HTML, I use the attachment menu.
I played around with this a little and came up with the following
solution. It may have some bugs, but it's at least a starting point.
First of all, you want to have mutt send HTML messages as raw HTML to
your pager. The way I did this was to put this in my muttrc:
auto_view text/html
and this in my mailcap:
text/html; w3m %s; nametemplate=%s.html
text/html; cat; copiousoutput
Next, you want to specify a pager that understands that the header is
plain text but the body is HTML. I wrote a shell script and called it
'htmlviewer':
#!/bin/sh
sed '1i\
<html>\
<head>\
<title></title>\
</head>\
<body>\
<pre>
s|^\[-- Autoview using .*|</pre>\
</body>\
</html>|
' $* | w3m -T text/html
It wraps the header in an HTML block and deletes the "[-- Autoview" line
before sending the message to w3m. Then I just set
pager=htmlviewer
in my muttrc. You will probably want to use a display-hook (or
message-hook) for this.
That was kind of terse--I hope it was clear. Is that closer to what you
want?
HTH,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |