ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial

54.2 Activating URLs

M-x goto-address-mode
Activate URLs and e-mail addresses in the current buffer.

You can make URLs in the current buffer active with M-x goto-address-mode. This minor mode finds all the URLs in the buffer, highlights them, and turns them into buttons: if you click on a URL with Mouse-1 or Mouse-2 (see Mouse References), or move to the URL and type C-c <RET>, that displays the web page that the URL specifies. For a ‘mailto’ URL, it sends mail instead, using your selected mail-composition method (see Mail Methods).

It can be useful to add goto-address-mode to mode hooks and the hooks used to display an incoming message (⁖, rmail-show-message-hook for Rmail, and mh-show-mode-hook for MH-E). This is not needed for Gnus, which has a similar feature of its own.

blog comments powered by Disqus