Re: Clickable URL's again... new patch



On 2001.06.13 11:46:47 -0400 Brian Stafford wrote:
> On Wed, 13 June 21:31 Jamie Webb wrote:
> | Shouldn't URLs be detected by a configurable regex, like quoted text?
> 
> The syntax for URLs is fixed by RFC 2396.  Assuming the parser is
> correct, there will be no need to configure it.

Ah, but you are assuming that we only ever want to match vanilla URLs. I
might want to match, e.g. email addresses:

[^\s]+@[^\s]+

Or ICQ numbers:

\b(ICQ|icq)[#:\s]*[0-9]+

..but maybe both those regexes are too primitive and I think of a reason to
change them later. Plus, as you point out yourself, not all things we
consider to be URLs are correct according to the RFC.

> | Maybe a list of regexes, with different target apps, e.g. browser,
> | ftp, balsa compose message.
> 
> No, a list of REs is worse still, matching them is pretty slow.

I have to say, that Emacs seems to do pretty well colorising much longer
texts than the average email, using regexes, by doing it once the text is
already displayed.

*snip*

 -- Jamie Webb




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]