On 2010-07-15, Erik Christiansen wrote: > On Wed, Jul 14, 2010 at 11:29:34AM -0700, Gary Johnson wrote: > > On 2010-07-14, Erik Christiansen wrote: > > > It's in an A tag: (I've munged some of the href's characters in this post) > > > > > > <td height=3D"60" colspan=3D"3" align=3D"center" valign=3D"middle= > > > "><font face=3D"Arial" color=3D"#666666" style=3D"font-size:10px"><a titl= > > > e=3D"View Email Online link" href=3D"http://example.media.xyz.com.au:80/t= > > > rack?t=3Dv&mid=3D45671&msgid=3D87652&did=3D87641&edid=3D26341&sn=3D374852= > > > 7545&eid=3df...@example.stuff.net&eeid=3df...@example.stuff.net&uid=3D9= > > > 56897&rid=3D234564&erid=3D234564&fl=3D&mvid=3D&extra=3D&&&2000&eu=3D425&&= > > > &viewonline" style=3D"color: #666666">Click here if you cannot view this = > > > email properly</a></span><br />=20 > > > > If the URL is embedded within an <A ...> tag, as this one is, then > > w3m will not display it. That is, in an HTML link written like > > this, > > > > <A href="http://foo.com">bar</A> > > > > w3m will display "bar" but not "http://foo.com". > > Ah, thank you. (And for improving my understanding of html.) > > > In your original post you said that the URL was rendered as "*". > > Did the "*" appear instead of "Click here if you cannot view this > > email properly" or was the "*" in front of "Click here ..."? > > The latter. It displays like this: > > * > Click here if you cannot view this email properly
The "*" is probably a list bullet, or it may be an explicit "*" in the text, possibly in the first column of the table of which the "Click here ..." message is a part. > > > > What happens if you open the attachment in the attachment menu? > > > > That will use w3m to display the message instead of just using w3m > > > > as a filter. Do you see the "*" as a link? > > Wow. It opens the link in firefox. > (Do you know, I've never before considered opening the message body in > the attachment menu.) > > > > It's not an attachment. The message is only text/html. > > > (Yes, I do dump 99% of them, just not this one. :) > > > > I guess I should have been more clear and written, "What happens if > > you open the attachment or the message in the attachment menu?" I > > expect w3m to highlight the link but not display the URL. > > It automatically followed the link, opening it in firefox. I think that Firefox is displaying the message, as a result of the first text/html rule in /etc/mailcap: text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html (I didn't look at those rules closely enough when I first read your message.) /usr/bin/sensible-browser is either a link to Firefox or a program that somehow decides what a "sensible browser" is in this case and opens it. > > If your w3m is configured to allow the use of an external browser, > > typing > > > > <Esc>M > > > > on the link will open the link in the external browser. > > Seems like it shot right past any opportunity to do that. > > Many thanks for helping me understand better what's happening between > mutt and w3m, to get to the browser. You're very welcome. > I might just interpose a wrapper around w3m, taking your information to > modify the > > > <A href="http://foo.com">bar</A> > > to > <A href="http://foo.com"> "http://foo.com" bar</A> > > Then I can copy-paste the displayed URL into an extant firefox instance, > instead of locking up mutt until a firefox instance, opened via the > attachment menu, is closed. You can get around the problem of Firefox locking up mutt by using a script that launches Firefox in the background. There's a example here: http://www.spocom.com/users/gjohnson/mutt/#background To extract the URLs from a message, you might try urlview, bound to the Ctrl-B key in mutt by default. You could also try using lynx instead of w3m as your HTML-to-text converter. It doesn't render HTML as well as w3m, or didn't the last time I used it, but it does gather all the URLs in a message and displays them as footnotes. Regards, Gary