Re: A need for a new-hook?
Does anyone have any idea how I can trigger a hook *only* when writing a new message? Maybe there's a patch floating around that I should know about? In case this was not clear, by new message, I mean a fresh e-mail that is not a reply. Nobody knows? Somebody must have come across this problem before? Does this silence confirm that there is no way to achieve this, and it's a feature worthy of including in a future release? :) I welcome any suggestions. Thanks, Adam -- Adam Bolte SitePoint Pty. Ltd. www.sitepoint.com
URL not extracted from HTML by w3m in mutt autoview
Most URLs arriving in html messages are eminently discardable, but today I received one worth trying. Mutt's autoview invokes w3m, which extracts most of the html text, but renders the URL as nothing more than '*'. There are three matching lines in /etc/mailcap: text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html OK, since I'm in mutt, one keystroke opens the message in vim, and the offending URL is revealed. It was spread over 5 lines, with a trailing '=' on the first 4 serving as continuation escape. I deleted them, and joined the lines. Also converting 15 occurrences of =3D to '=' allowed the URL to be used in firefox. It won't take me many minutes to point /etc/mailcap at a simple shell script which invokes a few lines of awk to perform the repair, before piping to w3m to finish off, but I'm very curious to know what other mutters do with something like that. The sender seems to consider the message standards compliant, because this: html xmlns=3Dhttp://www.w3.org/1999/xhtml; meta http-equiv=3DContent-Type content=3Dtext/html; charset=3DUTF-8 = / appears early in the message. I had thought that =3D was a m$-ism? Erik -- Microsoft is to software what McDonalds is to gourmet cooking. -- Bram Moolenaar
Re: A need for a new-hook?
On Tue, Jul 13, 2010 at 04:24:53PM +1000, Adam Bolte wrote: Does anyone have any idea how I can trigger a hook *only* when writing a new message? Maybe there's a patch floating around that I should know about? In case this was not clear, by new message, I mean a fresh e-mail that is not a reply. How about 'message-hook !~x . command' . Check the archives for a thread titled 'match messages without a reply from anyone?' around September 16, 2009. There are some additional patterns found there. -- Monte
Re: URL not extracted from HTML by w3m in mutt autoview
* Erik Christiansen dva...@internode.on.net [07-13-10 03:44]: Most URLs arriving in html messages are eminently discardable, but today I received one worth trying. Mutt's autoview invokes w3m, which extracts most of the html text, but renders the URL as nothing more than '*'. check the header for Content-Type:, it should contain: Content-Type: text/html; charset=UTF-8 If it is not there, add it. If it is there but not 'text/html; charset=UTF-8' change it and see what you get. -- Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535@ http://counter.li.org
Re: URL not extracted from HTML by w3m in mutt autoview
On 2010-07-13, Erik Christiansen wrote: Most URLs arriving in html messages are eminently discardable, but today I received one worth trying. Mutt's autoview invokes w3m, which extracts most of the html text, but renders the URL as nothing more than '*'. There are three matching lines in /etc/mailcap: text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html OK, since I'm in mutt, one keystroke opens the message in vim, and the offending URL is revealed. It was spread over 5 lines, with a trailing '=' on the first 4 serving as continuation escape. I deleted them, and joined the lines. Also converting 15 occurrences of =3D to '=' allowed the URL to be used in firefox. It won't take me many minutes to point /etc/mailcap at a simple shell script which invokes a few lines of awk to perform the repair, before piping to w3m to finish off, but I'm very curious to know what other mutters do with something like that. The sender seems to consider the message standards compliant, because this: html xmlns=3Dhttp://www.w3.org/1999/xhtml; meta http-equiv=3DContent-Type content=3Dtext/html; charset=3DUTF-8 = / appears early in the message. I had thought that =3D was a m$-ism? The = at the end of the line and =3D stuff is quoted-printable, a type of Content-Transfer-Encoding defined by RFC 2045. Mutt already knows how to deal with that and decodes it before piping the result to w3m. Is the URL in the text of the message, or is it embedded within an A tag? Posting the problematic URL with a few lines of context may help us see the problem better. 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? Regards, Gary
Re: A need for a new-hook?
On Tue, Jul 13, 2010 at 04:24:53PM +1000, Adam Bolte wrote: Does anyone have any idea how I can trigger a hook *only* when writing a new message? Maybe there's a patch floating around that I should know about? In case this was not clear, by new message, I mean a fresh e-mail that is not a reply. How about 'message-hook !~x . command' . Check the archives for a thread titled 'match messages without a reply from anyone?' around September 16, 2009. There are some additional patterns found there. Thanks Monte. Interesting idea. I haven't had any luck finding a combination that works perfectly using '! ~x .' in a message-hook yet (probably due to execution order) but I'll report back if/when I find a working setup. -Adam