emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: browse-url-firefox


From: Steve Youngs
Subject: Re: browse-url-firefox
Date: Sun, 06 Jan 2008 10:40:25 +1000
User-agent: Gnus/5.110007 (No Gnus v0.7) SXEmacs/22.1.8 (Daimler, linux)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

* Eli Zaretskii <address@hidden> writes:

  > The following fragment from browse-url-firefox:
  >       (apply 'start-process
  >              (concat "firefox " url) nil
  >              browse-url-firefox-program

[...]

  > has the effect of invoking Firefox with the URL specified twice on
  > the command line (so Firefox opens it in two tabs).  I think it's a
  > bug, and that the right fix is to not (concat "firefox " url), but
  > to use a literal "firefox" instead.  Does anyone see where I'm
  > wrong?

Yes.  The first arg to #'start-process is just a name to give to the
process so it can be more easily identified, it doesn't have anything to
do with the actual running of the started process.

I've not witnessed the behaviour you're describing, not in any version
of Firefox from 1.0 to the current 3.0 betas.

  > Steve, do you have any objections to such a change?

I have no objections if you want to make this change, Eli, but there's
not much point in doing so.

  > Also, why do we need to set up a process-sentinel in this case?

  > At least on MS-Windows, when an instance of Firefox is already
  > running, invoking another one like "firefox http://foo.bar"; has
  > the effect of asking the first instance of Firefox to display
  > http://foo.bar in another tab, and the second Firefox exits
  > immediately.

OK, this appears to be the case for Linux now as well, but I'm fairly
sure it wasn't always like that in earlier versions of Firefox.  And
starting Firefox with `-remote' when there is no running instance gives
you an error.  Hence, the sentinel.

  > So the above sentinel has 2 adverse effects: (1) it opens
  > http://foo.bar twice, because the sentinel is invoked when the
  > second instance of Firefox exits, and (2) the sentinel is invoked if
  > I close Firefox by via the window manager, at which time the
  > sentinel starts Firefox again with the last URL I browsed.

I've not witnessed this behaviour either.  And I'm not sure which of
Firefox, Emacs, MS-Win, or some combo-special, that is to blame.

  > Is the behavior of Firefox on other platforms different?

Apparently so. :-)

  > I think the right fix for this is to set-process-sentinel to nil.
  > Any objections?

Yes.  You would also need to remove the `-remote' arg in
#'browse-url-firefox.  Of course, you'd only make these changes if I'm
wrong about how earlier versions of Firefox handle starting with
`firefox http://some.site/' when an instance of Firefox is already
running (for non-MS platforms).

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|            SXEmacs - Even teddy bears love it!           |
|    Get your sxe teddy at <http://store.sxemacs.org/>     |
|------------------------------------<address@hidden>---|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: The SXEmacs Project <http://www.sxemacs.org/>
Comment: EMchat - The SXEmacs IM client <http://www.emchat.org/>

iEYEARECAAYFAkeAI3oACgkQHSfbS6lLMAOGOgCgzrGSnXDErZUb8WpU7LDKAUIP
dnwAoNdYOv+D/Z46GkfEtFjVc2ja3cGG
=uUxV
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]