* Refreshing Firefox window from within Emacs?
@ 2005-12-31 19:54 batkins57
2005-12-31 22:51 ` Thorsten Bonow
2006-01-04 23:29 ` Edward Dodge
0 siblings, 2 replies; 8+ messages in thread
From: batkins57 @ 2005-12-31 19:54 UTC (permalink / raw)
A lot of times I end up writing code in an Emacs window and switching
to a Firefox window to refresh it and see what happened and then
switching back. It would be nice if i could keep my Emacs window in
front of Firefox and use some keychord to refresh the page in Firefox
without Emacs losing focus and without having to actually switch to the
other window.
Is there any way to do this kind of thing (on X11)? Firefox provides
the -remote command-line option
(http://www.mozilla.org/unix/remote.html), which would be perfect
except that it doesn't seem to include a way to refresh the current
page.
Thanks,
Bill
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Refreshing Firefox window from within Emacs?
2005-12-31 19:54 Refreshing Firefox window from within Emacs? batkins57
@ 2005-12-31 22:51 ` Thorsten Bonow
2006-01-01 11:56 ` Lennart Borgman
2006-01-04 23:29 ` Edward Dodge
1 sibling, 1 reply; 8+ messages in thread
From: Thorsten Bonow @ 2005-12-31 22:51 UTC (permalink / raw)
>>>>> "Bill" == batkins <batkins57@gmail.com> writes:
Bill> Is there any way to do this kind of thing (on X11)? Firefox provides
Bill> the -remote command-line option
Bill> (http://www.mozilla.org/unix/remote.html), which would be perfect
Bill> except that it doesn't seem to include a way to refresh the current
Bill> page.
Hi,
just checked, calling
mozilla -remote "openfile(/home/toto/42/foo.txt)"
on my Debian System *reloads* "foo.txt" if it is already displayed in firefox.
So, together with "shell-command", you could refresh your file from within
Emacs.
Bill> Thanks, Bill
Hope this helps,
Toto
PS: 10 minutes too early over here to wish you a happy new year and make this
my first posting in 2006 :-)
--
Contact information and PGP key at
http://www-users.rwth-aachen.de/thorsten.bonow
I wear the chain I forged in life.
Marley's Ghost in Charles Dickens "A Christmas Carol"
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Refreshing Firefox window from within Emacs?
2005-12-31 22:51 ` Thorsten Bonow
@ 2006-01-01 11:56 ` Lennart Borgman
2006-01-04 11:30 ` ken
0 siblings, 1 reply; 8+ messages in thread
From: Lennart Borgman @ 2006-01-01 11:56 UTC (permalink / raw)
Cc: help-gnu-emacs
>just checked, calling
>
> mozilla -remote "openfile(/home/toto/42/foo.txt)"
>
>on my Debian System *reloads* "foo.txt" if it is already displayed in firefox.
>
>
There is a setting in FireFox 1.5 for how this works. Look in the
Options window under Tabs. The settings in "Open links from other
applications in:" determines this.
Unfortunately it does not seem like you can override this with -remote.
Or am I wrong?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Refreshing Firefox window from within Emacs?
2006-01-01 11:56 ` Lennart Borgman
@ 2006-01-04 11:30 ` ken
0 siblings, 0 replies; 8+ messages in thread
From: ken @ 2006-01-04 11:30 UTC (permalink / raw)
This is a pretty nice idea. I just did some looking around and found
that the following works from the CLI, except it opens the URL new tab
mozilla -a firefox -remote'openURL(http://www.foo.com/index.html)'
Here's some syntax:
mozilla -a firefox -remote 'openURL(%s,new-tab)'
I use Firefox v.1.0.7. and had to set Preferences/Advanced to open URLs
from remote application in "same tab/window".
Next thing is to run this from within emacs in a couple different ways.
hth,
ken
On Sun, 01 Jan 2006 12:56:24 +0100 Lennart Borgman
<lennart.borgman.073@student.lu.se> wrote:
>
> >just checked, calling
> >
> > mozilla -remote "openfile(/home/toto/42/foo.txt)"
> >
> >on my Debian System *reloads* "foo.txt" if it is already displayed in
> >firefox.
> >
> >
> There is a setting in FireFox 1.5 for how this works. Look in the
> Options window under Tabs. The settings in "Open links from other
> applications in:" determines this.
>
> Unfortunately it does not seem like you can override this with
> -remote. Or am I wrong?
>
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
--
"It is not knowable how long that conflict would last, it could last,
you know, six days, six weeks. I doubt six months."
--Secretary of Defense Donald Rumsfeld, 2/7/03
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Refreshing Firefox window from within Emacs?
2005-12-31 19:54 Refreshing Firefox window from within Emacs? batkins57
2005-12-31 22:51 ` Thorsten Bonow
@ 2006-01-04 23:29 ` Edward Dodge
2006-01-09 15:32 ` ken
1 sibling, 1 reply; 8+ messages in thread
From: Edward Dodge @ 2006-01-04 23:29 UTC (permalink / raw)
batkins57@gmail.com writes:
If the "code" you are speaking of is actually .html, you can simply bind
the following function to a handy key-combination:
browse-url-of-file
Also, you may have to set your default browser for the "browse-url..."
commands to Firefox in your .emacs.
Edward
> A lot of times I end up writing code in an Emacs window and switching
> to a Firefox window to refresh it and see what happened and then
> switching back. It would be nice if i could keep my Emacs window in
> front of Firefox and use some keychord to refresh the page in Firefox
> without Emacs losing focus and without having to actually switch to the
> other window.
>
> Is there any way to do this kind of thing (on X11)? Firefox provides
> the -remote command-line option
> (http://www.mozilla.org/unix/remote.html), which would be perfect
> except that it doesn't seem to include a way to refresh the current
> page.
>
> Thanks,
> Bill
>
--
Edward Dodge
__o
_`\(,_
(_)/ (_) --- ---
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Refreshing Firefox window from within Emacs?
2006-01-04 23:29 ` Edward Dodge
@ 2006-01-09 15:32 ` ken
2006-01-14 15:18 ` ken
0 siblings, 1 reply; 8+ messages in thread
From: ken @ 2006-01-09 15:32 UTC (permalink / raw)
On 04 Jan 2006 16:29:41 -0700 Edward Dodge <user@foo.bar> wrote:
> batkins57@gmail.com writes:
>
> If the "code" you are speaking of is actually .html, you can simply
> bind the following function to a handy key-combination:
>
> browse-url-of-file
>
> Also, you may have to set your default browser for the
> "browse-url..." commands to Firefox in your .emacs.
Thanks for the hint. The dunces among us (e.g., see Sender field) need
more. It seems that, with my emacs setup anyway, if you're not using
netscape, it's necessary to Customize the "Browse Url Browser Function"
variable. I already found out that the CLI command to open a URL in
Firefox is
mozilla -a firefox -remote 'openURL(http://www.domain.tld/file.html)'
So a couple brain cells are telling me to do this into Customize:
mozilla -a firefox -remote'openURL(buffer-file-name)'
But unless this function is smarter than I think I am, I doubt this is
going to work... because buffer-file-name returns the name of a file
while the "mozilla -a firefox..." command calls for a URL.
In fact, I just tried to save the customization and got an error:
"Invalid function: mozilla".
Any help appreciated.
--
"It is not knowable how long that conflict would last, it could last,
you know, six days, six weeks. I doubt six months."
--Secretary of Defense Donald Rumsfeld, 2/7/03
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Refreshing Firefox window from within Emacs?
2006-01-09 15:32 ` ken
@ 2006-01-14 15:18 ` ken
2006-01-16 17:26 ` Kevin Rodgers
0 siblings, 1 reply; 8+ messages in thread
From: ken @ 2006-01-14 15:18 UTC (permalink / raw)
On Mon, 9 Jan 2006 10:32:49 -0500 ken <gebser@speakeasy.net> wrote:
> .... The dunces among us (e.g., see Sender field) ....
Well, that didn't say what I wanted it to say. It seems that the
mailing list software changed my Sender field (should have guessed it
would), so let me amend the above to "see From field".
Back to the original issue: Refreshing a browser window from within
emacs.
When I run "M-x browse-url-of-file" I get an error message in the
minibuffer saying "Searching for program: no such file or directory,
netscape". This is logical because I'm using Firefox and not
netscape. So the obvious next step is to alter how browse-url-of-file
works. So I figured out that this command from the CLI works:
mozilla -a firefox -remote 'openURL(http://www.domain.tld/file.html)'
The problem comes when I use Customize in emacs to put in this command.
Trying to do so, Customize gives me the error "Invalid function:
mozilla". It seems it's looking for an elisp expression, something I
have no clue as to how to compose.
Anyone know what that might be?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Refreshing Firefox window from within Emacs?
2006-01-14 15:18 ` ken
@ 2006-01-16 17:26 ` Kevin Rodgers
0 siblings, 0 replies; 8+ messages in thread
From: Kevin Rodgers @ 2006-01-16 17:26 UTC (permalink / raw)
ken wrote:
> On Mon, 9 Jan 2006 10:32:49 -0500 ken <gebser@speakeasy.net> wrote:
>
>
>>.... The dunces among us (e.g., see Sender field) ....
>
>
> Well, that didn't say what I wanted it to say. It seems that the
> mailing list software changed my Sender field (should have guessed it
> would), so let me amend the above to "see From field".
>
>
> Back to the original issue: Refreshing a browser window from within
> emacs.
>
> When I run "M-x browse-url-of-file" I get an error message in the
> minibuffer saying "Searching for program: no such file or directory,
> netscape". This is logical because I'm using Firefox and not
> netscape. So the obvious next step is to alter how browse-url-of-file
> works. So I figured out that this command from the CLI works:
>
> mozilla -a firefox -remote 'openURL(http://www.domain.tld/file.html)'
>
> The problem comes when I use Customize in emacs to put in this command.
> Trying to do so, Customize gives me the error "Invalid function:
> mozilla". It seems it's looking for an elisp expression, something I
> have no clue as to how to compose.
No, as its doc string states, the value of browse-url-browser-function
is a function (see the "What Is a Function" node in the Emacs Lisp
manual).
I think Emacs 22 (aka CVS Emacs) defines the browse-url-firefox and
browse-url-mozilla functions, which would serve as useful values for
you. Or you probably could find one of them on the web; try
http://www.emacswiki.org/cgi-bin/wiki/BrowseUrl
But you might be able to get browse-url-netscape to work for you by
tweaking a couple of variables:
(setq browse-url-netscape-program "mozilla")
(setq browse-url-netscape-arguments '("-a" "firefox"))
--
Kevin
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-01-16 17:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-31 19:54 Refreshing Firefox window from within Emacs? batkins57
2005-12-31 22:51 ` Thorsten Bonow
2006-01-01 11:56 ` Lennart Borgman
2006-01-04 11:30 ` ken
2006-01-04 23:29 ` Edward Dodge
2006-01-09 15:32 ` ken
2006-01-14 15:18 ` ken
2006-01-16 17:26 ` Kevin Rodgers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).