Subject: bug#38257: Acknowledgement (27.0.50; ERC does not match or highlight nick surrounded by parens)

From: Emanuel Berg <[email-masked]>
Date: Thu, 09 Jan 2020 08:42:49 +0100

Amin Bandali wrote:

> * lisp/erc/erc-{button,match}.el
> (erc-{button,match}-syntax-table): Omit (, ),
> and '; as they're not valid nick characters,
> per RFC 2812 section 2.3.1. This enables
> correct matching/highlighting of nicks when
> they're surrounded by parens, like (nick),
> and when adjacent to an apostrophe,
> like nick's.
> * lisp/erc/erc-button.el
> (erc-button-url-regexp): Use the regexp from
> browse-url-button-regexp, which among other
> things, seems to handle surrounding pair of
> parens better.
> ---
>  etc/NEWS               | 12 ++++++++++++
>  lisp/erc/erc-button.el | 11 +++--------
>  lisp/erc/erc-match.el  |  3 ---
>  3 files changed, 15 insertions(+), 11 deletions(-)

It is just amazing how this has been handled,
to care so much for the IRC client and also to
be able to strengthen the reasons for the
policy by finding one RFC!

> -(defcustom erc-button-url-regexp
> -  (concat "\\(www\\.\\|\\(s?https?\\|"
> -       "ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\)"
> -       "\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?"
> -       "[-a-zA-Z0-9_=!?#$@~`%&*+\\/:;.,()]+[-a-zA-Z0-9_=#$@~`%&*+\\/()]")
> +(defcustom erc-button-url-regexp browse-url-button-regexp
>    "Regular expression that matches URLs."
> +  :version "27.1"
>    :group 'erc-button
>    :type 'regexp)

Here I wonder why does the erc-button has this?
Don't Gnus, Emacs-w3m, man mode, virtually every
mode that is about communicating have
a tendency to come across hyperlinks?

--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal