From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#52491: 28.0.90; Regression in window deletion with minibuffer Date: Mon, 20 Dec 2021 10:18:53 +0100 Message-ID: <9373956f-4999-4e0c-96f9-626f30d4cdb9@gmx.at> References: <865yrqsxmu.fsf@mail.linkov.net> <865yro7csh.fsf@mail.linkov.net> <83h7b8fngd.fsf@gnu.org> <86v8zo4bma.fsf@mail.linkov.net> <83fsqsfh8i.fsf@gnu.org> <86tuf73aen.fsf@mail.linkov.net> <83h7b7e8t2.fsf@gnu.org> <4318fa2c-0127-4a14-f65e-399b5c097028@gmx.at> <86sfupu8xi.fsf@mail.linkov.net> <9c2cbe85-b1a0-f147-69c8-0f26ab2e7c4d@gmx.at> <86wnk0frfj.fsf@mail.linkov.net> <0a55b1f4-dd66-62ed-591a-75438033e357@gmx.at> <86a6gwe9kl.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2E6FA65F1A7FF477ECD773BC" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34703"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52491@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 20 19:33:18 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzNTJ-0008ra-As for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Dec 2021 19:33:17 +0100 Original-Received: from localhost ([::1]:48456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzNTH-0007L0-Eu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Dec 2021 13:33:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzLpf-0007sO-0I for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 11:48:15 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzLpR-0002fF-SK for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 11:48:13 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzLpR-0005n5-R7 for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 11:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Dec 2021 16:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52491 X-GNU-PR-Package: emacs Original-Received: via spool by 52491-submit@debbugs.gnu.org id=B52491.164001886722163 (code B ref 52491); Mon, 20 Dec 2021 16:48:01 +0000 Original-Received: (at 52491) by debbugs.gnu.org; 20 Dec 2021 16:47:47 +0000 Original-Received: from localhost ([127.0.0.1]:51275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzLpC-0005lN-U2 for submit@debbugs.gnu.org; Mon, 20 Dec 2021 11:47:47 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:38073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzLp9-0005kZ-JI for 52491@debbugs.gnu.org; Mon, 20 Dec 2021 11:47:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1640018857; bh=Wxf5S7sxTZ9drPUCxUxOIWVytfTR96J/bCX76Z00/Xo=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=XIB2PPU63jnmsJAJndGpZ1D4e9IbS0C+EpG+6s6CnLQoxz9iVqxdIA0+2hK9O4/R1 Tl9q9N0ICsl6W6CzrGpe/GvegD7eHQu/ze5BliGk0UlJCLNGyg5Vb5snhcD53krfky /VnmqbN7Fs46Do61IgNxrxu5cmpxejQBNqXtEAOw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.102] ([213.142.96.93]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MXXuH-1mz6Rz3FDr-00Z0xt; Mon, 20 Dec 2021 17:47:36 +0100 In-Reply-To: <86a6gwe9kl.fsf@mail.linkov.net> Content-Language: en-US X-Provags-ID: V03:K1:p7RxQwmiKRqXtmce3ieqo7rktq7vscFSVWcyOJuCWb76C/YqJk2 +jt1uHeBg0XhzoOBi8wdLYjwkt9TZgpjbbm1BurxuJe8WDxgdAbyLWClOK52isnw6Zo5P2F BEx1QO2eRoMqujQ1yNX1uAdu/zTYsa8fYr8zQ+6Uj8vs2jQ1/9OPWENQebWQ32ZOM3h+/gg mb0Smh/RZsREzVU82mrVg== X-UI-Out-Filterresults: notjunk:1;V03:K0:YyYnWcPtTw0=:AdLnxf/XqaixwgJkW//eDq sDEmoKAIz6Ew0YI6VYhuK9xTA1ep/l52AhqCBNZP9iUYJR90I1G7ffYx4G9dSkGPUmCw3ZmWT 7bwSqkymAGJOu4LtPHfmX134H3CA/Ee/wOAbcF+8G55TwEWvqE1jmd3IaohnB35Xgj+yrxG3c y3cQ4C82wQQJB/T1UNVpc/RPU2XqDst9vyiNnh0IFIS5H1oOXlhL5cLjH+d/16SKt80hYOIHk zOdTObyMA6LuAtsAoEreEcg2a9FCXLhJp3oUWKF6V0YNxHVsd2Py529Ju3ksAfEOO0qMSfv3u k9A6k63Tc/qZmQ/Pqwgbw5FWEZTJv7zS7pPTc6hH6NpIRKO9djaRkCwQCDB3bacOamCzovur8 EZUAkzWicBUBF/MHHKOBoHw+VTbwZHkVRKC8eNQbhJfGKjGDccNrOWFQB8jD/DqiTqYrFkPnS 591J6uOHnqMcxHRWflkF6yfoqVZxzrX50ewHL8/ciP31AXy47Wi9Vf4Oe86GrlOgnIZoJShPM KN/Heb8PZOpD4YF/hh5rTi60T6vfRcP8zGMydsVTlZ7PeHqBzdKJc3zrml4+pc3/aJvPOdab+ 6eODbrM89YDx9mT37pW9jbQ9zp1ko0xRang5I9n+hUsgo5kG+OfKhl2/ELRay8HcErMkk+/Vm oUFouAI5gLauCtTnQsPHuD9XzuNSL1LCQhUYV1b9GFv+aQCf6RRkWqAdAR3TogMkblm5N222C rHVk8snboQ312Q5T7BuXnKWP25oYp2nHGxD4haPj7p4xJrHulWLmrTA8IRMp0OgWsqwrVVZn X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222793 Archived-At: This is a multi-part message in MIME format. --------------2E6FA65F1A7FF477ECD773BC Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > I get nil too, but I don't believe this value. > Maybe because of some strange window interactions, > the displayed value is wrong. When I tried to print > the real value with 'message' in the *Messages* value, > it was the same as in 27.2.90. Well then ... > I checked that in 28 in 'quit-restore-window', only these 2 lines are used: > > ((and dedicated (not (eq dedicated 'side)) > (window--delete window 'dedicated (eq bury-or-kill 'kill)))) > > but these lines are not used in 28: > > (when (window-live-p (nth 2 quit-restore)) > (select-window (nth 2 quit-restore))) > > But in 27 they correctly selected the minibuffer window. ... the attached patch should cure it (I suppose this got broken in commit d0c7d8bc22a935f2a79747a96b4043f0b449a212 but didn't check). martin --------------2E6FA65F1A7FF477ECD773BC Content-Type: text/x-patch; name="quit-restore.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="quit-restore.diff" diff --git a/lisp/window.el b/lisp/window.el index d12232641e..0db2dcbb90 100644 =2D-- a/lisp/window.el +++ b/lisp/window.el @@ -5171,10 +5171,7 @@ quit-restore-window ((and (not prev-buffer) (eq (nth 1 quit-restore) 'tab) (eq (nth 3 quit-restore) buffer)) - (tab-bar-close-tab) - ;; If the previously selected window is still alive, select it. - (when (window-live-p (nth 2 quit-restore)) - (select-window (nth 2 quit-restore)))) + (tab-bar-close-tab)) ((and (not prev-buffer) (or (eq (nth 1 quit-restore) 'frame) (and (eq (nth 1 quit-restore) 'window) @@ -5184,10 +5181,7 @@ quit-restore-window (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))) - ;; If the previously selected window is still alive, select it. - (when (window-live-p (nth 2 quit-restore)) - (select-window (nth 2 quit-restore)))) + (window--delete window nil (eq bury-or-kill 'kill)))) ((and (listp (setq quad (nth 1 quit-restore))) (buffer-live-p (car quad)) (eq (nth 3 quit-restore) buffer)) @@ -5229,10 +5223,7 @@ quit-restore-window (set-window-prev-buffers window (append (window-prev-buffers window) (list entry)))) ;; Reset the quit-restore parameter. - (set-window-parameter window 'quit-restore nil) - ;; Select old window. - (when (window-live-p (nth 2 quit-restore)) - (select-window (nth 2 quit-restore)))) + (set-window-parameter window 'quit-restore nil)) (t ;; Show some other buffer in WINDOW and reset the quit-restore ;; parameter. @@ -5244,9 +5235,11 @@ quit-restore-window (if (switch-to-prev-buffer window bury-or-kill) (when (eq dedicated 'side) (set-window-dedicated-p window 'side)) - (window--delete window nil (eq bury-or-kill 'kill)) - (when (window-live-p (nth 2 quit-restore)) - (select-window (nth 2 quit-restore)))))) + (window--delete window nil (eq bury-or-kill 'kill))))) + + ;; When the previously selected window is still live, select it. + (when (window-live-p (nth 2 quit-restore)) + (select-window (nth 2 quit-restore))) ;; Deal with the buffer. (cond --------------2E6FA65F1A7FF477ECD773BC--