help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: shortest amount of keystrokes to see URL in an external browser


From: Richard Riley
Subject: Re: shortest amount of keystrokes to see URL in an external browser
Date: Sat, 25 Jun 2011 01:36:45 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux)

address@hidden writes:

> "use and external browser" ->
> "use an external browser"
>

dunno if this is any good to you:

,----
| (defun rgr/browse (url)
|   "If prefix is specified use the system default browser else use the 
configured emacs one"
|   (if current-prefix-arg
|       (if  url
|           (w3m-browse-url url)
|         (call-interactively 'browse-url))
|     (when url (browse-url-generic 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)
`----




reply via email to

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