GNU bug report logs - #9328
24.0.50; `browse-url-fireforx' creates 2 identical tabs

Previous Next

Packages: w32, emacs;

Reported by: nyc4bos <at> aol.com

Date: Fri, 19 Aug 2011 02:35:02 UTC

Severity: normal

Merged with 4034

Found in version 24.0.50

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9328 in the body.
You can then email your comments to 9328 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9328; Package emacs. (Fri, 19 Aug 2011 02:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to nyc4bos <at> aol.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 19 Aug 2011 02:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: nyc4bos <at> aol.com
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
Date: Thu, 18 Aug 2011 22:34:00 -0400
Hi,

When using `browse-url-firefox', it creates 2 identical tabs.

To reproduce:

1. emacs -q
2. Evaluate in *sctatch* buffer:

(setq browse-url-browser-function 'browse-url-firefox
      browse-url-new-window-flag  t
      browse-url-firefox-new-window-is-tab t)

3. Make sure the Firefox executable is in the `exec-path':

(add-to-list 'exec-path "C:/Program Files/Mozilla/Firefox")

4. Call `browse-url-firefox' by evaluating:

(browse-url-firefox "http://www.gnu.org")

Emacs will then show 2 identical Firefox tabs instead of only one.

At first I thought this problem was due to mouse clicks and/or my
.emacs setting:

