5.4 Integrations

5.4.1 URL

For anything to work, you’ll want to set url-irc-function to url-irc-erc. As a rule of thumb, libraries relying directly on url-retrieve should be fine out the box from Emacs 29.1 onward. On older versions of Emacs, you may need to (require 'erc) beforehand. See Retrieving URLs in URL.

For other apps and libraries, such as those relying on the higher-level browse-url, you’ll oftentimes be asked to specify a pattern, sometimes paired with a function that accepts a string URL as a first argument. For example, with EWW, you may need to tack something like "\\|\\`irc6?s?:" onto the end of eww-use-browse-url. But with gnus-button-alist, you’ll need a function as well:

  '("\\birc6?s?://[][a-z0-9.,@_:+%?&/#-]+" 0 t browse-url-irc 0)

Users on Emacs 28 and below may need to use browse-url instead.