John Davis intends to provide support for coloured and clickable URLs in a different way in a future version of slrn, so this patch is unlikely to be integrated in its current form. However, John says he's happy for me to keep updating it and making it available. He's also incorporated some elements of earlier versions.
I've tested it on Linux 2.0 using rxvt (and very briefly with xterm), but it should work on other platforms too.
There's a bug in the 0.9.3.2 version, and in the original 0.9.4.0 version which may stop mouse clicks having any effect outside a URL (the intention is they should work as it would without the patch). This is fixed in the patches now available from here.
I've slightly tweaked the URL spotting algorithm in the 0.9.5.4 version of the patch. It now copes with URLs containing "," or ";" (but ignores them at the end assuming they are punctuation). It also takes "'" as ending a URL. But as with any heuristic algorithm for this sort of job, it could probably be improved. If you come across a particular example which is handled badly, send me an email.
It would be nice if slrn could handle news:newsgroup, news:msgid and nntp: URLs itself, but this is harder than it may at first appear. Maybe soon.
Mark K. Gardner has pointed out to me that some older versions of patch
don't understand diff -u
format patches, so I'm now
supplying patches in diff -c
format.
To apply the patch you'll need the patch program. Unpack the slrn source, then:
cd slrn/src patch < slrnfancyurls0954.patchThe source code for slrn is available from ftp://space.mit.edu/pub/davis/slrn/ in case you don't have it. Then run configure and make as usual (read 'slrn/README' for more info).
And don't forget to run slrn with the -m option to get the mouse to work!