Subject: bug#11939: 24.1; `save-buffers-kill-emacs' loses minibuffer focuswhenit calls `list-processes'

From: martin rudalics <[email-masked]>
Date: Sun, 29 Jul 2012 15:56:24 +0200

> Here's my attempt at a summary - but please help me fill things in, with your
 > understanding:
 >
 > You wrote some code which improved things, and I tried various things, the last
 > of which was this:
 >
 > (add-hook 'after-make-frame-functions
 >           (lambda (frame)
 >             (redirect-frame-focus frame
 >              (window-frame (minibuffer-window)))))
 >
 > You mentioned that when you tried redirecting to the minibuffer frame that way
 > you encountered some problems, but you didn't remember what they were.  I said
 > that when I instead redirected the frame to itself (which I guess worked for
 > you), it did not solve the focus problem (for me).
 >
 > I said that with the above code another problem is introduced, which is that the
 > current-buffer and selected window are apparently left as " *Minibuf-0*".
 >
 > Do you have a better idea of where things stand wrt this problem?

IIUC the above is what you wanted to apply for making your code work with
versions <= Emacs 24.1.

 > Will you be
 > applying your latest code to Emacs?

Unless you tell me that you find any problems with it.

 > Where do you think we should go from here,
 > to progress a bit and perhaps finish this?
 >
 > In sum, I would like us to try to refocus on the original problem and see if we
 > can take stock of what we have learned.

I can't say that I have learned much so far.  Most of the focus
redirection stuff still remains a mystery to me.  Personally, I would
never use a separate minibuffer frame for the sole reason that I don't
understand how it works.

martin