Subject: bug#11622: Ediff frame loses focus under certain circumstance

From: yary <[email-masked]>
Date: Mon, 4 Jun 2012 08:49:45 -0400

>> In GNU Emacs 22.0.91.1 (i386-mingw-nt5.1.2600)
>>  of 2006-12-03 on W2ONE
>> X server distributor `Microsoft Corp.', version 5.1.2600
>> configured using `configure --with-gcc (3.4) --cflags -Id:/g/include'
>
> I suppose this is not from the 24.1 pretest build.

You are right! I found the bug when running 24.1 pretest, but when I
ran with -Q my PATH got me the old emacs (which I kept in case of
catastrophe with 24). I have now reproduced the same bug using the
same keystrokes in a clean 24.1 pretest, here is its debug report:

> Start emacs -Q
> Open two files (small and similar will do)
> open Tools menu->Compare(Ediff)->Two Buffers...
> Hit enter twice to get the two suggested buffers
> Hit ? to expand the Ediff control panel commands
> Hit n to get to next (first) diff
> Hit b to copy diff from B to A
> Hit n - and Ediff frame loses focus, goes to B instead

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
c:/Program Files/emacs-24/etc/DEBUG.

In GNU Emacs 24.1.1 (i386-mingw-nt5.1.2600)
 of 2012-06-01 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'

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: ENU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: nXML

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:
<drag-n-drop> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <menu-bar> <tools> <compare>
<ediff-buffers> <return> <return> ? n b n <switch-frame>
M-x r e p o r t - e <tab> <return>

Recent messages:
Computing differences between
template-6897323563008038933-clay-grouse.xml522031K and
template-8410073415756606028-sonia.xml5220S1P ...
Buffer A: Processing difference region 0 of 15
Buffer A: Processing difference region 10 of 15
Buffer B: Processing difference region 0 of 15
Buffer B: Processing difference region 10 of 15
Processing difference regions ... done
Refining difference region 1 ...
Saving old diff region #1 of buffer A.  To recover, type `ra' [2 times]
Only white-space differences in region 1
Refining difference region 2 ...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils ediff-merg
ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff
nxml-uchnm rng-xsd xsd-regexp rng-cmpct regexp-opt rng-nxml rng-valid
rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn
nxml-ns easymenu nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph
nxml-enc xmltok browse-url url-util url-parse auth-source eieio byte-opt
bytecomp byte-compile cconv macroexp assoc gnus-util password-cache
url-vars mm-util mail-prsvr 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 loaddefs 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)