[Top][All Lists]

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

Re: Using a script to diplay web links

From: Reiner Steib
Subject: Re: Using a script to diplay web links
Date: Sun, 02 Oct 2005 15:33:49 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

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 "" ;; 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
  (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")))
;; 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)

Bye, Reiner.
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |

reply via email to

[Prev in Thread] Current Thread [Next in Thread]