From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#11939: 24.1; `save-buffers-kill-emacs' loses minibuffer focus whenit calls `list-processes' Date: Wed, 25 Jul 2012 10:28:21 -0700 Message-ID: References: <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><838veb209m.fsf@gnu.org> <83r4s2zcp9.fsf@gnu.org><81CFBB36FDCB4CD6B3762F9E00AC8290@us.oracle.com><83fw8iz7et.fsf@gnu.org><60948DD3935D452F85F95174474D06E9@us.oracle.com><838veaz34x.fsf@gnu.org> <83629blssa.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1343237363 3400 80.91.229.3 (25 Jul 2012 17:29:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2012 17:29:23 +0000 (UTC) Cc: 11939@debbugs.gnu.org To: "'martin rudalics'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 25 19:29:22 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 1Su5Oj-00056z-UN for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jul 2012 19:29:22 +0200 Original-Received: from localhost ([::1]:48227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su5Oi-0008Ip-Vs for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jul 2012 13:29:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su5Og-0008Id-0c for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 13:29:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Su5Oe-000428-HV for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 13:29:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su5Oe-000423-Dt for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 13:29:16 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Su5VC-0001Pc-6x for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2012 13:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jul 2012 17:36:02 +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.13432377155373 (code B ref 11939); Wed, 25 Jul 2012 17:36:02 +0000 Original-Received: (at 11939) by debbugs.gnu.org; 25 Jul 2012 17:35:15 +0000 Original-Received: from localhost ([127.0.0.1]:39382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Su5UR-0001Oc-6L for submit@debbugs.gnu.org; Wed, 25 Jul 2012 13:35:15 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:27594) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Su5UO-0001OU-Ej for 11939@debbugs.gnu.org; Wed, 25 Jul 2012 13:35:13 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q6PHSN4s011344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 25 Jul 2012 17:28:24 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q6PHSN5E027524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 Jul 2012 17:28:23 GMT Original-Received: from abhmt110.oracle.com (abhmt110.oracle.com [141.146.116.62]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q6PHSMl9014112; Wed, 25 Jul 2012 12:28:22 -0500 Original-Received: from dradamslap1 (/130.35.179.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 25 Jul 2012 10:28:22 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac1qgQuBCY7MZB/TQweqSDaFR1P/ogAA1cSwAABE3VA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] 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:62379 Archived-At: Martin, I tried what you suggested about `after-make-frame-functions' again, but this time with my setup (with unmodified oneonone.el). I added only this to my usual setup: (add-hook 'after-make-frame-functions (lambda (frame) (redirect-frame-focus frame frame))) I then ran through the scenario that lead to a crash (C-x C-c, no to exit, C-x k *shell* + yes, C-x k again, try to type or move cursor). No crash in this case, but when I try to type something or move the cursor after the second C-x k (which is the point at which the crash occurred), I can see that the input is being sent to buffer & frame *Process List*. That's not what you expected, is it? It is not TRT, in any case. I do not understand, BTW, why you redirect the focus from the new frame to itself, instead of to the minibuffer frame. So I tried instead redirecting the focus to the minibuffer frame. That worked OK, but the default buffer for killing with C-x k was ` *Minibuf-0*', not *shell* or *Process List*. It seems that when a new frame is created, the default value for C-x k (and other buffer commands) becomes *Minibuf-0*. I can of course choose not to use the default value, but it would be good to get this part fixed also. Or as a workaround I can explicitly select the frame of the buffer I want to kill - e.g., click the title bar of frame *shell*. After I do that, that buffer becomes the default value for C-x k. IOW, it seems that not only is the input focus redirected to the minibuffer frame, but also the current buffer is changed to *Minibuf-0*. And if I do `M-: (current-buffer)' I do get *Minibuf-0*. Is it normal for frame-focus redirection to change the current buffer also? That does not seem right to me. Anyway, aside from this problem of default value for C-x k, things seemed to work OK. So overall this seems like a reasonable solution, except for the default buffer problem. This is all I did, along with my usual setup: (add-hook 'after-make-frame-functions (lambda (frame) (redirect-frame-focus frame (window-frame (minibuffer-window)))))