[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: |
PJ Weisberg |
Subject: |
Re: shortest amount of keystrokes to see URL in an external browser |
Date: |
Fri, 24 Jun 2011 18:15:11 -0700 |
On Fri, Jun 24, 2011 at 5:01 PM, <jidanni@jidanni.org> wrote:
>>>>>> "PW" == PJ Weisberg <pj@irregularexpressions.net> writes:
> PW> If you got as far as looking at the code for `find-file-at-point',
> PW> perhaps it occurred to you to customize `ffap-url-fetcher' to
> PW> `browse-url-firefox'? :-)
> Yes I do similar things in http://jidanni.org/comp/configuration/.emacs
> I'm just wanting a way to have an external browser function be at the
> most just one more keystroke than the internal browser function.
>
> I.e., I want C-x C-f to call the internal browser function,
> and C-u C-x C-f to call the external browser function.
> Or some other key
> C-? C-? to call the external browser function.
> And with the massive complication of also wanting the power of FFAP,
> it is not kid stuff, but also not senior stuff, or senior stiff, which
> is where I'm headed...
It sounds like you don't want to "re-engineer" the whole thing; you
just want to appropriate the prefix argument for your own purposes.
Exactly like `find-file-at-point' does to `ffap-file-finder'. ;-)
So, along those lines, something like:
(defun my-ffap (&optional filename)
(interactive)
(let ((ffap-url-fetcher (if current-prefix-arg
#'browse-url-firefox
ffap-url-fetcher))
(current-prefix-arg nil))
(find-file-at-point filename)))
should do the trick.
Re: shortest amount of keystrokes to see URL in an external browser, jidanni, 2011/06/24