* browse-url
@ 2005-04-01 0:06 Hugh Lawson
2005-04-01 0:23 ` browse-url David Kastrup
0 siblings, 1 reply; 19+ messages in thread
From: Hugh Lawson @ 2005-04-01 0:06 UTC (permalink / raw)
Debian sarge
Emacs 21.4.1
browse-url works fine if firefox is already running.
But suppose firefox isn't running.
If I do 'M-x browse-url' and fill in the url, then firefox pops up for
a second and then disappears. The same thing happens with links I
click on in Emacs.
I think I can imagine a shell script to deal with this, but surely
there is something alread in Emacs.
--
Hugh Lawson
hlawson@triad.rr.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-01 0:06 browse-url Hugh Lawson
@ 2005-04-01 0:23 ` David Kastrup
2005-04-01 7:16 ` browse-url nfreimann
2005-04-04 0:02 ` browse-url Hugh Lawson
0 siblings, 2 replies; 19+ messages in thread
From: David Kastrup @ 2005-04-01 0:23 UTC (permalink / raw)
Hugh Lawson <hlawson@triad.rr.com> writes:
> Debian sarge
> Emacs 21.4.1
>
> browse-url works fine if firefox is already running.
>
> But suppose firefox isn't running.
>
> If I do 'M-x browse-url' and fill in the url, then firefox pops up for
> a second and then disappears. The same thing happens with links I
> click on in Emacs.
>
> I think I can imagine a shell script to deal with this, but surely
> there is something alread in Emacs.
The definition of browse-url-generic in browse-url.el needs to get
replaced with:
(defun browse-url-generic (url &optional new-window)
;; new-window ignored
"Ask the WWW browser defined by `browse-url-generic-program' to load URL.
Default to the URL around or before point. A fresh copy of the
browser is started up in a new process with possible additional arguments
`browse-url-generic-args'. This is appropriate for browsers which
don't offer a form of remote control."
(interactive (browse-url-interactive-arg "URL: "))
(if (not browse-url-generic-program)
(error "No browser defined (`browse-url-generic-program')"))
(apply 'call-process browse-url-generic-program nil
0 nil
(append browse-url-generic-args (list url))))
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-01 0:23 ` browse-url David Kastrup
@ 2005-04-01 7:16 ` nfreimann
2005-04-01 9:37 ` browse-url David Kastrup
2005-04-04 0:02 ` browse-url Hugh Lawson
1 sibling, 1 reply; 19+ messages in thread
From: nfreimann @ 2005-04-01 7:16 UTC (permalink / raw)
Cc: help-gnu-emacs
David Kastrup wrote:
>The definition of browse-url-generic in browse-url.el needs to get
>replaced with:
>
>
>
In browse-url-generic:
.emacs:78:14:Warning: reference to free variable `browse-url-generic-args'
In end of data:
.emacs:86:1:Warning: the function `browse-url-interactive-arg' is not
known to
be defined.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-01 7:16 ` browse-url nfreimann
@ 2005-04-01 9:37 ` David Kastrup
0 siblings, 0 replies; 19+ messages in thread
From: David Kastrup @ 2005-04-01 9:37 UTC (permalink / raw)
Cc: help-gnu-emacs
nfreimann <niels_freimann@yahoo.de> writes:
> David Kastrup wrote:
>
>>The definition of browse-url-generic in browse-url.el needs to get
>>replaced with:
>>
>>
>>
>
> In browse-url-generic:
> .emacs:78:14:Warning: reference to free variable `browse-url-generic-args'
>
> In end of data:
> .emacs:86:1:Warning: the function `browse-url-interactive-arg' is not
> known to
> be defined.
Perhaps it would work to replace the whole of browse-url.el with the
version from Emacs CVS.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-01 0:23 ` browse-url David Kastrup
2005-04-01 7:16 ` browse-url nfreimann
@ 2005-04-04 0:02 ` Hugh Lawson
2005-04-04 0:31 ` browse-url David Kastrup
1 sibling, 1 reply; 19+ messages in thread
From: Hugh Lawson @ 2005-04-04 0:02 UTC (permalink / raw)
David Kastrup <dak@gnu.org> writes:
> Hugh Lawson <hlawson@triad.rr.com> writes:
>
> > Debian sarge
> > Emacs 21.4.1
> >
> > browse-url works fine if firefox is already running.
> >
> > But suppose firefox isn't running.
> >
> > If I do 'M-x browse-url' and fill in the url, then firefox pops up for
> > a second and then disappears. The same thing happens with links I
> > click on in Emacs.
> >
> > I think I can imagine a shell script to deal with this, but surely
> > there is something alread in Emacs.
>
> The definition of browse-url-generic in browse-url.el needs to get
> replaced with:
>
> (defun browse-url-generic (url &optional new-window)
> ;; new-window ignored
> "Ask the WWW browser defined by `browse-url-generic-program' to load URL.
> Default to the URL around or before point. A fresh copy of the
> browser is started up in a new process with possible additional arguments
> `browse-url-generic-args'. This is appropriate for browsers which
> don't offer a form of remote control."
> (interactive (browse-url-interactive-arg "URL: "))
> (if (not browse-url-generic-program)
> (error "No browser defined (`browse-url-generic-program')"))
> (apply 'call-process browse-url-generic-program nil
> 0 nil
> (append browse-url-generic-args (list url))))
Hello David,
I don't understand how this solves my problem. If mozilla-firefox is open and running. all is well. If it isn't then there is a problem.
--
Hugh Lawson
hlawson@triad.rr.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-04 0:02 ` browse-url Hugh Lawson
@ 2005-04-04 0:31 ` David Kastrup
2005-04-05 0:36 ` browse-url Hugh Lawson
0 siblings, 1 reply; 19+ messages in thread
From: David Kastrup @ 2005-04-04 0:31 UTC (permalink / raw)
Hugh Lawson <hlawson@triad.rr.com> writes:
> David Kastrup <dak@gnu.org> writes:
>
>> Hugh Lawson <hlawson@triad.rr.com> writes:
>>
>> > Debian sarge
>> > Emacs 21.4.1
>> >
>> > browse-url works fine if firefox is already running.
>> >
>> > But suppose firefox isn't running.
>> >
>> > If I do 'M-x browse-url' and fill in the url, then firefox pops up for
>> > a second and then disappears. The same thing happens with links I
>> > click on in Emacs.
>> >
>> > I think I can imagine a shell script to deal with this, but surely
>> > there is something alread in Emacs.
>>
>> The definition of browse-url-generic in browse-url.el needs to get
>> replaced with:
>>
>> (defun browse-url-generic (url &optional new-window)
>> ;; new-window ignored
>> "Ask the WWW browser defined by `browse-url-generic-program' to load URL.
>> Default to the URL around or before point. A fresh copy of the
>> browser is started up in a new process with possible additional arguments
>> `browse-url-generic-args'. This is appropriate for browsers which
>> don't offer a form of remote control."
>> (interactive (browse-url-interactive-arg "URL: "))
>> (if (not browse-url-generic-program)
>> (error "No browser defined (`browse-url-generic-program')"))
>> (apply 'call-process browse-url-generic-program nil
>> 0 nil
>> (append browse-url-generic-args (list url))))
>
>
> I don't understand how this solves my problem. If mozilla-firefox
> is open and running. all is well. If it isn't then there is a
> problem.
Emacs has several possibilities to start processes. Starting with
call-process and 0 as third argument detaches the process completely
from Emacs.
Starting the process with start-process, in contrast, leaves the
process associated with Emacs. If the process detaches itself from
the tty, Emacs assumes that it is finished and kills the process
group. This is what happens with new Firefoxes that try to escape the
Emacs tty.
This is why you need an Elisp function that will use call-process
instead of start-process for starting Firefox if it is supposed to
survive detaching.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-04 0:31 ` browse-url David Kastrup
@ 2005-04-05 0:36 ` Hugh Lawson
2005-04-05 1:29 ` browse-url David Kastrup
0 siblings, 1 reply; 19+ messages in thread
From: Hugh Lawson @ 2005-04-05 0:36 UTC (permalink / raw)
David Kastrup <dak@gnu.org> writes:
> Hugh Lawson <hlawson@triad.rr.com> writes:
>
> > David Kastrup <dak@gnu.org> writes:
> >
> >> Hugh Lawson <hlawson@triad.rr.com> writes:
> >>
> >> > Debian sarge
> >> > Emacs 21.4.1
> >> >
> >> > browse-url works fine if firefox is already running.
> >> >
> >> > But suppose firefox isn't running.
> >> >
> >> > If I do 'M-x browse-url' and fill in the url, then firefox pops up for
> >> > a second and then disappears. The same thing happens with links I
> >> > click on in Emacs.
> >> >
> >> > I think I can imagine a shell script to deal with this, but surely
> >> > there is something alread in Emacs.
> >>
> >> The definition of browse-url-generic in browse-url.el needs to get
> >> replaced with:
> >>
> >> (defun browse-url-generic (url &optional new-window)
> >> ;; new-window ignored
> >> "Ask the WWW browser defined by `browse-url-generic-program' to load URL.
> >> Default to the URL around or before point. A fresh copy of the
> >> browser is started up in a new process with possible additional arguments
> >> `browse-url-generic-args'. This is appropriate for browsers which
> >> don't offer a form of remote control."
> >> (interactive (browse-url-interactive-arg "URL: "))
> >> (if (not browse-url-generic-program)
> >> (error "No browser defined (`browse-url-generic-program')"))
> >> (apply 'call-process browse-url-generic-program nil
> >> 0 nil
> >> (append browse-url-generic-args (list url))))
> >
> >
> > I don't understand how this solves my problem. If mozilla-firefox
> > is open and running. all is well. If it isn't then there is a
> > problem.
>
> Emacs has several possibilities to start processes. Starting with
> call-process and 0 as third argument detaches the process completely
> from Emacs.
>
> Starting the process with start-process, in contrast, leaves the
> process associated with Emacs. If the process detaches itself from
> the tty, Emacs assumes that it is finished and kills the process
> group. This is what happens with new Firefoxes that try to escape the
> Emacs tty.
>
> This is why you need an Elisp function that will use call-process
> instead of start-process for starting Firefox if it is supposed to
> survive detaching.
Thanks for the explanation, David. I had trouble making it work, so
as a trial, I added the following two functions to my ~/.emacs file.
Please critique. I did this purely empirically, with no real
understanding.
(defun browse-url-firefox (url &optional new-window )
;;new-window ignored
"Ask the firefox browser to load URL."
(apply 'call-process "firefox" nil
0 nil (list url)))
(setq browse-url-browser-function 'browse-url-firefox)
--
Hugh Lawson
hlawson@triad.rr.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-05 0:36 ` browse-url Hugh Lawson
@ 2005-04-05 1:29 ` David Kastrup
2005-04-05 2:30 ` browse-url Hugh Lawson
0 siblings, 1 reply; 19+ messages in thread
From: David Kastrup @ 2005-04-05 1:29 UTC (permalink / raw)
Hugh Lawson <hlawson@triad.rr.com> writes:
> David Kastrup <dak@gnu.org> writes:
>
>> This is why you need an Elisp function that will use call-process
>> instead of start-process for starting Firefox if it is supposed to
>> survive detaching.
>
> Thanks for the explanation, David. I had trouble making it work, so
>as a trial, I added the following two functions to my ~/.emacs file.
>
> Please critique. I did this purely empirically, with no real
> understanding.
>
>
>
> (defun browse-url-firefox (url &optional new-window )
> ;;new-window ignored
> "Ask the firefox browser to load URL."
> (apply 'call-process "firefox" nil
> 0 nil (list url)))
Well, looks a bit more complicated than necessary. It should be
sufficient to write something like
(defun browse-url-firefox (url &optional new-window)
(call-process "firefox" nil 0 nil url))
However, this should be quite equivalent to what you wrote, so if you
are experiencing problems, you'll need to describe them in more detail
to make it possible to guess what might be amiss. At least in my
opinion, what you wrote looks like it should work.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-05 1:29 ` browse-url David Kastrup
@ 2005-04-05 2:30 ` Hugh Lawson
2005-04-05 4:28 ` browse-url Joe Corneli
[not found] ` <mailman.152.1112673857.2895.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 19+ messages in thread
From: Hugh Lawson @ 2005-04-05 2:30 UTC (permalink / raw)
David Kastrup <dak@gnu.org> writes:
> However, this should be quite equivalent to what you wrote, so if you
> are experiencing problems, you'll need to describe them in more detail
> to make it possible to guess what might be amiss. At least in my
> opinion, what you wrote looks like it should work.
The function adapted from your example seems to work ok. I will just
stop unti l it presents difficulties. Thank you for your help.
--
Hugh Lawson
hlawson@triad.rr.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-05 2:30 ` browse-url Hugh Lawson
@ 2005-04-05 4:28 ` Joe Corneli
2005-04-05 9:19 ` browse-url Greg Novak
[not found] ` <mailman.182.1112692644.2895.help-gnu-emacs@gnu.org>
[not found] ` <mailman.152.1112673857.2895.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 19+ messages in thread
From: Joe Corneli @ 2005-04-05 4:28 UTC (permalink / raw)
Both of these functions appear to require starting a new firefox. (??)
(defun browse-url-firefox (url &optional new-window )
;;new-window ignored
"Ask the firefox browser to load URL."
(apply 'call-process "firefox" nil
0 nil (list url)))
;;;
(defun browse-url-firefox (url &optional new-window)
(call-process "firefox" nil 0 nil url))
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
[not found] ` <mailman.152.1112673857.2895.help-gnu-emacs@gnu.org>
@ 2005-04-05 8:20 ` Hugh Lawson
2005-04-05 9:11 ` browse-url Joe Corneli
[not found] ` <mailman.179.1112690775.2895.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 19+ messages in thread
From: Hugh Lawson @ 2005-04-05 8:20 UTC (permalink / raw)
Joe Corneli <jcorneli@math.utexas.edu> writes:
> Both of these functions appear to require starting a new firefox. (??)
>
#1
> (defun browse-url-firefox (url &optional new-window )
> ;;new-window ignored
> "Ask the firefox browser to load URL."
> (apply 'call-process "firefox" nil
> 0 nil (list url)))
>
> ;;;
#2
> (defun browse-url-firefox (url &optional new-window)
> (call-process "firefox" nil 0 nil url))
Perhaps they do not. I just did:
'M-x browse-url' twice, inputting two different urls, and still have
just one instance of firefox visible on the screen. I can display the
two different pages by clicking the navigation toolbar arrows.
Before trying these functions, I could find no way by setting emacs
variables to start firefox if it was not already running.
There's probably a way, but I didn't find it. :(
--
Hugh Lawson
hlawson@triad.rr.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-05 8:20 ` browse-url Hugh Lawson
@ 2005-04-05 9:11 ` Joe Corneli
[not found] ` <mailman.179.1112690775.2895.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 19+ messages in thread
From: Joe Corneli @ 2005-04-05 9:11 UTC (permalink / raw)
Joe Corneli <jcorneli@math.utexas.edu> writes:
> Both of these functions appear to require starting a new firefox. (??)
>
#1
> (defun browse-url-firefox (url &optional new-window )
> ;;new-window ignored
> "Ask the firefox browser to load URL."
> (apply 'call-process "firefox" nil
> 0 nil (list url)))
>
> ;;;
#2
> (defun browse-url-firefox (url &optional new-window)
> (call-process "firefox" nil 0 nil url))
Perhaps they do not. I just did:
'M-x browse-url' twice, inputting two different urls, and still have
just one instance of firefox visible on the screen. I can display the
two different pages by clicking the navigation toolbar arrows.
Before trying these functions, I could find no way by setting emacs
variables to start firefox if it was not already running.
There's probably a way, but I didn't find it. :(
Well, I don't know what's different out our environments, but for me,
evaluating
(progn (call-process "firefox" nil 0 nil "http://www.gnu.org")
(call-process "firefox" nil 0 nil "http://www.google.com"))
gives me one firefox window browsing gnu.org, and one of those idiot
boxes that I hate telling me to choose a new user (i.e. if no firefox
window is open; if a window is open, 2 X idiot box).
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-05 4:28 ` browse-url Joe Corneli
@ 2005-04-05 9:19 ` Greg Novak
2005-04-05 19:57 ` browse-url Joe Corneli
[not found] ` <mailman.182.1112692644.2895.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 19+ messages in thread
From: Greg Novak @ 2005-04-05 9:19 UTC (permalink / raw)
* Joe Corneli <jcorneli@math.utexas.edu> wrote:
> Both of these functions appear to require starting a new firefox. (??)
By a cosmic coincidence I just put the following in my .emacs file,
which opens a page in a new tab using an existing Firefox.
(defun browse-url-firefox (url &optional new-window)
(shell-command (concat "/usr/local/firefox/mozilla-xremote-client \"openurl("
url
",new-tab)\"")))
(setq browse-url-browser-function 'browse-url-firefox)
Greg
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
[not found] ` <mailman.179.1112690775.2895.help-gnu-emacs@gnu.org>
@ 2005-04-05 13:07 ` Hugh Lawson
2005-04-05 13:43 ` browse-url Hugh Lawson
2005-04-07 9:34 ` browse-url Christian Lynbech
1 sibling, 1 reply; 19+ messages in thread
From: Hugh Lawson @ 2005-04-05 13:07 UTC (permalink / raw)
Joe Corneli <jcorneli@math.utexas.edu> writes:
>
> Well, I don't know what's different out our environments, but for me,
> evaluating
>
> (progn (call-process "firefox" nil 0 nil "http://www.gnu.org")
> (call-process "firefox" nil 0 nil "http://www.google.com"))
>
> gives me one firefox window browsing gnu.org, and one of those idiot
> boxes that I hate telling me to choose a new user (i.e. if no firefox
> window is open; if a window is open, 2 X idiot box).
For me, it first went to gnu.org, and then went to google, as expected.
I've got Debian sarge and firefox 1.0.1, as provided by Debian package
1.0.1.
--
Hugh Lawson
hlawson@triad.rr.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-05 13:07 ` browse-url Hugh Lawson
@ 2005-04-05 13:43 ` Hugh Lawson
0 siblings, 0 replies; 19+ messages in thread
From: Hugh Lawson @ 2005-04-05 13:43 UTC (permalink / raw)
Hugh Lawson <hlawson@triad.rr.com> writes:
> Joe Corneli <jcorneli@math.utexas.edu> writes:
>
>
> >
> > Well, I don't know what's different out our environments, but for me,
> > evaluating
> >
> > (progn (call-process "firefox" nil 0 nil "http://www.gnu.org")
> > (call-process "firefox" nil 0 nil "http://www.google.com"))
> >
> > gives me one firefox window browsing gnu.org, and one of those idiot
> > boxes that I hate telling me to choose a new user (i.e. if no firefox
> > window is open; if a window is open, 2 X idiot box).
>
> For me, it first went to gnu.org, and then went to google, as expected.
>
> I've got Debian sarge and firefox 1.0.1, as provided by Debian package
> 1.0.1.
oops! should be Debian package mozilla-firefox.
--
Hugh Lawson
hlawson@triad.rr.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-05 9:19 ` browse-url Greg Novak
@ 2005-04-05 19:57 ` Joe Corneli
0 siblings, 0 replies; 19+ messages in thread
From: Joe Corneli @ 2005-04-05 19:57 UTC (permalink / raw)
Well here's a version that works for me & that will either open a
new firefox or use an existing one. I think I'll send a bug
report about the issue I was seeing doing this the "simple way".
(defun browse-url-firefox (url &optional new-window)
(when (eq (shell-command
(concat
"/sw/lib/firefox/mozilla-xremote-client \"openurl("
url
")\"")) 2)
(call-process "firefox" nil 0 nil url)))
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
[not found] ` <mailman.179.1112690775.2895.help-gnu-emacs@gnu.org>
2005-04-05 13:07 ` browse-url Hugh Lawson
@ 2005-04-07 9:34 ` Christian Lynbech
2005-04-07 14:47 ` browse-url Hugh Lawson
1 sibling, 1 reply; 19+ messages in thread
From: Christian Lynbech @ 2005-04-07 9:34 UTC (permalink / raw)
>>>>> "Joe" == Joe Corneli <jcorneli@math.utexas.edu> writes:
Joe> Well, I don't know what's different out our environments, but for me,
Joe> evaluating
Joe> (progn (call-process "firefox" nil 0 nil "http://www.gnu.org")
Joe> (call-process "firefox" nil 0 nil "http://www.google.com"))
Joe> gives me one firefox window browsing gnu.org, and one of those idiot
Joe> boxes that I hate telling me to choose a new user (i.e. if no firefox
Joe> window is open; if a window is open, 2 X idiot box).
It appears that Hugh Lawson is running Debian and here /usr/bin/firefox points
to a ~400 line script that presumably examines the current situation and does
the right thing. Possibly, when you call "firefox" you get directly to the
application executable which only works as desired the first time.
------------------------+-----------------------------------------------------
Christian Lynbech | christian #\@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
- petonic@hal.com (Michael A. Petonic)
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
2005-04-07 9:34 ` browse-url Christian Lynbech
@ 2005-04-07 14:47 ` Hugh Lawson
0 siblings, 0 replies; 19+ messages in thread
From: Hugh Lawson @ 2005-04-07 14:47 UTC (permalink / raw)
Christian Lynbech <christian.lynbech@ericsson.com> writes:
> >>>>> "Joe" == Joe Corneli <jcorneli@math.utexas.edu> writes:
>
> Joe> Well, I don't know what's different out our environments, but for me,
> Joe> evaluating
>
> Joe> (progn (call-process "firefox" nil 0 nil "http://www.gnu.org")
> Joe> (call-process "firefox" nil 0 nil "http://www.google.com"))
>
> Joe> gives me one firefox window browsing gnu.org, and one of those idiot
> Joe> boxes that I hate telling me to choose a new user (i.e. if no firefox
> Joe> window is open; if a window is open, 2 X idiot box).
>
> It appears that Hugh Lawson is running Debian and here /usr/bin/firefox points
> to a ~400 line script that presumably examines the current situation and does
> the right thing. Possibly, when you call "firefox" you get directly to the
> application executable which only works as desired the first time.
I'm running Debian sarge, but Joe's elisp function works fine on my
system.
--
Hugh Lawson
hlawson@triad.rr.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: browse-url
[not found] ` <mailman.182.1112692644.2895.help-gnu-emacs@gnu.org>
@ 2005-04-07 18:12 ` Hugh Lawson
0 siblings, 0 replies; 19+ messages in thread
From: Hugh Lawson @ 2005-04-07 18:12 UTC (permalink / raw)
Greg Novak <novak@ucolick.org> writes:
> * Joe Corneli <jcorneli@math.utexas.edu> wrote:
> > Both of these functions appear to require starting a new firefox. (??)
>
> By a cosmic coincidence I just put the following in my .emacs file,
> which opens a page in a new tab using an existing Firefox.
>
> (defun browse-url-firefox (url &optional new-window)
> (shell-command (concat "/usr/local/firefox/mozilla-xremote-client \"openurl("
> url
> ",new-tab)\"")))
>
> (setq browse-url-browser-function 'browse-url-firefox)
This works for me too, just as Greg says, after customizing for my
paths. It works like this.
here's an url www.linux.org
Put point on url, and do 'M-x browse-url'
This puts in minibuffer: "URL: http://www.linux.org"
<enter> makes the url open in a new tab in firefox
But if I just type in the minibuffer "www.linux.org", it
doesn't work. I have to type in the full
'"http://www.linux.org".
Thanks for all the help everybody.
--
Hugh Lawson
hlawson@triad.rr.com
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2005-04-07 18:12 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-01 0:06 browse-url Hugh Lawson
2005-04-01 0:23 ` browse-url David Kastrup
2005-04-01 7:16 ` browse-url nfreimann
2005-04-01 9:37 ` browse-url David Kastrup
2005-04-04 0:02 ` browse-url Hugh Lawson
2005-04-04 0:31 ` browse-url David Kastrup
2005-04-05 0:36 ` browse-url Hugh Lawson
2005-04-05 1:29 ` browse-url David Kastrup
2005-04-05 2:30 ` browse-url Hugh Lawson
2005-04-05 4:28 ` browse-url Joe Corneli
2005-04-05 9:19 ` browse-url Greg Novak
2005-04-05 19:57 ` browse-url Joe Corneli
[not found] ` <mailman.182.1112692644.2895.help-gnu-emacs@gnu.org>
2005-04-07 18:12 ` browse-url Hugh Lawson
[not found] ` <mailman.152.1112673857.2895.help-gnu-emacs@gnu.org>
2005-04-05 8:20 ` browse-url Hugh Lawson
2005-04-05 9:11 ` browse-url Joe Corneli
[not found] ` <mailman.179.1112690775.2895.help-gnu-emacs@gnu.org>
2005-04-05 13:07 ` browse-url Hugh Lawson
2005-04-05 13:43 ` browse-url Hugh Lawson
2005-04-07 9:34 ` browse-url Christian Lynbech
2005-04-07 14:47 ` browse-url Hugh Lawson
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).