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

Re: Binding of RET in gnus when upon a hyperlink that contains "http://..."



In [emacs-w3m : No.12266] jidanni@xxxxxxxxxxx wrote:
> In the following HTML mail,
> regarding the binding of RET,
> when I put the cursor upon a hyperlink that is "some words", it is
>    RET runs the command w3m-safe-view-this-url, GOOD!
> when I put the cursor upon a hyperlink that is "http://someurl";, it is
>    RET runs the command widget-button-press, BAD!
> How do I make it
>    RET runs the command w3m-safe-view-this-url, GOOD!
> ?

The most easy way would be:

(add-hook
 'gnus-article-mode-hook
 (lambda ()
   (set (make-variable-buffer-local  'browse-url-browser-function)
	#'w3m-browse-url)))

Note that you once have to kill the article buffer in advance if
you try evaluating this form when you are already running Gnus.