<<< Date Index >>>     <<< Thread Index >>>

Re: viewing URLs (muttils or lynx?)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday, March 14 at 10:50 PM, quoth Robert Svoboda:
> * Peter Münster <pmlists@xxxxxxx> [2008-02-17 16:47]:
>> How can I tell mutt to fire up an external browser with some URL in the 
>> message?
>
> I use xclip way for this as mentioned earlier in this thread 
> (there is also 'matcher' extension for urxvt-unicode which 
> lets you click links with middle mouse button)

I'm really enjoying my new urlview pre-filter perlscript (it's solved 
SOOOO many problems for me, in a very short amount of time), but I 
understand the OP's frustration with lack of context.

>> urlview is not ok for me, since I want to keep the context around 
>> the URLs. I would like to select a URL for example with the 
>> TAB-key, and some other key-press would start "firefox url".
>
> This got me thinking about this:
>
> 1. pipe message through display_filter extracting and 
> numbering links
>
> 2. in the extracting step create macros for internal pager 
> which would correspond with numbered links
>
> 3. source those macros 
>
> 4. pressing numbers in pager starts the browser for the link 
> (Not exactly TAB, but good enough I guess)
>
> What you guys think?

That would be pretty slick, and very possible, in *most* cases. 
However, knowing which URL is which is a potential problem. You'd have 
to, in the display filter, edit the HTML (or the text/plain) and 
insert some sort of link identifier (e.g. "[1]") either immediately 
after or immediately before the link.  This is relatively easy to do 
for typical text-based <a href="URL"> links and links listed in 
text/plain email, but what about things like <a href=""> links around 
images, or <blockquote cite="URL"> or <embed src="foo" 
pluginspage="bar">? Or even <iframe src="gotcha!">? That gets tricky 
fast. I wouldn't want to make it impossible to access those links... 
but if not, how do we display things? I don't know that there's a 
really good solution without doing a full-blown html render (I'm open 
to being wrong).

I mean, heck, it wouldn't be *that* hard to do what you describe with 
my little perl script... but you run into the same problems of "okay, 
what do I do with <frame src="url"> tags?"

~Kyle
- -- 
Debugging is twice as hard as writing the code in the first place. 
Therefore, if you write the code as cleverly as possible, you are, by 
definition, not smart enough to debug it.
                                                     -- Brian Kernighan
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkfa/WUACgkQBkIOoMqOI14KSwCeNB9UVO5KVTEUtQn6WUKbP29r
kHEAn3Z4YuMGqqRMD3dE9hgQGoVhnpqX
=CMpu
-----END PGP SIGNATURE-----