all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Juri Linkov <juri@linkov.net>
Cc: 62427@debbugs.gnu.org
Subject: bug#62427: tab-bar-new-tab-to now handles cases with multiple side-windows
Date: Wed, 17 May 2023 10:13:18 +0200	[thread overview]
Message-ID: <0c52f6ed-c3e2-6d9e-6d57-6f3779257b25@gmx.at> (raw)
In-Reply-To: <861qjgkvui.fsf@mail.linkov.net>

[-- Attachment #1: Type: text/plain, Size: 745 bytes --]

 >> 0. emacs -Q
 >> 1. M-x
 >> 2. C-x t 2
 >> 3. C-x o     ;; switches to the minibuffer
 >> 4. C-x t 2
 >>
 >> Debugger entered--Lisp error: (error "Specified root is not an ancestor of specified win...")
 >>    delete-other-windows-internal(#<window 4 on  *Minibuf-1*> #<window 8 on *scratch*>)
 >>    delete-other-windows()
 >>    tab-bar-new-tab-to()
 >>    tab-new(nil)
 >>    funcall-interactively(tab-new nil)
 >>    command-execute(tab-new)
 >
 > Martin, could you please help to debug this problem.
 >
 > Does the error occur because the window configuration is broken?

No.  Binding 'ignore-window-parameters' to t skips the usual error
message that you "Can't expand minibuffer to full frame".  Does the
attached patch fix it?

martin

[-- Attachment #2: delete-other-windows.diff --]
[-- Type: text/x-patch, Size: 1742 bytes --]

diff --git a/lisp/window.el b/lisp/window.el
index 016d53ffbdd..5994b6816ef 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4356,10 +4356,7 @@ delete-other-windows
 	    (error "Root of atomic window is root window of its frame")
 	  (throw 'done (delete-other-windows atom-root))))
        ((window-parameter window 'window-side)
-	(error "Cannot make side window the only window"))
-       ((and (window-minibuffer-p window)
-	     (not (eq window (frame-root-window window))))
-	(error "Can't expand minibuffer to full frame")))
+	(error "Cannot make side window the only window")))
 
       (cond
        ((or ignore-window-parameters
@@ -4395,15 +4392,21 @@ delete-other-windows
               (error nil))))
         (throw 'done nil)))
 
-      ;; If WINDOW is the main window of its frame do nothing.
-      (if (eq window main)
-          ;; Give a message to the user if this has been called as a
-          ;; command.
-          (when (and interactive
-                     (not (or executing-kbd-macro noninteractive)))
-            (message "No other windows to delete"))
+      (cond
+       ;; If WINDOW is the main window of its frame do nothing.
+       ((eq window main)
+        ;; Give a message to the user if this has been called as a
+        ;; command.
+        (when (and interactive
+                   (not (or executing-kbd-macro noninteractive)))
+          (message "No other windows to delete")))
+       ((and (window-minibuffer-p window)
+	     (not (eq window (frame-root-window window))))
+	(user-error "Can't expand minibuffer to full frame"))
+       (t
 	(delete-other-windows-internal window main)
-	(window--check frame))
+	(window--check frame)))
+
       ;; Always return nil.
       nil)))
 

  reply	other threads:[~2023-05-17  8:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 21:07 bug#62427: tab-bar-new-tab-to now handles cases with multiple side-windows Benson Chu
2023-03-25 19:14 ` Juri Linkov
2023-03-26  4:19   ` Eli Zaretskii
2023-03-27  7:05     ` Juri Linkov
2023-03-27 13:36       ` Eli Zaretskii
2023-03-27 16:39         ` Juri Linkov
2023-03-27 17:06           ` Eli Zaretskii
2023-03-27 17:43             ` Benson Chu
2023-03-28 12:42               ` Eli Zaretskii
2023-03-28 16:17                 ` Benson Chu
2023-03-28 17:11                   ` Eli Zaretskii
2023-03-28 17:39                     ` Benson Chu
2023-03-30 16:43                 ` Juri Linkov
2023-03-31 16:20                   ` Benson Chu
2023-04-01 18:25                     ` Juri Linkov
2023-04-02 18:20                       ` Juri Linkov
2023-04-02 18:51                         ` Juri Linkov
2023-04-15  3:03                           ` Benson Chu
2023-04-15 18:42                             ` Juri Linkov
2023-04-18  6:58                               ` Juri Linkov
2023-04-22  9:05                                 ` Eli Zaretskii
2023-04-23 16:39                                   ` Juri Linkov
2023-04-24 11:50                                     ` Eli Zaretskii
2023-04-25 17:25                                       ` Juri Linkov
2023-05-15 17:32                                         ` Juri Linkov
2023-04-25 17:30                           ` Juri Linkov
2023-05-16 17:32                             ` Juri Linkov
2023-05-16 17:52                               ` Juri Linkov
2023-05-17  8:13                                 ` martin rudalics [this message]
2023-05-17 16:39                                   ` Juri Linkov
2023-05-18  8:31                                     ` martin rudalics
2023-05-18 15:46                                       ` Juri Linkov
2023-05-19  7:31                                         ` martin rudalics
2023-05-19 18:14                                           ` Juri Linkov
2023-05-16 18:23                               ` Eli Zaretskii
2023-05-17 16:32                                 ` Juri Linkov
2023-05-17 17:24                                   ` Eli Zaretskii

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=0c52f6ed-c3e2-6d9e-6d57-6f3779257b25@gmx.at \
    --to=rudalics@gmx.at \
    --cc=62427@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.