info-gnus-english
[Top][All Lists]
Advanced

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

Open urls in a browser (was: More gnewb questions)


From: Memnon Anon
Subject: Open urls in a browser (was: More gnewb questions)
Date: Mon, 1 Jun 2009 22:02:05 +0000 (UTC)

notbob@bb.nothome.com writes:

>>  * http://gnus.org/manual/gnus_167.html
>
> Is there a keystroke/function to bring up the above above weblink in
> browser of choice?

,----[ (info "(emacs)Browse-URL") ]
| 54.1 Following URLs
| ===================
| 
| `M-x browse-url <RET> URL <RET>'
|      Load a URL into a Web browser.
| 
|    The Browse-URL package provides facilities for following URLs
| specifying links on the World Wide Web.  Usually this works by invoking
| a web browser, but you can, for instance, arrange to invoke
| `compose-mail' from `mailto:' URLs.
| 
|    The general way to use this feature is to type `M-x browse-url',
| which displays a specified URL.  If point is located near a plausible
| URL, that URL is used as the default.  Other commands are available
| which you might like to bind to keys, such as `browse-url-at-point' and
| `browse-url-at-mouse'.
| 
|    You can customize Browse-URL's behavior via various options in the
| `browse-url' Customize group, particularly
| `browse-url-browser-function'.  You can invoke actions dependent on the
| type of URL by defining `browse-url-browser-function' as an association
| list.  The package's commentary available via `C-h p' under the
| `hypermedia' keyword provides more information.  Packages with
| facilities for following URLs should always go through Browse-URL, so
| that the customization options for Browse-URL will affect all browsing
| in Emacs.
`----

I have this in my .emacs.
Using C-x m on an url lets I am asked whether I want to use w3m inside
emacs or conkeror called as an external programm.

--8<---------------cut here---------------start------------->8---
(require 'w3m-load)
(require 'w3m)
 (setq browse-url-browser-function 'browse-url-generic
       browse-url-generic-program "/usr/bin/conkeror")

;; Found here: http://www.emacswiki.org/cgi-bin/wiki/JorgenSchaefersEmacsConfig
(defun choose-browser (url &rest args)
  (interactive "sURL: ")
  (if (y-or-n-p "Use external browser? ")
      (browse-url-generic url)
    (w3m-browse-url url)))

(setq browse-url-browser-function 'choose-browser)

(global-set-key "\C-xm" 'browse-url-at-point)
--8<---------------cut here---------------end--------------->8---

hth

Memnon
P.S.: You should really consider splitting your questions in seperate
      messages and giving each a clear subject. You will certainly get
      more replys ;)






reply via email to

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