From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Martins Subject: Re: default browser - SOLVED Date: Fri, 26 Feb 2010 14:06:59 -0300 Message-ID: <6ac505ad1002260906t3909dc94xd7f39521bf2646c3@mail.gmail.com> References: <87vddl9o18.fsf@belvoir.org> <07110F32-05E4-4975-9A2D-AE20B222FE21@gmail.com> <6ac505ad1002260248o4c4ead4u1ba3165e80f3d6ca@mail.gmail.com> <3332.1267198545@gamaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0439833131==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nl3el-0003yS-2D for emacs-orgmode@gnu.org; Fri, 26 Feb 2010 12:07:15 -0500 Received: from [140.186.70.92] (port=52640 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nl3ej-0003xT-1v for emacs-orgmode@gnu.org; Fri, 26 Feb 2010 12:07:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nl3ec-0005Jm-CH for emacs-orgmode@gnu.org; Fri, 26 Feb 2010 12:07:07 -0500 Received: from fg-out-1718.google.com ([72.14.220.159]:40107) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nl3ec-0005JQ-4c for emacs-orgmode@gnu.org; Fri, 26 Feb 2010 12:07:06 -0500 Received: by fg-out-1718.google.com with SMTP id 19so2287fgg.12 for ; Fri, 26 Feb 2010 09:07:01 -0800 (PST) In-Reply-To: <3332.1267198545@gamaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org, Carsten Dominik --===============0439833131== Content-Type: multipart/alternative; boundary=00163649a34775bd50048083edf7 --00163649a34775bd50048083edf7 Content-Type: text/plain; charset=ISO-8859-1 Thanks Nick, > Most (?) browsers have a remote URL capability: you can send a URL to an > already running instance and it will just open it, without going through > the overhead of creating another instance. For me it seems strange this behaviour. When I have firefox already open, it creates another tab for the URL and does not open a new firefox instance. Daniel 2010/2/26 Nick Dokos > [I had sent a similar answer to Henri-Paul, but for some reason, my reply > never hit the list - I've had problem posting to the list in the past > couple of days. I have an outstanding query to the list administrators, > but I haven't heard anything back. If you do receive this personally, > you might want to check the list and if it does not make it within the > next day or so, you might want to just post it there for posterity.] > > Daniel Martins wrote: > > > > You solved for me a quite annoying issue related to org that I could not > solve! > > > > For those who use firefox these two lines become: > > > > (setq browse-url-browser-function (quote browse-url-generic)) > > (setq browse-url-generic-program "firefox") > > > > Simply copy and paste it!! > > > > Daniel, > > The problem with this solution is that it creates a new instance > of the browser every time you click a link: > > > ,---- > | browse-url-generic is an interactive compiled Lisp function in > | `browse-url.el'. > | > | (browse-url-generic URL &optional NEW-WINDOW) > | > | 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. > `---- > > Most (?) browsers have a remote URL capability: you can send a URL to an > already running instance and it will just open it, without going through > the overhead of creating another instance. > > For firefox, I do the following: > > ,---- > | (defun browse-url-firefox (url &optional new-window) > | (shell-command (concat "firefox-xremote-client" " " "\"" url "\""))) > | > | (setq browse-url-browser-function 'browse-url-firefox) > `---- > > with the following firefox-xremote-client script somewhere in my path: > > ,---- > | #! /bin/bash > | > | firefox --remote "openURL($1)" > `---- > > HTH, > Nick > > > --00163649a34775bd50048083edf7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Nick,


> Most (?) browsers have a remote URL capability= : you can send a URL to an
> already running instance and it will just open it, without going throu= gh
> the overhead of creating another instance.

For me it seems strange this behaviour.

When I have firefox alre= ady open, it creates another tab for the URL and does not open a new firefo= x instance.

Daniel

2010/2/26 Nick = Dokos <nichol= as.dokos@hp.com>
[I had sent a sim= ilar answer to Henri-Paul, but for some reason, my reply
never hit the list - I've had problem posting to the list in the past couple of days. I have an outstanding query to the list administrators,
but I haven't heard anything back. If you do receive this personally, you might want to check the list and if it does not make it within the
next day or so, you might want to just post it there for posterity.]

Daniel Martins <danielemc@gmail.c= om> wrote:


> You solved for me a quite annoying issue related to org that I could n= ot solve!
>
> For those who use firefox these two lines become:
>
> (setq browse-url-browser-function (quote browse-url-generic))
> (setq browse-url-generic-program "firefox")
>
> Simply copy and paste it!!
>

Daniel,

The problem with this solution is that it creates a new instance
of the browser every time you click a link:


,----
| browse-url-generic is an interactive compiled Lisp function in
| `browse-url.el'.
|
| (browse-url-generic URL &optional NEW-WINDOW)
|
| Ask the WWW browser defined by `browse-url-generic-program' to load U= RL.
| Default to the URL around or before point. =A0A fresh copy of the
| browser is started up in a new process with possible additional arguments=
| `browse-url-generic-args'. =A0This is appropriate for browsers which<= br> | don't offer a form of remote control.
`----

Most (?) browsers have a remote URL capability: you can send a URL to an already running instance and it will just open it, without going through the overhead of creating another instance.

For firefox, I do the following:

,----
| (defun browse-url-firefox (url &optional new-window)
| =A0 (shell-command (concat "firefox-xremote-client" " &quo= t; "\"" url "\"")))
|
| (setq browse-url-browser-function 'browse-url-firefox)
`----

with the following firefox-xremote-client script somewhere in my path:

,----
| #! /bin/bash
|
| firefox --remote "openURL($1)"
`----

HTH,
Nick



--00163649a34775bd50048083edf7-- --===============0439833131== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0439833131==--