GNU bug report logs - #62592
Not creating new Tabs with small window

Previous Next

Package: emacs;

Reported by: Claudio Grondi <claudio.grondi <at> freenet.de>

Date: Sat, 1 Apr 2023 12:49:02 UTC

Severity: normal

Fixed in version 29.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 62592 <at> debbugs.gnu.org
Subject: bug#62592: Not creating new Tabs with small window
Date: Tue, 16 May 2023 20:34:32 +0300
>>> 1. ~ $ emacs -Q
>>> 2. Menu -> Options -> Show/Hide -> Tab Bar (gives Tab *scratch*)
>>> 3. resize the Emacs window to a small one, but large enough to show some Tab labels
>>> 3. 1x click on rightmost * in the Tab Bar to create a new Tab
>>>
>>> The bug: No new Tab will be created and the minibuf and*Messages*  show:
>>>
>>>    split-window: Window #<window 3 on*Messages*> too small for splitting
>>
>> Thanks for the bug report.  It is related to bug#62427 where
>> we need to find a way to create a new window without using
>> delete-windows and split-window.

The patch below still fails when the height of the window is 1 line.

Maybe Martin could help?

> diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
> index 35474e1c674..08f904ec73d 100644
> --- a/lisp/tab-bar.el
> +++ b/lisp/tab-bar.el
> @@ -1586,7 +1595,8 @@ tab-bar-new-tab-to
>                (window-state-put (window-state-get))
>              ;; Create a new window to get rid of old window parameters
>              ;; (e.g. prev/next buffers) of old window.
> -            (split-window) (delete-window))))
> +            (let ((window-min-height 1)) (split-window))
> +            (delete-window))))
>  
>        (let ((buffer
>               (if (and (functionp tab-bar-new-tab-choice)
> diff --git a/lisp/window.el b/lisp/window.el
> index aa7520f30fa..b2ee869940a 100644
> --- a/lisp/window.el
> +++ b/lisp/window.el
> @@ -6391,7 +6396,8 @@ window-state-put
>                       (selected-window)))
>        (delete-other-windows-internal window root)
>        ;; Create a new window to replace the existing one.
> -      (setq window (prog1 (split-window window)
> +      (setq window (prog1 (let ((window-min-height 1))
> +                            (split-window window))
>                       (delete-window window)))))
>  
>    (set-window-dedicated-p window nil)




This bug report was last modified 2 years and 55 days ago.

Previous Next


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