[email protected] writes:

> Memnon Anon <[email protected]> writes:
>
>
>> | `M-x browse-url <RET> URL <RET>'
>> |      Load a URL into a Web browser.
>
> Works great! ...even brings up my preferred browser instead of any of
> the other 3 I have.  How it did that, I have no clue, but works
> perfectly.  I did discover having the cursor "close" to a URL gives
> only a close approximation of the link.  Gotta have cursor right on
> link to get accurate location.
>
> Thank you
> nb

Possibly better - I use :


(defun rgr/browse (url)
  "If prefix is specified use the system default browser else use the 
configured emacs one"
  (if current-prefix-arg
      (when url (browse-url-default-browser url))
    (if  url (browse-url url) (call-interactively 'browse-url))
    ))

(defun rgr/browse-url (&optional url)
  "browse the url passed in"
  (interactive)
  (setq url (or url (w3m-url-valid (w3m-anchor)) (browse-url-url-at-point) 
(region-or-word-at-point)))
  (setq url (read-string (format "Url \"%s\" :" url) url nil url))
  (rgr/browse url))

(global-set-key (kbd "<f4>") 'rgr/browse-url)



Cursor on url. Hit f4 to open using your emacs browser (whatever that is
configured to) or C-u f4 to open in your desktop browser (firefox here).

_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to