Subject: bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs

From: [email-masked]
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)