GNU bug report logs - #48493
28.0.50; quit-window doesn't work

Previous Next

Package: emacs;

Reported by: Sujith Manoharan <sujith.wall <at> gmail.com>

Date: Tue, 18 May 2021 03:36:01 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: pillule <pillule <at> riseup.net>
Cc: Sujith Manoharan <sujith.wall <at> gmail.com>, 48493 <at> debbugs.gnu.org
Subject: bug#48493: 28.0.50; quit-window doesn't work
Date: Wed, 9 Jun 2021 10:33:37 +0200
Thanks for the patches.  Please follow ELi's suggestions first, I'll
then comment on the manual changes.

-	(current (eq (window-buffer window) (current-buffer))))
+	(current (eq (window-buffer window) (current-buffer)))
+        (dedicated (window-dedicated-p window)))
     (set-window-buffer window buffer)
+    ;; restore the dedicated side flag
+    (when (eq dedicated 'side)
+      (set-window-dedicated-p window 'side))

Here you could use the 'dedicated-side' solution you used below in
`replace-buffer-in-windows'.

+    (or ;; first try to delete dedicated windows that are not side windows
+     (and dedicated (not (eq dedicated 'side))
+          (window--delete window 'dedicated (eq bury-or-kill 'kill)))
+     (cond
+       ((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))))

What's wrong with putting the first disjunct into the conditional as in
the below?  In general, always try to avoid larger indentation changes -
they can make forensics cumbersome while bisecting.

     (cond
      ;; First try to delete dedicated windows that are not side windows
      ((and dedicated (not (eq dedicated 'side))
            (window--delete window 'dedicated (eq bury-or-kill 'kill))))
      ((and (not prev-buffer)
             (eq (nth 1 quit-restore) 'tab)
             (eq (nth 3 quit-restore) buffer))

BTW, how's your paperwork process proceeding?

martin




This bug report was last modified 3 years and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.