Re: URLs screwed in the mail body
- To: mutt-users@xxxxxxxx
- Subject: Re: URLs screwed in the mail body
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Fri, 7 Mar 2008 10:00:55 -0600
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date: from:to:subject:message-id:references:mime-version:content-type: in-reply-to; q=dns/txt; s=default; bh=/qvYQqkVgIJVbscVg6HplHR+Ol 0=; b=BWPPHT7ElIx6nb//TOO2h8q0Oxkaa8EgLqh/+MVuzjHfOUWQ2FDFNdcCy9 ffHXcoKJaX4tvQ/B0K7FcGodmKQLkd6bkf2Vk0U0u2aY4pOaDYj3C45Viy6r0Gsc 3e3RceCm7dDafjxyXswiQULAIdKZ0pnwAZu5vs7SSAabze+tU=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=AqotpoRikF0IxXgE1Jkr7HjG2oQHdZ7ftTi3+/MbP9m1+kziebqrGjMGKarR0VegoQV/oFzSH0RRzM1mb/WRdj+kuNWQs9R0BIUpmhRKAkU+eBMqwheQqI3SIVM2wi9RKK62Aph2Pop+oZKJVD/S833BfvcoOZUYQOddQhCbCVk=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <38b2ab8a0803070126h47c06683hc346db2187c52324@xxxxxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <38b2ab8a0803070126h47c06683hc346db2187c52324@xxxxxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.17 (2008-02-27)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday, March 7 at 10:26 AM, quoth Francis Moreau:
> So my problem is that I often receive emails including some URLs.
> But they're usually not displayed in one line but splitted into 2
> parts. Then if I want to call urlview to extract URLs out of the
> mail (^B), it only use the first part leading to a wrong URL.
>
> It usually happens with emails written in HTML.
>
> Could anybody tell me what's the best way to fix this.
I can think of two ways, both have their flaws.
1. You can set pipe_decode before piping the message to urlview;
that way mutt will reconnect all the lines according to the way
they were encoded, and URLs won't be split. On the other hand,
if you use w3m as your html renderer, many URLs will simply not
be visible to urlview.
2. Pipe it through tr to removes all newlines and spaces before
piping it to urlview. Like this:
macro pager \cb "<pipe-message>tr -d ' \r\n' | urlview<enter>"
The second option seems to be the best... but it has the problem that
it may concatenate urls that shouldn't be concatenated (For example,
imagine the sentence "Go to http://www.google.com/ and tell me what
you think" - the url would become
http://www.google.com/andtellmewhatyouthink
Perhaps it's better to do this:
3. Pipe it through lynx to extract the urls before piping it to
urlview, like so:
macro pager \cb "<pipe-message>lynx --force-html --dump |
urlview<enter>"
~Kyle
- --
Last comes the beverage of the Orient shore, Mocha, far off, the
fragrant berries bore. Taste the dark fluid with a dainty lip,
Digestion waits on pleasure as you sip.
-- Pope Leo XII
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iD8DBQFH0Wa3BkIOoMqOI14RAn0PAKCWANOrXkyrh/dUVjDp2xqXDxOYhwCePaKM
C/G+eK4SM/C6fWi3QponBPI=
=mFwO
-----END PGP SIGNATURE-----