From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#62592: Not creating new Tabs with small window Date: Tue, 16 May 2023 20:34:32 +0300 Organization: LINKOV.NET Message-ID: <868rdokw73.fsf@mail.linkov.net> References: <969620d8-8532-b23b-a870-c0852241160c@freenet.de> <86sfdihj2o.fsf@mail.linkov.net> <86v8ieb2g7.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7065"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 62592@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 16 19:48:19 2023 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 1pyymZ-0001hW-DT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 May 2023 19:48:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyymM-0001TA-NM; Tue, 16 May 2023 13:48:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyymJ-0001Pz-Iv for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 13:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pyymI-000305-AY for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 13:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pyymI-0000PF-50 for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 13:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 May 2023 17:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62592 X-GNU-PR-Package: emacs Original-Received: via spool by 62592-submit@debbugs.gnu.org id=B62592.16842592621420 (code B ref 62592); Tue, 16 May 2023 17:48:02 +0000 Original-Received: (at 62592) by debbugs.gnu.org; 16 May 2023 17:47:42 +0000 Original-Received: from localhost ([127.0.0.1]:47653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyyly-0000Mp-9h for submit@debbugs.gnu.org; Tue, 16 May 2023 13:47:42 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:34929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyylw-0000MF-OT for 62592@debbugs.gnu.org; Tue, 16 May 2023 13:47:41 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id C0B571BF206; Tue, 16 May 2023 17:47:33 +0000 (UTC) In-Reply-To: <86v8ieb2g7.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 02 Apr 2023 20:49:09 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261801 Archived-At: >>> 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 # 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)