Reiner Steib <[EMAIL PROTECTED]> writes: > On Sat, Oct 01 2005, David Sumbler wrote: > >> I use Gnus on a virtual console under Linux. I have >> (setq mm-text-html-renderer 'w3m) in my .gnus file. The display of >> HTML emails is fine. The problem I have is with links contained in >> some emails. >> >> I have a bash script which takes a URL as a parameter and displays the >> relevant page in a new tab in Firefox. I want this to be used if I >> decide to follow a link in an email. > > (setq browse-url-generic-program "xsel.sh" ;; replace with your script > browse-url-browser-function 'browse-url-generic) > > (defun rs-w3m-view-this-url () > "View the URL of the link under point. > Use `browse-url' when in a Gnus article buffer, else use > `w3m-safe-view-this-url'." > (interactive) > (if (string-equal gnus-article-buffer (buffer-name)) > (let ((url (w3m-url-valid (w3m-anchor)))) > (if url > (browse-url url) > (w3m-message "No URL at point"))) > (w3m-safe-view-this-url))) > ;; Map it to RET and/or <right>: > (define-key w3m-minor-mode-map (kbd "RET") 'rs-w3m-view-this-url) > (define-key w3m-minor-mode-map (kbd "<right>") 'rs-w3m-view-this-url)
Thanks - seems to work like a dream! David -- David Sumbler Please reply with a followup to the newsgroup. However, if you _really_ want to send me an e-mail, replace "nospam" in my address with "aeolia". _______________________________________________ Info-gnus-english mailing list Info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english