Gnus development mailing list
 help / color / mirror / Atom feed
From: Richard Riley <rileyrg@googlemail.com>
To: ding@gnus.org
Subject: Re: Survey: how do you view links in a external browser?
Date: Mon, 25 Oct 2010 00:22:33 +0200	[thread overview]
Message-ID: <8uhbgbut7a.fsf@news.eternal-september.org> (raw)
In-Reply-To: <87ocaj38ch.fsf@gmail.com> (Robert D. Crawford's message of "Sun, 24 Oct 2010 10:42:54 -0500")

"Robert D. Crawford" <robdcraw@gmail.com> writes:

> jidanni@jidanni.org writes:
>
>> How do fellows usually view links in a external browser when reading a
>> message in gnus?
>
> Well, I use emacs/w3 for almost all of my browsing.  I am only partially
> sighted and emacs/w3 gives me the best experience.  Some pages don't
> cooperate with w3 and I open them in w3m.  Other times I use firefox
> under orca.  Below is what you will want to do.  I've commented within
> the defun.
>
> (defun rdc-gnus-open-in-browser (&optional arg)
>   "opens the link under point in browser
> numeric argument calls alternate browser"
>   (interactive "p")
>   ;; the next few lines are not useful to you
>   ;;  (dtk-speak "Opening URL in GUI browser")
>   ;;  (let ((emacspeak-speak-messages nil))
>     (goto-char (point-min))
>     (search-forward-regexp "link")
>     ;; the next line moves into the word "link"
>     (backward-char 2)
>     (if (= arg 4)
>         (setq browser-command-string "chrome ")
>       (setq browser-command-string "firefox "))
>     (shell-command  (concat browser-command-string
>                             "\""
>                             (if (eq browse-url-browser-function
>                                     'browse-url-w3)
>                                 (w3-view-this-url)
>                               (w3m-print-this-url)
>                             "\""
>                             nil nil))))
>
> This is what I use for rss feed links and should give you a starting
> point to adapt it to opening regular urls.  I just tested it under w3m
> and it fails.  Sorry, but I don't have the time to figure out how to do
> it properly.  The problem is w3m-print-this-url.  You need a function
> that returns the url, not sends it to the kill-ring.  Not sure what I
> was thinking when I wrote it.


What wrong with something as simple as

(setq browse-url-browser-function (quote browse-url-generic))
(setq browse-url-generic-program "iceweasel")

for the default return key/left click on a link

and then something like

  (define-key mode-specific-map [?u] 'w3m-browse-url)

for internal using w3m?

Have I forgotten some other part of my configuration that facilitates
this I wonder?



  reply	other threads:[~2010-10-24 22:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-24 13:51 jidanni
2010-10-24 14:02 ` Adam Sjøgren
2010-10-24 14:57 ` Richard Riley
2010-10-24 15:15   ` jidanni
2010-10-24 15:49     ` Richard Riley
2010-10-24 16:00       ` jidanni
2010-10-24 17:38         ` Richard Riley
2010-10-24 18:18           ` jidanni
2010-10-24 19:29             ` Richard Riley
2010-10-24 16:10     ` Lars Magne Ingebrigtsen
2010-10-24 17:03       ` [emacs-w3m:11398] " jidanni
2010-10-24 17:11         ` Charles Philip Chan
2010-11-29  4:09       ` jidanni
2010-11-29  9:05         ` Rupert Swarbrick
2010-10-24 15:42 ` Robert D. Crawford
2010-10-24 22:22   ` Richard Riley [this message]
2010-10-25 16:55     ` Robert D. Crawford
2010-10-25 18:01       ` Richard Riley
2010-10-24 17:03 ` Charles Philip Chan
2010-10-25  0:54 ` Daniel Pittman
2010-10-25 17:54 ` Łukasz Stelmach

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=8uhbgbut7a.fsf@news.eternal-september.org \
    --to=rileyrg@googlemail.com \
    --cc=ding@gnus.org \
    /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).