Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+from-uce@imap.cc>
Subject: Re: Using a script to diplay web links
Date: Sun, 02 Oct 2005 15:33:49 +0200	[thread overview]
Message-ID: <v94q803uwy.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <m3ek75476m.fsf@ceres.staly.plus.com>

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)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


  reply	other threads:[~2005-10-02 13:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-01  9:37 David Sumbler
2005-10-02 13:33 ` Reiner Steib [this message]
2005-10-02 19:00   ` David Sumbler
2005-10-03 21:20     ` Reiner Steib

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v94q803uwy.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+from-uce@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).