From: martin rudalics <rudalics@gmx.at>
To: Juri Linkov <juri@linkov.net>
Cc: 52491@debbugs.gnu.org
Subject: bug#52491: 28.0.90; Regression in window deletion with minibuffer
Date: Mon, 20 Dec 2021 10:18:53 +0100 [thread overview]
Message-ID: <9373956f-4999-4e0c-96f9-626f30d4cdb9@gmx.at> (raw)
In-Reply-To: <86a6gwe9kl.fsf@mail.linkov.net>
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
> 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: quit-restore.diff --]
[-- Type: text/x-patch; name="quit-restore.diff", Size: 2368 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index d12232641e..0db2dcbb90 100644
--- 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
next prev parent reply other threads:[~2021-12-20 9:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 21:08 bug#52491: 28.0.90; Regression in window deletion with minibuffer Juri Linkov
2021-12-16 17:28 ` Juri Linkov
2021-12-16 17:50 ` Eli Zaretskii
2021-12-16 19:02 ` Juri Linkov
2021-12-16 20:05 ` Eli Zaretskii
2021-12-17 8:25 ` Juri Linkov
2021-12-17 12:04 ` Eli Zaretskii
2021-12-18 9:05 ` martin rudalics
2021-12-18 17:20 ` Juri Linkov
2021-12-19 10:14 ` martin rudalics
2021-12-19 17:14 ` Juri Linkov
2021-12-19 18:16 ` martin rudalics
2021-12-19 18:25 ` Juri Linkov
2021-12-20 9:18 ` martin rudalics [this message]
2021-12-20 17:29 ` Eli Zaretskii
2021-12-20 18:08 ` martin rudalics
2021-12-20 18:18 ` Eli Zaretskii
2021-12-21 8:05 ` Juri Linkov
2021-12-21 10:33 ` martin rudalics
2021-12-21 19:13 ` Juri Linkov
2021-12-22 9:23 ` martin rudalics
2021-12-21 8:08 ` Juri Linkov
2021-12-21 10:34 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9373956f-4999-4e0c-96f9-626f30d4cdb9@gmx.at \
--to=rudalics@gmx.at \
--cc=52491@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.