Subject: 24.1; `save-buffers-kill-emacs' loses minibuffer focus when it calls `list-processes'
From: "Drew Adams" <[email-masked]>
To: <[email-masked]>
Date: Fri, 13 Jul 2012 11:00:08 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

This is part of the ongoing saga of trying to get Emacs to DTRT with
buffers popped up only to serve as info while Emacs asks a question
requiring a response.
 
IF you use a standalone minibuffer frame, AND the popped up buffer is
special-display (e.g. because of `special-display-regexps'), AND you are
on MS Windows (which automatically shifts the focus to a new frame that
it creates), THEN:
 
1. When you try to exit Emacs with active processes, Emacs pops up a new
frame for buffer `*Process List*' and asks you about killing them.
 
2. But the minibuffer frame no longer has the focus!  So when you type
your answer (e.g. "yes") Emacs tries to insert it as text in buffer
`*Process List*'.  Poor Emacs.
 
Please do something to fix this.  For inspiration, perhaps look to
`dired-mark-pop-up' which does something similar but gets it right.  See
perhaps `dired-pop-to-buffer'.
 
Better would be to fix this ask-for-input-after-popping-up-some-info
problem generally, obviously.  But a fix for just this particular
query will be better than nothing.

At least Dired DTRT now wrt focus - that's already something.

Of course, for Dired I still have to modify `dired-mark-pop-up' anyway, to have
it delete the window or frame popped up, afterward, and bury its buffer.  See
bug #7533 - a patch was provided for this but AFAIK Emacs Dev has never applied
it.

In GNU Emacs 24.1.1 (i386-mingw-nt5.1.2600)
 of 2012-06-10 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --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'