unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
@ 2011-08-19  2:34 nyc4bos
  2011-08-19  5:04 ` Vijay Lakshminarayanan
  2011-08-19  6:35 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: nyc4bos @ 2011-08-19  2:34 UTC (permalink / raw)
  To: 9328

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)





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
  2011-08-19  2:34 bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs nyc4bos
@ 2011-08-19  5:04 ` Vijay Lakshminarayanan
  2011-08-19  6:35 ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Vijay Lakshminarayanan @ 2011-08-19  5:04 UTC (permalink / raw)
  To: nyc4bos; +Cc: 9328

nyc4bos@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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
  2011-08-19  2:34 bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs nyc4bos
  2011-08-19  5:04 ` Vijay Lakshminarayanan
@ 2011-08-19  6:35 ` Eli Zaretskii
  2011-08-20 20:13   ` Chong Yidong
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2011-08-19  6:35 UTC (permalink / raw)
  To: nyc4bos; +Cc: 9328

> From: nyc4bos@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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
  2011-08-19  6:35 ` Eli Zaretskii
@ 2011-08-20 20:13   ` Chong Yidong
  2011-08-21  0:32     ` Lennart Borgman
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2011-08-20 20:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 9328, nyc4bos

Eli Zaretskii <eliz@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.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
  2011-08-20 20:13   ` Chong Yidong
@ 2011-08-21  0:32     ` Lennart Borgman
  2011-08-21  1:01       ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Lennart Borgman @ 2011-08-21  0:32 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 9328, nyc4bos

On Sat, Aug 20, 2011 at 22:13, Chong Yidong <cyd@stupidchicken.com> wrote:
> Eli Zaretskii <eliz@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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
  2011-08-21  0:32     ` Lennart Borgman
@ 2011-08-21  1:01       ` Chong Yidong
  2011-08-22  3:14         ` nyc4bos
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2011-08-21  1:01 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 9328, nyc4bos

Lennart Borgman <lennart.borgman@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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs
  2011-08-21  1:01       ` Chong Yidong
@ 2011-08-22  3:14         ` nyc4bos
  0 siblings, 0 replies; 7+ messages in thread
From: nyc4bos @ 2011-08-22  3:14 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 9328

Chong Yidong <cyd@stupidchicken.com> writes:

> Lennart Borgman <lennart.borgman@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!





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-22  3:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-19  2:34 bug#9328: 24.0.50; `browse-url-fireforx' creates 2 identical tabs nyc4bos
2011-08-19  5:04 ` Vijay Lakshminarayanan
2011-08-19  6:35 ` Eli Zaretskii
2011-08-20 20:13   ` Chong Yidong
2011-08-21  0:32     ` Lennart Borgman
2011-08-21  1:01       ` Chong Yidong
2011-08-22  3:14         ` nyc4bos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).