(setq mouse-1-click-follows-link 'double)

but as you can see with the recipe (above) it still occurs without
using the mouse.

I noticed that this behavior also occurs with Emacs 23.3.1:

GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO

I recall that this behavior didn't occur sometime in the past when
I first set `browse-url-browser-functions' many moons ago.

This could also be a problem with changes in Firefox but I don't have
a version earlier than Firefox 3.6.x (nor Emacs 23.3.1) to test or
confirm.

Thanks.



In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-08-15 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US
  value of $XMODIFIERS: nil
  locale-coding-system: cp949
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> C-x b <return> <help-echo> 
<help-echo> <help-echo> <down-mouse-1> <mouse-1> C-y 
C-j C-y C-p C-p C-p C-p C-p C-e C-j C-n C-n C-n C-e 
C-j C-x <help-echo> <help-echo> C-n C-n C-n C-g C-g 
C-n C-n C-y C-j <help-echo> <help-echo> <help-echo> 
<help-echo> <return> <return> C-y C-j <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<menu-bar> <help-menu> <send-emacs-bug-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set [2 times]
Type y, n, ! or SPC (the space bar): 
Please type y, n, ! or SPC (the space bar):  [2 times]
Quit [2 times]
Mark set [2 times]
Starting Firefox...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message derived format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev nnheader gnus-util mm-util mail-prsvr mail-utils
gmm-utils mailheader cl emacsbug browse-url help-mode easymenu view
novice time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)




Merged 4034 9328. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 19 Aug 2011 02:51:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9328; Package emacs,w32. (Fri, 19 Aug 2011 05:07:02 GMT) Full text and rfc822 format available.

Message #10 received at 9328 <at> debbugs.gnu.org (full text, mbox):

From: Vijay Lakshminarayanan <laksvij <at> gmail.com>
To: nyc4bos <at> aol.com
Cc: 9328 <at> debbugs.gnu.org
Subject: Re: bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
Date: Fri, 19 Aug 2011 10:34:22 +0530
nyc4bos <at> aol.com writes:

> Hi,
>
> When using `browse-url-firefox', it creates 2 identical tabs.
>
> To reproduce:
>
> 1. emacs -q
> 2. Evaluate in *sctatch* buffer:
>
> (setq browse-url-browser-function 'browse-url-firefox
>       browse-url-new-window-flag  t
>       browse-url-firefox-new-window-is-tab t)

I encountered a similar bug yesterday when evaluating on the *scratch*
buffer.  I found that running C-M-x on a form on the *scratch* buffer
evaluated the form twice.  It occurred on my work machine and I'm unable
to reproduce the same on my home machine now.

Below is the code that I was playing with when facing the issue
yesterday

(defvar debug-counting 0)

(let ((url "http://en.wikipedia.org/wiki/Emacs")
      (url-request-method "GET"))
  (setq debug-counting 0)
  (url-retrieve url
                (lambda (status)
                  (kill-buffer)
                  (message "%d" (incf debug-counting)))
                nil))

I don't encounter the issue now but when I did, `debug-counting' would
increment twice and the url would be downloaded twice.

-- 
Cheers
~vijay

Gnus should be more complicated.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9328; Package emacs,w32. (Fri, 19 Aug 2011 06:38:02 GMT) Full text and rfc822 format available.

Message #13 received at 9328 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: nyc4bos <at> aol.com
Cc: 9328 <at> debbugs.gnu.org
Subject: Re: bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
Date: Fri, 19 Aug 2011 09:35:08 +0300
> From: nyc4bos <at> aol.com
> Date: Thu, 18 Aug 2011 22:34:00 -0400
> 
> 
> When using `browse-url-firefox', it creates 2 identical tabs.
> 
> To reproduce:
> 
> 1. emacs -q
> 2. Evaluate in *sctatch* buffer:
> 
> (setq browse-url-browser-function 'browse-url-firefox
>       browse-url-new-window-flag  t
>       browse-url-firefox-new-window-is-tab t)
> 
> 3. Make sure the Firefox executable is in the `exec-path':
> 
> (add-to-list 'exec-path "C:/Program Files/Mozilla/Firefox")
> 
> 4. Call `browse-url-firefox' by evaluating:
> 
> (browse-url-firefox "http://www.gnu.org")
> 
> Emacs will then show 2 identical Firefox tabs instead of only one.

Isn't this the same problem as described here?

  https://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00392.html

AFAIR, that thread concluded that this is specific to the Windows
version of Firefox.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9328; Package emacs,w32. (Sat, 20 Aug 2011 20:16:01 GMT) Full text and rfc822 format available.

Message #16 received at 9328 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 9328 <at> debbugs.gnu.org, nyc4bos <at> aol.com
Subject: Re: bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
Date: Sat, 20 Aug 2011 16:13:35 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

> Isn't this the same problem as described here?
>
>   https://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00392.html
>
> AFAIR, that thread concluded that this is specific to the Windows
> version of Firefox.

After reading that thread, I still don't understand where the problem is
coming from.

Could you check if the firefox process returns a non-zero exit status on
Window when you call it as (say) "firefox www.gnu.org"?  Because the
second call in browse-url-firefox-sentinel should only be triggered if
the exit status is non-zero.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9328; Package emacs,w32. (Sun, 21 Aug 2011 00:36:01 GMT) Full text and rfc822 format available.

Message #19 received at 9328 <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 9328 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, nyc4bos <at> aol.com
Subject: Re: bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
Date: Sun, 21 Aug 2011 02:32:25 +0200
On Sat, Aug 20, 2011 at 22:13, Chong Yidong <cyd <at> stupidchicken.com> wrote:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> Isn't this the same problem as described here?
>>
>>   https://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00392.html
>>
>> AFAIR, that thread concluded that this is specific to the Windows
>> version of Firefox.
>
> After reading that thread, I still don't understand where the problem is
> coming from.
>
> Could you check if the firefox process returns a non-zero exit status on
> Window when you call it as (say) "firefox www.gnu.org"?  Because the
> second call in browse-url-firefox-sentinel should only be triggered if
> the exit status is non-zero.

There seems to be a problem with Firefox.

If firefox was already started before then the command exits status 1.

If firefox was not started before then the command does not exit until
firefox is closed. And the exit status is then 0.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9328; Package emacs,w32. (Sun, 21 Aug 2011 01:04:02 GMT) Full text and rfc822 format available.

Message #22 received at 9328 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 9328 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, nyc4bos <at> aol.com
Subject: Re: bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
Date: Sat, 20 Aug 2011 21:01:24 -0400
Lennart Borgman <lennart.borgman <at> gmail.com> writes:

> If firefox was already started before then the command exits status 1.
>
> If firefox was not started before then the command does not exit until
> firefox is closed. And the exit status is then 0.

Fair enough.  I've committed a fix.




bug closed, send any further explanations to 9328 <at> debbugs.gnu.org and nyc4bos <at> aol.com Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sun, 21 Aug 2011 01:04:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9328; Package emacs,w32. (Mon, 22 Aug 2011 03:15:02 GMT) Full text and rfc822 format available.

Message #27 received at 9328 <at> debbugs.gnu.org (full text, mbox):

From: nyc4bos <at> aol.com
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 9328 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	Lennart Borgman <lennart.borgman <at> gmail.com>
Subject: Re: bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
Date: Sun, 21 Aug 2011 23:14:00 -0400
Chong Yidong <cyd <at> stupidchicken.com> writes:

> Lennart Borgman <lennart.borgman <at> gmail.com> writes:
>
>> If firefox was already started before then the command exits status 1.
>>
>> If firefox was not started before then the command does not exit until
>> firefox is closed. And the exit status is then 0.
>
> Fair enough.  I've committed a fix.

Your patch fixes it.

Thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Sep 2011 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.