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#12764: 24.2; `quit-window' wrongly iconifies frame Date: Tue, 30 Oct 2012 11:27:40 +0100 Message-ID: <508FAB9C.7020504@gmx.at> References: <87hapdcfm7.fsf@silenus.orebokech.com> <87pq408wt3.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1351592930 17023 80.91.229.3 (30 Oct 2012 10:28:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2012 10:28:50 +0000 (UTC) Cc: Romain Francoise , 12764@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 30 11:28:58 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 1TT945-0005MP-Oj for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Oct 2012 11:28:57 +0100 Original-Received: from localhost ([::1]:52586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT93x-0001p5-Ge for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Oct 2012 06:28:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT93p-0001km-Pg for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 06:28:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TT93f-000726-CJ for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 06:28:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT93f-00071z-98 for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 06:28:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TT965-0003b9-KY for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 06:31: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, 30 Oct 2012 10:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12764 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12764-submit@debbugs.gnu.org id=B12764.135159301913770 (code B ref 12764); Tue, 30 Oct 2012 10:31:01 +0000 Original-Received: (at 12764) by debbugs.gnu.org; 30 Oct 2012 10:30:19 +0000 Original-Received: from localhost ([127.0.0.1]:39131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TT95O-0003a3-Iv for submit@debbugs.gnu.org; Tue, 30 Oct 2012 06:30:18 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:55289) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TT95L-0003Zu-Qb for 12764@debbugs.gnu.org; Tue, 30 Oct 2012 06:30:16 -0400 Original-Received: (qmail invoked by alias); 30 Oct 2012 10:27:43 -0000 Original-Received: from 62-47-45-43.adsl.highway.telekom.at (EHLO [62.47.45.43]) [62.47.45.43] by mail.gmx.net (mp034) with SMTP; 30 Oct 2012 11:27:43 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19ElwJ3SkNEa+Y8sB3yqRLT7SLKMwrQ/SQFObQU5s 3navjuOxs5elm4 In-Reply-To: <87pq408wt3.fsf@gnu.org> 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:66231 Archived-At: >> There's a regression in Emacs 24 compared to Emacs 23 wrt the behavior >> of `quit-window'. In some circumstances, it iconifies frames that were >> existing before the current buffer was created, which (AIUI) it's not >> supposed to do. >> >> Recipe starting from `emacs -Q': >> - C-x 5 2 to create a new frame >> - in the new frame, M-x man RET emacs RET >> - C-x 0 to make the man buffer the current buffer Which means that we now have a single-window frame where that window has been specially created for showing man. We could intepret the user's intentions here also as "show me man in a separate, dedicated frame". >> - q >> >> When you hit `q' the frame gets iconified, even though it was not >> created by M-x man. > > I think the attached patch is required to fix this. Martin, please > review, thanks. I'm not sure whether the current behavior should be considered incorrect or a feature. C-x 5 2 usually shows the same buffer as in the previous frame's selected window. Showing it instead of man doesn't strike me as something very useful. OTOH if the user has worked on a different buffer in the new frame and used C-x 0 in order to temporarily show more of the man page, it makes sense to show that other buffer again. And if users really wanted to show man on a separate frame, they could do so immediately. In any case I'd propose the slightly different patch below. martin *** lisp/window.el 2012-10-27 08:58:30 +0000 --- lisp/window.el 2012-10-30 09:51:16 +0000 *************** *** 3556,3562 **** quad entry) (cond ((and (not prev-buffer) ! (memq (nth 1 quit-restore) '(window frame)) (eq (nth 3 quit-restore) buffer) ;; Delete WINDOW if possible. (window--delete window nil (eq bury-or-kill 'kill))) --- 3556,3567 ---- quad entry) (cond ((and (not prev-buffer) ! (or (eq (nth 1 quit-restore) 'frame) ! (and (eq (nth 1 quit-restore) 'window) ! ;; If the window has been created on an existing ! ;; frame and winds up as the sole window on that ! ;; frame, do not delete it (Bug#12764). ! (not (eq window (frame-root-window window))))) (eq (nth 3 quit-restore) buffer) ;; Delete WINDOW if possible. (window--delete window nil (eq bury-or-kill 'kill)))