From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#11939: 24.1; `save-buffers-kill-emacs' loses minibuffer focus when it calls `list-processes' Date: Tue, 24 Jul 2012 14:46:55 +0200 Message-ID: <500E993F.7020502@gmx.at> References: <50019C2F.8060103@gmx.at> <6B9036DBFDEF4881AB39804520BF63B3@us.oracle.com> <5002BEC6.3040106@gmx.at> <893E59C2E4F94D6EB910560C9E8C42CD@us.oracle.com> <5002EAF4.5080107@gmx.at> <6F73D04E8EE144E780D602DFEBA48E7B@us.oracle.com> <5003DAF2.2060400@gmx.at> <50043C3D.7090201@gmx.at> <208B7D7BB4BC4339ADCC1166F76C1CD2@us.oracle.com> <500449B7.6070309@gmx.at> <023F63BCBF9442EBAEDCCE9D8A59E5E4@us.oracle.com> <5005354E.6040306@gmx.at> <62CF21F0010048E2BC1391192EB943FF@us.oracle.com> <5006E14B.3000407@gmx.at> <47731CC5C6EC4ED9AB9E9E05E259572C@us.oracle.com> <5007E47B.3050907@gmx.at> <446B437450EC47968D15C20D7142296B@us.oracle.com> <500A8C0E.4040006@gmx.at> <96A974694CF64567A3EAB85185AB3A5C@us.oracle.com> <500BBE6F.6020007@gmx.at> <1403DD3D67534F53BC023CC99A258DF5@us.oracle.com> <500D1A93.606@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1343134065 3577 80.91.229.3 (24 Jul 2012 12:47:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Jul 2012 12:47:45 +0000 (UTC) Cc: 11939@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 24 14:47:45 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SteWb-0008Ga-Jl for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Jul 2012 14:47:41 +0200 Original-Received: from localhost ([::1]:51023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SteWb-0005SI-0I for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Jul 2012 08:47:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SteWS-0005NL-PE for bug-gnu-emacs@gnu.org; Tue, 24 Jul 2012 08:47:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SteWI-0001ne-RV for bug-gnu-emacs@gnu.org; Tue, 24 Jul 2012 08:47:32 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SteWI-0001na-OI for bug-gnu-emacs@gnu.org; Tue, 24 Jul 2012 08:47:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Stecj-00010A-S0 for bug-gnu-emacs@gnu.org; Tue, 24 Jul 2012 08:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Jul 2012 12:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11939 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11939-submit@debbugs.gnu.org id=B11939.13431343843774 (code B ref 11939); Tue, 24 Jul 2012 12:54:01 +0000 Original-Received: (at 11939) by debbugs.gnu.org; 24 Jul 2012 12:53:04 +0000 Original-Received: from localhost ([127.0.0.1]:35201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Stebo-0000yo-Hs for submit@debbugs.gnu.org; Tue, 24 Jul 2012 08:53:04 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:58789) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1Stebm-0000yS-94 for 11939@debbugs.gnu.org; Tue, 24 Jul 2012 08:53:03 -0400 Original-Received: (qmail invoked by alias); 24 Jul 2012 12:46:21 -0000 Original-Received: from 62-47-32-76.adsl.highway.telekom.at (EHLO [62.47.32.76]) [62.47.32.76] by mail.gmx.net (mp070) with SMTP; 24 Jul 2012 14:46:21 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/wOMEkYLXwPGRQTRiPW1AgZWHGkzoyk9H5qM2tCz 62R5hlaI5bKDBe In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62346 Archived-At: >> (progn >> ;; (setq minibuffer-auto-raise t) >> ;; (setq pop-up-frame-function >> ;; (lambda () (make-frame '((minibuffer . nil))))) >> (setq pop-up-frames t) >> (add-hook 'after-make-frame-functions >> #'(lambda (frame) >> (redirect-frame-focus frame frame))) >> (shell)) >> >> where the two forms in comments are optional. In all cases, focus is >> redirected appropriately after C-x C-c (although I think that when the >> new frame does have a minibuffer window, no redirection should be done >> at all and the prompt should appear in the new frame - but it seems >> difficult to get that right). And obviously things look better with >> `minibuffer-auto-raise' non-nil. > > Yes, if I try that with emacs -Q then it does what you say (with Emacs 24.1 and > later). > > And uncommenting those two lines also behaves as I think you intend. In both > cases, the question is posed, and the response is accepted, in the minibuffer of > frame *shell* (i.e., not the minibuffer of frame *Process List* in the case > where it has one). > > But if *Process List* has no minibuffer (uncommented test case), and it is > selected (e.g., later, manually, after replying "no" once) when you hit `C-x > C-c' (i.e., the second `C-x C-c'), then frame *shell* is raised and receives the > input, even though there is nothing on that frame that the user needs to see > (apart from the question/answer). This is probably the case where a window on another frame is reused before asking the `yes-or-no-p' question. This should be easier to handle because the window manager supposedly won't focus that frame. In any case I think a `yes-or-no-p' question should terminate by killing the *Process List* buffer to avoid such confusion. > It is better, IMO, for the question/response to be in frame *Process List*, as > we discussed earlier. (This is all for the case where there is no standalone > minibuffer frame.) I think so too. > The reason I provided the description I did was that I thought we were talking > about my setup with a standalone minibuffer frame. See my previous description > (quoted above) for what happens in that context. For that context, your > suggestion of using `after-make-frame-functions', as I understood it, did not > help. What precisely is the problem with it? martin