From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/5809 Path: news.gmane.org!not-for-mail From: David Sumbler Newsgroups: gmane.emacs.gnus.user Subject: Re: Using a script to diplay web links Date: Sun, 02 Oct 2005 20:00:20 +0100 Organization: Customer of PlusNet plc (http://www.plus.net) Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138671466 28927 80.91.229.2 (31 Jan 2006 01:37:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:37:46 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:35:52 2006 Original-Path: quimby.gnus.org!newsfeed.gazeta.pl!newsfeed.pionier.net.pl!news-fra1.dfn.de!news-stu1.dfn.de!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!solnet.ch!solnet.ch!nntp-peering.plus.net!ptn-nntp-feeder01.plus.net!ptn-nntp-spool02.plus.net!ptn-nntp-reader03.plus.net!not-for-mail Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:nM+ZPGZSNNfkgSksPfbi2vsYLDM= Original-NNTP-Posting-Host: eb6ce70a.ptn-nntp-reader03.plus.net Original-X-Trace: DXC=BdW]:h[LGD8\^hjaOl;;GmH1?MQObG;L Original-X-Complaints-To: abuse@plus.net Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:5951 Original-Lines: 43 X-Gnus-Article-Number: 5951 Tue Jan 17 17:35:52 2006 Xref: news.gmane.org gmane.emacs.gnus.user:5809 Archived-At: Reiner Steib 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 : > (define-key w3m-minor-mode-map (kbd "RET") 'rs-w3m-view-this-url) > (define-key w3m-minor-mode-map (kbd "") '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".