From: Richard Riley <rileyrg@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: shortest amount of keystrokes to see URL in an external browser
Date: Sat, 25 Jun 2011 01:36:45 +0200 [thread overview]
Message-ID: <bjmxh6u7hu.fsf@news.eternal-september.org> (raw)
In-Reply-To: 874o3eakip.fsf@jidanni.org
jidanni@jidanni.org 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)
`----
next prev parent reply other threads:[~2011-06-24 23:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.102.1308507902.785.help-gnu-emacs@gnu.org>
2011-06-24 23:14 ` shortest amount of keystrokes to see URL in an external browser jidanni
2011-06-24 23:34 ` PJ Weisberg
2011-06-25 0:01 ` jidanni
2011-06-25 1:15 ` PJ Weisberg
2011-06-25 2:44 ` jidanni
2011-06-24 23:15 ` jidanni
2011-06-24 23:36 ` Richard Riley [this message]
2011-06-19 11:12 jidanni
2011-06-19 18:24 ` Eric Abrahamsen
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=bjmxh6u7hu.fsf@news.eternal-september.org \
--to=rileyrg@googlemail.com \
--cc=help-gnu-emacs@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.