GNU bug report logs - #71386
29.1; Frame is auto-deleted even when it has multiple tabs

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Al Haji-Ali <abdo.haji.ali@HIDDEN>; dated Thu, 6 Jun 2024 00:11:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 3 Apr 2025 16:31:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 03 12:31:27 2025
Received: from localhost ([127.0.0.1]:35389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u0NTS-0008Jf-MW
	for submit <at> debbugs.gnu.org; Thu, 03 Apr 2025 12:31:26 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:51413)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1u0NTQ-0008JL-8e
 for 71386 <at> debbugs.gnu.org; Thu, 03 Apr 2025 12:31:24 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id AD5C64424F;
 Thu,  3 Apr 2025 16:31:14 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <0c29ab2a-7cd6-4dc5-b091-1605b0e7862e@HIDDEN>
Organization: LINKOV.NET
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN> <87jz834tdx.fsf@HIDDEN>
 <a94708ae-f84c-470b-98f1-9563256b143d@HIDDEN>
 <87jz817odu.fsf@HIDDEN>
 <0c29ab2a-7cd6-4dc5-b091-1605b0e7862e@HIDDEN>
Date: Thu, 03 Apr 2025 19:22:21 +0300
Message-ID: <875xjl6z22.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeeltdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopeejudefkeeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheprggsughordhhrghjihdrrghlihesghhmrghilhdrtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehshhhiphhmihhnthhssehgmhgrihhlrdgtohhmpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrth
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 Ship Mints <shipmints@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 1. C-x 5 5 C-h i
>> 2. C-h e
>> 3. q
>>
>> should make the selected window with the buffer *Messages*.
>
> You get the "correct" interactive behavior with
>
> (defun window--quit-restore-select-window (window)
>   "Select WINDOW after having quit another one.
> Do not select an inactive minibuffer window."
>   (when (and (window-live-p window)
>              (or (not (window-minibuffer-p window))
>                  (minibuffer-window-active-p window)))
>     (let ((frame (window-frame window)))
>       (set-frame-selected-window frame window)
>       (unless (eq frame (selected-frame))
> 	(select-frame-set-input-focus frame)))))
>
> but I'm not even sure whether we want it.  And it still won't match the
> non-interactive behavior if you can't set frame focus there.

Just removing 'window--quit-restore-select-window' also allows tests to pass.

I wonder why it's needed when 'delete-window' already selects
the right window with 'set-frame-selected-window'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 3 Apr 2025 09:12:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 03 05:12:52 2025
Received: from localhost ([127.0.0.1]:32825 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u0Gd1-0000xJ-KD
	for submit <at> debbugs.gnu.org; Thu, 03 Apr 2025 05:12:51 -0400
Received: from mout.gmx.net ([212.227.17.22]:38727)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1u0Gcy-0000x3-5P
 for 71386 <at> debbugs.gnu.org; Thu, 03 Apr 2025 05:12:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743671558; x=1744276358; i=rudalics@HIDDEN;
 bh=1M/BmT1xlGUsyzlcIcl64Yb2rVhMaJ4oX4KqDzlEPSY=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=A9vu9DobDc/zdyV+ePQtOwkSdktmuhrA92bnWMXXc47GtHAfKS2gcuEDrjMpZDsB
 lHe4kRVs8QTJKR8TaZLJreonRH3fmVadb/Duc+m2Tt7rqeLYjOgcJJ7G87GQyDLF+
 D1R2nCKmqC7HkNCDdImvyzXjkylYeMKwD388HWR3DGz03X819N4QxE4/+JbsaZa2d
 IT0xrNwrNtQR8Xt5STe7kVoSGx4hXHNgXHPmCEDzV1CNigimIPIwosKsHbVDP5qFw
 r4BjZgr0JQJ+ao9YqeYEYee86n/1oqFVgbRhEx8u1PWSiHQZdfaBzKCvNnvqhhCPY
 uEJPIcSEZo+HOf+AXQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.97.74]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M8ygY-1u30S00YR4-006Dnr; Thu, 03
 Apr 2025 11:12:38 +0200
Message-ID: <0c29ab2a-7cd6-4dc5-b091-1605b0e7862e@HIDDEN>
Date: Thu, 3 Apr 2025 11:12:33 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN> <87jz834tdx.fsf@HIDDEN>
 <a94708ae-f84c-470b-98f1-9563256b143d@HIDDEN>
 <87jz817odu.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <87jz817odu.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:PK92jAGodUa3xdq6xE1KkVDfpcK1iryxEjYNLCZU8yKoi+QHNFk
 b2Hv8B6WwXeqwOT5MxiyUQ8AxeCn+21O2rM9K14bJ49qBVQppgLkoMmRATc1Mgm4w1TZpW0
 vO9OI2M7+w8CZKqY/Y4PKEbObIyf97RFuOvPFNTBWEUlxXM9rluZf83xUsCa3tSEO2WNra7
 m8JJmUc2AWtAdzNLdp6mg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:KKHCi+97+OA=;dzqwCjjhokUq4ekzdlPCQwlhrNQ
 zdr4u8DS+ZaMvDxaM4iAJopEsw5Pwep5aj0RLabYo6VyGSNMxMHmOV8aOy/wq2Pmus8Kkxuap
 dplA8Zsr95DPc4S3dVR+vTbkXTizehKuBCTcGTQ9ROUrwlraQiIsBu9FnPQcVsMG7jMSjovB4
 BgSVAYMB3D7hYS48YdhkmqOiTLulE8JwD2IRAImRbADb7IHzDFtvQpj1jNc92qO7SHlNhQV4s
 nITEjWo9prIVr0PuEXPngwZH6LK5JE0R2vrDuqZWYeB85wk0LpgjhLjy7GcBUAi258WDqiS5X
 huykAkzADMkFp1TgFSA7Kdd0VK17Q5X/LjxjbRjs1xfqFGibqxNUcdU311Hn1nIgjFHI1UDLJ
 nFBQSkxL32lBvByriEogszjzF3pRX0HfJZtxV63rdmsOt/9A9Og0+WgY1+B/ww21Zpt0fD6kK
 H1eQFU2a0qe8zMot9/X58ptpxq7mn8XEK1e5db2rvA75W9PgCUDhEah5gDjZJcTJy5HQlEuar
 BfC+jKugnfoUI4L0lyuzdBJd6WAZoDlxB3WZg88uGIAT5FeOfyA7yDuP1gFqnoCPc5xT8yoE2
 h6cYBrs2gQXWk35cD37wyRbooEErp8oMA9jX4iTnfBDA4gH4qxFe0IoypuRcNahf9/2DDakb7
 juR38bzKxXPQM+gtZL6Tp7/rG4CzV2PmvIaFuxv3eIAGF3qJ5HmWQxWhLOBhlTlsRDbsinIZR
 rRJaU17A/FQWcypSUjDaSkmkzNtvlPi0bMkB6xOSEicywyuwTGFWYV0vWSPFrxHMwUwpwP3jS
 rJtXNvr7XjTLzD1ema1oiBafisu1r9EteFhksysGxJKDavZaSkBKFxQa/1sDCTdepsLDljpAa
 Fm8eu6gM7/77lQswpmGnuWcAzcrPXLhF3o7cpc0xBm5f0MUEyrC1a9wSPX3oluc2/1bRuO9gp
 Bfh69yj327RAOPBUPtj+l2y71YUl88A5mDoZtEuA7qdPx7/lbrrvzrW3TKNxmG0JVlSlQKhDG
 6K4Ejruc6U1j1DP+J7MKLEvG31xe0sfOHsKIVv53vHZlRCy/+z2Hkqqb6xWLKazJWTEVnFbqt
 nBDFczMy/XinXaEuyl7cZ1eYR8YqJJ57/HiuGJLLnD98oOU4Xwv4ABTfTrfCHHJQORsFeOuBB
 JwcJWGljw/K1ZDMfO64ffwv8u7SMB9/qyk05vLXJ159XFHeuntYTS1AJLa69nWU/uo7Dcrq6I
 LhLMOOhlt49ZVhm45DM+Fz5UtzpDjeZccBFec1kkaVTjB6KjDBQasIDmwjV4y2RqsjoF46/2b
 3LAp0k3xd+FPOFzqP4JDNqf/3rBrJRJ4NXzKKkUlYg1owpiIEmWuMosn6pa0mlGOXcjfC2fsS
 RP7ZUVdO0urL2M1Du7YW3SqGdUj7/php+BwWRGLUboU6/oA99zK8b02bb7E5n4iKjPTxbD7SS
 B8DrWDBBwuB/r21Zv11yqe4h1VbvjaNSLke1tg52vD5DKWN18
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 Ship Mints <shipmints@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> IIUC the context is
 >>
 >>        (quit-window)
 >>        (should (eq (length (window-list)) 1))
 >>        (should (eq (length (frame-list)) 2))
 >>        ;; FIXME: uncomment (should (equal (buffer-name) "*Messages*"))
 >>
 >> What is 'quit-window' supposed to do - delete the frame?
 >
 > 'q' is supposed to delete one of two windows and move focus
 > to the remaining window:
 >
 > 1. C-x 5 5 C-h i
 > 2. C-h e
 > 3. q
 >
 > should make the selected window with the buffer *Messages*.
 > And it does when trying the same interactively.
 >
 >> In either case we would have to know which window gets selected when
 >> the 'quit-window' call returns and which buffer it shows.
 >
 > Interactively it selects the *Messages* window, but not in tests.
 > This is because for tests window-system is nil, so it behaves
 > weirdly in noninteractive tests.

The non-interactive behavior is, in some sense, the correct one.  Here
in 'quit-restore-window'

       ;; If the previously selected window is still alive, select it.
       (window--quit-restore-select-window quit-restore-2))

quit-restore-2 is the window on *scratch* and it gets selected
interactively _and_ non-interactively.  The latter tested with

(progn
   (other-frame-prefix)
   (info)
   (view-echo-area-messages)
   (let (window-system)
     (quit-window))
   (buffer-name))

If, in interactive use, instead of "q" you run

(defun foo ()
   (interactive)
   (quit-window)
   (message "%s" (selected-window)))

you will see that 'quit-window' selects *scratch*.  But in interactive
behavior, the *Messages* frame still has input focus and so its window
gets re-selected later.

You get the "correct" interactive behavior with

(defun window--quit-restore-select-window (window)
   "Select WINDOW after having quit another one.
Do not select an inactive minibuffer window."
   (when (and (window-live-p window)
              (or (not (window-minibuffer-p window))
                  (minibuffer-window-active-p window)))
     (let ((frame (window-frame window)))
       (set-frame-selected-window frame window)
       (unless (eq frame (selected-frame))
	(select-frame-set-input-focus frame)))))

but I'm not even sure whether we want it.  And it still won't match the
non-interactive behavior if you can't set frame focus there.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 3 Apr 2025 07:04:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 03 03:04:09 2025
Received: from localhost ([127.0.0.1]:60657 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u0EcS-0005ar-PR
	for submit <at> debbugs.gnu.org; Thu, 03 Apr 2025 03:04:09 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:39633)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1u0EcP-0005Zw-Jj
 for 71386 <at> debbugs.gnu.org; Thu, 03 Apr 2025 03:04:05 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 0994344361;
 Thu,  3 Apr 2025 07:03:54 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <a94708ae-f84c-470b-98f1-9563256b143d@HIDDEN>
Organization: LINKOV.NET
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN> <87jz834tdx.fsf@HIDDEN>
 <a94708ae-f84c-470b-98f1-9563256b143d@HIDDEN>
Date: Thu, 03 Apr 2025 09:55:17 +0300
Message-ID: <87jz817odu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeejleduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopeejudefkeeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheprggsughordhhrghjihdrrghlihesghhmrghilhdrtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehshhhiphhmihhnthhssehgmhgrihhlrdgtohhmpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrth
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 Ship Mints <shipmints@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Martin, could you help to understand why this line fails
>>
>>        ;; FIXME: uncomment (should (equal (buffer-name) "*Messages*"))
>>
>> in 'tab-bar-tests-quit-restore-window' in test/lisp/tab-bar-tests.el?
>>
>> It selects an unexpected buffer.  Maybe because the frame focus
>> is broken?
>
> IIUC the context is
>
>       (quit-window)
>       (should (eq (length (window-list)) 1))
>       (should (eq (length (frame-list)) 2))
>       ;; FIXME: uncomment (should (equal (buffer-name) "*Messages*"))
>
> What is 'quit-window' supposed to do - delete the frame?

'q' is supposed to delete one of two windows and move focus
to the remaining window:

1. C-x 5 5 C-h i
2. C-h e
3. q

should make the selected window with the buffer *Messages*.
And it does when trying the same interactively.

> In either case we would have to know which window gets selected when
> the 'quit-window' call returns and which buffer it shows.

Interactively it selects the *Messages* window, but not in tests.
This is because for tests window-system is nil, so it behaves
weirdly in noninteractive tests.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 3 Apr 2025 07:04:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 03 03:04:01 2025
Received: from localhost ([127.0.0.1]:60653 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u0EcL-0005a4-A2
	for submit <at> debbugs.gnu.org; Thu, 03 Apr 2025 03:04:01 -0400
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:51261)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1u0EcJ-0005Zm-Ke
 for 71386 <at> debbugs.gnu.org; Thu, 03 Apr 2025 03:04:00 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 2AC86442D4;
 Thu,  3 Apr 2025 07:03:49 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <CAN+1HboG8AWWGZ0OkqkSRM3-scvUZh5Ch=HC-su-K=Dzxp4+FA@HIDDEN>
Organization: LINKOV.NET
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
 <871pub6861.fsf@HIDDEN>
 <CAN+1HbqWqM84anGss-mZ6wBXtMgnw00KbW7nx0T_NEiF1rzHyA@HIDDEN>
 <CAN+1HbrGeMGMLcDBGSWOUqb0DTuf8sAuof41Y+aoOb5KimoGBA@HIDDEN>
 <87v7rncbtu.fsf@HIDDEN>
 <CAN+1HboG8AWWGZ0OkqkSRM3-scvUZh5Ch=HC-su-K=Dzxp4+FA@HIDDEN>
Date: Thu, 03 Apr 2025 09:54:04 +0300
Message-ID: <87y0wh7owj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeejleduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopeejudefkeeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheprggsughordhhrghjihdrrghlihesghhmrghilhdrtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomh
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>     >         > WIP patch attached with a test and some few refinements
>     we've
>     >         talked about
>     >         > in this dialog.  I didn't alter tab-bar-mode to
>     tab-bar-lines as
>     >         Martin
>     >         > suggested.  You're the expert.
>     >
>     >         We don't need a new unusable option, so please remove it and
>     submit
>     >         a new patch.
>     >         Also please replace tab-bar-mode with tab-bar-lines like
>     Martin
>     >         suggested.
>     >         Then everything should be good.  Also it seems you forgot to
>     remove
>     >         window-dedicated-p in your previous patch.
>     >
>     >     I'll work on that now.  I'll remove
>     >     'window-delete-active-tabs-inhibit-delete-frame'. 
>     'window-dedicated-p'
>     >     condition now gone.
>     >
>     >     Are you sure you don't want this to support the case where
>     tab-bar-mode
>     >     is active and tabs merely aren't visible?
>     >
>     > There's also 'tab-bar--tab-bar-lines-for-frame' if you think that's
>     more
>     > appropriate.
>
>     'tab-bar--tab-bar-lines-for-frame' is used to set tab-bar-lines,
>     but you need only to get it.
>
>     > All tests pass unless I set tab-bar-show nil, and I still think this
>     patch
>     > should work even if the tab-bar is hidden, but tab-bar-mode is
>     enabled.
>
>     It's a different situation when you see tabs like in a web browser.
>     They have even an option "Ask before closing multiple tabs".
>     We could add a similar option instead of the above one,
>     with 3 possible values like
>
>     1. nil - don't ask and close all tabs
>     2. t - close only the current tab
>     3. 'ask - ask a confirmation
>
> Hmm.  Well Emacs isn't a web browser, but I hear you.

Why not:

1. C-x 5 5 M-x eww
2. C-x t t M-x eww
3. q
4. q

behaves as expected from a web browser.

> I'll try out an
> option like that and see how it feels.  I haven't looked deeply, but if we
> prompt inside window functions and there are state changes along the code
> path before the prompt that we can't undo if the user quits while prompted,
> I don't think we need that level of complexity.  Maybe we can prompt before
> state changes using window-deletable-p output as an indication.  Again, not
> looked that deeply yet.

Agreed, we don't need that level of complexity and don't need an option.
I don't think anybody might want the first 'q' in the above scenario
to delete the whole frame.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 2 Apr 2025 20:48:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 02 16:48:48 2025
Received: from localhost ([127.0.0.1]:59738 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u050y-0002Pe-C5
	for submit <at> debbugs.gnu.org; Wed, 02 Apr 2025 16:48:48 -0400
Received: from mail-vk1-xa2a.google.com ([2607:f8b0:4864:20::a2a]:60557)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1u050v-0002PH-FH
 for 71386 <at> debbugs.gnu.org; Wed, 02 Apr 2025 16:48:46 -0400
Received: by mail-vk1-xa2a.google.com with SMTP id
 71dfb90a1353d-5259331b31eso131843e0c.0
 for <71386 <at> debbugs.gnu.org>; Wed, 02 Apr 2025 13:48:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743626920; x=1744231720; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=/726TDPsPhJa1HQHJnaoQN0Px2+sNyGYinQXk4p+uwE=;
 b=Ke+a8ifulRjqg4ZRCtw6zwIrRNfkanIEYE/I5SJy/aRt5NasEU8XKiYYZB265jrNGr
 WN1B3yAvDgjMRFeKYWyPX54j8c1iHJuxVbpYpa1N1MwmVr4JFYV10JxJ5+c6hdYN2T+3
 WCMcr/WP3y+1IlnL+70NagEujez/Eo/IjfbMG4QJvGV5UbnDn78MJIMTAHPQegWOlFOO
 qqyPsAz9F3HKXNGzxrgSjFSGC8yo1CqhN2lEbrmM109Sre9cCyApLqslWC644vAlVqKU
 H8QqqrtTLfvTD4hPWqdGKiQ6sRIOHSsP9DAmRkwQCEBTZdhmgK3vdUgBNmP0FNoCffKi
 DVOg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743626920; x=1744231720;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=/726TDPsPhJa1HQHJnaoQN0Px2+sNyGYinQXk4p+uwE=;
 b=v412OYHIVT7O80/UgAKVTn0WyYZuy2fXLBnXUu82FW4RhJ6CY8reaxtYFfTuSk0sZj
 ln+Gb1tFyEvE86t5jH96A5eM/DEEItpUBRmNqVykgLeJqr6OR9hx7PPABUc9UcYPJMqq
 tUSE+FZPTjO14PiksYtebqxZU+7hA3raDZTUF7N+tKB9iVzZ5trl2t2NstJUjYESRWjw
 xB1rxdeXFsRI5IdmzrDKZgEcDnPCbkflnHS99ez/idqufhnBLVK1GseBWaewIfAisOgU
 GyA6huo3+AHGKh49OdQSl2BmQwkTbqbfAHqols9DQPmNUpgNKG2zDcj57Ao7Eml7OLsy
 uKDg==
X-Forwarded-Encrypted: i=1;
 AJvYcCWJsczGs+We8o87qpVT+TySXd7xCaAf0e1NgskIL4Tt+cKbk6GY44lM5LP9IO1WGZyvEaD9GQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yz+AfKLu2SEXlMFYhawlJGWRP6aiyMtTRTynGKVQpqGgiPW6Aep
 sYlikmzFp1KktCUESEy/SPdhwtQWPb4gPzXIqiJX+EYAwBJ0tD3z4AFHp1LdnY5GsUd8XNoCHou
 SKXh0iXJzIf8VL8NvBm/2UnP9mJQ=
X-Gm-Gg: ASbGncsVKtp7bSvKo1Ys1woQfCSbacjmdm9zIG55TKlM2k8i6Tx6P3wCNVmEZKxmyNK
 e3MhacXguwLtRFkwjx5XhKLiwFSQyn0g35eeLj8zslsCk7DUFzXN97eJiEk6V6e2S8QLHI3+/k7
 7zIZe/pODoO6kQox4I2+W23vrRtohjKxue+d+P
X-Google-Smtp-Source: AGHT+IGsCtGcN6Oq53ncTk/uWBSXHVqdJoz/0Jwv5MyaxNjK+x8osoBiyXV5xoa+fjG1VdEXpMA3hLMc9WQIOgsASIY=
X-Received: by 2002:a67:e706:0:b0:4c1:9738:820d with SMTP id
 ada2fe7eead31-4c6d384b469mr13671567137.6.1743626919779; Wed, 02 Apr 2025
 13:48:39 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
 <871pub6861.fsf@HIDDEN>
 <CAN+1HbqWqM84anGss-mZ6wBXtMgnw00KbW7nx0T_NEiF1rzHyA@HIDDEN>
 <CAN+1HbrGeMGMLcDBGSWOUqb0DTuf8sAuof41Y+aoOb5KimoGBA@HIDDEN>
 <87v7rncbtu.fsf@HIDDEN>
In-Reply-To: <87v7rncbtu.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Wed, 2 Apr 2025 16:48:28 -0400
X-Gm-Features: ATxdqUHRkkrizuqwM4bP8cpRgIRFTS_Bj-NNxSwvOO0_dAkydwv0_kjw7sRCxVc
Message-ID: <CAN+1HboG8AWWGZ0OkqkSRM3-scvUZh5Ch=HC-su-K=Dzxp4+FA@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000002ca5f80631d1c7b8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000002ca5f80631d1c7b8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Wed, Apr 2, 2025 at 3:00=E2=80=AFAM Juri Linkov <juri@HIDDEN> wrote:

> >         > WIP patch attached with a test and some few refinements we've
> >         talked about
> >         > in this dialog.  I didn't alter tab-bar-mode to tab-bar-lines
> as
> >         Martin
> >         > suggested.  You're the expert.
> >
> >         We don't need a new unusable option, so please remove it and
> submit
> >         a new patch.
> >         Also please replace tab-bar-mode with tab-bar-lines like Martin
> >         suggested.
> >         Then everything should be good.  Also it seems you forgot to
> remove
> >         window-dedicated-p in your previous patch.
> >
> >     I'll work on that now.  I'll remove
> >     'window-delete-active-tabs-inhibit-delete-frame'.
> 'window-dedicated-p'
> >     condition now gone.
> >
> >     Are you sure you don't want this to support the case where
> tab-bar-mode
> >     is active and tabs merely aren't visible?
> >
> > There's also 'tab-bar--tab-bar-lines-for-frame' if you think that's mor=
e
> > appropriate.
>
> 'tab-bar--tab-bar-lines-for-frame' is used to set tab-bar-lines,
> but you need only to get it.
>
> > All tests pass unless I set tab-bar-show nil, and I still think this
> patch
> > should work even if the tab-bar is hidden, but tab-bar-mode is enabled.
>
> It's a different situation when you see tabs like in a web browser.
> They have even an option "Ask before closing multiple tabs".
> We could add a similar option instead of the above one,
> with 3 possible values like
>
> 1. nil - don't ask and close all tabs
> 2. t - close only the current tab
> 3. 'ask - ask a confirmation
>

Hmm.  Well Emacs isn't a web browser, but I hear you.  I'll try out an
option like that and see how it feels.  I haven't looked deeply, but if we
prompt inside window functions and there are state changes along the code
path before the prompt that we can't undo if the user quits while prompted,
I don't think we need that level of complexity.  Maybe we can prompt before
state changes using window-deletable-p output as an indication.  Again, not
looked that deeply yet.

--0000000000002ca5f80631d1c7b8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Wed, Apr 2, 2025 at 3:00=E2=80=AFAM Juri Linkov &lt;<a href=3D"mailto:ju=
ri@HIDDEN">juri@HIDDEN</a>&gt; wrote:</span></div></div><div class=
=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex">&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&gt; WIP patch attached=
 with a test and some few refinements we&#39;ve<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0talked about<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&gt; in this dialog.=C2=A0 I didn&#39=
;t alter tab-bar-mode to tab-bar-lines as<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Martin<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&gt; suggested.=C2=A0 You&#39;re the =
expert.<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0We don&#39;t need a new unusable opti=
on, so please remove it and submit<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0a new patch.<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Also please replace tab-bar-mode with=
 tab-bar-lines like Martin<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0suggested.<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Then everything should be good.=C2=A0=
 Also it seems you forgot to remove<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0window-dedicated-p in your previous p=
atch.<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0I&#39;ll work on that now.=C2=A0 I&#39;ll remove<br=
>
&gt;=C2=A0 =C2=A0 =C2=A0&#39;window-delete-active-tabs-inhibit-delete-frame=
&#39;.=C2=A0 &#39;window-dedicated-p&#39;<br>
&gt;=C2=A0 =C2=A0 =C2=A0condition now gone.<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0Are you sure you don&#39;t want this to support the=
 case where tab-bar-mode<br>
&gt;=C2=A0 =C2=A0 =C2=A0is active and tabs merely aren&#39;t visible?<br>
&gt;<br>
&gt; There&#39;s also &#39;tab-bar--tab-bar-lines-for-frame&#39; if you thi=
nk that&#39;s more<br>
&gt; appropriate.<br>
<br>
&#39;tab-bar--tab-bar-lines-for-frame&#39; is used to set tab-bar-lines,<br=
>
but you need only to get it.<br>
<br>
&gt; All tests pass unless I set tab-bar-show nil, and I still think this p=
atch<br>
&gt; should work even if the tab-bar is hidden, but tab-bar-mode is enabled=
.<br>
<br>
It&#39;s a different situation when you see tabs like in a web browser.<br>
They have even an option &quot;Ask before closing multiple tabs&quot;.<br>
We could add a similar option instead of the above one,<br>
with 3 possible values like<br>
<br>
1. nil - don&#39;t ask and close all tabs<br>
2. t - close only the current tab<br>
3. &#39;ask - ask a confirmation<br></blockquote><div><br></div><div class=
=3D"gmail_default" style=3D"font-family:monospace">Hmm.=C2=A0 Well Emacs is=
n&#39;t a web browser, but I hear you.=C2=A0 I&#39;ll try out an option lik=
e that and see how it feels.=C2=A0 I haven&#39;t looked deeply, but if we p=
rompt inside window functions and there are state changes along the code pa=
th before the prompt that we can&#39;t undo if the user quits while prompte=
d, I don&#39;t think we need that level of complexity.=C2=A0 Maybe we can p=
rompt before state changes using window-deletable-p output as an indication=
.=C2=A0 Again, not looked that deeply yet.</div></div></div>

--0000000000002ca5f80631d1c7b8--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 2 Apr 2025 08:15:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 02 04:15:05 2025
Received: from localhost ([127.0.0.1]:54452 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tztFY-000311-AJ
	for submit <at> debbugs.gnu.org; Wed, 02 Apr 2025 04:15:05 -0400
Received: from mout.gmx.net ([212.227.17.22]:42303)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1tztFT-0002z8-Q0
 for 71386 <at> debbugs.gnu.org; Wed, 02 Apr 2025 04:15:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743581692; x=1744186492; i=rudalics@HIDDEN;
 bh=Tr6ieG1nfQocqoTua+T1YN+ULVyBDLpiVPEnziWwNpg=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=WZLXSfRHoOuPBjB17AarYMx1zpQPE+j17Yj2EXmPZVf+loqUBeiykD2iGZeAWjt4
 zAKZkgwh1PtDueCw3Algi1QMYTKBjvxhVPK6E8O28UM6XZQ9hf6OmVieGndTHedAT
 Xvgyo+tVoqDANLI9RdCCPkKfzpynTBbMwczu0moNbO++bhfnP+i1blbgWKVChyq7O
 9fYWausFnCSLhzem/3aopXQHtNQxZ5k5vHMhgBETYBDfcVBhSxis2HeC8fktEcjqY
 7qeMEEF6c2nB0F03qSaqD/40Z3laFDeJuSDgPjdnDWMmJRYLShPbmwpR4OHfw1dDC
 YPC+rrQY++fjPkAdJw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([46.125.249.43]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MEm6F-1tu4bg3Krj-00GMuV; Wed, 02
 Apr 2025 10:14:51 +0200
Message-ID: <a94708ae-f84c-470b-98f1-9563256b143d@HIDDEN>
Date: Wed, 2 Apr 2025 10:14:50 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN> <87jz834tdx.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <87jz834tdx.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:KtTHy64p4RDfi53ZfdupKdUvtO2ZO/cKUeuEelgsgqCt2JLw8h1
 YkyNcjIeKTHN0DwUfhYCZHsm9vh9GTCh2ncpFpWuGtVph+LtrbegNwUxBJ1wSRidVlIAt/z
 c0oiElZEP+CS61ozfuw/8b8jlsCa92k5NO1kVrPzOIMG2ivUdBkAeKhI0E+LxrpfsNw6mvt
 zj0EEyYZEcxfaNVT8Mi4w==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:d71d1178wR4=;hWmW8yOucTuzVedotuN8Esw8SRj
 ADYk2uSK4xwlGWRhzcMLeqS2NbeYcvvnG1FcWlX2ia8AkYSgl6Pky/pSZrJfNxQp7Kh1NIx3a
 W7NjmFlS7vXm7+2eMbDDEe2SjQAdwtywo2CTR+JZNnVrqyufrNVUIuS8ySUyTmZol+IkObuuM
 ViSCUJJl3P4v4w+pM/GhKDraBsBSuQPd7RdVSb6b1/pNSHgzG5B0tZQF20wPj9wOjK903MhVf
 Rbgyb3Q3SvS4X9TCI4+YMk07ydsk6zMreuEySNDCSKRprmJPJRxFXX9chUm8m8/nNX+1yvhnj
 /Dz9SVRrvWg4/D5onIvPqGeevW9zkOdeYbiAY2VgpCuFILXdyCoDwg9N1zgWkXzT2ThD5ZTvt
 o0YKb51N8JuvVjX9hOSGmyoShlX8dWd0iu1C62RAqzWBKbVJpu9m9uVYqSZJ6rGgljaInxu08
 n+2UMneZQjvhpd+TCffBHWhUGF5UlogEMiRNN1xoh5fm3oqMTf0gAOON1ymUOoLv2k+yXjNSl
 vZb1Do7DMVmdL0Das72WeV26jWCXAy6J09EjfyEiqtiKFfwjWMOfiU5aVZFD/xhKKvUWHRegn
 WTH2JWL3aWdeB32lbIBHzxOMeCIK+jhD8eLOjBBrHARLNzeOStEuU23yXgNvOllCV7In6t/tl
 adjjw/uLoJfuCAQEy/Yr62wiSnBFMtoezVSea35Exa4w3RrWp2ucl4P+DJx9baVUjTmuIAjC8
 HvXpFHq8FTSv2q98rB5eRqMe01rbHXIK9yJnXZMU97vWTFahsZncpZRxGwu66eKu9Afx0qP+h
 v+adS9McNMx+AMVwTmDhLFYul0ujORVSzHeCqU/8U966gnBMm9MptDoMbsXCU44g2w3axjyDE
 QcouujO+8FDNEB5VRolK0DXKNwdqmhVZZMPiyZUUBmerPqthE54ppJuS3ruh8NHCeRSjjaKH5
 46p0CkXpLRGmc/28OlxwUMLb+5G6dnRw/5AEgG91C733J1+0f2GIPxCKnfSX8M5N1MUW83Pe7
 0QhJSeto2hNU/BJhgdkaisvLfvicTHFr2RPDQ6hPXlUPug8SJ2NdSCUKnhtgE5hgoluQ6tG8S
 kjUDRA9+6fUyF88yxhnlvMaey6QCKsWh6aW9umyWjrbdTieYhURF1QG1LS9YgxnvpjoVuEVAr
 QnOFZar0k0dF0+84q1z8BQlJuuJP1is68D3rh/MsvnRuHDdXs9ekJc8oKwps+CRCgVpw+Fg3U
 /ZO3oizNkQhFzap2wI8tfeurGgoBrJjcK+lb8RdFDq9SiuwctVFYGNkNgMq7BK0H97DMCEtBJ
 TGEJf5yVGJjFjj+m6P2tjDP3QRWtOFL2EGF6raAQKD3MLnM9pdx8AiqrzCmFS83D+wX1YvGrV
 KNviNcnYCWowrXxEE7MKhAqsz8vJvUmhBURAJUQ+WUKR6PMY0+bcDSTFSoW1rOElysRMGHuqI
 7HWyegSgQE4S5SoW5hMlk+sqschtTyUHgyzVjlHX5sn5CHJblmCB6OLWn2zq1NVBk0AzJ2Q==
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > Martin, could you help to understand why this line fails
 > > ;; FIXME: uncomment (should (equal (buffer-name) "*Messages*")) > > in
 'tab-bar-tests-quit-restore-window' in test/lisp/tab-bar-tests.el [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
 The query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [212.227.17.22 listed in sa-accredit.habeas.com]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.17.22 listed in list.dnswl.org]
 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
 query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [212.227.17.22 listed in bl.score.senderscore.com]
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [46.125.249.43 listed in zen.spamhaus.org]
 0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
 [212.227.17.22 listed in wl.mailspike.net]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 Ship Mints <shipmints@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > Martin, could you help to understand why this line fails
    > > ;; FIXME: uncomment (should (equal (buffer-name) "*Messages*")) > > in
    'tab-bar-tests-quit-restore-window' in test/lisp/tab-bar-tests.el [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.17.22 listed in list.dnswl.org]
  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
                             The query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [212.227.17.22 listed in sa-accredit.habeas.com]
  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
                             query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [212.227.17.22 listed in bl.score.senderscore.com]
  0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
                             [212.227.17.22 listed in wl.mailspike.net]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [46.125.249.43 listed in zen.spamhaus.org]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

 > Martin, could you help to understand why this line fails
 >
 >        ;; FIXME: uncomment (should (equal (buffer-name) "*Messages*"))
 >
 > in 'tab-bar-tests-quit-restore-window' in test/lisp/tab-bar-tests.el?
 >
 > It selects an unexpected buffer.  Maybe because the frame focus
 > is broken?

IIUC the context is

       (quit-window)
       (should (eq (length (window-list)) 1))
       (should (eq (length (frame-list)) 2))
       ;; FIXME: uncomment (should (equal (buffer-name) "*Messages*"))

What is 'quit-window' supposed to do - delete the frame?  In either case
we would have to know which window gets selected when the 'quit-window'
call returns and which buffer it shows.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 2 Apr 2025 07:00:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 02 03:00:26 2025
Received: from localhost ([127.0.0.1]:54056 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzs5K-0001cF-6S
	for submit <at> debbugs.gnu.org; Wed, 02 Apr 2025 03:00:26 -0400
Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:42737)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1tzs5H-0001YZ-SF
 for 71386 <at> debbugs.gnu.org; Wed, 02 Apr 2025 03:00:24 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 93FE544401;
 Wed,  2 Apr 2025 07:00:16 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <CAN+1HbrGeMGMLcDBGSWOUqb0DTuf8sAuof41Y+aoOb5KimoGBA@HIDDEN>
Organization: LINKOV.NET
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
 <871pub6861.fsf@HIDDEN>
 <CAN+1HbqWqM84anGss-mZ6wBXtMgnw00KbW7nx0T_NEiF1rzHyA@HIDDEN>
 <CAN+1HbrGeMGMLcDBGSWOUqb0DTuf8sAuof41Y+aoOb5KimoGBA@HIDDEN>
Date: Wed, 02 Apr 2025 09:53:01 +0300
Message-ID: <87v7rncbtu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeehtddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopeejudefkeeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheprggsughordhhrghjihdrrghlihesghhmrghilhdrtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomh
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>         > WIP patch attached with a test and some few refinements we've
>         talked about
>         > in this dialog.  I didn't alter tab-bar-mode to tab-bar-lines as
>         Martin
>         > suggested.  You're the expert.
>
>         We don't need a new unusable option, so please remove it and submit
>         a new patch.
>         Also please replace tab-bar-mode with tab-bar-lines like Martin
>         suggested.
>         Then everything should be good.  Also it seems you forgot to remove
>         window-dedicated-p in your previous patch.
>
>     I'll work on that now.  I'll remove
>     'window-delete-active-tabs-inhibit-delete-frame'.  'window-dedicated-p'
>     condition now gone.
>
>     Are you sure you don't want this to support the case where tab-bar-mode
>     is active and tabs merely aren't visible?
>
> There's also 'tab-bar--tab-bar-lines-for-frame' if you think that's more
> appropriate.

'tab-bar--tab-bar-lines-for-frame' is used to set tab-bar-lines,
but you need only to get it.

> All tests pass unless I set tab-bar-show nil, and I still think this patch
> should work even if the tab-bar is hidden, but tab-bar-mode is enabled.

It's a different situation when you see tabs like in a web browser.
They have even an option "Ask before closing multiple tabs".
We could add a similar option instead of the above one,
with 3 possible values like

1. nil - don't ask and close all tabs
2. t - close only the current tab
3. 'ask - ask a confirmation




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 1 Apr 2025 20:13:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 16:13:28 2025
Received: from localhost ([127.0.0.1]:51530 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzhzE-0000S1-0A
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 16:13:28 -0400
Received: from mail-vk1-xa34.google.com ([2607:f8b0:4864:20::a34]:59885)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzhzB-0000Qx-2k
 for 71386 <at> debbugs.gnu.org; Tue, 01 Apr 2025 16:13:25 -0400
Received: by mail-vk1-xa34.google.com with SMTP id
 71dfb90a1353d-523ed8ac2a3so2801879e0c.3
 for <71386 <at> debbugs.gnu.org>; Tue, 01 Apr 2025 13:13:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743538399; x=1744143199; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=kODxY1zUg6Ct2yh3zRh5nCvqlO9mkHmNaOhwqhm5fXs=;
 b=Cgn2iE5FcokUmWY992QIO8+CJnj53W8RUS0DI6MF92e91AYfnrTbrX5XVz5tzUAUir
 xRvO/Hc05pzFrio/iJpivprGd9VOidrrOLo/wAR8XABCe5kdQ2SzmETGyBcY1Kr4FEZS
 V69I1XHZ8n3opiQy7kb1BCEidkeVAjhUSkWgg1QlqfzQDh7qw/7teM6agVyw6dxr76eN
 Ur0ST7zUS5tDvxoCbVamEwmiXo7rf6pyNmHjHwTqNNT7a1mxIB5//oA9OwVNtjI29CsC
 pIHwJx8h9r2tL3lnCSvIrpCXBhh0j5X39wVTKWxQqtuQE+1oenWNW53uIr5y/2a7F9k3
 kvoA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743538399; x=1744143199;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=kODxY1zUg6Ct2yh3zRh5nCvqlO9mkHmNaOhwqhm5fXs=;
 b=nTA8au/7bBO7FTKmomZ+9RorUl3HTll1hgk3mbwdfmwU/1Ei5ZEiqVKz4WgC57aoVG
 3JpYyk48F+RLn3dAz+Zf9bhqHOXszqBBAPFckjjiFvl2l5lTlJaeSlOD3kLADch9WEBS
 m0//xRQMJdvwj81b2fsm7k+VvI8JNmJejMN/3I5EX4pc21dMqjBbtBUC8DF9hSojtbMu
 s7v5clzU/uaIO4JPXaSlXo+KVl6xnRDeJbQ8GEpb3vM8jiFF6aIbd51Tfs5qXJe+On1A
 mFjBBXoxRB6JVtNLhvSEWQIlfNAIU66+WCACAJDH6RBwDcBM5P9LuCns1bROCN/BfJSF
 JnHA==
X-Forwarded-Encrypted: i=1;
 AJvYcCVTi1lvXtO+JMI2NH/dLQNQCJwXnYlSZq+ijGoUTu/v3IOQV6FrslqABLVs/tHgzQn7Kxa4PQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yyd45YLcQLTyBVCCvoko4OYju7ZI6GkH41P+H04bjULIejTEfww
 MG5SFcWr66NfRePeFY2QQ1GHWZMxhkvhPsfxISfaKFZ0v0SWi2WSjWRQgEjRlB3XBQitv9qu/gs
 Z9X8Vg6Uk7jCQQJaaI96OoStbqxQ=
X-Gm-Gg: ASbGncuUUGUPj/P1VmLaF/qb7IpcNlPiZNq7YCqpsR4e062PeKKKcKWd09EY2H0dyS8
 cFSHzVsqq1HaNibJ6EWB9VMfHnfKPUwAtw0q1gRtzvdC0A2J/9To1Me8IZqMWl02MICW2ykVL7d
 qbub72KCe+xZmm9maIWoKRaUdPWQ==
X-Google-Smtp-Source: AGHT+IGJX27Cw7kDk9RiEtVvwjb3FnRW4MnHiRzJi2bFKoKfS44SpBh7SEqfczsJ23D9SQnQcQYpHUlE+evqQo7dNtA=
X-Received: by 2002:a05:6122:2510:b0:518:7ab7:afbb with SMTP id
 71dfb90a1353d-5261d4abd25mr8819792e0c.8.1743538399285; Tue, 01 Apr 2025
 13:13:19 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
 <871pub6861.fsf@HIDDEN>
 <CAN+1HbqWqM84anGss-mZ6wBXtMgnw00KbW7nx0T_NEiF1rzHyA@HIDDEN>
In-Reply-To: <CAN+1HbqWqM84anGss-mZ6wBXtMgnw00KbW7nx0T_NEiF1rzHyA@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Tue, 1 Apr 2025 16:13:08 -0400
X-Gm-Features: AQ5f1JoKvAhRylXvIPnm8MusdQTnKj4m6suEf-jEOR3B8V_juy6Ym6P4S8BY20U
Message-ID: <CAN+1HbrGeMGMLcDBGSWOUqb0DTuf8sAuof41Y+aoOb5KimoGBA@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000f1188b0631bd2a41"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000f1188b0631bd2a41
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 1, 2025 at 3:07=E2=80=AFPM Ship Mints <shipmints@HIDDEN> wro=
te:

> On Tue, Apr 1, 2025 at 2:44=E2=80=AFPM Juri Linkov <juri@HIDDEN> wrot=
e:
>
>> > WIP patch attached with a test and some few refinements we've talked
>> about
>> > in this dialog.  I didn't alter tab-bar-mode to tab-bar-lines as Marti=
n
>> > suggested.  You're the expert.
>>
>> We don't need a new unusable option, so please remove it and submit a ne=
w
>> patch.
>> Also please replace tab-bar-mode with tab-bar-lines like Martin suggeste=
d.
>> Then everything should be good.  Also it seems you forgot to remove
>> window-dedicated-p in your previous patch.
>>
>
> I'll work on that now.  I'll remove
> 'window-delete-active-tabs-inhibit-delete-frame'.  'window-dedicated-p'
> condition now gone.
>
> Are you sure you don't want this to support the case where tab-bar-mode i=
s
> active and tabs merely aren't visible?
>

There's also 'tab-bar--tab-bar-lines-for-frame' if you think that's more
appropriate.

All tests pass unless I set tab-bar-show nil, and I still think this patch
should work even if the tab-bar is hidden, but tab-bar-mode is enabled.

--000000000000f1188b0631bd2a41
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Tue, Apr 1, 2025 at 3:07=E2=80=AFPM Ship Mints &lt;<a href=3D"mailto:shi=
pmints@HIDDEN">shipmints@HIDDEN</a>&gt; wrote:</span></div></div><div=
 class=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204=
);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div style=3D"font-fa=
mily:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">On T=
ue, Apr 1, 2025 at 2:44=E2=80=AFPM Juri Linkov &lt;<a href=3D"mailto:juri@l=
inkov.net" target=3D"_blank">juri@HIDDEN</a>&gt; wrote:</span></div></d=
iv><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:=
1ex">&gt; WIP patch attached with a test and some few refinements we&#39;ve=
 talked about<br>
&gt; in this dialog.=C2=A0 I didn&#39;t alter tab-bar-mode to tab-bar-lines=
 as Martin<br>
&gt; suggested.=C2=A0 You&#39;re the expert.<br>
<br>
We don&#39;t need a new unusable option, so please remove it and submit a n=
ew patch.<br>
Also please replace tab-bar-mode with tab-bar-lines like Martin suggested.<=
br>
Then everything should be good.=C2=A0 Also it seems you forgot to remove<br=
>
window-dedicated-p in your previous patch.<br></blockquote><div><br></div><=
div style=3D"font-family:monospace">I&#39;ll work on that now.=C2=A0 I&#39;=
ll remove &#39;window-delete-active-tabs-inhibit-delete-frame&#39;.=C2=A0 &=
#39;window-dedicated-p&#39; condition now gone.</div><div style=3D"font-fam=
ily:monospace"><br></div><div style=3D"font-family:monospace">Are you sure =
you don&#39;t want this to support the case where tab-bar-mode is active an=
d tabs merely=C2=A0aren&#39;t visible?</div></div></div></blockquote><div><=
br></div><div class=3D"gmail_default" style=3D"font-family:monospace">There=
&#39;s also &#39;tab-bar--tab-bar-lines-for-frame&#39; if you think that&#3=
9;s more appropriate.</div><div class=3D"gmail_default" style=3D"font-famil=
y:monospace"><br></div><div class=3D"gmail_default" style=3D"font-family:mo=
nospace">All tests pass unless I set tab-bar-show nil, and I still think th=
is patch should work even if the tab-bar is hidden, but tab-bar-mode is ena=
bled.</div></div></div>

--000000000000f1188b0631bd2a41--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 1 Apr 2025 19:07:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 15:07:53 2025
Received: from localhost ([127.0.0.1]:51295 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzgxl-0005Xy-62
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 15:07:53 -0400
Received: from mail-vk1-xa34.google.com ([2607:f8b0:4864:20::a34]:56565)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzgxf-0005Wi-W1
 for 71386 <at> debbugs.gnu.org; Tue, 01 Apr 2025 15:07:51 -0400
Received: by mail-vk1-xa34.google.com with SMTP id
 71dfb90a1353d-524168b16d3so5454835e0c.0
 for <71386 <at> debbugs.gnu.org>; Tue, 01 Apr 2025 12:07:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743534462; x=1744139262; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=wzIdJ2V4qMYK+oJRoGIBB/aFSspQA21pEukGK8h+u0A=;
 b=H7BpkVbZHswp6CnkJRt/1TkEVpCl+NKLxNHGJ3XF/GdCsJa6fd2T+n5ewLbHv/qBzB
 zzzVK4WO7hh+aSrbfPg2tiCED5Ye+b90hLgKJHjwOkX8QLHSYTGP7B94pNjJ2UmU/MhD
 w60VJd63Ti0lWjUf3AjJ8FrmUnGoUeW6xk1y0VolsU2tQOz3WFiz2omhtPQqgHM4k8od
 p8yEpxtRwzYxlThb03DBXqDqnaNufBanBpmy9gEn1zo5yB0t1ZmIgbyDljYsb4DwaQ5O
 qCxYdEtUmcVUbtmmDnK8Zz8DBoAsMlXGlbvsO6QKN3/qT5V3aHUHBSGnDynvLeJEof/i
 yh7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743534462; x=1744139262;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=wzIdJ2V4qMYK+oJRoGIBB/aFSspQA21pEukGK8h+u0A=;
 b=LAQFFbCOXJITFG/fDab87GqZvy2fZ2mXQkWHwNWBjRH3dlnb4i+SM4sIg/rKRkUH8M
 qPkA4w9bYzf11LjVP62wvML8si4snfFwf80g0AScbso0d49rSAuHDhHbQlbxqaD9s03D
 GdmkdyCB3waDtPLroBK6kjvnKjwtsPHNzyzaSR5MbFskXMcv8z3CEuSuTtnrbdxWezH0
 bWlRtyiQAsZivICzRbyBrdYXDDYpfHYu0sNleO/CWE1EFQTSoQety2w0CdJuhg9I6huT
 Tgyci586UQldOfISKNRUuLHmcKrBVv289uFq2EvkCPJoO4/ciLm2TWJ0zmAZEiDGpBKu
 dP5A==
X-Forwarded-Encrypted: i=1;
 AJvYcCW5FNHAl+TvyrcE9weRPPoBX65KCl/1VBs01gQn4CpiVpKGqD3CIkcV8Nw1DQAmKHBe9vVw/w==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyFFxmQ0TSaiTmaPBiJyhXc/2pJP8aOUw31Fe+W5lKdkuAEdEci
 ym6svjc5U4h/+6zP9NswHC5yG96EjQ8gJ9BVJ9I2hwQ52RpK506HfvAPgIjq031BF3CLElzgweh
 rBudmrUKwb6RqHw0reevEOaVTsLI=
X-Gm-Gg: ASbGncvmACzh7lETVyt2l4R56VCyRtfT/2Egpy4KKtZ1wB9Ju6QopQGu3mYzOe49V7F
 sq8BBAm+/c1ymERCqM8/gqwts+/h2r3zfK8jT9xq0FRpFEZdIKbPVh7uxMDgHzru1OcLP+XGn/J
 Hvrjv9ZdkkC+buwgjai4LA1fS8Tw==
X-Google-Smtp-Source: AGHT+IEW0fWn0FdJJsXyAAPqaU8VWiZ4mESfXCO6ZEh/pJ6bIV7OSaafzqJar840GPxQHeptHk/s9QnIsfQlto5KcPc=
X-Received: by 2002:a05:6122:1aca:b0:523:a88b:9ac5 with SMTP id
 71dfb90a1353d-5261d49fea4mr9667774e0c.9.1743534462144; Tue, 01 Apr 2025
 12:07:42 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
 <871pub6861.fsf@HIDDEN>
In-Reply-To: <871pub6861.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Tue, 1 Apr 2025 15:07:31 -0400
X-Gm-Features: AQ5f1JqegBujzESYnPq8x_mzoD3Mqm2nlVfwNsk0uB0drF2kWlTd9AppWqLqbUc
Message-ID: <CAN+1HbqWqM84anGss-mZ6wBXtMgnw00KbW7nx0T_NEiF1rzHyA@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000045180a0631bc4083"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000045180a0631bc4083
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 1, 2025 at 2:44=E2=80=AFPM Juri Linkov <juri@HIDDEN> wrote:

> > WIP patch attached with a test and some few refinements we've talked
> about
> > in this dialog.  I didn't alter tab-bar-mode to tab-bar-lines as Martin
> > suggested.  You're the expert.
>
> We don't need a new unusable option, so please remove it and submit a new
> patch.
> Also please replace tab-bar-mode with tab-bar-lines like Martin suggested=
.
> Then everything should be good.  Also it seems you forgot to remove
> window-dedicated-p in your previous patch.
>

I'll work on that now.  I'll remove
'window-delete-active-tabs-inhibit-delete-frame'.  'window-dedicated-p'
condition now gone.

Are you sure you don't want this to support the case where tab-bar-mode is
active and tabs merely aren't visible?

--00000000000045180a0631bc4083
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Tue, Apr 1, 2025 at 2:44=E2=80=AFPM Juri Linkov &lt;<a href=3D"mailto:ju=
ri@HIDDEN">juri@HIDDEN</a>&gt; wrote:</span></div></div><div class=
=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex">&gt; WIP patch attached with a test and some few refinements =
we&#39;ve talked about<br>
&gt; in this dialog.=C2=A0 I didn&#39;t alter tab-bar-mode to tab-bar-lines=
 as Martin<br>
&gt; suggested.=C2=A0 You&#39;re the expert.<br>
<br>
We don&#39;t need a new unusable option, so please remove it and submit a n=
ew patch.<br>
Also please replace tab-bar-mode with tab-bar-lines like Martin suggested.<=
br>
Then everything should be good.=C2=A0 Also it seems you forgot to remove<br=
>
window-dedicated-p in your previous patch.<br></blockquote><div><br></div><=
div class=3D"gmail_default" style=3D"font-family:monospace">I&#39;ll work o=
n that now.=C2=A0 I&#39;ll remove &#39;window-delete-active-tabs-inhibit-de=
lete-frame&#39;.=C2=A0 &#39;window-dedicated-p&#39; condition now gone.</di=
v><div class=3D"gmail_default" style=3D"font-family:monospace"><br></div><d=
iv class=3D"gmail_default" style=3D"font-family:monospace">Are you sure you=
 don&#39;t want this to support the case where tab-bar-mode is active and t=
abs merely=C2=A0aren&#39;t visible?</div></div></div>

--00000000000045180a0631bc4083--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 1 Apr 2025 18:44:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 14:44:41 2025
Received: from localhost ([127.0.0.1]:51191 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzgbJ-0002Lq-Ho
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 14:44:41 -0400
Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]:40317)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1tzgbF-0002KR-Ny
 for 71386 <at> debbugs.gnu.org; Tue, 01 Apr 2025 14:44:38 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id B3C7744363;
 Tue,  1 Apr 2025 18:44:26 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <87y0wlt7xb.fsf@HIDDEN>
Organization: LINKOV.NET
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
Date: Tue, 01 Apr 2025 21:40:58 +0300
Message-ID: <87jz834tdx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeefheefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopeejudefkeeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheprggsughordhhrghjihdrrghlihesghhmrghilhdrtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehshhhiphhmihhnthhssehgmhgrihhlrdgtohhmpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrth
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 Ship Mints <shipmints@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> the new tests that cover its 'quit-restore' logic in
> test/lisp/tab-bar-tests.el.

Martin, could you help to understand why this line fails

      ;; FIXME: uncomment (should (equal (buffer-name) "*Messages*"))

in 'tab-bar-tests-quit-restore-window' in test/lisp/tab-bar-tests.el?

It selects an unexpected buffer.  Maybe because the frame focus
is broken?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 1 Apr 2025 18:44:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 14:44:36 2025
Received: from localhost ([127.0.0.1]:51188 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzgbE-0002Kv-2f
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 14:44:36 -0400
Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]:46569)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1tzgbB-0002Jz-K8
 for 71386 <at> debbugs.gnu.org; Tue, 01 Apr 2025 14:44:34 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 3736841C84;
 Tue,  1 Apr 2025 18:44:21 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
Organization: LINKOV.NET
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
Date: Tue, 01 Apr 2025 21:36:22 +0300
Message-ID: <871pub6861.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeefheegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopeejudefkeeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheprggsughordhhrghjihdrrghlihesghhmrghilhdrtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomh
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> WIP patch attached with a test and some few refinements we've talked about
> in this dialog.  I didn't alter tab-bar-mode to tab-bar-lines as Martin
> suggested.  You're the expert.

We don't need a new unusable option, so please remove it and submit a new patch.
Also please replace tab-bar-mode with tab-bar-lines like Martin suggested.
Then everything should be good.  Also it seems you forgot to remove
window-dedicated-p in your previous patch.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 1 Apr 2025 15:51:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 11:51:39 2025
Received: from localhost ([127.0.0.1]:50364 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzdtr-0001oi-EI
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 11:51:39 -0400
Received: from mout.gmx.net ([212.227.17.22]:57851)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1tzdto-0001ni-Mk
 for 71386 <at> debbugs.gnu.org; Tue, 01 Apr 2025 11:51:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743522639; x=1744127439; i=rudalics@HIDDEN;
 bh=j2eqpLPT3ZwWSggiyfvYAjQgHKKTh2AjPVNVCFAqA4I=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=cRsYdSdkrYxnLYooQqF/fB2UeyZoP9qDMzbRS5fnia+oibJm4Fk/FcwA7gL+uNkR
 MP/l/04J7ZpeljUB7tAvZrmhukHnpT+EwE4YlJGs896HjoNBhg5vtITUENCy64FO/
 QToScRkXJxD8dalu1WUFI+TzBjW8b3ZAd70im1ZfpVnQKpM6elaQhUvKpLa5G1PY6
 wuwAKRURKLClsBGkX7qbOOBxcdUD5lqTlpyRX+doq0KWZAR2GT7sHxdjJbftPbJpF
 S+hdIT8aANemvIqg/5/6Sp0FOSPjjSvt6EnBTpnd7oqUzfVWnFghGlUgalzjbdfC+
 65zFXs0tGeuxUOnc/Q==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.238]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M3UZG-1u0Bqe3hII-00FJTI; Tue, 01
 Apr 2025 17:50:38 +0200
Message-ID: <9ef63b96-074d-40dd-ae79-af920e0f6973@HIDDEN>
Date: Tue, 1 Apr 2025 17:50:37 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Ship Mints <shipmints@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
 <c310ad2a-4404-46ae-9e1b-d1e4e3b872e8@HIDDEN>
 <CAN+1HbpjE11Hi3q=s9SD5pNpmEfQrTnHA9dm8bnK2MhNtm8vRA@HIDDEN>
 <aa8d2642-71ac-4868-a658-e6f3ccdb0052@HIDDEN>
 <CAN+1HbooR9LdDmu4XBSrK-y1a9nDEKOfwWGLdAgrBqxZfV-Nbw@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAN+1HbooR9LdDmu4XBSrK-y1a9nDEKOfwWGLdAgrBqxZfV-Nbw@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:zQr3MDzQ2f5NWSTm3UAL+U7MFUq0mJDWQHbIN3V2lVK6iKYexat
 Iu+Iow1BlvT0Q6FDvD+O2gKMFHujdq+hYGH0DCm3EpII9/qK3AiWpSIINYnaD/GRADJNLWx
 cwtI9V/sQPeBMMkaJCeIQLQFWyS/SvrF5tYRTFtWTSVWZ1ML2xmjAXj99I7fVHGOfDkGy+3
 bZkiDZdQejaJNu+gTgV9w==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:EpBiAIDW1Dc=;BZK+xKw89WlvpZP/tlugPxToQjH
 N4z58NOJzqFL9tHgSlmyQcUg/9JfjwOiHaKRR2TGZ0d9pqCvqNBJnAjp955fJKJaEY00VTXyY
 etNNE/wt0Q1/U/Hb8zI8MfYO0xcNDfCDwyd1yLyfPXjLTSzIm1TE87ZOk133i3tT7NffnpcND
 nyCAa4O6om8ysWnXeRMmew5iq2L0m6x75hNOYFE8cBG/FpX3q3xnCQwxlRawz5uLReeompRVy
 TJT/eLf+0qOFJNpDlPP98M0vIRCpBZFCpdtHgbWCzmc8ZKyilgJR/GtJdzZ5/l7LjHaw81Dc+
 VgoJ9XIwid0XdfRCS2XZjvRtWDaRMbAm55Sn61TTb+Wmpcmnt9bcM5m5eOo5d443u986x3jX/
 T7e28t1/sfcFJeKmn4bkBrbEOR0M5TDRpQ4PpWbxktb7QgB5zinl8CY7M81wwzOCZrTOyCTvF
 262a2QhTMgKHpMFBJENSOoZtMxCQSdK52rPDRiTLzAN6EGnmjFh7EKZtn7WSpwdA1m0v+B10U
 Z8C3QJMgg5Uo4Tp1G95/fuPbrK4PuMlb9ULrDvmzzeETqhRpev7BFo5Q4iRdn4E2hEmAPPwHt
 SbGLgxm94eX7G2ikt40Gwlw02Z6wXk200iRMjTFVPkX7B33n0XPlay+B0PkpxI3dNRvNU0svL
 gtH9Nsew1UNHoH5jFz3oIAwJyXLqnVl5CdQNaiCz6UQ+St00NxJZgj0rbgdCyniPfiu2OhvNm
 7esyk5KAe7PtEH4sFB/OZjV+3yAQ0a0XTquKWp4iu+1JrL4A44GvekkAgDLGpHzLXdeoWUkGT
 uCzGeYjgR0rYWVdARnvTvJNLo66P66FN8PMzQ24MI1F1E+R0d6gqDmZpqXMqx+skYmClCYRmq
 f9Z3cXY/1qn+Niz6p0jvqPggcOa1Pvv6lRe8I4PyYaNunuhFqFiNW3CglRP4+kOtgBecjzKfd
 7E2w7qCciT7TxJWx5ywrl8glvfioCQpkUcYfb82xwaYWEUDyZ8DHVyoVmOVKOORzDrtasNTee
 wFoPnlGrIR0FdXr/8/dsm2G1AeLHLlQ1rByuQQpC0Fq+MHAFL/McZe3uZCo+yw8WTJn1cI4C1
 o03/ZFRic+FPfJbiebMS8D3BY9Ku0194wVi652vTO021B2kmBlzG7JN/HEJN5+SEX+T67/UxJ
 T/F9Y306r8YjuN8spZh4bIoIOaawXVwBW+kEKmh+1QYXDdiQuDDp2Pi9d46mVm3GDvCkOfNRN
 BY7g+QbFQTsbAEzdwLQXpaW9iU8jHllorUh94VdEh3F8bQnrIGOIoacQOislSvs2vgmw+K4uw
 6gY2Q1W9b5sIS4wVYn6qb4gAt+USBvp8UlAaNcK/+tWotwYlDcmOKEsGy5G6N+6pOGTFRBg+v
 B36BNwpLpi8Bso7kkVT6O1/4b71AcAOQrUHGmR5Takv97n9x5jspudtvVhIRQVHTCMkgjAPN4
 U/mDo5NOuu8m/Uic8ZugOpkYV2TY=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> Ah yes.  A frame might have no tab bar even if tab-bar-mode is enabled.
 >>
 >
 > One can use tab-bar features without displaying the tab-bar, though.
 > tab-bar-history-mode as a winner-mode replacement works.  tabs still work
 > as window-configuration controls even without a visible tab-bar, isn't that
 > right?  I don't use it this way but I think it works.

I have no idea, Juri will tell.  At least 'tab-bar-tabs' which we seem
to run here consults the 'tabs' frame parameter.

martin





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 1 Apr 2025 15:00:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 11:00:45 2025
Received: from localhost ([127.0.0.1]:49984 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzd6a-0003rF-Um
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 11:00:45 -0400
Received: from mail-vk1-xa36.google.com ([2607:f8b0:4864:20::a36]:61489)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzd6U-0003ps-5y
 for 71386 <at> debbugs.gnu.org; Tue, 01 Apr 2025 11:00:39 -0400
Received: by mail-vk1-xa36.google.com with SMTP id
 71dfb90a1353d-5262475372eso1151148e0c.2
 for <71386 <at> debbugs.gnu.org>; Tue, 01 Apr 2025 08:00:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743519632; x=1744124432; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=tCSNIxTTJLaxNOtPfH1VP3sjeSKUMrrh36SRmpwFcJ4=;
 b=Kd6V+tFuJSTulNde/vlhlROG0A6Yf85i14N4IthNa1oall4IcYhazxRnk/CJJNsfSm
 k0yyLPVJzPcyIpaPHQ8XUcaSsrC0L1tPFI9gCcUL+y69HRZl9cIE/gMlJLaqb5itVHn7
 y9i2jnIZm0b8PEZTmEWjUV3wzyTq4precXeGSwgxZ8h7aPYRNR/4VEuoZ3Sv10fdy4C9
 h97l+Nq0/oICFgQCca1uyFvkpjwDnm6/0Y1y7cBuoR7VD0lAdB/NlhdyOQlss+OMq5Pv
 uLpJm2dHLYvKqiXT7czdxkCaZZ/ODEuoPfhT7O3ur4MZzKXXQPmukwoLJK6mED4Qf9EO
 CxmQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743519632; x=1744124432;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=tCSNIxTTJLaxNOtPfH1VP3sjeSKUMrrh36SRmpwFcJ4=;
 b=UH7RAM5lrosdh/n8bUs+R42Zx/zPR5XzDc5OKWf45yeryLP7yhrBq+YPPxWKAgmeUe
 514uUEn7aA1MuG0Lj97ltphHcZe9T978ba/a+ZzeftWRequyaxAe7qJlpU5wqhwcN24w
 OQ3maNKLupwEgjJs8C5CP/f5jj8483UFOG7YWApmNiH0f5M0H/uWnziRmucNgiR+BsSC
 dHAjOahgJyf7ujm9Qf5y7bB8Bwz5ynCJY1U9xUyaxSFk7r0jEZBxLwy1jyxbhqDRBfLa
 iHNFy2GWfMQZ+8zAMkFKv3+SxzgFgkSXykBCNlRPdvputFkqRM2cqri31+nOpUXmVuhX
 /POA==
X-Forwarded-Encrypted: i=1;
 AJvYcCURnry0gtrp3+O1S2OofL+rfi6nfenfAduXnZdX744n1ZI02jKygAdcOuwAqS1k1oX4CUX0tw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Ywh7OAN+LzFeB4IjTe2JbAXjt9ze1s2dsn7Z0FB7K/vz33xn+ww
 V6wBg9gRgP8VmiNHK4WSrOAbjW+5XkFKkQJLWGbGHewU1F8rhlAIhuUio3EaaxkqzvjdvCZzL7i
 tfsUfeNuBrCaZhpyDdTvlPfSw24Q=
X-Gm-Gg: ASbGncu0ydl1i/x/KMB+mqhHSbtYBP2uetYbLSQCG3RykhJqH77MUCE6/csrYkQV+/0
 W++bk6y0u5b459gw+LJGboojnkmyicm+svjlAP9yIwPUu1xP0vi8VJRD4UKyuBgOAwaWiZ2EBCx
 f88IxTseBmFOVAKZHL1Nit4QIz0A==
X-Google-Smtp-Source: AGHT+IHZF+qpqlhXGuLxX2zgpU9aXJRoUMyseGnT8FxqlktYhh2ziI0sWW2R4kndMTDLArrmnLDlUb3OpgICyLDvn4c=
X-Received: by 2002:a05:6122:3c8b:b0:523:9ee7:7f8e with SMTP id
 71dfb90a1353d-5261d36a655mr8990494e0c.4.1743519632232; Tue, 01 Apr 2025
 08:00:32 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
 <c310ad2a-4404-46ae-9e1b-d1e4e3b872e8@HIDDEN>
 <CAN+1HbpjE11Hi3q=s9SD5pNpmEfQrTnHA9dm8bnK2MhNtm8vRA@HIDDEN>
 <aa8d2642-71ac-4868-a658-e6f3ccdb0052@HIDDEN>
In-Reply-To: <aa8d2642-71ac-4868-a658-e6f3ccdb0052@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Tue, 1 Apr 2025 11:00:20 -0400
X-Gm-Features: AQ5f1Jpr9U1pW08w0jhtOP8NTZ30Ew1u9pixnFzzJI8tb9aOtUMJfGpzh4acXVA
Message-ID: <CAN+1HbooR9LdDmu4XBSrK-y1a9nDEKOfwWGLdAgrBqxZfV-Nbw@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: martin rudalics <rudalics@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000569b1e0631b8cc88"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000569b1e0631b8cc88
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 1, 2025 at 10:46=E2=80=AFAM martin rudalics <rudalics@HIDDEN> w=
rote:

>  >>   > I didn't alter tab-bar-mode to tab-bar-lines as Martin
>  >>   > suggested.
>  >>
>  >> When did I suggest that?  IIRC I only said that I don't know which of
>  >> the two you wanted to fix.
>  >>
>  >
>  > I meant this suggestion you made "(> (frame-parameter frame
> 'tab-bar-lines)
>  > 0) is more reliable" than "((and tab-bar-mode";
>
> Ah yes.  A frame might have no tab bar even if tab-bar-mode is enabled.
>

One can use tab-bar features without displaying the tab-bar, though.
tab-bar-history-mode as a winner-mode replacement works.  tabs still work
as window-configuration controls even without a visible tab-bar, isn't that
right?  I don't use it this way but I think it works.

--000000000000569b1e0631b8cc88
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Tue, Apr 1, 2025 at 10:46=E2=80=AFAM martin rudalics &lt;<a href=3D"mail=
to:rudalics@HIDDEN">rudalics@HIDDEN</a>&gt; wrote:</span></div></div><div c=
lass=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex">=C2=A0&gt;&gt;=C2=A0 =C2=A0&gt; I didn&#39;t alter tab-ba=
r-mode to tab-bar-lines as Martin<br>
=C2=A0&gt;&gt;=C2=A0 =C2=A0&gt; suggested.<br>
=C2=A0&gt;&gt;<br>
=C2=A0&gt;&gt; When did I suggest that?=C2=A0 IIRC I only said that I don&#=
39;t know which of<br>
=C2=A0&gt;&gt; the two you wanted to fix.<br>
=C2=A0&gt;&gt;<br>
=C2=A0&gt;<br>
=C2=A0&gt; I meant this suggestion you made &quot;(&gt; (frame-parameter fr=
ame &#39;tab-bar-lines)<br>
=C2=A0&gt; 0) is more reliable&quot; than &quot;((and tab-bar-mode&quot;;<b=
r>
<br>
Ah yes.=C2=A0 A frame might have no tab bar even if tab-bar-mode is enabled=
.<br></blockquote><div><br></div><div class=3D"gmail_default" style=3D"font=
-family:monospace">One can use tab-bar features without displaying the tab-=
bar, though.=C2=A0 tab-bar-history-mode as a winner-mode replacement works.=
=C2=A0 tabs still work as window-configuration controls even without a visi=
ble tab-bar, isn&#39;t that right?=C2=A0 I don&#39;t use it this way but I =
think it works.</div></div></div>

--000000000000569b1e0631b8cc88--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 1 Apr 2025 14:46:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 10:46:58 2025
Received: from localhost ([127.0.0.1]:48721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzctC-0008CF-F5
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 10:46:57 -0400
Received: from mout.gmx.net ([212.227.17.21]:48737)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1tzct3-00088e-G0
 for 71386 <at> debbugs.gnu.org; Tue, 01 Apr 2025 10:46:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743518797; x=1744123597; i=rudalics@HIDDEN;
 bh=tg9UPqySprfgeUz5525Z1AgoWnv/JV7ScWT8w6jtWJM=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=tDPm4SdMhfclPJsz1o/9Nln8XyJUunOVMK3rgM5qi5ETqYFCn9rl1R1VcNAN9sYs
 5fxiE/dxz6DlRA21b+xVCLYUQ+ZcfWdsUSBTPVQWGgl5piXEnYrtGGVX8W/bPHEEC
 v93Pop8xfyrxQjgycNhqBm90zvMAagjr/rCb+dZGRUkk+5tuC8YfzgKEzAyw9Jp+N
 SG8CsSkGDP8IG1SxlCw6rx9YyHsQ/1KzkcaKWe37qlVJYqs1vA9+gg1bFQ12adEj6
 n15YE57o70dzbVxsffegiP+5SrBepSCa0O2PPFYDusOEmrM534DNXNYAnxEi5aRSk
 dZBZSe0BocjNaWbKow==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.238]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mkpap-1tFWV829Et-00gNSt; Tue, 01
 Apr 2025 16:46:37 +0200
Message-ID: <aa8d2642-71ac-4868-a658-e6f3ccdb0052@HIDDEN>
Date: Tue, 1 Apr 2025 16:46:35 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Ship Mints <shipmints@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
 <c310ad2a-4404-46ae-9e1b-d1e4e3b872e8@HIDDEN>
 <CAN+1HbpjE11Hi3q=s9SD5pNpmEfQrTnHA9dm8bnK2MhNtm8vRA@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAN+1HbpjE11Hi3q=s9SD5pNpmEfQrTnHA9dm8bnK2MhNtm8vRA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:/MCEE1WokgV1wh8pL1AXXbEMStwDMJNipBzyc3znthpOXobXmZ8
 v2OE6BVcQilGIXte90vR4gSY8mrs2H6jdaos8MRC8weSaOYsjeHUkQVqlfbFuOIug0iLXpY
 zfhyIq/f9R5KMKqSSt1prREpuXuh86kK+ncaWbNo7tF+bsEkC4oEZVi8yB1k23WgwZsUlgT
 s7RT2qZlskg3a6w7hdJqg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:wd6v9xeZZmc=;LDQjYuNvADlF1iLktaWF9AoJFY+
 T6WQuLzDlZZiu5nFhXt3XNvohnI/bvCTx7D1Ru7DPiQc2VMGU4DecesM/xZHOB5kMrY+dqne1
 h+w+Tc0osNL6VORg45bnj6FFJ+Wqf09RUkuTYAspfJLivVg6wPFfNb2IQ6BnufHoEW4ZwTisw
 e4Qqex4g+5OiZlALSnIZO/zA3jH6WEe48FZYb2jXCy96nSiBmslP320pCI9XMUJlT/2UeOpcC
 ktUIFW8yaNAHNrPV5tss5YB9kBsHrH2g8VhvJKmqDyzQbPBSH/BqpRTHfWUSTS07phkm5l20T
 furIMjVU5p5evv9eI+xP6CRbCd3J/nroGIS2fTmUn9wRvNkjB96MgUliJYuAUFmfrObhuIZ2s
 q+X16JWysb+gr0dofeK1wdDxzkziwCaPNPqz3RUgZxuo860CYNwveiElWy0YhevR34f0Y1fL/
 rSStrEUMEfS1l7ZFOxjExFy+QOTTReYC5rr4JnEGMAK1s46SYMnbbE4Ui4NDqDEZEamE6eXuD
 1CsN8gDBnd4LywQTpNR/pV+d1hbf69Z4Jka5/6wbKpHauti+HyMz1z5cLA8kkiK4Pfs+SE6mC
 cFnOxl6aM6gMaZUSPPV57UaRIsu3rSkMIX8vIlNnk8H/LaMIJ/eRMz6AhCJDiecUdyibLaOxa
 xsi+VrmZe3UYfYQrQO2Fx0lQuCoGHxeAL99vMwpupSc446VQ3wstzVOfJswywttF3PsbEUiBM
 NA4kfwiE6prhz2ZLICLNOd5LLYVu5M/NrkSPbnqdhVE7Z2t+ZLg1vns3KcmVYOMl3TH2ZYIJ6
 ZiDWXtiWlArRwo8jJtWOMeHQt6iYHd9jMmYreVdoL2A3dTYlkdWkF5fFMzt2eZQw3VVAlYnmf
 hAXsHzsFBG0n7qDEZqQCwJzwpxISQQy3lMVfKYyqGWTP4n/KHaDhkuX9xgl7/zlWaQh7TlkNG
 DwJXfaeBIt2Ylsew++B+DiqKOw36Ll9eddwhQ4mO4OBb32kRazMguPe2r7jd076NONr5AwX38
 4PL1eFuuV6uCws/DUXQDihKRPZ64A3MhiUq3FiiF4fXVbvFsmR+CYuCq10dj3/CXqTuUjOe19
 bxCATQh9wTDCvuB5uQNyHZv4iDxU0tU6GZSXrcmNLfwWtYqtVBZkOlV/s7noSZxM0mh+vYuBI
 DeBguDhuYDc7ce++e40Wl7GAFGFViLvqaP+GhH/TU37ketiy2TJQO7TiKxbBikIXZ35gduE8H
 JNFeNtfExpiicVzrV/qrHZUUbrp4FemUp13SW8qRW6Wa5EjJKUgXuYsyGZIVEthefoqBVaAS1
 +/w3CwV5mfaUCwNZ+24mDSilfCoMm8Akv/bz3iTUOgHRtsxAfak7gZA3Y94MSUtZQ60KDU5Lp
 EA6CPDAx1O/tB6ATUN3bg7rCXcjQd5mg0tCk6loRcBkHLGsy2o5zwWQuR+upaA1A/Lipz4iqv
 xxNm9BoLAQ+T+vUxIOjP2sdywQqo=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >>   > I didn't alter tab-bar-mode to tab-bar-lines as Martin
 >>   > suggested.
 >>
 >> When did I suggest that?  IIRC I only said that I don't know which of
 >> the two you wanted to fix.
 >>
 >
 > I meant this suggestion you made "(> (frame-parameter frame 'tab-bar-lines)
 > 0) is more reliable" than "((and tab-bar-mode";

Ah yes.  A frame might have no tab bar even if tab-bar-mode is enabled.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 1 Apr 2025 11:39:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 07:39:47 2025
Received: from localhost ([127.0.0.1]:46743 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzZy5-0002MK-RG
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 07:39:47 -0400
Received: from mail-vk1-xa2e.google.com ([2607:f8b0:4864:20::a2e]:55759)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzZy1-0002Ka-Sf
 for 71386 <at> debbugs.gnu.org; Tue, 01 Apr 2025 07:39:43 -0400
Received: by mail-vk1-xa2e.google.com with SMTP id
 71dfb90a1353d-51eb1823a8eso2861696e0c.3
 for <71386 <at> debbugs.gnu.org>; Tue, 01 Apr 2025 04:39:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743507576; x=1744112376; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=WqqRTwy25ky85mEWrGxw/fxTvPfapJLVxBhrTSXXFpM=;
 b=npvhj/fvX6BiM5Tnr2Rrhv5CZJ5bZsQIcKpmoPg57Z48gW4SmSzt3Xl+LfoeobizzT
 AvcLz8pk6rbKL8PKqLDoBuVazGcJuPdPxk5g7TmBTB1A0GMxpsQYkOREqZ5vk5JYQEDF
 s/JKH03VLAvWNM8/Sff78EPMlOM3FA5Lgc9lKZGtaKeMkZVbmdRQcp/I0fZkM29/IXNV
 2fj4gAiFYgf1crzVc/E4d0dMy9NAS4QBaNhckA0+0z109buGGrY6N9lb1D3wXEeOLnAi
 wM9lgp1fMc896xHoLEwTaW2dstYvCeikzXqhAMuwDsXKIObc/VCzQM/7CqhtnCFIuPj5
 hYCQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743507576; x=1744112376;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=WqqRTwy25ky85mEWrGxw/fxTvPfapJLVxBhrTSXXFpM=;
 b=SAeKj8sJnot/PBT189TmNInd2Z5zwPRZiPZEwIizCcH35ItkfHKJPgo6qZQyGcobhe
 ioYvLnhVY9b5obAQ5zmnqSgxqWLKA+3rIYgvfqpPY5uGMDecwYoOIsqjcL+xm3wdlU/v
 NmEp/OfJEx9A3p+85eKRL9xBtxskNdDeK0faGthY7hKI7BKxN9CyqRNyarfZbUkCBUSl
 cgc5YBFj6e71WR8Z5R8BEsqXnkPfEYB1hoIzWno/VkUjftf5BAZhvRDyBu5Ej39LgFlC
 OATP6End8icaQ3RiS4d0jfo3VkULY3Qtm721T1JTvxvcYtKMtkmDnkgaRa6RygRImnCv
 irFw==
X-Forwarded-Encrypted: i=1;
 AJvYcCWqL9qtKK4DOq6ufASxa6KESqNMx+4gWdrM0sCOg77+PluLHCrI9t88P49pdzQ7HKYrqB632A==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yw8S3BVMlWwpCI0GZIWoasTYQx4ASsc+xrkyp/7211zqKNNHB32
 U3UWUG9KexTQ4a1z+F1nnHkmodkxzJJbh6C9cjQwPa/Ivsmn3LS8nd9ai6pkWjFvvxcyqFi+JYl
 FyU2N0MWCN1UUHdDOsMkHi5Rj0rM=
X-Gm-Gg: ASbGnct+4iXUWQEdPk+cjCfpA8HDHQHQNmUiyEdBsigFQcFOY8e2fF3P+ArPjroiqgZ
 QjDvb7nxtxoQY67+MXmLkKJY53xbwcYixpGt60gXT9VMw9csHsZ+X+nBRtaXdnp3wUbHgkb1SXt
 FfOeBXfHRjzsRrOHbsIrg2kaa+bg==
X-Google-Smtp-Source: AGHT+IGBRzkrsOIib1SqMuZVXlbKpPtHV5R8YfjPQKIGpOFCuKhFX/Ekr1mFFS6OJq4kdGqrEw25LbKEkrCm3uti/KA=
X-Received: by 2002:ac5:c5cc:0:b0:526:1ddd:8953 with SMTP id
 71dfb90a1353d-5261ddd899cmr4958048e0c.0.1743507575515; Tue, 01 Apr 2025
 04:39:35 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
 <c310ad2a-4404-46ae-9e1b-d1e4e3b872e8@HIDDEN>
In-Reply-To: <c310ad2a-4404-46ae-9e1b-d1e4e3b872e8@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Tue, 1 Apr 2025 07:39:23 -0400
X-Gm-Features: AQ5f1JrkYs0xaMRroMb17ZqTtwJya_eSK8pLFGSNyCnvSTxlp_NRjEGjrM445bU
Message-ID: <CAN+1HbpjE11Hi3q=s9SD5pNpmEfQrTnHA9dm8bnK2MhNtm8vRA@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: martin rudalics <rudalics@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000b3b4070631b5fd34"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000b3b4070631b5fd34
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 1, 2025 at 4:33=E2=80=AFAM martin rudalics <rudalics@HIDDEN> wr=
ote:

>  > I didn't alter tab-bar-mode to tab-bar-lines as Martin
>  > suggested.
>
> When did I suggest that?  IIRC I only said that I don't know which of
> the two you wanted to fix.
>

I meant this suggestion you made "(> (frame-parameter frame 'tab-bar-lines)
0) is more reliable" than "((and tab-bar-mode";

--000000000000b3b4070631b5fd34
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Tue, Apr 1, 2025 at 4:33=E2=80=AFAM martin rudalics &lt;<a href=3D"mailt=
o:rudalics@HIDDEN">rudalics@HIDDEN</a>&gt; wrote:</span></div></div><div cl=
ass=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote"=
 style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p=
adding-left:1ex">=C2=A0&gt; I didn&#39;t alter tab-bar-mode to tab-bar-line=
s as Martin<br>
=C2=A0&gt; suggested.<br>
<br>
When did I suggest that?=C2=A0 IIRC I only said that I don&#39;t know which=
 of<br>
the two you wanted to fix.<br></blockquote><div><font color=3D"#000000"><br=
></font></div><div class=3D"gmail_default" style=3D""><font face=3D"monospa=
ce" color=3D"#000000">I meant this suggestion you made &quot;(&gt; (frame-p=
arameter frame &#39;tab-bar-lines) 0) is more reliable&quot; than &quot;((a=
nd tab-bar-mode&quot;;</font></div></div></div>

--000000000000b3b4070631b5fd34--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 1 Apr 2025 08:33:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 04:33:50 2025
Received: from localhost ([127.0.0.1]:45439 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzX49-0004qU-4T
	for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 04:33:50 -0400
Received: from mout.gmx.net ([212.227.17.20]:53659)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1tzX46-0004ol-Cx
 for 71386 <at> debbugs.gnu.org; Tue, 01 Apr 2025 04:33:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743496413; x=1744101213; i=rudalics@HIDDEN;
 bh=T4xMryIeS+Nbebc9lY8Jt8/WOYgH1bm6Mr7QYDeNZtI=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=GN82CxKFdq8DN72FFWCViwDjfW7BYT2sIU76rgZLCBHkBbLHbJfIhUtujYB4sHrZ
 DTDgN+vM4vB4yesx/dLg4dicFf1pboo5z6z+Tpjy994Fm9hYSm7N/eGKhwnv9R5LJ
 Laf/b09e3ZCRIclrXEXV3W33SFp7kyEsDRYkfng9NvuGk7QPgRXqknSfKEfLHWu0H
 fru75yyu3ng8xZZyjst3pA/ZD0uRufoOLOtdo03AEXZ150r/UySLjmAC6S0RoOmdi
 aIszCrhLjG7XXpBROCxV4JlRQ639qUZwcpinS/bdSWSMqjZuaePjPVJUk2kdCGnVw
 YulpAnECIhn0u87dCw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.238]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MHGCu-1tv7DY3wI4-001W7D; Tue, 01
 Apr 2025 10:33:33 +0200
Message-ID: <c310ad2a-4404-46ae-9e1b-d1e4e3b872e8@HIDDEN>
Date: Tue, 1 Apr 2025 10:33:31 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Ship Mints <shipmints@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
 <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:/otvVpZJaCx7jTLo3DZJqVNyU2TRIb4yq5kCF7O+srybO0TwSjI
 2jYIDn+MQFLgKn4oxt1ZCi8L91GboIcT7LkvAwSairhGLVxYv4WJ5m2uMnr/eREO71E2Xe9
 agSxBDI6yUUf+RM45IjlyDrOUAtp4qpJjvpx28lHT0vscOV1T+PcInoTHundq0Pc0xYN3GA
 EFzVsVOSJ71EK5Aw2MEZA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:W8C9yWF1CS4=;iXyiKMXWd23+SoCVmzpyZ6/Z+dv
 Gaxf+qu3J1cXHa9tng+lhtGfnuuqmL0YbyrAFv87SuuM4a7gxoAEvqApk3vKr3M4aPQKCpyOr
 DvlITbMBFQBMq7wZNhqW7zs26jewKThPZj9NjPj3F54xXfV9EpN0eSThGeRZtQECFKlwIYQYV
 AZwo/Eq9k3u21sjeY1+PRALzSJMhVGMkuSaUh99wUTvWE7qFSs52RIT/MsF8CnvQtpDG6Q+0d
 TRvCs5SSSprFeZCZbPo3av8C5UHQ425NbwhMxYftel72QHl85oV7/p0WzCs+p0gltgDjewI3g
 JSldU3ZaRDfRo8TWeix5nsF56xjS7/l/I/bssmQ5RfjMCjc6xxASuXHdIYcu0mXCzjCEE3s6X
 b/WV7tgqNc/HS3c1o5tkuX5Wm/1FnDbUPq4TX+3rSGuVYdr1e8FHVi7JkZM23fYjq/AFX64kb
 bgndVhJ0RO39dtewF5Sm1oOMdYxuCEsNAgMcmU+0+CgKnn/mzSpZwOkix5jcnPHFx5NVHlXwe
 wpDUDdqlWXI975gneRJ78GJcvW37NIpkKmyOdWLfB3yYcGu4P6bvI1hcjFOGQjczVA0AYxfv7
 EruXsZJJAFyeA4ZGAS/PSboA5r99ei8Y1rIboGKUV7KZZhCHGpuW92bZOdyyHEdJ5uUbxTAOR
 H/gPIeXPNdHiIikDxyYanO1Ppa46SGTx2a0lrk+BvYibF4u853yfAezYAWfN3GH+X8XLuzi9N
 ks0l8FjvjCEx03tASim7v4hf5uctRCcS3LAaltEdgJa9YpLFGcd2dNquBdO+pdyYNZkE4E017
 1kRe7M3Y+BV1EK5aj9Ov4+6i5xcFH/IlP091SKpH3KT2ihWhN5glLduKqsU2fk0nw8RapMI8c
 jbfyKvvtK0JvqChwfQouP0uxRjCF7TsFPgbF1hmqBV3fJ7j4dOkpQURgB9nN1XqZfMNbVGxOm
 o3JV/TFWEsFboDt0zOpYBI7NXlZp3Q3fdBmGZQsKzMhIF/Asor1+7QcLnun0BouVrmO+vy36y
 4GV0vuxpUnPX5TRVMwQ0ml6od2zNhQLtpqgEQa+OQ5mwexlmQCQFJ/HJPD/j/cits6l4QZWPy
 0SH6cvkC3Bh9s1jw0Unf77oqlUbUGFLtnQgfWg9qxIkKxW8zOY/Eu569HxfV30ZJCOKECQmcW
 5W2pvMc5LQGZSsJwV2IxnmViTlGUaeq2N3Bx6GMSI0t7s4fGPlj0jfBHzodFnc7dVbfMCWubO
 8ha/trQ/k+b4z8pI2tujFDyPFGk27CuhC5geNxNunjuG7WqeYswStCpVKdfijEy90tdJecL5E
 E+UejgL0mz6duryuW8RIDZ+DJsYHsbXEhkRrnhyL+UjGB8ISQ5qlPUEczWMtoCB10dbn0fTDu
 uniCk7U2zp8s8le5P9Y6KUisZnoe3NjuvWWwFQvzclBNCJ/tee0keHfvAyb4O7N97Dhb2/1MV
 zP+5s0LE29lFZMiAZqR2bZje2vSzGcYn6F6CIYWwrnJkGJAmM
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > I didn't alter tab-bar-mode to tab-bar-lines as Martin
 > suggested.

When did I suggest that?  IIRC I only said that I don't know which of
the two you wanted to fix.

martin





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 21:27:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 17:27:38 2025
Received: from localhost ([127.0.0.1]:43196 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzMfR-0004CY-Qu
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 17:27:38 -0400
Received: from mail-ua1-x92d.google.com ([2607:f8b0:4864:20::92d]:60482)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzMfO-0004Bo-VU
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 17:27:36 -0400
Received: by mail-ua1-x92d.google.com with SMTP id
 a1e0cc1a2514c-86feb848764so2209367241.0
 for <71386 <at> debbugs.gnu.org>; Mon, 31 Mar 2025 14:27:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743456449; x=1744061249; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=1B83gTRFOrfHYQOYQt6JTUUx4gpNidk3S6tO+czCfkk=;
 b=Ejtcu7MWQv2KSp7M4j2s5A264TVi8m9OcPUBVeayBLCKKGiT+qJJNWPHhcxTV1QJll
 4OXQnrIekQcdPQbcRjaRbQHH7mCnM3tP+oA8P5LCvmOLe5/zgiUKpUGfBQQGJoaz+a69
 eAyinEUp+fZALSTpuaYvVkCsOhIfnDE8eQPVIrtutxOSz3HUiab5108D/NvrzhRA222i
 fwSx76IwYj3Vb+I8iKIZzOwEdOed0NLtv9R5IDggpRVvkl+EBo4FsOFSAyicEWwHSxIx
 5beQjkMTGnZFZ0BPj4vULpGbcrcTa0cLqhopk+oA8Bz/wBKI/c8c5rv0ACHp/TB8VYzh
 TktA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743456449; x=1744061249;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=1B83gTRFOrfHYQOYQt6JTUUx4gpNidk3S6tO+czCfkk=;
 b=Xe8ZZ/D9NKbL9Am60Byn99Nqgh0JzBABaojEvjp5jNFPQ8HNFANsKFBBllElH7gGa8
 bUaWux8BI3p8aWttzfrCPD4iGdvH/rMqbLVHHmVbvmYZPes7asWAhXkHm++tWQWw96Pf
 6PpyfTYP5JA1XPnyFzZHw1twb+D0Q/rih5SRA4WgN45FRjG8DdhaPORVXxPtOR8uvsv/
 75+nD3qiAU3nOjtJVNWVUQiM2V6jhH32JlChr8MJLwMY9dRztkTRyBdt7uW4LtLHDtxa
 CJlp77onE4sy4SKPCHLT1WpQ7g8sG2LZgSvkD18A6Uc8IH6Wo7Ko0RHlof9caj6wXCJU
 DtwQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCWktAJIzq4gJdCbNrcbxbJupZ/Iy3k+/bJEuzYEHW9xOtXOZVK9m7Mikkci6fZWgYww9Ef2wg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwjroNo1ILapKYhiaJwoZNpfuxG8tsHJ9RLFimYmOZsBVfAAjXK
 /tsCCqdNqGFP0kmw5vhjeQkpDwdsfJjcNOekw/psd//FRUIl/Mt26Iq6lE/CKUv1PcVde8gx/Xt
 H2C5N5P4DAcqI2NRCpb3GYzO1d2I=
X-Gm-Gg: ASbGncunmJl9X7NGA6DwEx/GZ8uOAGJ+CQ37u4DuUeAQrPJNUl9ToKPdFaguCWHlCj7
 26/wBEiDjs8s7ekc/7GrLwt71K1WfLZio9iDuQ6PW+HWRgUysnkEKT+DXBxn9BpdPNTQ/chlj5l
 qSe1s/S8dKVa3Pf3zyBytgm2AdmA==
X-Google-Smtp-Source: AGHT+IE9z+OV7/okn0FNt/gfeGhpcgvfv1hwS/uX/rGAqfzZsBeDz04RHKFrLEW9mxOqts0q8vBzhp4v1YBBwijvZdI=
X-Received: by 2002:a05:6102:14a8:b0:4bb:d062:455 with SMTP id
 ada2fe7eead31-4c6d35ed894mr7906131137.0.1743456449260; Mon, 31 Mar 2025
 14:27:29 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
 <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
In-Reply-To: <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Mon, 31 Mar 2025 17:27:17 -0400
X-Gm-Features: AQ5f1Jq3j6eI26qe3U0hOUjMv1_AqXJazbLYSEJW8JozhGcMWy3Mj_H33Fbb0Kk
Message-ID: <CAN+1Hbq+WRER2dJx2NUkcRCNrjO=LmC6p6TeUhDUYtnaPyW+nw@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/mixed; boundary="00000000000057137c0631aa1619"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000057137c0631aa1619
Content-Type: multipart/alternative; boundary="00000000000057137b0631aa1617"

--00000000000057137b0631aa1617
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 31, 2025 at 3:31=E2=80=AFPM Ship Mints <shipmints@HIDDEN> wr=
ote:

> On Mon, Mar 31, 2025 at 2:59=E2=80=AFPM Juri Linkov <juri@HIDDEN> wro=
te:
>
>> > I thought Martin agreed that we don't need `(window-dedicated-p
>> window)` in
>> > `window-deleteable-p`?  That makes my use case work.  Or are you waiti=
ng
>> > for the test case and do you want that stand alone or in the test suit=
e?
>>
>> Currently we have such test:
>>
>>     ;; 3. Don't delete the frame with dedicated window
>>     ;; from the second tab (bug#71386)
>>     (with-selected-frame (make-frame frame-params)
>>       (switch-to-buffer (generate-new-buffer "test1"))
>>       (tab-new)
>>       (switch-to-buffer (generate-new-buffer "test2"))
>>       (set-window-dedicated-p (selected-window) t)
>>       (kill-buffer)
>>       (should (eq (length (frame-list)) 2))
>>       (should (eq (length (tab-bar-tabs)) 1))
>>       ;; But now should delete the frame with dedicated window
>>       ;; from the last tab
>>       (set-window-dedicated-p (selected-window) t)
>>       (kill-buffer)
>>       (should (eq (length (frame-list)) 1)))
>>
>> So you propose to remove the line with 'set-window-dedicated-p', right?
>>
>
> Not quite.  The test that simulates the environment I find frames being
> deleted in is more like this:
>
> (setq switch-to-prev-buffer-skip #'always)
> (setq kill-buffer-quit-windows nil)
> (tab-bar-mode)
> (select-frame-set-input-focus (make-frame))
> (switch-to-buffer "FOO")
> (tab-bar-new-tab)
> (switch-to-buffer "BAR")
> (set-window-prev-buffers nil nil) ; Martin said this is the moral
> equivalent of window-dedicated-p, but not technically
> ;; (kill-buffer)
>
> The suggestion about removing the dedicated window condition is in
> `window-deletable-p` here which could be left in place as long as the cas=
e
> representing the above scenario is also accounted for.
>
>      ((and tab-bar-mode
>            ;; Fall back to frame handling in case of less than 2 tabs
>            (> (length (funcall tab-bar-tabs-function frame)) 1)
>            ;; Close the tab with the initial window (bug#59862)
>            (or (eq (nth 1 (window-parameter window 'quit-restore)) 'tab)
>                ;; or with the dedicated window (bug#71386)
>                (and (window-dedicated-p window) ; <=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>                     (frame-root-window-p window)))
>            ;; Don't close the tab if more windows were created explicitly
>            (< (seq-count (lambda (w)
>                            (memq (car (window-parameter w 'quit-restore))
>                                  '(window tab frame same)))
>                          (window-list-1 nil 'nomini))
>               2))
>       'tab)
>

WIP patch attached with a test and some few refinements we've talked about
in this dialog.  I didn't alter tab-bar-mode to tab-bar-lines as Martin
suggested.  You're the expert.

-Stephane

--00000000000057137b0631aa1617
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Mon, Mar 31, 2025 at 3:31=E2=80=AFPM Ship Mints &lt;<a href=3D"mailto:sh=
ipmints@HIDDEN">shipmints@HIDDEN</a>&gt; wrote:</span></div></div><di=
v class=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div style=3D"font-f=
amily:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">On =
Mon, Mar 31, 2025 at 2:59=E2=80=AFPM Juri Linkov &lt;<a href=3D"mailto:juri=
@linkov.net" target=3D"_blank">juri@HIDDEN</a>&gt; wrote:</span></div><=
/div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"=
margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef=
t:1ex">&gt; I thought Martin agreed that we don&#39;t need `(window-dedicat=
ed-p window)` in<br>
&gt; `window-deleteable-p`?=C2=A0 That makes my use case work.=C2=A0 Or are=
 you waiting<br>
&gt; for the test case and do you want that stand alone or in the test suit=
e?<br>
<br>
Currently we have such test:<br>
<br>
=C2=A0 =C2=A0 ;; 3. Don&#39;t delete the frame with dedicated window<br>
=C2=A0 =C2=A0 ;; from the second tab (bug#71386)<br>
=C2=A0 =C2=A0 (with-selected-frame (make-frame frame-params)<br>
=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer (generate-new-buffer &quot;test1&quo=
t;))<br>
=C2=A0 =C2=A0 =C2=A0 (tab-new)<br>
=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer (generate-new-buffer &quot;test2&quo=
t;))<br>
=C2=A0 =C2=A0 =C2=A0 (set-window-dedicated-p (selected-window) t)<br>
=C2=A0 =C2=A0 =C2=A0 (kill-buffer)<br>
=C2=A0 =C2=A0 =C2=A0 (should (eq (length (frame-list)) 2))<br>
=C2=A0 =C2=A0 =C2=A0 (should (eq (length (tab-bar-tabs)) 1))<br>
=C2=A0 =C2=A0 =C2=A0 ;; But now should delete the frame with dedicated wind=
ow<br>
=C2=A0 =C2=A0 =C2=A0 ;; from the last tab<br>
=C2=A0 =C2=A0 =C2=A0 (set-window-dedicated-p (selected-window) t)<br>
=C2=A0 =C2=A0 =C2=A0 (kill-buffer)<br>
=C2=A0 =C2=A0 =C2=A0 (should (eq (length (frame-list)) 1)))<br>
<br>
So you propose to remove the line with &#39;set-window-dedicated-p&#39;, ri=
ght?<br></blockquote><div><br></div><div style=3D"font-family:monospace">No=
t quite.=C2=A0 The test that simulates the environment I find frames being =
deleted in is more like this:</div><div style=3D"font-family:monospace"><br=
></div><div style=3D"font-family:monospace">(setq switch-to-prev-buffer-ski=
p #&#39;always)<br>(setq kill-buffer-quit-windows nil)<br>(tab-bar-mode)<br=
>(select-frame-set-input-focus (make-frame))<br>(switch-to-buffer &quot;FOO=
&quot;)<br>(tab-bar-new-tab)<br>(switch-to-buffer &quot;BAR&quot;)<br>(set-=
window-prev-buffers nil nil) ; Martin said this is the moral equivalent of =
window-dedicated-p, but not technically<br>;; (kill-buffer)<br></div><div s=
tyle=3D"font-family:monospace"><br></div><div style=3D"font-family:monospac=
e">The suggestion about removing the dedicated window condition is in `wind=
ow-deletable-p` here which could be left in place as long as the case repre=
senting the above scenario is also accounted for.</div><div style=3D"font-f=
amily:monospace"><br></div><div style=3D"font-family:monospace">=C2=A0 =C2=
=A0 =C2=A0((and tab-bar-mode<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;;=
 Fall back to frame handling in case of less than 2 tabs<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0(&gt; (length (funcall tab-bar-tabs-function fra=
me)) 1)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Close the tab with t=
he initial window (bug#59862)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(=
or (eq (nth 1 (window-parameter window &#39;quit-restore)) &#39;tab)<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; or with the dedicate=
d window (bug#71386)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0(and (window-dedicated-p window) ; &lt;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (frame-root-window-p window)))<br=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Don&#39;t close the tab if mor=
e windows were created explicitly<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0(&lt; (seq-count (lambda (w)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(memq (car (wind=
ow-parameter w &#39;quit-restore))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;(window tab frame same)))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(window-list-1 n=
il &#39;nomini))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2))<br=
>=C2=A0 =C2=A0 =C2=A0 &#39;tab)<br></div></div></div></blockquote><div><br>=
</div><div class=3D"gmail_default" style=3D"font-family:monospace">WIP patc=
h attached with a test and some few refinements we&#39;ve talked about in t=
his dialog.=C2=A0 I didn&#39;t alter tab-bar-mode to tab-bar-lines as Marti=
n suggested.=C2=A0 You&#39;re the expert.</div><div class=3D"gmail_default"=
 style=3D"font-family:monospace"><br></div><div class=3D"gmail_default" sty=
le=3D"font-family:monospace">-Stephane</div></div></div>

--00000000000057137b0631aa1617--

--00000000000057137c0631aa1619
Content-Type: application/octet-stream; 
	name="0001-Refining-logic-of-tab-handling-when-quitting-windows.patch"
Content-Disposition: attachment; 
	filename="0001-Refining-logic-of-tab-handling-when-quitting-windows.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_m8xky0jp0>
X-Attachment-Id: f_m8xky0jp0

RnJvbSBiODlmNWIzOTY3YjExYjYzMjJiZjJmM2UzYzgyMTExY2M3ZjFjMTRkIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBzaGlwbWludHMgPHNoaXBtaW50c0BnbWFpbC5jb20+CkRhdGU6
IE1vbiwgMzEgTWFyIDIwMjUgMTc6MTU6MTIgLTA0MDAKU3ViamVjdDogW1BBVENIXSBSZWZpbmlu
ZyBsb2dpYyBvZiB0YWIgaGFuZGxpbmcgd2hlbiBxdWl0dGluZyB3aW5kb3dzCiAoYnVnIzcxMzg2
KQoKKiBsaXNwL3dpbmRvdy5lbCAod2luZG93LWRlbGV0YWJsZS1mdW5jdGlvbnMpOgood2luZG93
LWRlbGV0ZS1hY3RpdmUtdGFicy1pbmhpYml0LWRlbGV0ZS1mcmFtZSk6IE5ldyBkZWZjdXN0b20u
Cih3aW5kb3ctZGVsZXRhYmxlLXApOiBDb25zdWx0CndpbmRvdy1kZWxldGUtYWN0aXZlLXRhYnMt
aW5oaWJpdC1kZWxldGUtZnJhbWUgVXBkYXRlZCBkb2NzdHJpbmcgdG8gYWRkICd0YWIuCih3aW5k
b3ctLWRlbGV0ZSk6IEluaGliaXQgJ3RhYi1iYXItdGFiLXByZXZlbnQtY2xvc2UtZnVuY3Rpb25z
Jwp3aGVuIGNhbGxpbmcgJ3RhYi1iYXItY2xvc2UtdGFiJyB0byBmb3JjZSB0aGUgdGFiIHRvIGNs
b3NlLgoKKiB0ZXN0L2xpc3AvdGFiLWJhci10ZXN0cy5lbCAodGFiLWJhci10ZXN0cy1xdWl0LXJl
c3RvcmUtd2luZG93KToKTmV3IHRlc3QgdGVzdCBmb3IgJ2RlbGV0ZS1mcmFtZScgZm9yIHBzZXVk
by1kZWRpY2F0ZWQgd2luZG93cy4KLS0tCiBsaXNwL3dpbmRvdy5lbCAgICAgICAgICAgICB8IDIz
ICsrKysrKysrKysrKysrKysrLS0tLQogdGVzdC9saXNwL3RhYi1iYXItdGVzdHMuZWwgfCA0MiAr
KysrKysrKysrKysrKysrKysrKysrKysrKystLS0tLS0tLS0tLQogMiBmaWxlcyBjaGFuZ2VkLCA0
OSBpbnNlcnRpb25zKCspLCAxNiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saXNwL3dpbmRv
dy5lbCBiL2xpc3Avd2luZG93LmVsCmluZGV4IDFiNWFkMzRkYzE5Li5kODM5MTY2ZDA5MyAxMDA2
NDQKLS0tIGEvbGlzcC93aW5kb3cuZWwKKysrIGIvbGlzcC93aW5kb3cuZWwKQEAgLTQxNDksNyAr
NDE0OSw3IEBAIG9uZS13aW5kb3ctcAogDAogOzs7IERlbGV0aW5nIHdpbmRvd3MuCiAoZGVmY3Vz
dG9tIHdpbmRvdy1kZWxldGFibGUtZnVuY3Rpb25zIG5pbAotICAgIkFibm9ybWFsIGhvb2sgdG8g
ZGVjaWRlIHdoZXRoZXIgYSB3aW5kb3cgbWF5IGJlIGltcGxpY2l0bHkgZGVsZXRlZC4KKyAgIkFi
bm9ybWFsIGhvb2sgdG8gZGVjaWRlIHdoZXRoZXIgYSB3aW5kb3cgbWF5IGJlIGltcGxpY2l0bHkg
ZGVsZXRlZC4KIFRoZSB2YWx1ZSBzaG91bGQgYmUgYSBsaXN0IG9mIGZ1bmN0aW9ucyB0aGF0IHRh
a2UgdHdvIGFyZ3VtZW50cy4gIFRoZQogZmlyc3QgYXJndW1lbnQgaXMgdGhlIHdpbmRvdyBhYm91
dCB0byBiZSBkZWxldGVkLiAgVGhlIHNlY29uZCBhcmd1bWVudAogaWYgbm9uLW5pbCwgbWVhbnMg
dGhhdCB0aGUgd2luZG93IGlzIHRoZSBvbmx5IHdpbmRvdyBvbiBpdHMgZnJhbWUgYW5kCkBAIC00
MTY3LDYgKzQxNjcsMTUgQEAgd2luZG93LWRlbGV0YWJsZS1mdW5jdGlvbnMKICAgOnZlcnNpb24g
IjMxLjEiCiAgIDpncm91cCAnd2luZG93cykKIAorKGRlZmN1c3RvbSB3aW5kb3ctZGVsZXRlLWFj
dGl2ZS10YWJzLWluaGliaXQtZGVsZXRlLWZyYW1lIG5pbAorICAiSWYgbm9uLW5pbCwgaW5oaWJp
dCBgZGVsZXRlLWZyYW1lJyB3aXRoIG1vcmUgdGhhbiBvbmUgYWN0aXZlIHRhYi4KK1RoZSB3aW5k
b3cncyB0YWIgd2lsbCBiZSBjbG9zZWQsIGFuZCBhbm90aGVyIHRhYiB3aWxsIGJlIG9wZW5lZCB0
bworcmVwbGFjZSBpdCwgYXMgc3BlY2lmaWVkIGluIHRoZSBvcHRpb24gYHRhYi1iYXItY2xvc2Ut
dGFiLXNlbGVjdCcuCitUaGlzIG9wdGlvbiBpcyBjb25zdWx0ZWQgYnkgYHdpbmRvdy1kZWxldGFi
bGUtcCcuIgorICA6dHlwZSAnKHJlcGVhdCBmdW5jdGlvbikKKyAgOmdyb3VwICd3aW5kb3dzCisg
IDp2ZXJzaW9uICIzMS4xIikKKwogKGRlZnVuIHdpbmRvdy1kZWxldGFibGUtcCAoJm9wdGlvbmFs
IHdpbmRvdyBuby1ydW4pCiAgICJSZXR1cm4gdCBpZiBXSU5ET1cgY2FuIGJlIHNhZmVseSBkZWxl
dGVkIGZyb20gaXRzIGZyYW1lLgogV0lORE9XIG11c3QgYmUgYSB2YWxpZCB3aW5kb3cgYW5kIGRl
ZmF1bHRzIHRvIHRoZSBzZWxlY3RlZCBvbmUuCkBAIC00MTc0LDYgKzQxODMsMTAgQEAgd2luZG93
LWRlbGV0YWJsZS1wCiBSZXR1cm4gYGZyYW1lJyBpZiBXSU5ET1cgaXMgdGhlIHJvb3Qgd2luZG93
IG9mIGl0cyBmcmFtZSBhbmQgdGhhdAogZnJhbWUgY2FuIGJlIHNhZmVseSBkZWxldGVkLgogCitS
ZXR1cm4gYHRhYicgaWYgdGhlIG9wdGlvbiBgd2luZG93LWRlbGV0ZS1hY3RpdmUtdGFicy1pbmhp
Yml0LWRlbGV0ZS1mcmFtZScKK2lzIG5vbi1uaWwsIGFuZCBXSU5ET1cgaXMgaW4gYSBmcmFtZSB3
aXRoIG1vcmUgdGhhbiBvbmUgYWN0aXZlIGB0YWItYmFyYAordGFiLCBhbmQgV0lORE9XJ3MgdGFi
IGNhbiBiZSBjbG9zZWQgYW5kIHJlcGxhY2VkIGJ5IGEgcmVtYWluaW5nIHRhYi4KKwogVW5sZXNz
IHRoZSBvcHRpb25hbCBhcmd1bWVudCBOTy1SVU4gaXMgbm9uLW5pbCwgcnVuIHRoZSBhYm5vcm1h
bCBob29rCiBgd2luZG93LWRlbGV0YWJsZS1mdW5jdGlvbnMnIGFuZCByZXR1cm4gbmlsIGlmIGFu
eSBmdW5jdGlvbiBvbiB0aGF0IGhvb2sKIHJldHVybnMgbmlsLiIKQEAgLTQxODcsNyArNDIwMCw4
IEBAIHdpbmRvdy1kZWxldGFibGUtcAogCiAgIChsZXQgKChmcmFtZSAod2luZG93LWZyYW1lIHdp
bmRvdykpKQogICAgIChjb25kCi0gICAgICgoYW5kIHRhYi1iYXItbW9kZQorICAgICAoKGFuZCB3
aW5kb3ctZGVsZXRlLWFjdGl2ZS10YWJzLWluaGliaXQtZGVsZXRlLWZyYW1lCisgICAgICAgICAg
IHRhYi1iYXItbW9kZQogICAgICAgICAgICA7OyBGYWxsIGJhY2sgdG8gZnJhbWUgaGFuZGxpbmcg
aW4gY2FzZSBvZiBsZXNzIHRoYW4gMiB0YWJzCiAgICAgICAgICAgICg+IChsZW5ndGggKGZ1bmNh
bGwgdGFiLWJhci10YWJzLWZ1bmN0aW9uIGZyYW1lKSkgMSkKICAgICAgICAgICAgOzsgQ2xvc2Ug
dGhlIHRhYiB3aXRoIHRoZSBpbml0aWFsIHdpbmRvdyAoYnVnIzU5ODYyKQpAQCAtNTAzOCw4ICs1
MDUyLDkgQEAgd2luZG93LS1kZWxldGUKICAgICAobGV0ICgoZGVsZXRhYmxlICh3aW5kb3ctZGVs
ZXRhYmxlLXAgd2luZG93KSkpCiAgICAgICAoY29uZAogICAgICAgICgoZXEgZGVsZXRhYmxlICd0
YWIpCi0gICAgICAgICh0YWItYmFyLWNsb3NlLXRhYikKLSAgICAgICAgKG1lc3NhZ2UgIlRhYiBj
bG9zZWQgYWZ0ZXIgZGVsZXRpbmcgdGhlIGxhc3Qgd2luZG93IikKKyAgICAgICAgKGxldCAodGFi
LWJhci10YWItcHJldmVudC1jbG9zZS1mdW5jdGlvbnMpCisgICAgICAgICAgKHRhYi1iYXItY2xv
c2UtdGFiKSkKKyAgICAgICAgKG1lc3NhZ2UgIlRhYiBjbG9zZWQgYWZ0ZXIgZGVsZXRpbmcgaXRz
IGxhc3Qgd2luZG93IikKICAgICAgICAgJ3RhYikKICAgICAgICAoKGVxIGRlbGV0YWJsZSAnZnJh
bWUpCiAJKGxldCAoKGZyYW1lICh3aW5kb3ctZnJhbWUgd2luZG93KSkpCmRpZmYgLS1naXQgYS90
ZXN0L2xpc3AvdGFiLWJhci10ZXN0cy5lbCBiL3Rlc3QvbGlzcC90YWItYmFyLXRlc3RzLmVsCmlu
ZGV4IGMwZTEyY2YxNTljLi41MzBkYjBlNjk5ZSAxMDA2NDQKLS0tIGEvdGVzdC9saXNwL3RhYi1i
YXItdGVzdHMuZWwKKysrIGIvdGVzdC9saXNwL3RhYi1iYXItdGVzdHMuZWwKQEAgLTEzNywxOCAr
MTM3LDM2IEBAIHRhYi1iYXItdGVzdHMtcXVpdC1yZXN0b3JlLXdpbmRvdwogICAgIDs7IDMuIERv
bid0IGRlbGV0ZSB0aGUgZnJhbWUgd2l0aCBkZWRpY2F0ZWQgd2luZG93CiAgICAgOzsgZnJvbSB0
aGUgc2Vjb25kIHRhYiAoYnVnIzcxMzg2KQogICAgICh3aXRoLXNlbGVjdGVkLWZyYW1lIChtYWtl
LWZyYW1lIGZyYW1lLXBhcmFtcykKLSAgICAgIChzd2l0Y2gtdG8tYnVmZmVyIChnZW5lcmF0ZS1u
ZXctYnVmZmVyICJ0ZXN0MSIpKQotICAgICAgKHRhYi1uZXcpCi0gICAgICAoc3dpdGNoLXRvLWJ1
ZmZlciAoZ2VuZXJhdGUtbmV3LWJ1ZmZlciAidGVzdDIiKSkKLSAgICAgIChzZXQtd2luZG93LWRl
ZGljYXRlZC1wIChzZWxlY3RlZC13aW5kb3cpIHQpCi0gICAgICAoa2lsbC1idWZmZXIpCi0gICAg
ICAoc2hvdWxkIChlcSAobGVuZ3RoIChmcmFtZS1saXN0KSkgMikpCi0gICAgICAoc2hvdWxkIChl
cSAobGVuZ3RoICh0YWItYmFyLXRhYnMpKSAxKSkKLSAgICAgIDs7IEJ1dCBub3cgc2hvdWxkIGRl
bGV0ZSB0aGUgZnJhbWUgd2l0aCBkZWRpY2F0ZWQgd2luZG93Ci0gICAgICA7OyBmcm9tIHRoZSBs
YXN0IHRhYgotICAgICAgKHNldC13aW5kb3ctZGVkaWNhdGVkLXAgKHNlbGVjdGVkLXdpbmRvdykg
dCkKLSAgICAgIChraWxsLWJ1ZmZlcikKLSAgICAgIChzaG91bGQgKGVxIChsZW5ndGggKGZyYW1l
LWxpc3QpKSAxKSkpCisgICAgICAobGV0ICgod2luZG93LWRlbGV0ZS1hY3RpdmUtdGFicy1pbmhp
Yml0LWRlbGV0ZS1mcmFtZSB0KSkKKyAgICAgICAgKHN3aXRjaC10by1idWZmZXIgKGdlbmVyYXRl
LW5ldy1idWZmZXIgInRlc3QxIikpCisgICAgICAgICh0YWItbmV3KQorICAgICAgICAoc3dpdGNo
LXRvLWJ1ZmZlciAoZ2VuZXJhdGUtbmV3LWJ1ZmZlciAidGVzdDIiKSkKKyAgICAgICAgKHNldC13
aW5kb3ctZGVkaWNhdGVkLXAgKHNlbGVjdGVkLXdpbmRvdykgdCkKKyAgICAgICAgKGtpbGwtYnVm
ZmVyKQorICAgICAgICAoc2hvdWxkIChlcSAobGVuZ3RoIChmcmFtZS1saXN0KSkgMikpCisgICAg
ICAgIChzaG91bGQgKGVxIChsZW5ndGggKHRhYi1iYXItdGFicykpIDEpKQorICAgICAgICA7OyBC
dXQgbm93IHNob3VsZCBkZWxldGUgdGhlIGZyYW1lIHdpdGggZGVkaWNhdGVkIHdpbmRvdworICAg
ICAgICA7OyBmcm9tIHRoZSBsYXN0IHRhYgorICAgICAgICAoc2V0LXdpbmRvdy1kZWRpY2F0ZWQt
cCAoc2VsZWN0ZWQtd2luZG93KSB0KQorICAgICAgICAoa2lsbC1idWZmZXIpCisgICAgICAgIChz
aG91bGQgKGVxIChsZW5ndGggKGZyYW1lLWxpc3QpKSAxKSkpKQorCisgICAgOzsgMy4gRG9uJ3Qg
ZGVsZXRlIHRoZSBmcmFtZSB3aXRoIGEgcHNldWRvLWRlZGljYXRlZCB3aW5kb3cKKyAgICA7OyBm
cm9tIHRoZSBzZWNvbmQgdGFiIChidWcjNzEzODYpCisgICAgKHdpdGgtc2VsZWN0ZWQtZnJhbWUg
KG1ha2UtZnJhbWUgZnJhbWUtcGFyYW1zKQorICAgICAgKGxldCAoKHdpbmRvdy1kZWxldGUtYWN0
aXZlLXRhYnMtaW5oaWJpdC1kZWxldGUtZnJhbWUgdCkKKyAgICAgICAgICAgIChzd2l0Y2gtdG8t
cHJldi1idWZmZXItc2tpcCAjJ2Fsd2F5cykKKyAgICAgICAgICAgIChraWxsLWJ1ZmZlci1xdWl0
LXdpbmRvd3MgbmlsKSkKKyAgICAgICAgKHN3aXRjaC10by1idWZmZXIgKGdlbmVyYXRlLW5ldy1i
dWZmZXIgInRlc3QxIikpCisgICAgICAgICh0YWItYmFyLW5ldy10YWIpCisgICAgICAgIChzd2l0
Y2gtdG8tYnVmZmVyIChnZW5lcmF0ZS1uZXctYnVmZmVyICJ0ZXN0MiIpKQorICAgICAgICAoc2V0
LXdpbmRvdy1wcmV2LWJ1ZmZlcnMgbmlsIG5pbCkKKyAgICAgICAgOzsgS2lsbGluZyB0aGUgYnVm
ZmVyIHNob3VsZCBjbG9zZSB0aGUgdGFiLCBsZWF2ZSBvbmUgb3BlbiB0YWIsCisgICAgICAgIDs7
IGFuZCBub3QgZGVsZXRlIHRoZSBmcmFtZS4KKyAgICAgICAgKGtpbGwtYnVmZmVyKQorICAgICAg
ICAoc2hvdWxkIChlcSAobGVuZ3RoICh0YWItYmFyLXRhYnMpKSAxKSkKKyAgICAgICAgKHNob3Vs
ZCAoZXEgKGxlbmd0aCAoZnJhbWUtbGlzdCkpIDIpKQorICAgICAgICAoZGVsZXRlLWZyYW1lKSkp
CiAKICAgICA7OyBDbGVhbiB1cCB0YWJzIGFmdGVyd2FyZHMKICAgICAodGFiLWJhci10YWJzLXNl
dCBuaWwpKSkKLS0gCjIuNDcuMQoK
--00000000000057137c0631aa1619--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 19:31:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 15:31:30 2025
Received: from localhost ([127.0.0.1]:42933 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzKr3-0002q7-Lx
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 15:31:30 -0400
Received: from mail-vk1-xa33.google.com ([2607:f8b0:4864:20::a33]:54402)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzKr1-0002pQ-BJ
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 15:31:28 -0400
Received: by mail-vk1-xa33.google.com with SMTP id
 71dfb90a1353d-52617ceae0dso732470e0c.0
 for <71386 <at> debbugs.gnu.org>; Mon, 31 Mar 2025 12:31:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743449481; x=1744054281; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=d80zxRivu+q6RVTeVaInIozkBccw0sHOM1gHWOYfw/U=;
 b=HocQFTIcW/0OAjRlP7zcOQ8n/flXQ8JZjMyo1HGX+IT+gCkWnFWMT2bMkCU4xKh5Nu
 DOYgyWeVB41ug3Qm2swmhyer6zA9AR2SS1iwmEM1M814WUidFo2qjoQBD+y4187YzXkE
 TklqGTa/jsBktCdmUWqMyf2ngq/6ijAdie7nMEPYnJ14tKUor4EuX7begTG7tWnOhz/C
 COgDOP/sYeFQR6L2MP7kjKyzQZUcgq/z+AyvhtbD02ZL5FNwd35/sT/4FmsBrxC0sZoD
 QKu5JY1GTnuvCavbNLf8LdaaTHajgbqzJUMcfOsY4GYS1lHx9FkBh3hCmSsUKdnKU/ph
 5UOQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743449481; x=1744054281;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=d80zxRivu+q6RVTeVaInIozkBccw0sHOM1gHWOYfw/U=;
 b=g2CwLounriS3UiwA6aA+yw4DNVv3JUURfdi8Z9qM5Dvq74chSF8e98Nh5trqtJhCUB
 MX84N009z8N+2myj5RFVATmip6UAvdi3ta7RS1q0LX0aq5vKs8nG925qnQsFei1KgjKq
 SlecAWQSWijEWatLHCSRA8NEFOPN+JJMWw/wCmkSov2bWIwqf4okUZgOiIBan5kWKxCo
 1PJxVsiFTmhUCppN7Apa5fsQw5O/SvNQJDcJnHk8GK9rApqVLwTM8NFKZNy0lYaabYPo
 lg4PA5dnShg35MAL2dIr8ytl5S2QMLQmrTM5MHvtLNo8J48PdHYictziRKgsR4EkrmBJ
 dScQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCUN8XPKiRkhtMrsYZBdoZh0RKAp8e/SYTYiGmyGMUkDkw5I0cXhhQohOLYId64MrDK8T7wC0A==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwGFmimXFfv7fBl1gI+bOCLEf2DUxdy2kcvt5DPM8JvAci5+oTA
 1584r82Y6JrZOz3rkfybGfuV7buqtQ1gfKzGr+htaE7bBnJT+fP3+ifVDsedJAKKa3dtFhbpSxR
 ESVjmRVBURBrEuevvJFvJS7NYhxB1vEN6
X-Gm-Gg: ASbGncvUq+2Vf8LK7aNfCvFOEiEP3uhvA1TBIL+TcLjkD0oiJtbRh0rYVH5PFbarv/Z
 aKF+8wLEwaaWkIfkA0XQaHOuSC6d7swnOEnWcwLbK+ynLMZV2LysiYqTBtpHyh/S7XGD+jV7tAQ
 UfWldgiK0y+pCihCBz9EG/sPSesg==
X-Google-Smtp-Source: AGHT+IHsg18FEyllI9pBysrs7osjRQupG5h4y07xYx6oCbIETdCJGy6ERQTfdkYXXX3gFc5tfONqdp2zVJ4AhntCznM=
X-Received: by 2002:a05:6122:c8b:b0:520:6773:e5ea with SMTP id
 71dfb90a1353d-5261d476509mr5892913e0c.7.1743449481701; Mon, 31 Mar 2025
 12:31:21 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
 <87o6xht4ai.fsf@HIDDEN>
In-Reply-To: <87o6xht4ai.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Mon, 31 Mar 2025 15:31:10 -0400
X-Gm-Features: AQ5f1Jrl6A9QX7wjqTI4QZCFq1Q4uY-wK1u3Zo7Xw-MRmtE6FyRGsO-Uw2Sr8AY
Message-ID: <CAN+1Hbp-4PAT3GsEEZ3CJXFAefzEDOCffv9pTC3vXx8NTXVbUQ@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000000a6f680631a87756"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000000a6f680631a87756
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 31, 2025 at 2:59=E2=80=AFPM Juri Linkov <juri@HIDDEN> wrote=
:

> > I thought Martin agreed that we don't need `(window-dedicated-p window)=
`
> in
> > `window-deleteable-p`?  That makes my use case work.  Or are you waitin=
g
> > for the test case and do you want that stand alone or in the test suite=
?
>
> Currently we have such test:
>
>     ;; 3. Don't delete the frame with dedicated window
>     ;; from the second tab (bug#71386)
>     (with-selected-frame (make-frame frame-params)
>       (switch-to-buffer (generate-new-buffer "test1"))
>       (tab-new)
>       (switch-to-buffer (generate-new-buffer "test2"))
>       (set-window-dedicated-p (selected-window) t)
>       (kill-buffer)
>       (should (eq (length (frame-list)) 2))
>       (should (eq (length (tab-bar-tabs)) 1))
>       ;; But now should delete the frame with dedicated window
>       ;; from the last tab
>       (set-window-dedicated-p (selected-window) t)
>       (kill-buffer)
>       (should (eq (length (frame-list)) 1)))
>
> So you propose to remove the line with 'set-window-dedicated-p', right?
>

Not quite.  The test that simulates the environment I find frames being
deleted in is more like this:

(setq switch-to-prev-buffer-skip #'always)
(setq kill-buffer-quit-windows nil)
(tab-bar-mode)
(select-frame-set-input-focus (make-frame))
(switch-to-buffer "FOO")
(tab-bar-new-tab)
(switch-to-buffer "BAR")
(set-window-prev-buffers nil nil) ; Martin said this is the moral
equivalent of window-dedicated-p, but not technically
;; (kill-buffer)

The suggestion about removing the dedicated window condition is in
`window-deletable-p` here which could be left in place as long as the case
representing the above scenario is also accounted for.

     ((and tab-bar-mode
           ;; Fall back to frame handling in case of less than 2 tabs
           (> (length (funcall tab-bar-tabs-function frame)) 1)
           ;; Close the tab with the initial window (bug#59862)
           (or (eq (nth 1 (window-parameter window 'quit-restore)) 'tab)
               ;; or with the dedicated window (bug#71386)
               (and (window-dedicated-p window) ; <=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
                    (frame-root-window-p window)))
           ;; Don't close the tab if more windows were created explicitly
           (< (seq-count (lambda (w)
                           (memq (car (window-parameter w 'quit-restore))
                                 '(window tab frame same)))
                         (window-list-1 nil 'nomini))
              2))
      'tab)

--0000000000000a6f680631a87756
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Mon, Mar 31, 2025 at 2:59=E2=80=AFPM Juri Linkov &lt;<a href=3D"mailto:j=
uri@HIDDEN">juri@HIDDEN</a>&gt; wrote:</span></div></div><div class=
=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex">&gt; I thought Martin agreed that we don&#39;t need `(window-=
dedicated-p window)` in<br>
&gt; `window-deleteable-p`?=C2=A0 That makes my use case work.=C2=A0 Or are=
 you waiting<br>
&gt; for the test case and do you want that stand alone or in the test suit=
e?<br>
<br>
Currently we have such test:<br>
<br>
=C2=A0 =C2=A0 ;; 3. Don&#39;t delete the frame with dedicated window<br>
=C2=A0 =C2=A0 ;; from the second tab (bug#71386)<br>
=C2=A0 =C2=A0 (with-selected-frame (make-frame frame-params)<br>
=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer (generate-new-buffer &quot;test1&quo=
t;))<br>
=C2=A0 =C2=A0 =C2=A0 (tab-new)<br>
=C2=A0 =C2=A0 =C2=A0 (switch-to-buffer (generate-new-buffer &quot;test2&quo=
t;))<br>
=C2=A0 =C2=A0 =C2=A0 (set-window-dedicated-p (selected-window) t)<br>
=C2=A0 =C2=A0 =C2=A0 (kill-buffer)<br>
=C2=A0 =C2=A0 =C2=A0 (should (eq (length (frame-list)) 2))<br>
=C2=A0 =C2=A0 =C2=A0 (should (eq (length (tab-bar-tabs)) 1))<br>
=C2=A0 =C2=A0 =C2=A0 ;; But now should delete the frame with dedicated wind=
ow<br>
=C2=A0 =C2=A0 =C2=A0 ;; from the last tab<br>
=C2=A0 =C2=A0 =C2=A0 (set-window-dedicated-p (selected-window) t)<br>
=C2=A0 =C2=A0 =C2=A0 (kill-buffer)<br>
=C2=A0 =C2=A0 =C2=A0 (should (eq (length (frame-list)) 1)))<br>
<br>
So you propose to remove the line with &#39;set-window-dedicated-p&#39;, ri=
ght?<br></blockquote><div><br></div><div class=3D"gmail_default" style=3D"f=
ont-family:monospace">Not quite.=C2=A0 The test that simulates the environm=
ent I find frames being deleted in is more like this:</div><div class=3D"gm=
ail_default" style=3D"font-family:monospace"><br></div><div class=3D"gmail_=
default" style=3D"font-family:monospace">(setq switch-to-prev-buffer-skip #=
&#39;always)<br>(setq kill-buffer-quit-windows nil)<br>(tab-bar-mode)<br>(s=
elect-frame-set-input-focus (make-frame))<br>(switch-to-buffer &quot;FOO&qu=
ot;)<br>(tab-bar-new-tab)<br>(switch-to-buffer &quot;BAR&quot;)<br>(set-win=
dow-prev-buffers nil nil) ; Martin said this is the moral equivalent of win=
dow-dedicated-p, but not technically<br>;; (kill-buffer)<br></div><div clas=
s=3D"gmail_default" style=3D"font-family:monospace"><br></div><div class=3D=
"gmail_default" style=3D"font-family:monospace">The suggestion about removi=
ng the dedicated window condition is in `window-deletable-p` here which cou=
ld be left in place as long as the case representing the above scenario is =
also accounted for.</div><div class=3D"gmail_default" style=3D"font-family:=
monospace"><br></div><div class=3D"gmail_default" style=3D"font-family:mono=
space">=C2=A0 =C2=A0 =C2=A0((and tab-bar-mode<br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0;; Fall back to frame handling in case of less than 2 tabs=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&gt; (length (funcall tab-bar=
-tabs-function frame)) 1)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Cl=
ose the tab with the initial window (bug#59862)<br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0(or (eq (nth 1 (window-parameter window &#39;quit-restore)=
) &#39;tab)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; or=
 with the dedicated window (bug#71386)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0(and (window-dedicated-p window) ; &lt;=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (frame-root-win=
dow-p window)))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Don&#39;t cl=
ose the tab if more windows were created explicitly<br>=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0(&lt; (seq-count (lambda (w)<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0(memq (car (window-parameter w &#39;quit-restore))<br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0&#39;(window tab frame same)))<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0(window-list-1 nil &#39;nomini))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 2))<br>=C2=A0 =C2=A0 =C2=A0 &#39;tab)<br></div></div></div>

--0000000000000a6f680631a87756--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 18:59:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 14:59:55 2025
Received: from localhost ([127.0.0.1]:42850 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzKMV-0007gz-HT
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 14:59:55 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:59191)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1tzKMS-0007gG-Sv
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 14:59:53 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 7B6E444328;
 Mon, 31 Mar 2025 18:59:40 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
Organization: LINKOV.NET
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
 <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
Date: Mon, 31 Mar 2025 21:59:17 +0300
Message-ID: <87o6xht4ai.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukedtjedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopegrsgguohdrhhgrjhhirdgrlhhisehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepjedufeekieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomh
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> I thought Martin agreed that we don't need `(window-dedicated-p window)` in
> `window-deleteable-p`?  That makes my use case work.  Or are you waiting
> for the test case and do you want that stand alone or in the test suite?

Currently we have such test:

    ;; 3. Don't delete the frame with dedicated window
    ;; from the second tab (bug#71386)
    (with-selected-frame (make-frame frame-params)
      (switch-to-buffer (generate-new-buffer "test1"))
      (tab-new)
      (switch-to-buffer (generate-new-buffer "test2"))
      (set-window-dedicated-p (selected-window) t)
      (kill-buffer)
      (should (eq (length (frame-list)) 2))
      (should (eq (length (tab-bar-tabs)) 1))
      ;; But now should delete the frame with dedicated window
      ;; from the last tab
      (set-window-dedicated-p (selected-window) t)
      (kill-buffer)
      (should (eq (length (frame-list)) 1)))

So you propose to remove the line with 'set-window-dedicated-p', right?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 18:13:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 14:13:17 2025
Received: from localhost ([127.0.0.1]:42783 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzJdN-0002O4-8A
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 14:13:17 -0400
Received: from mail-vk1-xa35.google.com ([2607:f8b0:4864:20::a35]:61951)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzJdK-0002N6-Ck
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 14:13:15 -0400
Received: by mail-vk1-xa35.google.com with SMTP id
 71dfb90a1353d-525b44ec88aso2200719e0c.3
 for <71386 <at> debbugs.gnu.org>; Mon, 31 Mar 2025 11:13:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743444788; x=1744049588; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=XL6IwNFWcUPZkLdzbTjqptkAtykP+QBtLSJ7G3YvMQo=;
 b=ilHcV9fMRedxGLcE5syl1zShs3ywIp08df+clXrwJo7W+1Szhe2bWuub1zFEonySaX
 G18YdLkhO1C+AFe8xUrUw9uJOX4K0Hvrh0jHlYEnBMfaf+d/TjipsBPJcZdjsmt9OQP5
 U5KNzcCYfKpWStscdzYbPaRv8NnFuB/TRd8HnSizk8jLoXis6/ZIWLA25lIovHr2ognS
 QeBYpBZ6v+B0MQVSAQvXJcAK+5luyZaUB+3JTtzLGFV5czjUSCuQHdsys04U+EFenKbF
 5OSxOjmiLBmpzbJAn73LMjZ9Yfm2X5VhGYoNJvjsMbWK2eO0IQycEXlU7Bib8glAuQ68
 W2Xw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743444788; x=1744049588;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=XL6IwNFWcUPZkLdzbTjqptkAtykP+QBtLSJ7G3YvMQo=;
 b=cINXasDX+6/AABzUB6KMdmpy+o/ol/ob1242byz4R/36Hqkmcj3iTvAt0CicQnldRr
 TseFCpF9dH91x2L8rfh7qBOx46HGUJVhA8v4SLiPn6XK8haD9Ma1GAD/bFz9zyeFjQz/
 3ybXb5TD7qY62FE/yxU+sP57u66iTVWIJk1N9/dfOT2tb9UcEZYf4Sz0snfZ1x6cEb1h
 ZeXQ9e1WGNyJNsAhaSDGfI3UaxHsbGGBnpSevlHg3/zJugFbu5Cl2+x+oPBddawAfs4W
 iRIQ/RspdFZfZzJXKigXrYLUuoMLNFJL4IegEVY+JBNceHqGYsNzPAe4i/sgKOI5NgCx
 +xOw==
X-Forwarded-Encrypted: i=1;
 AJvYcCU4hpWJH0HTa2GUDoswRPPJiarJCCSqggzR+bo2ahdj0SxKPaTbZ96oLNvF0oJeMPk+Mwbr8A==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyYbnxelFSXrVfaqCdDndER9SrG+lKeD5hVuPoh7oZzbiMsQ9Bt
 VHu0Ub39g6gVlPV9NRKddwZa85DopeFL0stGe5qZ93BHosJd8U1JlSjWWiRvilF7OyksOgjjDu5
 hdVwtiku+IDqljc8WJPkBF3S6rU0=
X-Gm-Gg: ASbGnctLE15aNPMzAqqjvTCj34vS+AoaazYaZ6mPq7HFP6LxN81BWlPy2ymXrOSIsBy
 JdmEzQpLmxQTGMaJ4+oC+jvQBfQwhPu3tRAdKswgmkCKZ9E5l7ne4aMAMvh8kdofVsBrO2aaAqn
 V+SmqGWBydsGbUDUExCtCqCMjqiQ==
X-Google-Smtp-Source: AGHT+IEvI+rLcuDGFsixwxGEiMcdZ3qKEPUcT81a4K5LnZWLkj+iqIr8TocGUKxJdFCIWUePx2gzR1vX8bgIKJ1QXH8=
X-Received: by 2002:a05:6122:201d:b0:525:bf40:e628 with SMTP id
 71dfb90a1353d-5261d442184mr6194590e0c.6.1743444788597; Mon, 31 Mar 2025
 11:13:08 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <87y0wlt7xb.fsf@HIDDEN>
In-Reply-To: <87y0wlt7xb.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Mon, 31 Mar 2025 14:12:56 -0400
X-Gm-Features: AQ5f1Jp7Fn4d8ZpNgvh03iXaGsGkShn-T5D4Br9_9TO3-GCynCP_wU8BNtN9KGQ
Message-ID: <CAN+1HbqN1=0Lu8VvP32Xo2LsOsCd2bSkoNQ3CFFOnmxzR71DVQ@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000004f59200631a75fb8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000004f59200631a75fb8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 31, 2025 at 1:42=E2=80=AFPM Juri Linkov <juri@HIDDEN> wrote=
:

> > [The patch probably needs to be rebased on master but I was able to app=
ly
> > it by hand, I think.]
>
> Now I pushed the current patch, together with the new tests
> that cover its 'quit-restore' logic in test/lisp/tab-bar-tests.el.
>
> Could you please write a new test that will contain a sequence of
> function calls that implement the logic of your configuration.
>
> Then we could see how to improve the window functions
> to pass the tests.
>

I thought Martin agreed that we don't need `(window-dedicated-p window)` in
`window-deleteable-p`?  That makes my use case work.  Or are you waiting
for the test case and do you want that stand alone or in the test suite?

--0000000000004f59200631a75fb8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Mon, Mar 31, 2025 at 1:42=E2=80=AFPM Juri Linkov &lt;<a href=3D"mailto:j=
uri@HIDDEN">juri@HIDDEN</a>&gt; wrote:</span></div></div><div class=
=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex">&gt; [The patch probably needs to be rebased on master but I =
was able to apply<br>
&gt; it by hand, I think.]<br>
<br>
Now I pushed the current patch, together with the new tests<br>
that cover its &#39;quit-restore&#39; logic in test/lisp/tab-bar-tests.el.<=
br>
<br>
Could you please write a new test that will contain a sequence of<br>
function calls that implement the logic of your configuration.<br>
<br>
Then we could see how to improve the window functions<br>
to pass the tests.<br></blockquote><div><br></div><div class=3D"gmail_defau=
lt" style=3D"font-family:monospace">I thought Martin agreed that we don&#39=
;t need `(window-dedicated-p window)` in `window-deleteable-p`?=C2=A0 That =
makes my use case work.=C2=A0 Or are you waiting for the test case and do y=
ou want that stand alone or in the test suite?</div></div></div>

--0000000000004f59200631a75fb8--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 17:42:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 13:42:12 2025
Received: from localhost ([127.0.0.1]:42739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzJ9H-0004ON-PH
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 13:42:12 -0400
Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]:44981)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1tzJ9E-0004Nh-Le
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 13:42:09 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 70134441D5;
 Mon, 31 Mar 2025 17:42:01 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
Organization: LINKOV.NET
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
Date: Mon, 31 Mar 2025 20:40:48 +0300
Message-ID: <87y0wlt7xb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukedtheehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopegrsgguohdrhhgrjhhirdgrlhhisehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepjedufeekieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomh
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> [The patch probably needs to be rebased on master but I was able to apply
> it by hand, I think.]

Now I pushed the current patch, together with the new tests
that cover its 'quit-restore' logic in test/lisp/tab-bar-tests.el.

Could you please write a new test that will contain a sequence of
function calls that implement the logic of your configuration.

Then we could see how to improve the window functions
to pass the tests.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 15:44:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 11:44:13 2025
Received: from localhost ([127.0.0.1]:42514 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzHJ6-0007Zx-64
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 11:44:12 -0400
Received: from mout.gmx.net ([212.227.17.22]:51693)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1tzHJ1-0007Xf-Kf
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 11:44:09 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743435838; x=1744040638; i=rudalics@HIDDEN;
 bh=O9nVbatP8BR3ScMROt+7Sri4ZYhOZhz6buBjo/7LM6A=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=FN6MkIdSscl1pF4E6CM1bprsaYXeDtFM+2bVLkEqpzAA7VCVcWG5nAgsG9z/rfzr
 VMI46heqll1DMfQ7Kjr2e4Qne8voMb1lNz11QkwulO/x4AFlCEZXgetbZLROt8vgO
 I9jSeq2DndHpNL37CFLi0ctNk0BNN2mZBvSGhh+PR4xCnJzm9t8W4HGCarhqKSKef
 VvWW+Icdr2mVDFRPy0s042PTnwhWnPvgY9tsQAtu+6xYHar4IcLNGM6P9CwnYfua4
 bLIgq4kJW/LSN0pQTuiS4+R5Iz16yFcAb87owHOQuxS25juAdy9h5Qe/LQeunpjQE
 kVy7VHzirWwE3oQkYA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.97.231]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MQ5rU-1tm8AI0Uim-00I38L; Mon, 31
 Mar 2025 17:43:58 +0200
Message-ID: <9511f0ce-95d5-42b7-81e9-693370e18a3e@HIDDEN>
Date: Mon, 31 Mar 2025 17:43:57 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Ship Mints <shipmints@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <e96d3ec6-38d0-4b28-8f41-eb029ca6b8b8@HIDDEN>
 <CAN+1HboCVQUxvB2N8VgcA4HHg1cZOvHotOf4f+8SVtQQvEWV3g@HIDDEN>
 <b6a60888-eaa9-45cd-aae3-c367c78d0020@HIDDEN>
 <CAN+1HbrnGtZ1cwz5ungx+aoxZ9UyfbZhHP4oPcchMXLkVAJcRg@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAN+1HbrnGtZ1cwz5ungx+aoxZ9UyfbZhHP4oPcchMXLkVAJcRg@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:UkIirDcDBQk8S0aoCc5/ikiIvjYl0xi4drhpIliVSm1UMn8mLtu
 zSAp+ow4iL7L1+jIEDDzDTS2h5pwWD+8TbxB15aTr7n1K6P4OtRJpOHEDfPk1q5Hb5vZ4j6
 8j74QVsz2vy3bQXEOe+EIoRNvNiSoMFmpR7qzptWzEtYjPwEftWWXbPG8CdMLgcPY8iV/Mu
 XcoLzn2tRv2HahOxo7+eA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:aeRiqURDwo8=;ytC9y6wKMm3k42KrzmwXkflDpho
 /Q1DS4dZGyQmY9vNT3OJPb02rinDRzJ71nrz1BrCCtR0JCNZEz/u5ft1hwddHzPKHDBke3sHs
 mLalPZxsGLNDC37mloHUQHiL162DIdelFTN858fN1NNW/XhYRRGLbQ9o6BLviLWAHiPbJHGGE
 klzZHTUvfhRS3lBT1vxQAu2qy/khH9+JM1gED+Zhfgp0HIiM7JyQHCMgZVElBDLsmdw8ouvXS
 5a8myJjnOox37PyzAZD80G2iEhT+C2914+CEZzP85N8hI+cmvSy8zohVt/Np5VI2ShplfRcy9
 1LXyWAl/NrAzJgNx3aF+PeCXvQT11T04Oj1+WHUoJhUqyjcMnPwM66aZMFFD/gUOrAVfYfrj2
 rar5P4c57+g00ZcUZgRmDVhJaZEyqovkr//1ao7uIotNXdfI+D174fagXgXuzXj3UV+BokeEL
 CPqacxxPvtkTVxMzawsk7vcGE7PkPF9gGo6A9CZP37BxA0jYbZl5N/CCBP040W9q9LIgLY0rP
 XDQyd3YxPOVlH0bqmRZZXqtU7nCLSjzK2p/KGVgd1UnhEXk+L8KVu3rhbxcE5bCx7fv03PK5o
 Bk09NTG1xEQKSxfkd7hHMWVAdw4QhMe4YEdseGp0rk9zahGwuGPv6Y5mo8Y4ZT4kSE0EltjXt
 1kS1+ryYi46w4F5Fw6ZjbYGO66YstVUvf88Oy5CqaSjODK1fSeM36ppe4+tFxqvREDfJG4JHk
 Q1MWd5mpqSPcQWKnWoPJA71qKKxSUzNUI5bt8NIkBQa8iVO4FeNY9qSrVGllkcrvOz5jWUJIN
 iqizgnP1Qmqiylv0OCGCJV3a4u6Ka5fMyNde8pwkaJPt6dCSpIOqQXUgDBkUycA+sfrUoAeAu
 XqA+UuoPD2JQXXpXTr0pL27SNDymLY9UCRmU1JbDJ/1RJY0nAYDUmhV9518b5Npe+a1ygS3B7
 3UCQpb7+pEWK4egGCLKmj26UR0cz4A2RxYryygR0BIO4xaUv+gzFkzv9KlMnfXRGi97H2mr5K
 /orIqt3BLDpk/ZDErooOhGepmjJAFPdBqH6ceIQpL/OuneYkAAQLp7rK7ol1YVRgwPHXv+AUS
 aj6yIGBGshBOk7NrZX4oTtjjHc1CQ4FAa4ixn60lie3o5TL+RuITjpjqkwtm3ByEbvdF7AZxH
 U+5KRhTuDw6ujV2kxbCykJPIPnqYlHWUHd4dza5Tc3ipoEpLNPUMGuPNOhXFo9qJJk63fBMyC
 h60qmjoljH/WVMv0TdCfy3LF7AXQgkMzREWwksPQWQcq7oyi32oHT2/0s5xKbbhODcp/9NzzT
 6YmviEsp8Ia6A0RpCkByoZCX0jJrQp/RNVjr2fP/TAAl7e4sg9I4cZYV1/OLcI5OfUGAfPUqh
 Ys6xlJrO1kMv3Sq4syWJUosUNIW9zkGvpNysGMhk1kjF1kMjl7SdFyx63xLxNdMemf8rAnNd3
 CFlvnOPzv5jl6qh4RTcMCU7INlwUppu120wXyVkhMgobwRxYQ
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >>   > (set-window-prev-buffers nil nil)
 >>   > (setq switch-to-prev-buffer-skip #'always)
 >>
 >> The last two boil down to saying that the selected window is dedicated
 >> to its buffer.
 >>
 >
 > That might be in some way but window-dedicated-p returns nil for that case.

I meant that if you say that the window never showed another buffer
before, you get the same effect as if the window were dedicated to its
buffer.

 >>   >                 (and ;; (window-dedicated-p window) ; <==== THIS WORKS
 >> BETTER
 >>
 >
 > Agree that we don't need the strict window-dedicated-p condition?

Yes, because it's not related to the issue at hand (IIUC).

 > I'd rather make this subject to an option say
 >> 'tab-bar-open-tab-inhibits-delete-frame'.
 >>
 >
 > I assume you meant 'tab-bar-close-tab-inhibits-delete-frame'.

What I meant was that if at least one open tab remains, the frame should
not be deleted.

martin





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 15:30:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 11:30:19 2025
Received: from localhost ([127.0.0.1]:42476 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzH5b-0005MR-7q
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 11:30:19 -0400
Received: from mail-vk1-xa2c.google.com ([2607:f8b0:4864:20::a2c]:58870)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzH5T-0005Jc-4D
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 11:30:12 -0400
Received: by mail-vk1-xa2c.google.com with SMTP id
 71dfb90a1353d-52446b21cfdso1996417e0c.1
 for <71386 <at> debbugs.gnu.org>; Mon, 31 Mar 2025 08:30:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743435001; x=1744039801; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=POoPEVjMmfnCqoIYuPP12qEY+CIfuVx+zooat/n+Igk=;
 b=brmSaBN9TP7FCIHLoEiVVeN5LXodPGAQqvOhrKLuzjd220Bf7n7XFwTSUw5xqlxsh7
 v1WGFJVxiAs78cw+U+7vSss04jgCKzPl0hTUBaCp0AOMCwWwHSf4EXWKZbg/Z12t8JUf
 lTSYdSxyCqO3IKV+aBWWG1TnYqi3i7clLuraeBuhY+EnGVf3dtUfmC8XEesWuc2qHWxB
 K3/vvG41wQRJ9XHKQy4rXlKw8EYVDyKYGjGJZJ/c7FCSQLd3XQ7HodMWY2jmfNxK9IIS
 Ts9n14zy9RQ4LZHr3+xtO++zT+UsVlh4FUeA5U3vPKyhzT09qUbuCOb53lSFiAqba4Pj
 oGcA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743435001; x=1744039801;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=POoPEVjMmfnCqoIYuPP12qEY+CIfuVx+zooat/n+Igk=;
 b=imLiCgYr1qUTi/dnWg5WyE5F3K9j+TcNd2VWjfbNSVahaxR7wMXuuECKj/6AqVJD9L
 EYZsKTv0kNlyhBJhu6hNKacZT6PTyzrIctHEB/rdRKD1bxljaTvwhVJPuPNootrv0Y1t
 HTcQ9fa/IZP93uc298HN/q6UheYvyquMFmrqXVSMguvR4othg57rnG/WIGy+aTNH/FM0
 5464OczJp2ZAz4fII3XH9VWjIx/ZdJKFm3LtgiiTyxtEC2ojCj3s663ExTMkbRwbp7hM
 xF57I9YNodBVLPP/vySuOXZ3JqOlTD63XdHnjhdZdlqVF7U3/iuCFmcAceKClI5/BRUE
 F6qQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCWxFbkbPmYrOG7p3K98hZlOW2wtfF/ILc6vJJ6w9n5vNqq44ZD+Gya7GOE4MSeszkfe0BIsCg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YxZAl7eVmT6jNSLk5qX5FavubIhcBWazApUqIKWKG6WkGtLC1/F
 8HwLfB7mW2ZdNzXq4x8F0NHfFkMuYRmNak6PoCLdSYpxIHkPR5nevRw1OehrSwt1sUm5N1NqEaX
 ffEdi212JLCA2M2nt7RQqZsJLDQc=
X-Gm-Gg: ASbGncuvJBo6sgjJpVNSR/8urIlwYS+P/RQj8lIWzExOcGdu0duM2DPV4RsKKhlgUyt
 PmITWH4M8uQ9rwXnewFdviW1GWRCJYRBW7Q/pk4t7y582Iwkfm3DNZPDOTsIzWOnzHJ/b4t+a8c
 ecYMYoc2Z354VkBxJSKV7C/4QwRA==
X-Google-Smtp-Source: AGHT+IGgnTpyz1i/I6//bEh2FQKUq46x5jXnSvn/0AnSaogz8Mg1AMNLIevwyupvf/olT1/4xxhl+5A/kDWNe7o+wnM=
X-Received: by 2002:a05:6122:2510:b0:518:7ab7:afbb with SMTP id
 71dfb90a1353d-5261d4abd25mr4623503e0c.8.1743435001090; Mon, 31 Mar 2025
 08:30:01 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <e96d3ec6-38d0-4b28-8f41-eb029ca6b8b8@HIDDEN>
 <CAN+1HboCVQUxvB2N8VgcA4HHg1cZOvHotOf4f+8SVtQQvEWV3g@HIDDEN>
 <b6a60888-eaa9-45cd-aae3-c367c78d0020@HIDDEN>
In-Reply-To: <b6a60888-eaa9-45cd-aae3-c367c78d0020@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Mon, 31 Mar 2025 11:29:50 -0400
X-Gm-Features: AQ5f1Jr0_SNsIlgGABuXflB-hAWgmAqbHiiPWub8Dl1D87ZWH9P9_Vq6euKzmPw
Message-ID: <CAN+1HbrnGtZ1cwz5ungx+aoxZ9UyfbZhHP4oPcchMXLkVAJcRg@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: martin rudalics <rudalics@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000edd9b70631a51704"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000edd9b70631a51704
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 31, 2025 at 11:09=E2=80=AFAM martin rudalics <rudalics@HIDDEN> =
wrote:

>  > Below with -Q reproduces the effect.
>  >
>  > (setq kill-buffer-quit-windows nil)
>  > (tab-bar-mode)
>  > (select-frame-set-input-focus (make-frame))
>  > (switch-to-buffer "FOO")
>  > (tab-bar-new-tab)
>  > (switch-to-buffer "BAR")
>  > ;; these emulate the effect I see
>  > (set-window-prev-buffers nil nil)
>  > (setq switch-to-prev-buffer-skip #'always)
>
> The last two boil down to saying that the selected window is dedicated
> to its buffer.
>

That might be in some way but window-dedicated-p returns nil for that case.

 > (kill-buffer) ; frame is deleted when I expect the first tab to remain
>  > intact
>  >
>  > If the patch removes the test for window-dedicated-p, it leaves the
> first
>  > tab in place.  I almost never use dedicated windows outside of a few
>  > packages that do but those haven't been in play vis-a-vis this issue. =
 I
>  > don't pretend to fully understand what situation w-d-p is intended to
> deal
>  > with but if we can accommodate both, that'd be fine.
>  >
>  >       ((and tab-bar-mode
>
> (> (frame-parameter frame 'tab-bar-lines) 0) is more reliable.
>

I leave this up to Juri.

 >             ;; Fall back to frame handling in case of less than 2 tabs
>  >             (> (length (funcall tab-bar-tabs-function frame)) 1)
>  >             ;; Close the tab with the initial window (bug#59862)
>  >             (or (eq (nth 1 (window-parameter window 'quit-restore))
> 'tab)
>  >                 ;; or with the dedicated window (bug#71386)
>  >                 (and ;; (window-dedicated-p window) ; <=3D=3D=3D=3D TH=
IS WORKS
> BETTER
>

Agree that we don't need the strict window-dedicated-p condition?

I'd rather make this subject to an option say
> 'tab-bar-open-tab-inhibits-delete-frame'.
>

I assume you meant 'tab-bar-close-tab-inhibits-delete-frame'.

 >                      (frame-root-window-p window)))
>  >             ;; Don't close the tab if more windows were created
> explicitly
>  >             (< (seq-count (lambda (w)
>  >                             (memq (car (window-parameter w
> 'quit-restore))
>  >                                   '(window tab frame same)))
>  >                           (window-list-1 nil 'nomini))
>  >                2)
>  >             )
>  >        'tab)
>
>

--000000000000edd9b70631a51704
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Mon, Mar 31, 2025 at 11:09=E2=80=AFAM martin rudalics &lt;<a href=3D"mai=
lto:rudalics@HIDDEN">rudalics@HIDDEN</a>&gt; wrote:</span></div></div><div =
class=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex">=C2=A0&gt; Below with -Q reproduces the effect.<br>
=C2=A0&gt;<br>
=C2=A0&gt; (setq kill-buffer-quit-windows nil)<br>
=C2=A0&gt; (tab-bar-mode)<br>
=C2=A0&gt; (select-frame-set-input-focus (make-frame))<br>
=C2=A0&gt; (switch-to-buffer &quot;FOO&quot;)<br>
=C2=A0&gt; (tab-bar-new-tab)<br>
=C2=A0&gt; (switch-to-buffer &quot;BAR&quot;)<br>
=C2=A0&gt; ;; these emulate the effect I see<br>
=C2=A0&gt; (set-window-prev-buffers nil nil)<br>
=C2=A0&gt; (setq switch-to-prev-buffer-skip #&#39;always)<br>
<br>
The last two boil down to saying that the selected window is dedicated<br>
to its buffer.<br></blockquote><div><br></div><div><div class=3D"gmail_defa=
ult" style=3D"font-family:monospace">That might be in some way but window-d=
edicated-p returns nil for that case.</div></div><div class=3D"gmail_defaul=
t" style=3D"font-family:monospace"><br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204=
);padding-left:1ex">
=C2=A0&gt; (kill-buffer) ; frame is deleted when I expect the first tab to =
remain<br>
=C2=A0&gt; intact<br>
=C2=A0&gt;<br>
=C2=A0&gt; If the patch removes the test for window-dedicated-p, it leaves =
the first<br>
=C2=A0&gt; tab in place.=C2=A0 I almost never use dedicated windows outside=
 of a few<br>
=C2=A0&gt; packages that do but those haven&#39;t been in play vis-a-vis th=
is issue.=C2=A0 I<br>
=C2=A0&gt; don&#39;t pretend to fully understand what situation w-d-p is in=
tended to deal<br>
=C2=A0&gt; with but if we can accommodate both, that&#39;d be fine.<br>
=C2=A0&gt;<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0((and tab-bar-mode<br>
<br>
(&gt; (frame-parameter frame &#39;tab-bar-lines) 0) is more reliable.<br></=
blockquote><div><br></div><div><div class=3D"gmail_default" style=3D"font-f=
amily:monospace">I leave this up to Juri.</div></div><div class=3D"gmail_de=
fault" style=3D"font-family:monospace"><br></div><blockquote class=3D"gmail=
_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204=
,204);padding-left:1ex">
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Fall back to f=
rame handling in case of less than 2 tabs<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&gt; (length (fu=
ncall tab-bar-tabs-function frame)) 1)<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Close the tab =
with the initial window (bug#59862)<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(or (eq (nth 1 (w=
indow-parameter window &#39;quit-restore)) &#39;tab)<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; =
or with the dedicated window (bug#71386)<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(an=
d ;; (window-dedicated-p window) ; &lt;=3D=3D=3D=3D THIS WORKS BETTER<br></=
blockquote><div><br></div><div><div class=3D"gmail_default" style=3D"font-f=
amily:monospace">Agree that we don&#39;t need the strict window-dedicated-p=
 condition?</div></div><div><br></div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddi=
ng-left:1ex">
I&#39;d rather make this subject to an option say<br>
&#39;tab-bar-open-tab-inhibits-delete-frame&#39;.<br></blockquote><div><br>=
</div><div class=3D"gmail_default" style=3D"font-family:monospace">I assume=
 you meant &#39;tab-bar-close-tab-inhibits-delete-frame&#39;.</div><div cla=
ss=3D"gmail_default" style=3D"font-family:monospace"><br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex">
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 (frame-root-window-p window)))<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Don&#39;t clos=
e the tab if more windows were created explicitly<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&lt; (seq-count =
(lambda (w)<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(memq (car (window-parameter w &#3=
9;quit-restore))<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&#39;(window =
tab frame same)))<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(window-list-1 nil &#39;nomini))<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2)<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)<br>
=C2=A0&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39;tab)<br><br>
</blockquote></div></div>

--000000000000edd9b70631a51704--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 15:09:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 11:09:39 2025
Received: from localhost ([127.0.0.1]:42425 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzGlc-0002WV-MR
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 11:09:39 -0400
Received: from mout.gmx.net ([212.227.17.21]:37573)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1tzGlW-0002Uv-NZ
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 11:09:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743433755; x=1744038555; i=rudalics@HIDDEN;
 bh=jSnPDYjYB3NMXYK8MF4gwH1aeiWky3RZysj7C0VZugg=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=bb+6iBBwOPDDRgi1bZjw5jOWLXDgPoxiHG9NhaxTWkwK52NL4QgrO+hgTmlSCWJ5
 go0H55/yJgnUDYaIff4b3jH/7j8sOyX0a4I7n+E/T6WLF4tRzumxXy6Blh+unF0Cx
 AHXGYk6+iOXf44lR5c7YrLZwi6Sf5kVz2VSWHnz3nxj8XoG7boVWB9RaiqLKdH3eP
 sLhRGHbTrckkTByFssuQ05rNyIseX/yipV7yJhQpKh+UoXkkL2yFvKZC8f5QMRoPd
 6loF+VrER3fUa09UlZfv+AyuumIef/F8YGJx8g3N1MQUB45jOYbzXXtHl1CpKQAOD
 YkJXR3MQiCg+KtvHWA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.97.231]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N79u8-1t2rmo3x4m-013BAm; Mon, 31
 Mar 2025 17:09:15 +0200
Message-ID: <b6a60888-eaa9-45cd-aae3-c367c78d0020@HIDDEN>
Date: Mon, 31 Mar 2025 17:09:13 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Ship Mints <shipmints@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <e96d3ec6-38d0-4b28-8f41-eb029ca6b8b8@HIDDEN>
 <CAN+1HboCVQUxvB2N8VgcA4HHg1cZOvHotOf4f+8SVtQQvEWV3g@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAN+1HboCVQUxvB2N8VgcA4HHg1cZOvHotOf4f+8SVtQQvEWV3g@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:SgLlZmRO9u6cV4jMSYBuc/nJ6+E5H5DQWbZnIeV2bJoTN6ywojj
 5Ou1w9Vqf+FO7MQZe88wQucorel8CuBVeMwhQzOzZeN9BxxNdIaYS2QiFTiUWV1MGu9PsWZ
 vKkfrScbHtdJVJg9Xoy+G1hPKttwFYktXg1arY9UEEXa/z2Y/2kk3WG82oF641XCfxzPqNl
 b7+QaWfLcG5w2L2rfmgsg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:UrSWuuu19B8=;KIj541EGOq10vMqQ6s7fwDhqWbS
 mjMMOOGhYZ6a4fa/FpHIVAYbYlqnZjyVJbcA23pcwkhed2xocRa9peAvsbInd4/9ukwyCMH4I
 VpTMr2JJvLC6q/LLKr479IJXs4LfKpnTs6pBfCHbCFpgVbtcG5MiSNh115JC7qGAO9M/Rfolv
 /GYxib6nh/u45q+QszV/VVSQ4PjKSseWxVVYdF3nA54WQqbs04hdMMqZlbOX/WO1BfHAJtObs
 6KlXeyGy1SOVMmku3mUpCJCF5+JXpXOyKjS2AegUfa8GWRtTySxb6PhN+7yt/q2ozwvST+Xg3
 /kX5as5pwDjlYsNhU4qH4D3Q+Vb7NgBbTENIjcS9aXddBwhB1+OkxOBcD+OvGOmNBujb4JKHI
 ww8p3Zu99Amh6G+4+2vwJNBjg+myGsk9weUkZVsrbWaO0RYfJiAlyYl2zLXFspEk5AklV3Fv9
 mh6lpdvIO7v/PD/+ZJBHggkIVXviZxs+RPZ0PHB5k7MBD5P6gZ0F8tBVvlnJU1j8EVg5unO61
 2GImA9J1bkWuSUlSqKmw+l/QD4R7IeG8SBxJ8jBF7xF/k9N9C5nIHOhZ+I5vUllXF48d9XV/7
 ICqKP2QhZHxxhQAtaf0OAfrDDUZ7D+eFxvTSKs400hNmRS4ArdZhHuYuBjz8lnMqUxm27wE6r
 S1Dcg0+2EBVoOqZaU3DZdmxYQVVFegDxm1+sLQPcgr++BKqFtRlcnWhKlUF6H8+a/EjpD6cvo
 qDIjfzSXOETC99dlxfpbnPJUu7a0yXxoJ5G+K8/QHNEJwVBohJmlKQsIVoYKrHFBGkSWePL12
 DmTH71Sb9lOaz6U18+GzNPAzOtb5FNy3XY4PdiATM8UifGn08I6GQ/FPx9pyTaADdrDzBm6fX
 /yFrPTdgJot03GUy2RWxYZ0Oc6YZUMFqtsZI5YqBz0uGjujlJzx/h313okxgkFzNbbrKNDAKZ
 kfXbYbP0bxj6tbL0v6N8G9JZ4sryn6eRfV+pQCEmtVmFcIpo0wNq+aZnxCHn4vU3HwkfkX13Z
 v0fsCe6dPDdHZXmYZ46lYx5Yw02XjbUSoKCk++5E67k3YGMKMqPo2B5FRZTp0wuWldCnhWMw+
 BpQwhiD9T01uv2Ip/OPI9EWSVGoHaSBWLR0VI4Gm8Uzu/9vqxHPgw4q8abRwJHZ3G8m+JVdqE
 bwFmRGv7L2C8akBFKuKg41MmPQfM6N6j0J3BUaS1ErQ/t9+KAHadcM7+1wvx4mOjPxj+0Avxo
 7NIqyqXxrgAaRrRFzCea+Mg5D2y1ue5/BJqn3/DuTFduYfTc2w8CQg+xdFo0HpGPzd60OugCV
 7dIm1xvuoFGXdwdQguaI3njim8w4guAcsC2aDO+ZoCrXsLrdi8LNGSFjxw2APQbxiaZV+MYjE
 AuDNeIFpdt1nhHxpPs2ptWuPfeWi/OJF0fnUAIqn5JlbVLZMwugDK99ZsJueHR+wgOO3hkCZH
 lj7itFsSVw4sjcmQd8xQj0IOokM8UawIPLQeqj94HvfdNqdQ6
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > Below with -Q reproduces the effect.
 >
 > (setq kill-buffer-quit-windows nil)
 > (tab-bar-mode)
 > (select-frame-set-input-focus (make-frame))
 > (switch-to-buffer "FOO")
 > (tab-bar-new-tab)
 > (switch-to-buffer "BAR")
 > ;; these emulate the effect I see
 > (set-window-prev-buffers nil nil)
 > (setq switch-to-prev-buffer-skip #'always)

The last two boil down to saying that the selected window is dedicated
to its buffer.

 > (kill-buffer) ; frame is deleted when I expect the first tab to remain
 > intact
 >
 > If the patch removes the test for window-dedicated-p, it leaves the first
 > tab in place.  I almost never use dedicated windows outside of a few
 > packages that do but those haven't been in play vis-a-vis this issue.  I
 > don't pretend to fully understand what situation w-d-p is intended to deal
 > with but if we can accommodate both, that'd be fine.
 >
 >       ((and tab-bar-mode

(> (frame-parameter frame 'tab-bar-lines) 0) is more reliable.

 >             ;; Fall back to frame handling in case of less than 2 tabs
 >             (> (length (funcall tab-bar-tabs-function frame)) 1)
 >             ;; Close the tab with the initial window (bug#59862)
 >             (or (eq (nth 1 (window-parameter window 'quit-restore)) 'tab)
 >                 ;; or with the dedicated window (bug#71386)
 >                 (and ;; (window-dedicated-p window) ; <==== THIS WORKS BETTER

I'd rather make this subject to an option say
'tab-bar-open-tab-inhibits-delete-frame'.

 >                      (frame-root-window-p window)))
 >             ;; Don't close the tab if more windows were created explicitly
 >             (< (seq-count (lambda (w)
 >                             (memq (car (window-parameter w 'quit-restore))
 >                                   '(window tab frame same)))
 >                           (window-list-1 nil 'nomini))
 >                2)
 >             )
 >        'tab)

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 13:50:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 09:50:45 2025
Received: from localhost ([127.0.0.1]:40418 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzFXF-00064K-Tg
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 09:50:45 -0400
Received: from mail-ua1-x935.google.com ([2607:f8b0:4864:20::935]:52410)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzFXD-00063d-1r
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 09:50:39 -0400
Received: by mail-ua1-x935.google.com with SMTP id
 a1e0cc1a2514c-86d69774081so1957842241.0
 for <71386 <at> debbugs.gnu.org>; Mon, 31 Mar 2025 06:50:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743429033; x=1744033833; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=uBy5lKlran4OodDbVlU6ZxdyfefUKAA5ivrCTGF5pPM=;
 b=mX/h5ByNSax4Vtl5Bxl+Ku8niWLdgvbnx3is76Go7eVTGWnF9qkLdkvz5bODajpeql
 Gql9kCnaZdIvTYoaE8K4XRYqLnasvyTUG8rBsvua1KlGQNbBhEOLqHm+gItK/fLtcCOv
 OaR/p0+Tg6lenn7b2XRAp/mp7/ye2nfcbeYbvq3Q9Xp/9/cxinaI9kpsrp+HkallgDBN
 3oFX43r2WiK0vzxrysGSwBfNcOX3tGaiKtXgHl/qlOJHIfAKpAlOuW5RmWxaYaWjN+uX
 gaGwNOvSxEfhdhhUEd6gBTwweAg/p/udU16aJco22sV6+b1QOMLmvBKkC7qazF9xNc8S
 HhAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743429033; x=1744033833;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=uBy5lKlran4OodDbVlU6ZxdyfefUKAA5ivrCTGF5pPM=;
 b=g0a9E2k5cq5GrSq6/BSn1XKEIMiU0K7GdCk3sjbCk7Z2zJPBzKQc4CjjBuGYztsUEl
 YE1zMo/fy51fBufADn0YOaC4EK2XKWKd7IbGeSgHs++QVtXAP19yhEE6bVKKje4CU6pv
 sxGF7jOP+ip0wDqRo98AWUvWQS6lAu89/4IAFYhXglxMc/YRubAlrw8Jtb64nFbEBatI
 PecBLoO1ZdRsl3stil+1amzLw4EZeqpq51ckEHoY41C3fWkoNquU6Qfy3htdZnejdxlo
 RvU4PxZLDHiHlx8dDI9VF3zJY4uQFm2nx5ByxaDMTJ/M4mPBAV9akCKQfDaI/T3HyUlZ
 9Rrg==
X-Forwarded-Encrypted: i=1;
 AJvYcCWEmjIiQMPid0XOT5oA8GtHuNlOn/Mq9CbiZKR5uvFFH871OeqbP39G8HeFdNsSZVJCkaT/yA==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyMaPmz3Hg2kDKuHXc/a/gyY38jnB8kIKqJhSXz0d5V37pBiRQE
 HgMivwxM0MjPTsH7yXUn/gBPaLNMukn018dklCoEXz5skC8Un3V0Zp2BFP5Tpp7YY1zi/7YEYzk
 x6wzLfILDK2qDRjJeQW24Dh4J3to=
X-Gm-Gg: ASbGnctM19FTPyqNfSCDYD7nCxA/+e7+7+4KEoDmb/k8upTSNpFM9+ND/s8+WLyM3Cd
 ZgtJu3dlBpDb94ToLH3f2QluPwwBxZqzxTyC7ZAV12VoHD+oeorf9/sOAimL20T/TG1aG0Yci+T
 r7g95h9fBCGdHk2xT2xGlhe8D91g==
X-Google-Smtp-Source: AGHT+IHumX1/9grUDk7JBnTD16WOBOurXepVcsBfEVmy/w0Re4Z/162CsUMqHyeNvwt3xwTPkuTPG6WD0kwNtCj7yQA=
X-Received: by 2002:a05:6102:8081:b0:4c1:86ff:4af7 with SMTP id
 ada2fe7eead31-4c6d397f2bdmr4982839137.21.1743429033169; Mon, 31 Mar 2025
 06:50:33 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <e96d3ec6-38d0-4b28-8f41-eb029ca6b8b8@HIDDEN>
 <CAN+1HboCVQUxvB2N8VgcA4HHg1cZOvHotOf4f+8SVtQQvEWV3g@HIDDEN>
In-Reply-To: <CAN+1HboCVQUxvB2N8VgcA4HHg1cZOvHotOf4f+8SVtQQvEWV3g@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Mon, 31 Mar 2025 09:50:21 -0400
X-Gm-Features: AQ5f1JoGVN6m_TwdghEXZHaNsmt8IB-ra47ZflMxbqr4yJOnNBxKT9VmI1K7rVk
Message-ID: <CAN+1HboUM9vX9r9_Zj=jPovJ9iZeCM=Ts5amuOzoiF=WaXxN7Q@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: martin rudalics <rudalics@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000369b1c0631a3b458"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000369b1c0631a3b458
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 31, 2025 at 7:57=E2=80=AFAM Ship Mints <shipmints@HIDDEN> wr=
ote:

> On Mon, Mar 31, 2025 at 3:59=E2=80=AFAM martin rudalics <rudalics@HIDDEN>=
 wrote:
>
>>  > I'm not using the display actions in my configuration and I don't
>> invoke
>>  > the tab-bar functions that use it.
>>  >
>>  > I have two tabs on a newly opened frame.  Both tabs have only one
>> window.
>>  > If I'm on tab 2, and I eval (kill-buffer), the frame disappears.
>>  >
>>  >  From inside window-deletable-p: tab-bar-mode=3Dt #tabs=3D2 quit-rest=
ore
>>  > parameter=3Dnil window-dedicated-p=3Dnil frame-root-window=3Dt
>>
>> Can you give us a sequence of function calls that implement the behavior
>> you sketch here.  From the text above I don't even understand whether
>> this is about tab-bars or tab-lines.  Among others we need to know
>> whether the window showing the buffer to be killed is dedicated to it
>> and what the value of 'kill-buffer-quit-windows' is.  If the latter is
>> non-nil, Emacs will try to call 'quit-restore-window' for any window
>> showing that buffer and that function expects a 'quit-restore' parameter
>> for that window.
>>
>
> I haven't experimented with kill-buffer-quit-windows yet so it's nil for
> me.
>
> I've spelunked through my use-case state and it's, as usual, hard to teas=
e
> out.  Below with -Q reproduces the effect.
>
> (setq kill-buffer-quit-windows nil)
> (tab-bar-mode)
> (select-frame-set-input-focus (make-frame))
> (switch-to-buffer "FOO")
> (tab-bar-new-tab)
> (switch-to-buffer "BAR")
> ;; these emulate the effect I see
> (set-window-prev-buffers nil nil)
> (setq switch-to-prev-buffer-skip #'always)
> (kill-buffer) ; frame is deleted when I expect the first tab to remain
> intact
>
> If the patch removes the test for window-dedicated-p, it leaves the first
> tab in place.  I almost never use dedicated windows outside of a few
> packages that do but those haven't been in play vis-a-vis this issue.  I
> don't pretend to fully understand what situation w-d-p is intended to dea=
l
> with but if we can accommodate both, that'd be fine.
>
>      ((and tab-bar-mode
>            ;; Fall back to frame handling in case of less than 2 tabs
>            (> (length (funcall tab-bar-tabs-function frame)) 1)
>            ;; Close the tab with the initial window (bug#59862)
>            (or (eq (nth 1 (window-parameter window 'quit-restore)) 'tab)
>                ;; or with the dedicated window (bug#71386)
>                (and ;; (window-dedicated-p window) ; <=3D=3D=3D=3D THIS W=
ORKS
> BETTER
>                     (frame-root-window-p window)))
>            ;; Don't close the tab if more windows were created explicitly
>            (< (seq-count (lambda (w)
>                            (memq (car (window-parameter w 'quit-restore))
>                                  '(window tab frame same)))
>                          (window-list-1 nil 'nomini))
>               2)
>            )
>       'tab)
>

The patch is unreliable when there are tab-bar-tab-prevent-close-functions.

The following altered repro will block the tab being closed yet the tab
closed message in 'window--delete' will still show.  Should tabs be
forcibly closed in this case?

(setq kill-buffer-quit-windows nil)
(tab-bar-mode)
(select-frame-set-input-focus (make-frame))
(switch-to-buffer "FOO")
(tab-bar-new-tab)
(switch-to-buffer "BAR")
;; these emulate the effect I see
(set-window-prev-buffers nil nil)
(setq switch-to-prev-buffer-skip #'always)
(let ((tab-bar-tab-prevent-close-functions (list #'always)))
  (kill-buffer))

--000000000000369b1c0631a3b458
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Mon, Mar 31, 2025 at 7:57=E2=80=AFAM Ship Mints &lt;<a href=3D"mailto:sh=
ipmints@HIDDEN">shipmints@HIDDEN</a>&gt; wrote:</span></div></div><di=
v class=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div style=3D"font-f=
amily:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">On =
Mon, Mar 31, 2025 at 3:59=E2=80=AFAM martin rudalics &lt;<a href=3D"mailto:=
rudalics@HIDDEN" target=3D"_blank">rudalics@HIDDEN</a>&gt; wrote:</span></d=
iv></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">=C2=A0&gt; I&#39;m not using the display actions in my configura=
tion and I don&#39;t invoke<br>
=C2=A0&gt; the tab-bar functions that use it.<br>
=C2=A0&gt;<br>
=C2=A0&gt; I have two tabs on a newly opened frame.=C2=A0 Both tabs have on=
ly one window.<br>
=C2=A0&gt; If I&#39;m on tab 2, and I eval (kill-buffer), the frame disappe=
ars.<br>
=C2=A0&gt;<br>
=C2=A0&gt;=C2=A0 From inside window-deletable-p: tab-bar-mode=3Dt #tabs=3D2=
 quit-restore<br>
=C2=A0&gt; parameter=3Dnil window-dedicated-p=3Dnil frame-root-window=3Dt<b=
r>
<br>
Can you give us a sequence of function calls that implement the behavior<br=
>
you sketch here.=C2=A0 From the text above I don&#39;t even understand whet=
her<br>
this is about tab-bars or tab-lines.=C2=A0 Among others we need to know<br>
whether the window showing the buffer to be killed is dedicated to it<br>
and what the value of &#39;kill-buffer-quit-windows&#39; is.=C2=A0 If the l=
atter is<br>
non-nil, Emacs will try to call &#39;quit-restore-window&#39; for any windo=
w<br>
showing that buffer and that function expects a &#39;quit-restore&#39; para=
meter<br>
for that window.<br></blockquote><div><br></div><div style=3D"font-family:m=
onospace">I haven&#39;t experimented with kill-buffer-quit-windows yet so i=
t&#39;s nil for me.</div><div style=3D"font-family:monospace"><br></div><di=
v style=3D"font-family:monospace">I&#39;ve spelunked through my use-case st=
ate and it&#39;s, as usual, hard to tease out.=C2=A0 Below with -Q reproduc=
es the effect.</div><div style=3D"font-family:monospace"><br></div><div sty=
le=3D"font-family:monospace">(setq kill-buffer-quit-windows nil)<br>(tab-ba=
r-mode)<br>(select-frame-set-input-focus (make-frame))<br>(switch-to-buffer=
 &quot;FOO&quot;)<br>(tab-bar-new-tab)<br>(switch-to-buffer &quot;BAR&quot;=
)</div><div style=3D"font-family:monospace">;; these emulate the effect I s=
ee<br>(set-window-prev-buffers nil nil)</div><div style=3D"font-family:mono=
space">(setq switch-to-prev-buffer-skip #&#39;always)</div><div style=3D"fo=
nt-family:monospace">(kill-buffer) ; frame is deleted when I expect the fir=
st tab to remain intact<br></div><div style=3D"font-family:monospace"><br><=
/div><div style=3D"font-family:monospace">If the patch removes the test for=
 window-dedicated-p, it leaves the first tab in place.=C2=A0 I almost never=
 use dedicated windows outside of a few packages that do but those haven&#3=
9;t been in play vis-a-vis this issue.=C2=A0 I don&#39;t pretend to fully u=
nderstand what situation w-d-p is intended to deal with but if we can accom=
modate both, that&#39;d be fine.</div><div style=3D"font-family:monospace">=
<br></div><div style=3D"font-family:monospace">=C2=A0 =C2=A0 =C2=A0((and ta=
b-bar-mode</div><div style=3D"font-family:monospace">=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0;; Fall back to frame handling in case of less than 2 t=
abs<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&gt; (length (funcall tab-=
bar-tabs-function frame)) 1)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;;=
 Close the tab with the initial window (bug#59862)<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0(or (eq (nth 1 (window-parameter window &#39;quit-resto=
re)) &#39;tab)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;;=
 or with the dedicated window (bug#71386)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0(and ;; (window-dedicated-p window) ; &lt;=3D=3D=
=3D=3D THIS WORKS BETTER<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 (frame-root-window-p window)))<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0;; Don&#39;t close the tab if more windows were =
created explicitly<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&lt; (seq-c=
ount (lambda (w)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(memq (car (window-parameter w &#=
39;quit-restore))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&#39;(win=
dow tab frame same)))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(window-list-1 nil &#39;nomini))<b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2)<br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0)<br>=C2=A0 =C2=A0 =C2=A0 &#39;tab)</div></div></di=
v></blockquote><div><br></div><div class=3D"gmail_default" style=3D"font-fa=
mily:monospace">The patch is unreliable when there are tab-bar-tab-prevent-=
close-functions.</div><div class=3D"gmail_default" style=3D"font-family:mon=
ospace"><br></div><div class=3D"gmail_default" style=3D"font-family:monospa=
ce">The following altered repro will block the tab being closed yet the tab=
 closed message in &#39;window--delete&#39; will still show.=C2=A0 Should t=
abs be forcibly closed in this case?</div><div class=3D"gmail_default" styl=
e=3D"font-family:monospace"><br></div><div class=3D"gmail_default" style=3D=
"font-family:monospace"><div class=3D"gmail_default">(setq kill-buffer-quit=
-windows nil)<br>(tab-bar-mode)<br>(select-frame-set-input-focus (make-fram=
e))<br>(switch-to-buffer &quot;FOO&quot;)<br>(tab-bar-new-tab)<br>(switch-t=
o-buffer &quot;BAR&quot;)</div><div class=3D"gmail_default">;; these emulat=
e the effect I see<br>(set-window-prev-buffers nil nil)</div><div class=3D"=
gmail_default">(setq switch-to-prev-buffer-skip #&#39;always)</div>(let ((t=
ab-bar-tab-prevent-close-functions (list #&#39;always)))<br><div class=3D"g=
mail_default">=C2=A0 (kill-buffer))</div></div><div class=3D"gmail_default"=
 style=3D"font-family:monospace"><br></div></div></div>

--000000000000369b1c0631a3b458--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 11:58:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 07:58:10 2025
Received: from localhost ([127.0.0.1]:40143 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzDmL-0007qw-An
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 07:58:09 -0400
Received: from mail-ua1-x92a.google.com ([2607:f8b0:4864:20::92a]:60500)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tzDmI-0007pS-E7
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 07:58:07 -0400
Received: by mail-ua1-x92a.google.com with SMTP id
 a1e0cc1a2514c-86feb848764so1915456241.0
 for <71386 <at> debbugs.gnu.org>; Mon, 31 Mar 2025 04:58:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743422280; x=1744027080; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=JNeMSY3jQsFrc5llZQGSCswcXwr49i3t8KuCzAa+X8M=;
 b=bt4if2B6/AHrvWKQ7slXOeMUIoj5TOXDNJJTZSJBh6TLIsVxSMOKSJNRyN/M6GgM3R
 sPj15zEA5tEKnO60lb6laF58nbTrKwsDkBJwQNBl59KUu5kNsOfuutYvrEi5VmADAs6E
 za5q35pSCynkMY9uEwS/WOdtSLigfjkkZlZfcOit7qyb5PbbSAD5IoEyr09q8iH255hb
 bYuESe1LmPseGYS+olE9sX1JQBzmOWkbqRMI01TYJp4zm1nmmM/CFPH66rN0vBxu4lPo
 q6zYPcB4qIkMOcQga70l6zmnffekS0/6zbUfR0JDN9MbbhEb8dZyVXWpE8dru2OKUJJQ
 pZ1A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743422280; x=1744027080;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=JNeMSY3jQsFrc5llZQGSCswcXwr49i3t8KuCzAa+X8M=;
 b=M2/d98pyuSJ/sL87J0O7OH9rePsYBEk9QjgvgJpWPMAM/ovhQI5f7VYTgqJplj5IA4
 xZC59UIoqmZdHOiPLJ0Gs3Yjdl//QUbTUcnfc/4/J4z732xpWf/dFm3MF6gY1+g10OpW
 KDCGUmWFNi8duMMtfHVJSS0FIyYNXtyRp44isyXqQuNy5KN9nkmBohoQN5ATxtW1U1EJ
 bUBzhqwDM5+OYub3Qm/Wdud3NFrq7sb69PmLcxypXEx18SrG0UQz33xL4t+dyUWKp7Nd
 k0DnCrMnSQ47gNeAgERtvS+QGzoTBU1kk1GZHWWAlkIk5ksGyJ3SUQCFqrISIQ4/w+JV
 EuOw==
X-Forwarded-Encrypted: i=1;
 AJvYcCVv18U1C/x93SlOK8njNVuXkgfsTMKp/CD6XW85gMybuXXIYWlHoMEAFEgxvnssSvnFG9cxxw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YxYH28oyeziMWR0NTz/W4hO4DqACENtjTlvdEhlLGLRqHdhm+JD
 fwZfITkoZqol9jfrsKDyTLvNkSgcfhpQa16DPu0xwSPK6IoTT2vviHIhcrINZFux+hfaWsAq7QI
 /SxaEyQ4MRQHOcGXXOTFYG76BExs=
X-Gm-Gg: ASbGncvLBRrFipgePQDsOPpAvj+4aN14k6FspBOG99c+MCn2hXj0UIJZSyo/LlKOi17
 tmBfiA2ffTmi5GnKuSWIb4WWUaJeAvVS1LyLtL8Xwp5tXglfu0cp5Q93mfT3/LgC9KRLeLwVC/+
 aTdbUc/23Rc3flpX2wpm0gutcauxa8niwVPdLs
X-Google-Smtp-Source: AGHT+IHfpbnNlR1eaRPWu5LZctxT6ugOKvWAv8RnQrYqYaYTkIk5zEsnuMxL4ETPNGQX/e2zv9MVciZ2zwSrc9+PAKc=
X-Received: by 2002:a05:6102:3ec6:b0:4c4:e415:6737 with SMTP id
 ada2fe7eead31-4c6d399a575mr5366029137.23.1743422280421; Mon, 31 Mar 2025
 04:58:00 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
 <e96d3ec6-38d0-4b28-8f41-eb029ca6b8b8@HIDDEN>
In-Reply-To: <e96d3ec6-38d0-4b28-8f41-eb029ca6b8b8@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Mon, 31 Mar 2025 07:57:49 -0400
X-Gm-Features: AQ5f1Jpk-sWaFzx8Wt2d82qYbuzGgGym6hlcenG8CpQOCosCI08QpJe6YmiVF38
Message-ID: <CAN+1HboCVQUxvB2N8VgcA4HHg1cZOvHotOf4f+8SVtQQvEWV3g@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: martin rudalics <rudalics@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000b7d7f50631a22169"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000b7d7f50631a22169
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 31, 2025 at 3:59=E2=80=AFAM martin rudalics <rudalics@HIDDEN> w=
rote:

>  > I'm not using the display actions in my configuration and I don't invo=
ke
>  > the tab-bar functions that use it.
>  >
>  > I have two tabs on a newly opened frame.  Both tabs have only one
> window.
>  > If I'm on tab 2, and I eval (kill-buffer), the frame disappears.
>  >
>  >  From inside window-deletable-p: tab-bar-mode=3Dt #tabs=3D2 quit-resto=
re
>  > parameter=3Dnil window-dedicated-p=3Dnil frame-root-window=3Dt
>
> Can you give us a sequence of function calls that implement the behavior
> you sketch here.  From the text above I don't even understand whether
> this is about tab-bars or tab-lines.  Among others we need to know
> whether the window showing the buffer to be killed is dedicated to it
> and what the value of 'kill-buffer-quit-windows' is.  If the latter is
> non-nil, Emacs will try to call 'quit-restore-window' for any window
> showing that buffer and that function expects a 'quit-restore' parameter
> for that window.
>

I haven't experimented with kill-buffer-quit-windows yet so it's nil for me=
.

I've spelunked through my use-case state and it's, as usual, hard to tease
out.  Below with -Q reproduces the effect.

(setq kill-buffer-quit-windows nil)
(tab-bar-mode)
(select-frame-set-input-focus (make-frame))
(switch-to-buffer "FOO")
(tab-bar-new-tab)
(switch-to-buffer "BAR")
;; these emulate the effect I see
(set-window-prev-buffers nil nil)
(setq switch-to-prev-buffer-skip #'always)
(kill-buffer) ; frame is deleted when I expect the first tab to remain
intact

If the patch removes the test for window-dedicated-p, it leaves the first
tab in place.  I almost never use dedicated windows outside of a few
packages that do but those haven't been in play vis-a-vis this issue.  I
don't pretend to fully understand what situation w-d-p is intended to deal
with but if we can accommodate both, that'd be fine.

     ((and tab-bar-mode
           ;; Fall back to frame handling in case of less than 2 tabs
           (> (length (funcall tab-bar-tabs-function frame)) 1)
           ;; Close the tab with the initial window (bug#59862)
           (or (eq (nth 1 (window-parameter window 'quit-restore)) 'tab)
               ;; or with the dedicated window (bug#71386)
               (and ;; (window-dedicated-p window) ; <=3D=3D=3D=3D THIS WOR=
KS BETTER
                    (frame-root-window-p window)))
           ;; Don't close the tab if more windows were created explicitly
           (< (seq-count (lambda (w)
                           (memq (car (window-parameter w 'quit-restore))
                                 '(window tab frame same)))
                         (window-list-1 nil 'nomini))
              2)
           )
      'tab)

-Stephane

--000000000000b7d7f50631a22169
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Mon, Mar 31, 2025 at 3:59=E2=80=AFAM martin rudalics &lt;<a href=3D"mail=
to:rudalics@HIDDEN">rudalics@HIDDEN</a>&gt; wrote:</span></div></div><div c=
lass=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex">=C2=A0&gt; I&#39;m not using the display actions in my co=
nfiguration and I don&#39;t invoke<br>
=C2=A0&gt; the tab-bar functions that use it.<br>
=C2=A0&gt;<br>
=C2=A0&gt; I have two tabs on a newly opened frame.=C2=A0 Both tabs have on=
ly one window.<br>
=C2=A0&gt; If I&#39;m on tab 2, and I eval (kill-buffer), the frame disappe=
ars.<br>
=C2=A0&gt;<br>
=C2=A0&gt;=C2=A0 From inside window-deletable-p: tab-bar-mode=3Dt #tabs=3D2=
 quit-restore<br>
=C2=A0&gt; parameter=3Dnil window-dedicated-p=3Dnil frame-root-window=3Dt<b=
r>
<br>
Can you give us a sequence of function calls that implement the behavior<br=
>
you sketch here.=C2=A0 From the text above I don&#39;t even understand whet=
her<br>
this is about tab-bars or tab-lines.=C2=A0 Among others we need to know<br>
whether the window showing the buffer to be killed is dedicated to it<br>
and what the value of &#39;kill-buffer-quit-windows&#39; is.=C2=A0 If the l=
atter is<br>
non-nil, Emacs will try to call &#39;quit-restore-window&#39; for any windo=
w<br>
showing that buffer and that function expects a &#39;quit-restore&#39; para=
meter<br>
for that window.<br></blockquote><div><br></div><div class=3D"gmail_default=
" style=3D"font-family:monospace">I haven&#39;t experimented with kill-buff=
er-quit-windows yet so it&#39;s nil for me.</div><div class=3D"gmail_defaul=
t" style=3D"font-family:monospace"><br></div><div class=3D"gmail_default" s=
tyle=3D"font-family:monospace">I&#39;ve spelunked through my use-case state=
 and it&#39;s, as usual, hard to tease out.=C2=A0 Below with -Q reproduces =
the effect.</div><div class=3D"gmail_default" style=3D"font-family:monospac=
e"><br></div><div class=3D"gmail_default" style=3D"font-family:monospace">(=
setq kill-buffer-quit-windows nil)<br>(tab-bar-mode)<br>(select-frame-set-i=
nput-focus (make-frame))<br>(switch-to-buffer &quot;FOO&quot;)<br>(tab-bar-=
new-tab)<br>(switch-to-buffer &quot;BAR&quot;)</div><div class=3D"gmail_def=
ault" style=3D"font-family:monospace">;; these emulate the effect I see<br>=
(set-window-prev-buffers nil nil)</div><div class=3D"gmail_default" style=
=3D"font-family:monospace">(setq switch-to-prev-buffer-skip #&#39;always)</=
div><div class=3D"gmail_default" style=3D"font-family:monospace">(kill-buff=
er) ; frame is deleted when I expect the first tab to remain intact<br></di=
v><div class=3D"gmail_default" style=3D"font-family:monospace"><br></div><d=
iv class=3D"gmail_default" style=3D"font-family:monospace">If the patch rem=
oves the test for window-dedicated-p, it leaves the first tab in place.=C2=
=A0 I almost never use dedicated windows outside of a few packages that do =
but those haven&#39;t been in play vis-a-vis this issue.=C2=A0 I don&#39;t =
pretend to fully understand what situation w-d-p is intended to deal with b=
ut if we can accommodate both, that&#39;d be fine.</div><div class=3D"gmail=
_default" style=3D"font-family:monospace"><br></div><div class=3D"gmail_def=
ault" style=3D"font-family:monospace">=C2=A0 =C2=A0 =C2=A0((and tab-bar-mod=
e</div><div class=3D"gmail_default" style=3D"font-family:monospace">=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Fall back to frame handling in case of=
 less than 2 tabs<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&gt; (length=
 (funcall tab-bar-tabs-function frame)) 1)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0;; Close the tab with the initial window (bug#59862)<br>=C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(or (eq (nth 1 (window-parameter window =
&#39;quit-restore)) &#39;tab)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0;; or with the dedicated window (bug#71386)<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(and ;; (window-dedicated-p window=
) ; &lt;=3D=3D=3D=3D THIS WORKS BETTER<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (frame-root-window-p window)))<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Don&#39;t close the tab if more=
 windows were created explicitly<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0(&lt; (seq-count (lambda (w)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(memq (car (wind=
ow-parameter w &#39;quit-restore))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0&#39;(window tab frame same)))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(window-list-1 n=
il &#39;nomini))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2)<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)<br>=C2=A0 =C2=A0 =C2=A0 &#39;tab=
)<br></div><div class=3D"gmail_default" style=3D"font-family:monospace"><br=
></div><div class=3D"gmail_default" style=3D"font-family:monospace">-Stepha=
ne</div><div>=C2=A0</div></div></div>

--000000000000b7d7f50631a22169--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 07:59:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 03:59:22 2025
Received: from localhost ([127.0.0.1]:39574 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzA3F-0004KM-86
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 03:59:22 -0400
Received: from mout.gmx.net ([212.227.17.22]:51245)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1tzA36-0004IR-Us
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 03:59:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743407946; x=1744012746; i=rudalics@HIDDEN;
 bh=PNXwK8PY2Rjlf5iqCCd1RVRSXmKhBbUjD3NBkseNSX4=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=Rux6Pf9mIH3touXsiEpszdXU+P+/SeJbNLVqhs5hIGmNQ1zvZSunH/yZC894R/I7
 iXUUwRnMhXOFSjtolIQ/1xtnEC2yrrwLjYvbfNnGMwMsrxVCXsLR0w3cor3BXzAcH
 QIhySLDVAX4JFCvi3NmA9fBomm08j8h9cDSrXM3FIMC3P0GuiJf/1w8e/e/2RFUX/
 PmpYOKdW1o20myj/dr8cEDoXXA+CBMS3KfLQzZ4NwbKX5bDb68w2VzvjvIaaG7UVt
 ZdgJGA6YEmyLwpPl+wbtAYRi7kuKgeJ/EoDMsqm+zQyDw8LyrwMvPKmNTfDtQTeOM
 5cWxqOqngYmB83srtA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([46.125.249.15]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MdvmY-1tQeZr3ln4-00feIT; Mon, 31
 Mar 2025 09:59:06 +0200
Message-ID: <e96d3ec6-38d0-4b28-8f41-eb029ca6b8b8@HIDDEN>
Date: Mon, 31 Mar 2025 09:59:04 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Ship Mints <shipmints@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
 <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:29FKjQ8ZU8oFPijPSuBwDggPzkda0CIazUAIzARtI/xMfRllAvv
 4r2FqCaBO4uWFOzVPJ1NxkmnlZF6FjEyGy7OIdsnLH1RkP45pKfydMfbQQiBioUbvU6znwY
 FW7GMVkZunsvcGbqQQkjSdHPWUsOQ+jsD7X9fl3RK6pX2crl6Qrr7x2qL0AVBjS07zlK/OU
 lOhmBYvnc1cICKa67EX0g==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:r/zddhmDZLk=;OCpLTr99jEjkhLfKS/0qFJi7WI0
 rZ8lmNfh800BzOjMOlqxY1g9OeJxMHIh7RCf4OnDzKSDGlK0Q/StMZcVK3dzxp5gKfIsFpZNw
 LGI27kwt+Vjql0/HizB0nqojA1sUKeengXGUyxG1EwA6fIlYfEXxISoMWfitzaQj9lMQDbG+k
 buWfRg+Ri0YPACTaUUtbFw1X+5D59UGxyCiPMmrZxHdn0E5uU3X+7lX6Sbn5WDzK2gch/3zpY
 rYACb2Ob/GhSNMHZf9yVTUjaBM7Nl8IU5ftltjBZaXrjUGK+REnvHIAL4j7XSggUTWAnydAVj
 zNwegJqLwHGcdZVJYpMYhYRzy+XULl3++iGSQ8O5qnUQVFA1opVphmthEtUMqP0gIGKXySfla
 Bv+o6JZ0kapVMa1fmpToN521RIggbwLT5cICS3cW9lCUtqL0RHLI/ohGL/LG09xyvZ6w952TL
 czPlzs4pbAgJYt6JSgUuukqPuyRgw8rTmpwuLEAt3KpJJgGajmolxi5vVGUX68rlk8LLLAQM+
 EVEx/IQosG+dFGiyN03xd2iTA/1K8ZB6T+oDbqk9Voc8VL6xkfmo2x7/rMWlpt1ii6Vi1JDrG
 JWdupEuOq+a903/UaDA0fvVouwQhc9pmheAZY0blAEB40Vdqi+PHsMfIYAib3RGzpAmDEJxVW
 bGe5vsYXQP2WmaVDgVov7tppp8IhdIlbh7LP4emTVQ/N1WsN5u6VeJNU7uduMQLcN8ewAPU9y
 X2Csn5BdHqBAW9eb95oBsA/X7Bh+XsTOQ+6m0iyRmcTd/XAOSC6/Qs5/10YLmL5CcACTaHstb
 YvrpnWVSmPWXrOMDTG2IMo6NvuI0DZtNJzR0oc4ExiHllvrlaoqDNyFN2r7Hsl6EWtirIW0oV
 HQ8jkLYXzBxuoXJ3S/njU7RG8+BJBMsnAtHrVZ+tr6esJzV2AGoInHp74x4/jDC6pJeTzuyJG
 NLAUD985f3xceqgj/LryoMmloOC8hE4mEDU9Dp1iF4dylO67+zWdEcbn5mRkoE9oed3AdzQao
 yaQAV/l5/2PfLSq5oFxBlhfEnLuI0UixjbRmr6xK2gMeQLIF0K1o4zWwFSc4rKyEcN8VITKB4
 MthO20Z8dwohLRXcv/ZmwZEoqhy/PHLrpA0a1JYFuWVpnevXlr9awT3s1gQfJTOjMq3bs0AKU
 sH8xGdBdACtrbjD7dfZAKq4SEnhXce66KxVM/xJNfhg2kn8nAFQJoKU0Pjl/5IrvhJdbuCCqp
 w/hONRZ/aOSbe1bMy7y0rbTAh0nGzHjHuSKFpwe5/aAb9NttN4rm8YKCR3kqXHuHNjMm+ooW5
 +ueUTOjPPg2tCq2R/uGC0Yaflk9tCE1JyNdFDdkTnB4G0kJddg0n2x3XCkHaYJdkk1P+jydmY
 jSlT6g2Cq70rJ8QS1/rEIHVCPj2rrP5V8gxTZ0TkD1xqvRygDDx9F8tSxNWm180jrEhLS5dQY
 CrMGrB9MRlScEIiUuZd+1EKYAUIFv5MEIgjQEkp8iqShqFwq1
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > I'm not using the display actions in my configuration and I don't invoke
 > the tab-bar functions that use it.
 >
 > I have two tabs on a newly opened frame.  Both tabs have only one window.
 > If I'm on tab 2, and I eval (kill-buffer), the frame disappears.
 >
 >  From inside window-deletable-p: tab-bar-mode=t #tabs=2 quit-restore
 > parameter=nil window-dedicated-p=nil frame-root-window=t

Can you give us a sequence of function calls that implement the behavior
you sketch here.  From the text above I don't even understand whether
this is about tab-bars or tab-lines.  Among others we need to know
whether the window showing the buffer to be killed is dedicated to it
and what the value of 'kill-buffer-quit-windows' is.  If the latter is
non-nil, Emacs will try to call 'quit-restore-window' for any window
showing that buffer and that function expects a 'quit-restore' parameter
for that window.

Thanks, martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 07:59:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 03:59:06 2025
Received: from localhost ([127.0.0.1]:39571 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tzA2z-0004Hr-2f
	for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 03:59:05 -0400
Received: from mout.gmx.net ([212.227.17.20]:38139)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1tzA2t-0004Fr-OV
 for 71386 <at> debbugs.gnu.org; Mon, 31 Mar 2025 03:59:00 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743407930; x=1744012730; i=rudalics@HIDDEN;
 bh=g9tDXPzyVWFDvPQggdr4whX2oiI6lLVfH0r3texc21w=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=InyiTEv4L/cAspNFRdZd4bQ2sEVJ/YA7t1o0WHQ+wctQJXQ5ePtZDXORxPsbCp0m
 YuNWgvSeRkhN4rYEJO6A0SpVd/t02qtkDQcxDYYqIZf1DhagRMLLohg1QHLXwpYZV
 ny8oQ7qh+m8prnlbtLbMUXrz0nfpJA5G79uo6Y7jZBhlTQbIH94cVkqRoUWofDi/I
 AYpOGzP6wcvVlWvhvUJBNtMQ1MAOLhlGP7mT8KdTYRyS815AVsJF1ohUVWuWOarLM
 YiQx97r1C+fPtQoKAfPgaxtVBGxakz99OlVHxVDyuRXHr81PJc8sAFyNsrDiTKDUb
 HlSGyEVe0G/QlCPwFA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([46.125.249.15]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M89Gt-1u3Idd2SuZ-00AdGe; Mon, 31
 Mar 2025 09:58:50 +0200
Message-ID: <4d9ca0f4-4322-4623-b08d-5a8e6a43b0a2@HIDDEN>
Date: Mon, 31 Mar 2025 09:58:49 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Ship Mints <shipmints@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:WOw8uF+wn+xulEO7NZrV60kb4cl65HohyrCh7cSOldM28vDTwXE
 y2SNDe/2jZ5HtNdHoXsn1KvmwULEkJeDMXx5yISNBEUU0kMrFNZQCEPB+9ImdbLiGqpM6Uk
 q0JyDD2rUqvwu1wesct+kVv9h6u/j9oDav41wJtIDkDPZtBz3e73biifJ0RZTSjB7vd98Ca
 hHhAS8ljbs8emCU8Sneig==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:ug4oNrdT/zo=;gDh7PZcj62UKOIDGJgxFoFUq6lq
 ROMC6SN3EyrMYQ+MQ5mgnuqzSuOhK8R6e0HEQF48/wzFME8Waw/nsqXDxzOJ1LTEJ3zetX5D7
 14eLabynnfi7dT8kvO/X6fpYkSdvFi4aWGTtDpNxf1D91NJ6lSCezEqflVi5YxisMBAZpy6QE
 bJutf/KcMubbep1zfvRfUnY+kRqn/HCjiVywhSXgYpvjI2AI3ShwA571UoyJasLkbjeCmEqqT
 Y8Meduh9T19VVlCPuMSzGOsm/TbSm3kIU8YFIJiPLFcZftkyQkmFfDvCCAvp9zxaov/2nZgkl
 wAssfPVNeq397dElfceS3W7stVimaDB7c8r3B3Mof20699fFZDxx5k9HG/ffKLbt3T6IlZFsk
 pcVjV09WADwOl7HsRJgqzdlLx7Xv13Emus/ry4b65J6ow5K3bSoeHBxba8CXHXJq8Z8jQ4OBx
 hlwBNnNwaxYvPQ+fBfEtQ5dVRN5N7bfzpBXTZds91/qRRajVRGSxKKgLXnovyaFBsofxvNVxI
 KrSte0zSuA0Q9cBuNmiHHVHV8EDgbAuzJ/cGvO8m6NJXpPfMKFa73AXRhqaQZr9h+Efw8yAk3
 /Qy08PlZzcO1TGjI0aKaKQZW2lxpAqCaeATTp2ArabfxN1zHJ7NFmB1I45BVP+7I/2OodM7iG
 yLH8ZjyiVSxu41dDYv58QkrQ+kjvRx9NYqGUJPxCc425R/OKaQlmQrRUXWyD2KCPtk5Y439He
 ZcSbiHrnN0dTHQUG2spZVKSQonj5Q2bTFtQP5zER9+2iSawmTXed6726DBtdMLfd9VKF/PuzU
 ZqEqVdnU2Z0BwcvduB6+Oc+0+80EzG4zlGhLsqav/4EcWIbT5L0zRn+uDiqdrP/kkQNCW4Txl
 XYbiE4G+6a3N/BU7QRmyZsQAEABN51EHAJmmUtrkWOyUSbHp9oi/7SPVnhAwsFGBhiG7clOhl
 O0QW2azLxr1mLU5DbsJdpdEUF4MXPOZpB8aqTL8GhvTawUyuDK/gTxH8UzZLzh5321MX7eSg1
 3cSoxU95bkO8BDbvuBct+Mv8TwH7UTwUXqLUVX4e6Bqemubb5G43OtTlArXZdxR+aTSqD30UX
 FTALeIOgafAnMgbiIw6yCjw/bQuchUb6FYQGI199B2YYaOyhRDuIFwoCN5NGRmCEpFjiFVQMq
 lku/p4GN5aFwHuRiVDyBlgRedyWH0i0xDduD2MLHqUE+aRN4PKNMKBrWYlkHrWrY37olX1l45
 eJBThyJ5J//J+S3R+HnbXqvbbIpdvjrT2pYjNbo2ObTljCKcew8GSkZ/BWMqLjYIjt70UR0t0
 xzLfnWiIb0YkI9pJzJ+oy6ZLSMX7M0v/nsr2stayA0jxIxtQc6b7St61jbRifk6PEmxmyy94O
 +BccoPbL/XXXgbn/DRiRtNO9k2zbxzamgzjgSbUfIKXQCubWWsSbX1EUBQuRTSbfxTtSO0w+g
 cEdb3CwS+ZGrXLPiO4BPY851AmkX0f7RbORwLEVF71LKz0YX9
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > Minor point...when reading through the code, I think the docstrings for
 > 'window--display-buffer' and 'display-buffer-record-window' need to add
 > 'tab to the TYPE section in each.

Should be fixed now.

Thanks, martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 31 Mar 2025 01:38:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 21:38:04 2025
Received: from localhost ([127.0.0.1]:38622 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tz46D-0004C0-Tg
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 21:38:04 -0400
Received: from mail-vk1-xa2d.google.com ([2607:f8b0:4864:20::a2d]:43331)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tz469-0004AH-7M
 for 71386 <at> debbugs.gnu.org; Sun, 30 Mar 2025 21:37:59 -0400
Received: by mail-vk1-xa2d.google.com with SMTP id
 71dfb90a1353d-523fa0df55dso4723015e0c.1
 for <71386 <at> debbugs.gnu.org>; Sun, 30 Mar 2025 18:37:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743385071; x=1743989871; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=RYuXAXXYK9+8qJiEy7XjIyEFEJJHzC6i8x/3BirunfU=;
 b=M0kUlBLGcV+C4N8TW3pOOF7f9hp264l3xFUx3yljZk282K5BXuUcUfADWVjmKHT3gF
 +3YAmXCyPCp8yDCH03mvWufP3Gqs8EaBJfSoHeiTBBJA0y+3sEj85WDLNODe3xQxIuTO
 a6CusAQgGUYf+HhC9poTV5JoALGRJt0kkJPCd1nthRwzvaCQxaHfiYi5iocvZ327cA2S
 38DYA0EoeDnB8DNjaw+6WD49UwOVsn0byjqHty4hF7IMflmLBhU1zAhz9XD719tdlcTw
 rawHb9AWEMPRUFBbPCBOEsZF+aQxjx71z8rd4QPGJTpiQa7hHq8Yq7A5w5u4pTDpGI62
 h9uw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743385071; x=1743989871;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=RYuXAXXYK9+8qJiEy7XjIyEFEJJHzC6i8x/3BirunfU=;
 b=W7+KNOyimkBZv5IYZT2D6ZdG9ysHgj0fO6me60tH07Ycqfk1brrmsb4fohvVPgIazk
 dqLhAmloFkvAnmivXsTja9PwAeymUvWlaJ0hoSM8xHC8TjSgt4WD0bZHeqcblsJ/O62F
 oSE2RZyo8ELq5dOAIrhvVmtmf/VyCcx6NavPDulifqnuDxihTBUvUIG5iaF/LKDou+f1
 Ed116KriqMcrK/GPYXw+Mno9QsDYdiNx13vo/ZC+xhgEpkQ8JPIb91ulzIQah3G3tUzj
 3/ZTh0IMsAzv8TfvTtQk4UP9XaT868G8NFUzxGpNzjR04g8UPULJu2iaO/bZ+AHNG9E/
 qQaA==
X-Forwarded-Encrypted: i=1;
 AJvYcCUpSbCvo50fPtRCT12anJJ7T7YIqDOGSKztDkg3l+r1kXqg7bn6ygLVMl3wKzXLeMEDvWenOw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yypj0Y/HBO9mbirHGupYE5rppXWYx/2ffsu2B0OzO2Q9uv3jR8S
 dfruipYboODEEUiwA3Y64/c/894p0ltOuEs0ZG9T+IOwntjhGib/c15Yp233lTIuMosuy3h7dOq
 R8Fv7RpfGNBYHdrEeIey/2huuye0=
X-Gm-Gg: ASbGnct59IkwqzrYI8VAuh2AYxY5Xosms/VsSIvsWnX8EhIEIZYb7B0ped8Jp7csxlJ
 +hnYz9Rt/Lsvxh+AISpTL1mJmzg6l7L4ZA7ISI0EDG/XhI8uxToZd+3e+mfqjmhAH5U36EqyqRu
 BR/lWha8FyFmx2yTvLh3BiOhIn2Q==
X-Google-Smtp-Source: AGHT+IGzOGmffO92aZs5z+OSxmz4+ivFIpBo7T6pwJg4g9eMgipgo+gOQrMa3y7ly9B4F1p53sPm/ZIkZu5wsG4zIlU=
X-Received: by 2002:a05:6122:924:b0:518:8753:34b0 with SMTP id
 71dfb90a1353d-5261d4764cfmr3536907e0c.4.1743385071411; Sun, 30 Mar 2025
 18:37:51 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
 <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
In-Reply-To: <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sun, 30 Mar 2025 21:37:40 -0400
X-Gm-Features: AQ5f1JrvzTiv66sHcEKLnp9f0o5jAbOKZGeFUSg6iDf_fn-V8z6j5LrSXKq9018
Message-ID: <CAN+1HboBTmS03caS1ce9zw+SHyzyg0JzRDwBFR70TwXMr+QR4w@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: martin rudalics <rudalics@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000e3687b06319977ae"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000e3687b06319977ae
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 30, 2025 at 10:38=E2=80=AFAM Ship Mints <shipmints@HIDDEN> w=
rote:

> On Sun, Mar 30, 2025 at 9:55=E2=80=AFAM martin rudalics <rudalics@HIDDEN>=
 wrote:
>
>>  > I'll give it a try.  I have a question, though, and sorry if the
>> answer is
>>  > obvious.  Where is the window parameter 'quit-restore get set 'tab to
>> begin
>>  > with?
>>
>> At the very end of 'display-buffer-record-window'
>>
>>     ((eq type 'tab)
>>      ;; WINDOW has been created on a new tab.
>>      (set-window-parameter
>>       window 'quit-restore
>>       (list 'tab 'tab (selected-window) buffer)))))
>>
>> I suppose.  The initial call is from 'display-buffer-in-new-tab'.
>>
>
> Makes sense.  Thank you.  I don't use those display actions.  Juri's patc=
h
> should address the main issue for both use cases.  I hope to try it out
> later today.
>
> Minor point...when reading through the code, I think the docstrings for
> 'window--display-buffer' and 'display-buffer-record-window' need to add
> 'tab to the TYPE section in each.
>

Hi, Juri,

[The patch probably needs to be rebased on master but I was able to apply
it by hand, I think.]

The conditions it's testing for are not ones that exist in my case.

The conditions are:

I'm not using the display actions in my configuration and I don't invoke
the tab-bar functions that use it.

I have two tabs on a newly opened frame.  Both tabs have only one window.
If I'm on tab 2, and I eval (kill-buffer), the frame disappears.

From inside window-deletable-p: tab-bar-mode=3Dt #tabs=3D2 quit-restore
parameter=3Dnil window-dedicated-p=3Dnil frame-root-window=3Dt

HTH (hope that helps and happy to help),

-Stephane

--000000000000e3687b06319977ae
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sun, Mar 30, 2025 at 10:38=E2=80=AFAM Ship Mints &lt;<a href=3D"mailto:s=
hipmints@HIDDEN">shipmints@HIDDEN</a>&gt; wrote:</span></div></div><d=
iv class=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_q=
uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2=
04);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div style=3D"font-=
family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">On=
 Sun, Mar 30, 2025 at 9:55=E2=80=AFAM martin rudalics &lt;<a href=3D"mailto=
:rudalics@HIDDEN" target=3D"_blank">rudalics@HIDDEN</a>&gt; wrote:</span></=
div></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin=
g-left:1ex">=C2=A0&gt; I&#39;ll give it a try.=C2=A0 I have a question, tho=
ugh, and sorry if the answer is<br>
=C2=A0&gt; obvious.=C2=A0 Where is the window parameter &#39;quit-restore g=
et set &#39;tab to begin<br>
=C2=A0&gt; with?<br>
<br>
At the very end of &#39;display-buffer-record-window&#39;<br>
<br>
=C2=A0 =C2=A0 ((eq type &#39;tab)<br>
=C2=A0 =C2=A0 =C2=A0;; WINDOW has been created on a new tab.<br>
=C2=A0 =C2=A0 =C2=A0(set-window-parameter<br>
=C2=A0 =C2=A0 =C2=A0 window &#39;quit-restore<br>
=C2=A0 =C2=A0 =C2=A0 (list &#39;tab &#39;tab (selected-window) buffer)))))<=
br>
<br>
I suppose.=C2=A0 The initial call is from &#39;display-buffer-in-new-tab&#3=
9;.<br></blockquote><div><br></div><div style=3D"font-family:monospace">Mak=
es sense.=C2=A0 Thank you.=C2=A0 I don&#39;t use those display actions.=C2=
=A0 Juri&#39;s patch should address the main issue for both use=C2=A0cases.=
=C2=A0 I hope to try it out later today.</div><div style=3D"font-family:mon=
ospace"><br></div><div style=3D"font-family:monospace">Minor point...when r=
eading through the code, I think the docstrings for &#39;window--display-bu=
ffer&#39; and &#39;display-buffer-record-window&#39; need to add &#39;tab t=
o the TYPE section in each.</div></div></div></blockquote><div><br></div><d=
iv class=3D"gmail_default" style=3D"font-family:monospace">Hi, Juri,</div><=
div class=3D"gmail_default" style=3D"font-family:monospace"><br></div><div =
class=3D"gmail_default" style=3D"font-family:monospace">[The patch probably=
 needs to be rebased on master but I was able to apply it by hand, I think.=
]</div><div class=3D"gmail_default" style=3D"font-family:monospace"><br></d=
iv><div class=3D"gmail_default" style=3D"font-family:monospace">The conditi=
ons it&#39;s testing for are not ones that exist in my case.</div><div clas=
s=3D"gmail_default" style=3D"font-family:monospace"><br></div><div class=3D=
"gmail_default" style=3D"font-family:monospace">The conditions are:</div><d=
iv class=3D"gmail_default" style=3D"font-family:monospace"><br></div><div c=
lass=3D"gmail_default" style=3D"font-family:monospace">I&#39;m not using th=
e display actions in my configuration and I don&#39;t invoke the tab-bar fu=
nctions that=C2=A0use it.</div><div class=3D"gmail_default" style=3D"font-f=
amily:monospace"><br></div><div class=3D"gmail_default" style=3D"font-famil=
y:monospace">I have two tabs on a newly opened frame.=C2=A0 Both tabs have =
only one window.=C2=A0 If I&#39;m on tab 2, and I eval (kill-buffer), the f=
rame disappears.</div><div class=3D"gmail_default" style=3D"font-family:mon=
ospace"><br></div><div class=3D"gmail_default" style=3D"font-family:monospa=
ce">From inside=C2=A0window-deletable-p: tab-bar-mode=3Dt #tabs=3D2 quit-re=
store parameter=3Dnil window-dedicated-p=3Dnil frame-root-window=3Dt</div><=
div class=3D"gmail_default" style=3D"font-family:monospace"><br></div><div =
class=3D"gmail_default" style=3D"font-family:monospace">HTH (hope that help=
s and happy to help),</div><div class=3D"gmail_default" style=3D"font-famil=
y:monospace"><br></div><div class=3D"gmail_default" style=3D"font-family:mo=
nospace">-Stephane</div></div></div>

--000000000000e3687b06319977ae--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 30 Mar 2025 14:39:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 10:39:55 2025
Received: from localhost ([127.0.0.1]:37687 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tytpL-0003x2-Bf
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 10:39:55 -0400
Received: from mail-vk1-xa29.google.com ([2607:f8b0:4864:20::a29]:54645)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tytoX-0003ux-AN
 for 71386 <at> debbugs.gnu.org; Sun, 30 Mar 2025 10:39:06 -0400
Received: by mail-vk1-xa29.google.com with SMTP id
 71dfb90a1353d-523de5611a3so1654901e0c.1
 for <71386 <at> debbugs.gnu.org>; Sun, 30 Mar 2025 07:39:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743345539; x=1743950339; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=KDLiQGcKv/otT3DeNDkJQzk51OlK03aL1jlHPEDkv+M=;
 b=DRP15Rxvb3P4+wzVh6aaR1XDuTxO90Qv/XypoFNyIoAnhFLUo9oFgGvzLtapHfjy6a
 vJYfTPmnQ1AhnhWxZ/y4WNEUOjPufPYnEJD/cu2Ou0opXj7VPZK4WOKNMD9DxEWYQnws
 +403RQxCVHyef3owJpuCrZzsP1dPwMO5QW5W6GM3qm2195hLYWQFJMQ8zcxU4hFPyYEX
 VTLLwAc7dIK035k0V5e9k3lyF8vyCzxWqkmKuQB9Wg84VVNJfJmWF8hf2+fog7VJ5o/t
 G5lLSadrMnadvRHRalrDY7liS3+YdcnqiGVMbRryDIx5xSItNnMQ0KwFEipISrwD7xq+
 nnAg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743345539; x=1743950339;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=KDLiQGcKv/otT3DeNDkJQzk51OlK03aL1jlHPEDkv+M=;
 b=kLyucpOhoQezl40gi2Gxex0Ide8PK/+WxYpFZnoKjg1fIpK1W1wqoI49kQS2+sj/pT
 cRdbo4+q0l8OFzLeDGcdUaJ3q/fT5FhBVBa/MwH5pNp/qqYWaCzrCcs5e8H85eBG6JVx
 ARkY5FBVa8G2+wwyapHlxvIIZPcD9vTIOhKuWRSzjNEnoIadkcWYwfFntgc7T6y48x71
 E7hC0aQSNsswKf5Z3xajTTgU3Z0vpgGFc6J8AcP7q7yHj6xgOvTydCM3blbHKrk6HqJ9
 00/WB7FIITUNqMNmIwc9Og7x6lhROltdWCslG+JHr8oBIrhke3yvNdzAv6gcmn87ai8T
 cxxg==
X-Forwarded-Encrypted: i=1;
 AJvYcCV7J0a6Shkhp9zdQGgnFotvjgnfpHCxOE09XMVpESO1glAEmGW+OD/b4POcP665NNpvLsnzIQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwXish1qYJu4C1tIh2v3lSIcbhYXb/WZ33v7MIPP/DE4I87kvNF
 wXkcJd+8gQXR1YlmB0AOFIY9DZtMaxPiZF7b410a2qurYOvP+FZiWDFnPMOnBpMZQplD9ZuhU8v
 WtnV8kxr1hUP1BoJO+cTnDmFssck=
X-Gm-Gg: ASbGncuKdG8IsFHrrsv0shtp/b/81JC8odUJupVA+v8os/hzWYCbZ17fk199MAqo6+W
 Hd/VAxB8aEGtiIBeaCcrvdWAaXNLIm01a8d79EiaqaWn2fpIxKjpNQ2MwUNTepIQtse4FmYmFj+
 ybBkOKKvxgdaCJXB3pwdXftpWgIg==
X-Google-Smtp-Source: AGHT+IHwjtXiq1H9+Y212rMimjjJTM8lSnLPKYsjpzz5BjejXoBzfHNi9TDutvOWZEf+MRD1taAbK/aNqWH6Sylz1F0=
X-Received: by 2002:a05:6122:3d0c:b0:520:420a:a07a with SMTP id
 71dfb90a1353d-5261d4b2e88mr3063405e0c.8.1743345539703; Sun, 30 Mar 2025
 07:38:59 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
 <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
In-Reply-To: <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sun, 30 Mar 2025 10:38:48 -0400
X-Gm-Features: AQ5f1JoRQviPSWvfA72Dhk2wt8wFPn5pq86e-My3169jY9jitCR-Gq7eEDNi1pE
Message-ID: <CAN+1Hbrqtm2uMMv-+4Unt3bGGD+bok9BRn0VY8qNoU1GcKXp1A@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: martin rudalics <rudalics@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000009d6cd006319043c4"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000009d6cd006319043c4
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 30, 2025 at 9:55=E2=80=AFAM martin rudalics <rudalics@HIDDEN> w=
rote:

>  > I'll give it a try.  I have a question, though, and sorry if the answe=
r
> is
>  > obvious.  Where is the window parameter 'quit-restore get set 'tab to
> begin
>  > with?
>
> At the very end of 'display-buffer-record-window'
>
>     ((eq type 'tab)
>      ;; WINDOW has been created on a new tab.
>      (set-window-parameter
>       window 'quit-restore
>       (list 'tab 'tab (selected-window) buffer)))))
>
> I suppose.  The initial call is from 'display-buffer-in-new-tab'.
>

Makes sense.  Thank you.  I don't use those display actions.  Juri's patch
should address the main issue for both use cases.  I hope to try it out
later today.

Minor point...when reading through the code, I think the docstrings for
'window--display-buffer' and 'display-buffer-record-window' need to add
'tab to the TYPE section in each.

--0000000000009d6cd006319043c4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sun, Mar 30, 2025 at 9:55=E2=80=AFAM martin rudalics &lt;<a href=3D"mail=
to:rudalics@HIDDEN">rudalics@HIDDEN</a>&gt; wrote:</span></div></div><div c=
lass=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex">=C2=A0&gt; I&#39;ll give it a try.=C2=A0 I have a questio=
n, though, and sorry if the answer is<br>
=C2=A0&gt; obvious.=C2=A0 Where is the window parameter &#39;quit-restore g=
et set &#39;tab to begin<br>
=C2=A0&gt; with?<br>
<br>
At the very end of &#39;display-buffer-record-window&#39;<br>
<br>
=C2=A0 =C2=A0 ((eq type &#39;tab)<br>
=C2=A0 =C2=A0 =C2=A0;; WINDOW has been created on a new tab.<br>
=C2=A0 =C2=A0 =C2=A0(set-window-parameter<br>
=C2=A0 =C2=A0 =C2=A0 window &#39;quit-restore<br>
=C2=A0 =C2=A0 =C2=A0 (list &#39;tab &#39;tab (selected-window) buffer)))))<=
br>
<br>
I suppose.=C2=A0 The initial call is from &#39;display-buffer-in-new-tab&#3=
9;.<br></blockquote><div><br></div><div class=3D"gmail_default" style=3D"fo=
nt-family:monospace">Makes sense.=C2=A0 Thank you.=C2=A0 I don&#39;t use th=
ose display actions.=C2=A0 Juri&#39;s patch should address the main issue f=
or both use=C2=A0cases.=C2=A0 I hope to try it out later today.</div><div c=
lass=3D"gmail_default" style=3D"font-family:monospace"><br></div><div class=
=3D"gmail_default" style=3D"font-family:monospace">Minor point...when readi=
ng through the code, I think the docstrings for &#39;window--display-buffer=
&#39; and &#39;display-buffer-record-window&#39; need to add &#39;tab to th=
e TYPE section in each.</div></div></div>

--0000000000009d6cd006319043c4--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 30 Mar 2025 13:56:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 09:56:04 2025
Received: from localhost ([127.0.0.1]:36053 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tyt8s-0001Zs-LZ
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 09:56:04 -0400
Received: from mout.gmx.net ([212.227.15.19]:51751)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1tyt8n-0001Xj-8j
 for 71386 <at> debbugs.gnu.org; Sun, 30 Mar 2025 09:55:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1743342946; x=1743947746; i=rudalics@HIDDEN;
 bh=q0bBtzl+xNWkKWga3MENt64qjnDEhYG+Y5IVwpxknMU=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=F9aKqjiPreVbKOWwFlASaBn6dXoj7kEP3oZMox9hVgQJ19aDph45E4rbI1BHk2jn
 ClyuBbRU1AVG13ilUqykXYfKO/2z6W7QF+2Yur9iK+q2y+FIhBPnnT2P4GDV4ICyk
 5AdzaisZdVvQGJOl2Y1i7VdgMg2hMs0UVrqtDHFo5raDcxQFF9JS41gBIYkOkxbtC
 RNeNiX+VwilLwPx5hCp+k45ddYyQ8foP3GprxNgnAaZ92cJkra/WOgPOOAGQFD39V
 NTnao2VDhaeWMMJcGhyvAuBp8HB9gWordRLycG2GK8ZnLPqdNmtjiknzT4ZeKGPg6
 +b+8kvM/jp5S7eOnqg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.212]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MHXBj-1tuGQt1NzN-00C8Qv; Sun, 30
 Mar 2025 15:55:46 +0200
Message-ID: <30cc0b6f-e2f5-40c7-beea-d60f0a908d06@HIDDEN>
Date: Sun, 30 Mar 2025 15:55:45 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Ship Mints <shipmints@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
 <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:8vIXGJjJGk6TdlwvDVCVWsL8CMTu86n4tNiSbpo2gIssBfdIukj
 xmDL3VnuujXsOHzwIoBLSUSja70/xocRjTJT3GI0MaYLDHNeJmMSIobitl2MzpcwEC359za
 2i2srpsVw/iH75tSBa4Pqco2hE8ainEnNM3iEo4qlLatDtjcgC5TQTRz+7ab/h/0qhxtaBM
 Cb29V8zu0R782ZV5Hn5Rg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:HJWf/vIaRFU=;nVT2T/J2SCwnBd/fJmv1XTsg6mw
 ariMegWR/yXCCegqybPYOaBxcfsAQWdHZZNf07oZjtxitUqsbl/vf7DlYuviVSJIzQUxtfAKq
 eB5IvNyF+lTEzYrEJ+C2hft9YBG098w7GkG5TDnMG7dFBwxkukFjyBPEpDuV51iIj0qK89NtC
 vuAUWJqXK+YYXoyO4Y/aB5cB3U6KEI1tW+/qkGaTBEowJpe4HJhrgre3kJWVEaU4GJKcFAGaE
 6ftW/ZRIJoFeiFmrE77/WemooEzEbtvDO8SlhPjKeJqUrwTRVrbReWD38cXYUFZ46QSMtDwbj
 xxjfvutVcQxJYrgaXyAuNAu69FUthcE+5lTszAW7sgAAD+5hmbuXihtiTt7E1nbHuEKHOwcya
 vLTJN/sGGzO3/7PjIJfz2gC7/UsSBcvlGYw3RDdxxkDxe/WQXacaHG37TY76T9TGxrCJGXuC/
 9TeItRAPNFltFrqwdQKuMvobbht7qPkd2EsOl+sLIdbQn8jm6nt5j+hIP0Slvb+0p9aqRNru+
 YAunZIwBliDpgcjUrGTMrAM5N2MkmkGY4CQWeOVLETQ+fE2P3J3lm8CGuVDqRcdkdBu3QRNZx
 bT5JvAyUn7sqgJdHxwrYaSo94U7MckrAcGpU14LINT/sR2ozVVpisl027+cxL9eFTiRs/yZ+D
 Lndd5y16DBAv/sxZNo4ZLZayLVJKo66NU/jDtQMZahykMu+4EK3j0IIh2gtXtfF09XxnoJbtf
 T+rDlceQrFBqVjYpDI9lcknMJe619ZTx6ITUPREwZkCXMcMkKWZ/A5ErJRu1ppkKwW3Xf5lQH
 5vn959W3wzOIrzDnK0UB8RhTJ3H3xHDSzcYdp73xIZu7pIVu0DdtFtAUMXsaUxqfXc0X9r8uc
 kDLdoSbaW7Mr0H4tML8Nez1pMTiYROMtIjdb2OB8ONPZByIQqCFdVwQ7yw6+qcNyGRgnJfz48
 4iHWpGoAlwJ2i5Vb/HRcJAdIjt/fPdLlbqkosQttOsMLZuY6Jf5DzBnNt56Iz0vejaUWO1/e+
 IEPFFoCkUUca5PZyzY4yj+3vcrzZZ/iuVLG3LTqHXrPbUKNE1T1kHY9LTYXazq5oCazeQXMmm
 Ph9M09Uc469NboU1SgdJUvWEvHwTCEzAVzNaF+vAsGnHSlK3fiX21NBbjvjKzuZNnjGwjWqYW
 Ell27gZ3QucVWnVXgAQ1S8MWTZnHTmBG31PuHx50/TTChk2TWoghqKpRsctb+6q5Fmi3Lw63q
 aZJfR+am/aCmAiXNG4+a558qVpAXMlGP+EOT7qpPhE5yCtYXeyGinqe1bLn7pNCT7uDSBZNN0
 fWu07ir49e9A54aONC0SOfo/8PUfTIajVgybffv+bQzLL7iFWEzAVkupu7HF/IDLvhKKdwmaJ
 6mlMmHdr/51fAueKgKN+cRV7sgD6U6Mnt3YTnfGHq6CVKKXUSSWxI2UZ7Ded1hMIRqvuIbVzC
 atGqchRAWoUz+1HjmrQv8VSE7D78=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > I'll give it a try.  I have a question, though, and sorry if the answer is
 > obvious.  Where is the window parameter 'quit-restore get set 'tab to begin
 > with?

At the very end of 'display-buffer-record-window'

    ((eq type 'tab)
     ;; WINDOW has been created on a new tab.
     (set-window-parameter
      window 'quit-restore
      (list 'tab 'tab (selected-window) buffer)))))

I suppose.  The initial call is from 'display-buffer-in-new-tab'.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 30 Mar 2025 13:02:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 09:02:32 2025
Received: from localhost ([127.0.0.1]:35385 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tysJ5-0007I1-NH
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 09:02:32 -0400
Received: from mail-vk1-xa2a.google.com ([2607:f8b0:4864:20::a2a]:49622)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tysJ3-0007Hm-Rk
 for 71386 <at> debbugs.gnu.org; Sun, 30 Mar 2025 09:02:30 -0400
Received: by mail-vk1-xa2a.google.com with SMTP id
 71dfb90a1353d-525da75d902so1527715e0c.3
 for <71386 <at> debbugs.gnu.org>; Sun, 30 Mar 2025 06:02:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743339744; x=1743944544; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=7nwfDecM9VjosdOqyN4QbUqyB00Ienkk6uZsutfoMcc=;
 b=lG16qNaj0Dt8PEj+L5L2CrC5MuMcgCH/eMn53q6sPCnR8eJzO0ZqLEWGK3F0ow/Vaf
 McFgVGdqQvHw+kZ5wqyaTKAXQTl87m3auTErb2ghvEDm2LX09CMrHOducTnoIG4fcNPd
 KOS/SvL/hcFFra+d+kEATjn+GQ2H6rrGCpwqwMmYeZ/ep0j25whxORy3WdAqwO6ahLIX
 pc5Yv3kisGY4N+1b+rB6DdgYvpkMy8AQcXrAB9F1sTtvEupmqtILWv1BZ9xyc0ZDAaN+
 RC9GDrEFYDbpKxfTuj+gegXd2ii7KK28WEZe7FAsoYwZ9oOSPiGhsLzpRCnFNvALPdmb
 +VoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743339744; x=1743944544;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=7nwfDecM9VjosdOqyN4QbUqyB00Ienkk6uZsutfoMcc=;
 b=oR+kbTLvcsZXgnzhNRVyu71bE9n0t6aUsp1Gg5KfpYYHLBVU6qRauR2RjkGszas3g7
 lUxO013aFNrijeTnmHvo6bKpY5B6FsIpNfpohEGVZHAyaAwnMpdWtPG6Ci4RSp1tZL/v
 C1bCwcIQ82zAIHFyxITk14iZ78t36YV7A7OcLORowdStClQ+dZwdxdu6P23mbpI2D8Tn
 rUR1SjRZWf+xTwPGECQP8AZHOUzqx2yUumdsazovNQ7ly0Hca2+YnujM5SlIefNYaHYn
 Xf3shL1z8panXH2/uRm2xMK3yfIXqjkTipO3g74NsDIGrDMZ2MQ2KEYO9aH95UpiXhAe
 aYfQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCWk8lERohx6LLKbK75XGM40TU0/YGQsyZPF3fy/wImpWq0iC7Oh1AwpPRrSUF5RhE3ERZVJzA==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yxd6wJvi8v+fXV1v5lKof82Gqw3eCPbq+oUULyPI2caqdNFTVM9
 /AmuJksDtEE+F3+9HLGPArD4rCUuxiaz/vSCYVRnkq/Gdz5Dd7KDvQzn+E9XPCP4zFFD3h68uLB
 fGeQvrIiW/6eQn3A+42NICdPFT5w=
X-Gm-Gg: ASbGnctllDmZi3Qoyctz6rTfg0quXSODjxlwS9fgLgY11Jpq4HZYBKsdUlVolfRcanO
 FV5I4He1iM2JqgOmpijz2VkJWE4gd6QiT0l3jND4UUCDhIMm49EskkB1CDdBJCnA5ar84mbOybb
 5BLYk7XVtnVKO8AHqah+FcEiBIoo9sr3MzMfIs
X-Google-Smtp-Source: AGHT+IEnZXAo6Aka9s1ams80+B+TQYswqXCNyS4kquDQGlnOZCVOeatA8z9hI3nx6P9bLfgaSzeyFOdv2PfBGF6qpHs=
X-Received: by 2002:a05:6122:1d10:b0:520:4996:7d2a with SMTP id
 71dfb90a1353d-5261d4aee2fmr2580898e0c.10.1743339744151; Sun, 30 Mar 2025
 06:02:24 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN> <86iknr55ha.fsf@HIDDEN>
 <CAN+1HbpSsGEK8hVeozdBkR7CdyeNMr_S06u5T7ZmxF1OfYWiJw@HIDDEN>
 <86y0wm4r01.fsf@HIDDEN>
In-Reply-To: <86y0wm4r01.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sun, 30 Mar 2025 09:02:12 -0400
X-Gm-Features: AQ5f1JrdAPB6nviUlhIrf-zprd3Q6snCyVSLh6396RnJC0t-ccMuKwybFwtw_2Q
Message-ID: <CAN+1Hbpz4epi8grWauYzyEKofH9Et8NSKm+WiwZia2i1G3Bo6g@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000002c501806318eeaa8"
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org,
 juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000002c501806318eeaa8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 30, 2025 at 8:56=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Ship Mints <shipmints@HIDDEN>
> > Date: Sun, 30 Mar 2025 08:35:35 -0400
> > Cc: Juri Linkov <juri@HIDDEN>, 71386 <at> debbugs.gnu.org,
> rudalics@HIDDEN,
> >       abdo.haji.ali@HIDDEN
> >
> >  As I wrote, I don't understand what does deleting a window have to do
> >  with tab-bar.  Can you explain why this is conceptually reasonable as
> >  the default behavior?
> >
> > Because users have implicit expectations of what a frame's behavior
> should be in the presence of multiple
> > tabs?  One condition contrary to my expectations are: more than one tab
> "open" (yes, I know they aren't
> > "real"), the current window configuration (aka current tab) has a singl=
e
> (non-dedicated) window with one
> > buffer, no window prev-buffers.  If that sole buffer gets killed, the
> frame is deleted.
>
> When the window is not dedicated to its buffer?  That shouldn't
> happen: replacing a buffer in windows does NOT delete a window if it
> is not dedicated to the buffer being replaced, and consequently the
> frame should NOT be deleted in that case.
>

I thought you meant explicitly made dedicated via set-window-dedicated-p or
a display-buffer-alist action.  This case is just a "regular" window
dedicated to its buffer, yes.

Docs for
> > 'replace-buffer-in-windows' say "If that window is the only window on
> its frame, delete its frame when there are
> > other frames left [on the terminal]."  However, the concept of "only
> window" when a user has implied windows
> > in other dormant tabs, makes this behavior bothersome.
>
> That's how Emacs behaves.  Tabs don't change that.
>

Right.  That's what's being discussed.

> 'tab-bar-select-restore-windows' addresses a wholly different problem
> where a window configuration is set and
> > a buffer referenced in the configuration is now no longer live.
>
> I think the situation discussed here is sufficiently similar.
>

Perhaps it is similar in spirit, but it's different use case.  In the
controversial case, there aren't any window configurations to restore
because the frame is (controversially and unexpectedly) deleted.

--0000000000002c501806318eeaa8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sun, Mar 30, 2025 at 8:56=E2=80=AFAM Eli Zaretskii &lt;<a href=3D"mailto=
:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:</span></div></div><div class=3D"=
gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">&gt; From: Ship Mints &lt;<a href=3D"mailto:shipmints@HIDDEN"=
 target=3D"_blank">shipmints@HIDDEN</a>&gt;<br>
&gt; Date: Sun, 30 Mar 2025 08:35:35 -0400<br>
&gt; Cc: Juri Linkov &lt;<a href=3D"mailto:juri@HIDDEN" target=3D"_blan=
k">juri@HIDDEN</a>&gt;, <a href=3D"mailto:71386 <at> debbugs.gnu.org" target=
=3D"_blank">71386 <at> debbugs.gnu.org</a>, <a href=3D"mailto:rudalics@HIDDEN" t=
arget=3D"_blank">rudalics@HIDDEN</a>, <br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0<a href=3D"mailto:abdo.haji.ali@HIDDEN" t=
arget=3D"_blank">abdo.haji.ali@HIDDEN</a><br>
&gt; <br>
&gt;=C2=A0 As I wrote, I don&#39;t understand what does deleting a window h=
ave to do<br>
&gt;=C2=A0 with tab-bar.=C2=A0 Can you explain why this is conceptually rea=
sonable as<br>
&gt;=C2=A0 the default behavior?<br>
&gt; <br>
&gt; Because users have implicit expectations of what a frame&#39;s behavio=
r should be in the presence of multiple<br>
&gt; tabs?=C2=A0 One condition contrary to my expectations are: more than o=
ne tab &quot;open&quot; (yes, I know they aren&#39;t<br>
&gt; &quot;real&quot;), the current window configuration (aka current tab) =
has a single (non-dedicated) window with one<br>
&gt; buffer, no window prev-buffers.=C2=A0 If that sole buffer gets killed,=
 the frame is deleted.<br>
<br>
When the window is not dedicated to its buffer?=C2=A0 That shouldn&#39;t<br=
>
happen: replacing a buffer in windows does NOT delete a window if it<br>
is not dedicated to the buffer being replaced, and consequently the<br>
frame should NOT be deleted in that case.<br></blockquote><div><br></div><d=
iv><div class=3D"gmail_default" style=3D"font-family:monospace">I thought y=
ou meant explicitly made dedicated via=C2=A0set-window-dedicated-p or a dis=
play-buffer-alist action.=C2=A0 This case is just a &quot;regular&quot; win=
dow dedicated to its buffer, yes.</div></div><div><br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex">
Docs for<br>
&gt; &#39;replace-buffer-in-windows&#39; say &quot;If that window is the on=
ly window on its frame, delete its frame when there are<br>
&gt; other frames left [on the terminal].&quot;=C2=A0 However, the concept =
of &quot;only window&quot; when a user has implied windows<br>
&gt; in other dormant tabs, makes this behavior bothersome.<br>
<br>
That&#39;s how Emacs behaves.=C2=A0 Tabs don&#39;t change that.<br></blockq=
uote><div><br></div><div><div class=3D"gmail_default" style=3D"font-family:=
monospace">Right.=C2=A0 That&#39;s what&#39;s being discussed.</div></div><=
div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px=
 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
&gt; &#39;tab-bar-select-restore-windows&#39; addresses a wholly different =
problem where a window configuration is set and<br>
&gt; a buffer referenced in the configuration is now no longer live.<br>
<br>
I think the situation discussed here is sufficiently similar.<br></blockquo=
te><div><br></div><div class=3D"gmail_default" style=3D"font-family:monospa=
ce">Perhaps it is similar in spirit, but it&#39;s different use case.=C2=A0=
 In the controversial case, there aren&#39;t any window configurations to r=
estore because the frame is (controversially and unexpectedly) deleted.</di=
v></div></div>

--0000000000002c501806318eeaa8--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 30 Mar 2025 12:56:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 08:56:20 2025
Received: from localhost ([127.0.0.1]:35373 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tysD6-00070E-5r
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 08:56:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56726)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tysD2-0006zz-O1
 for 71386 <at> debbugs.gnu.org; Sun, 30 Mar 2025 08:56:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tysCu-0002zK-Tz; Sun, 30 Mar 2025 08:56:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=06Frb+LzLRxZw2oxdM83aFWtdOenrruAWlGGU5F8dac=; b=e9/kyh+EGVIQ
 d4EkYq2JhN4uulZfDS5/bDdlLhd6H4mokZz/r6mP1Q1jnH8OAvsmquei/7Maf67ZKe0PMmW5S6yrs
 SzdtlhA4bTonHuCKQDIm9rjOxB7yAF8yHG5mWmvM9XJ3jG0++Qihoq5bfaEYvPFqXyWUglQQwWsTg
 Wih03FGWTJnLA4OKnOUxNAth0O0ZsTOXzhjFYoByDMrzl5MvuWvPTzhf/owRGAS3QStv2j3/oU9EN
 GCSvE30Y+IimjDWWQzOFrCX913jF8OdADMZc+af75PxtWiMvc+Xo1JJDx3zwQw0JHYnCDk9NZzEHq
 0D0WDjuwT9LHR86lgjl5cg==;
Date: Sun, 30 Mar 2025 15:55:42 +0300
Message-Id: <86y0wm4r01.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>
In-Reply-To: <CAN+1HbpSsGEK8hVeozdBkR7CdyeNMr_S06u5T7ZmxF1OfYWiJw@HIDDEN>
 (message from Ship Mints on Sun, 30 Mar 2025 08:35:35 -0400)
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN> <86iknr55ha.fsf@HIDDEN>
 <CAN+1HbpSsGEK8hVeozdBkR7CdyeNMr_S06u5T7ZmxF1OfYWiJw@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org,
 juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ship Mints <shipmints@HIDDEN>
> Date: Sun, 30 Mar 2025 08:35:35 -0400
> Cc: Juri Linkov <juri@HIDDEN>, 71386 <at> debbugs.gnu.org, rudalics@HIDDEN, 
> 	abdo.haji.ali@HIDDEN
> 
>  As I wrote, I don't understand what does deleting a window have to do
>  with tab-bar.  Can you explain why this is conceptually reasonable as
>  the default behavior?
> 
> Because users have implicit expectations of what a frame's behavior should be in the presence of multiple
> tabs?  One condition contrary to my expectations are: more than one tab "open" (yes, I know they aren't
> "real"), the current window configuration (aka current tab) has a single (non-dedicated) window with one
> buffer, no window prev-buffers.  If that sole buffer gets killed, the frame is deleted.

When the window is not dedicated to its buffer?  That shouldn't
happen: replacing a buffer in windows does NOT delete a window if it
is not dedicated to the buffer being replaced, and consequently the
frame should NOT be deleted in that case.

Docs for
> 'replace-buffer-in-windows' say "If that window is the only window on its frame, delete its frame when there are
> other frames left [on the terminal]."  However, the concept of "only window" when a user has implied windows
> in other dormant tabs, makes this behavior bothersome.

That's how Emacs behaves.  Tabs don't change that.

> 'tab-bar-select-restore-windows' addresses a wholly different problem where a window configuration is set and
> a buffer referenced in the configuration is now no longer live.

I think the situation discussed here is sufficiently similar.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 30 Mar 2025 12:37:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 08:37:02 2025
Received: from localhost ([127.0.0.1]:35324 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tyruP-00067A-GU
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 08:37:02 -0400
Received: from mail-vk1-xa2c.google.com ([2607:f8b0:4864:20::a2c]:46114)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tyruN-00066s-Ut
 for 71386 <at> debbugs.gnu.org; Sun, 30 Mar 2025 08:37:00 -0400
Received: by mail-vk1-xa2c.google.com with SMTP id
 71dfb90a1353d-523ffbe0dbcso4049508e0c.0
 for <71386 <at> debbugs.gnu.org>; Sun, 30 Mar 2025 05:36:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743338214; x=1743943014; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=XGYcwtg5Orx1XiwJgax1b4U48uAdcW5wUeqfCjCnqas=;
 b=Y3mwWsFBu/Zdz9LpFWH7kGfiPLy274PRp1K6Mv4lLJHOJ6/xh2vqzlgiGHewxUbJ8O
 cX68Wv975phWQ9OCwlJN76HUQXx+FxmtGnU3g9Lzdpu1Vk0Ij2DOXiwO90tHtXwDsSPa
 D4Ztl9jgHKPymx2yYqSawnCjps6J8/gTKuASTxSC449GAxE5qBe3JQpNYhMR9g0zeHDh
 7KSbVWRFXLi2YuofUM+MP+kzEq9qNZaHG8R91P2tija4hBWbIFtTrbr2YtBz+wBplddi
 4tPIdHRq4mYEf+RLAUog6u0wRCrUNEtsCATWbQqlpXAYXpE1wREn4+dGHr8KppqAhNFy
 lPfw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743338214; x=1743943014;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=XGYcwtg5Orx1XiwJgax1b4U48uAdcW5wUeqfCjCnqas=;
 b=jDVri5RQ0lCCUJk2j+GF+aKKGEidm+mBPUBDZ+Y8q3xj2KSF6deXZWQHJv6l5Gtb2F
 DNjat3tlmnNB/uCSe+JJjM10xBS2dp8vMcbT7/bmj0TR/W9RdIA35l4RLzsW1IrisJov
 +eTgDyce0MH/oRZxoKctreYpv9Vwql08BUUvPVt3dXvJHrU8HovVqXCnxUi0PqxZFpYK
 oZkEyiEpqaUuQBiN1IZ4URnZ6AqAcsB5bj7YPUD5ENraSq4Lu3hB8JX4zMevCb8wv1fL
 R8l/ISe/zKG8bZZ1mIDDLJOJySYi/F34/WwmJoshPZa6TxRsdPwKO0Kk05ID+NlteZ45
 qa1g==
X-Gm-Message-State: AOJu0Ywm8MzGOZnRcbMGnQxy4zSQt6k6oaxs2egOIKOlzxxh0xES96ZK
 dYj/eHoEhxLj8mPZSM41FFtL2tVf6SznM4W3F8ad6N3LRYhD4VrJxku/PjnF9kTRquVdeQxneuH
 NyP785rvPfAAA1+r8B3pvyxeRX/8=
X-Gm-Gg: ASbGncskePCmsxWUYjFGUcARfc0jn9elklNsST1m6H23/JelUVhUFOnNmTQjtqlRjys
 lzaE22WacO1A/Uu6Onv5Ny39JViKGE+CdA3zixzEGMX8MwbPv5Ci9q35pMcm+xqHMuPoovHGP5Q
 wJ/U7Gnd5wWd0WcQaT3rts+z2xWQ==
X-Google-Smtp-Source: AGHT+IEewADazMoUTDLgC08D5M9p8hIGWwjAhyOkfGhfNUoTwbhZLc5qAO4IyV7BXXR3q4trYUtHvS6PdLOMIoUfJ6w=
X-Received: by 2002:a05:6102:80a2:b0:4ba:99b5:60f5 with SMTP id
 ada2fe7eead31-4c6d39f8371mr3928889137.23.1743338214384; Sun, 30 Mar 2025
 05:36:54 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
In-Reply-To: <87tt7bhxcm.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sun, 30 Mar 2025 08:36:43 -0400
X-Gm-Features: AQ5f1Jp9_p85ZZsqxAXKgCEmXbHQxLfA0mZ3AzYEfXhV8Rn5WGb1PqyPMh3tidM
Message-ID: <CAN+1HbrSiCiG-cMic8AYN2NYGD3gZXFGpbvrnxtA2x10ckExGQ@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: Juri Linkov <juri@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000fdec9a06318e8e88"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000fdec9a06318e8e88
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 30, 2025 at 2:44=E2=80=AFAM Juri Linkov <juri@HIDDEN> wrote=
:

> > I've been bitten by this same issue where kill-buffer /
> > replace-buffer-in-windows doesn't take available tab-bar tabs into
> > consideration as viable replacement windows to restore when quitting th=
e
> > last window on a frame.  I looked at 29+, 30, 31 window.el/.c and
> > tab-bar.el and I can't find if this was resolved or if there was a reci=
pe
> > to avoid this.
> >
> > I've resorted to wrapping kill-buffer using a custom function, not
> advice,
> > to inhibit deleting the frame.
> >
> > Do any of you recall if this bug was addressed and how?  If not, may I
> > assist in some way?
>
> Sorry, I'm still testing the fix attached below.
> Does it work for you?
>

I'll give it a try.  I have a question, though, and sorry if the answer is
obvious.  Where is the window parameter 'quit-restore get set 'tab to begin
with?

--000000000000fdec9a06318e8e88
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sun, Mar 30, 2025 at 2:44=E2=80=AFAM Juri Linkov &lt;<a href=3D"mailto:j=
uri@HIDDEN">juri@HIDDEN</a>&gt; wrote:</span></div></div><div class=
=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex">&gt; I&#39;ve been bitten by this same issue where kill-buffe=
r /<br>
&gt; replace-buffer-in-windows doesn&#39;t take available tab-bar tabs into=
<br>
&gt; consideration as viable replacement windows to restore when quitting t=
he<br>
&gt; last window on a frame.=C2=A0 I looked at 29+, 30, 31 window.el/.c and=
<br>
&gt; tab-bar.el and I can&#39;t find if this was resolved or if there was a=
 recipe<br>
&gt; to avoid this.<br>
&gt;<br>
&gt; I&#39;ve resorted to wrapping kill-buffer using a custom function, not=
 advice,<br>
&gt; to inhibit deleting the frame.<br>
&gt;<br>
&gt; Do any of you recall if this bug was addressed and how?=C2=A0 If not, =
may I<br>
&gt; assist in some way?<br>
<br>
Sorry, I&#39;m still testing the fix attached below.<br>
Does it work for you?<br></blockquote><div><br></div><div class=3D"gmail_de=
fault" style=3D"font-family:monospace">I&#39;ll give it a try.=C2=A0 I have=
 a question, though, and sorry if the answer is obvious.=C2=A0 Where is the=
 window parameter &#39;quit-restore get set &#39;tab to begin with?</div></=
div></div>

--000000000000fdec9a06318e8e88--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 30 Mar 2025 12:35:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 08:35:55 2025
Received: from localhost ([127.0.0.1]:35314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tyrtL-00064X-0f
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 08:35:55 -0400
Received: from mail-vk1-xa2c.google.com ([2607:f8b0:4864:20::a2c]:58797)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tyrtI-00064H-5E
 for 71386 <at> debbugs.gnu.org; Sun, 30 Mar 2025 08:35:53 -0400
Received: by mail-vk1-xa2c.google.com with SMTP id
 71dfb90a1353d-52446b21cfdso1538265e0c.1
 for <71386 <at> debbugs.gnu.org>; Sun, 30 Mar 2025 05:35:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743338146; x=1743942946; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=Gbb8hGUdddmWzMjWl7/mvie0C5j9KBcDclkoMulBcsw=;
 b=Q77oKyre6PAaGI6qnL5B4w3Edur3PwcW2aPlNPfuDBtSBbvjCBs9zKnjHK6VRoWUhT
 CP/Z3w6dICJ0fg9mrf6cVp6RnTEgQFfpi5jC6jLRv8BLuOjew3M4dMQQwQiveWWYo0LV
 U2lvV8n5dQdh5xVWc6SnceJRzSr8idQchAbOHyN43xg9qAYEBKehrbbmvVqznr2HZtJw
 Nf0NgzNAmkOI82z3hMJ53nTDrc8iKB8G3kVyhktwYvSL/x5ow5DWrKy3pZuwO5YsHJjt
 w2nvefp+0hOD/6feP+qe6S2TL2Jhv1ckTn2FBrnxDoPsFMsxZvPdL1i4qzV3JmG/tczx
 Usaw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743338146; x=1743942946;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=Gbb8hGUdddmWzMjWl7/mvie0C5j9KBcDclkoMulBcsw=;
 b=tNoW8uYVGNPXeiUPqmySY7JpEmy7mh5uZFXNciP374X2VOf9lvqUcyJvQ//BMpuZNG
 VjDAhQGRCiI6qE/QfWzVRANblyRJb87CuD7JjXPF5FOYhp3Ht1shDvB+ehDT3LtsuoOf
 vlGSXniBsBTkY3RCaGxoCedcg4Px3inoUasxsJFlzvrA/ZMgD+fDot95SVHiEWZrazj0
 tse1RuLDY3T5zbdq9uFPUhlYS6loMoUsbN2rfdHI2rseaytSYju3YdJDJv1D0/AnM7Q3
 1jDTPHG6Q/hcEgor1sBbr1NFXqggMgxiyCe4/Q334MaO6d0C8lrNACRL857FvS6lCnl4
 s7pQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVpVjfnw2uN4CcDXXrqBjDACTqg5E2re7aWMYtZJkN94KlFfY9ePCJBgJiUAHkSiH/87Rylrg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyGgCqX8N9w1CR2BsYirQK95CD2Qh9dlKlj2ATZGXTG6IRuT7HA
 UnCkWT4VTnYuzkR8v3e5MCzhALCUdsLRdbxhIgIkcSvppp6CsxE1/f4A7VcBzw0hUZzfeS14Q7Q
 eccK66w/QzlU7z0Rh0w/okZaFcbs=
X-Gm-Gg: ASbGncsDvhM2udn+/O6W80oR59EsSwkjF9Z5SShYWrWsQ0rB8yzWD9g1zxq7ZutsJuH
 v+yIdk306bTD0Bw8Ad0AUf/a9Q5sGqDk0yS0vOCboC/FpT1IzT99z6P+KZlfLx223EUOtBfHRjq
 rhmwzYM21lQOvIF8Ki+yHe7tESZg==
X-Google-Smtp-Source: AGHT+IHMZW2nTiKdxlsOdmQ2mI0k+p35BuMqpFTSAstWuLWFysaZbyTYCgDW4Eg4nXvWgfc3BrOc2CgwEkTcWLTYshI=
X-Received: by 2002:a05:6122:548:b0:518:6286:87a4 with SMTP id
 71dfb90a1353d-5261d38c09bmr3403875e0c.4.1743338146489; Sun, 30 Mar 2025
 05:35:46 -0700 (PDT)
MIME-Version: 1.0
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN> <86iknr55ha.fsf@HIDDEN>
In-Reply-To: <86iknr55ha.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sun, 30 Mar 2025 08:35:35 -0400
X-Gm-Features: AQ5f1JoY7Ihf7wE9moEmoimzEIXGp2sDFkSvIoQb7N1hPMz1w175WIsMssISAcE
Message-ID: <CAN+1HbpSsGEK8hVeozdBkR7CdyeNMr_S06u5T7ZmxF1OfYWiJw@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000f1edac06318e8a5b"
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org,
 Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000f1edac06318e8a5b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 30, 2025 at 3:43=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Juri Linkov <juri@HIDDEN>
> > Cc: 71386 <at> debbugs.gnu.org,  martin rudalics <rudalics@HIDDEN>,  Eli
> >  Zaretskii <eliz@HIDDEN>,  abdo.haji.ali@HIDDEN
> > Date: Sun, 30 Mar 2025 09:35:09 +0300
> >
> > > I've been bitten by this same issue where kill-buffer /
> > > replace-buffer-in-windows doesn't take available tab-bar tabs into
> > > consideration as viable replacement windows to restore when quitting
> the
> > > last window on a frame.  I looked at 29+, 30, 31 window.el/.c and
> > > tab-bar.el and I can't find if this was resolved or if there was a
> recipe
> > > to avoid this.
> > >
> > > I've resorted to wrapping kill-buffer using a custom function, not
> advice,
> > > to inhibit deleting the frame.
> > >
> > > Do any of you recall if this bug was addressed and how?  If not, may =
I
> > > assist in some way?
> >
> > Sorry, I'm still testing the fix attached below.
> > Does it work for you?
>
> As I wrote, I don't understand what does deleting a window have to do
> with tab-bar.  Can you explain why this is conceptually reasonable as
> the default behavior?
>

Because users have implicit expectations of what a frame's behavior
should be in the presence of multiple tabs?  One condition contrary to my
expectations are: more than one tab "open" (yes, I know they aren't
"real"), the current window configuration (aka current tab) has a single
(non-dedicated) window with one buffer, no window prev-buffers.  If that
sole buffer gets killed, the frame is deleted.  Docs for
'replace-buffer-in-windows' say "If that window is the only window on its
frame, delete its frame when there are other frames left [on the
terminal]."  However, the concept of "only window" when a user has implied
windows in other dormant tabs, makes this behavior bothersome.

'tab-bar-select-restore-windows' addresses a wholly different problem where
a window configuration is set and a buffer referenced in the configuration
is now no longer live.

--000000000000f1edac06318e8a5b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sun, Mar 30, 2025 at 3:43=E2=80=AFAM Eli Zaretskii &lt;<a href=3D"mailto=
:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:</span></div></div><div class=3D"=
gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">&gt; From: Juri Linkov &lt;<a href=3D"mailto:juri@HIDDEN" ta=
rget=3D"_blank">juri@HIDDEN</a>&gt;<br>
&gt; Cc: <a href=3D"mailto:71386 <at> debbugs.gnu.org" target=3D"_blank">71386@d=
ebbugs.gnu.org</a>,=C2=A0 martin rudalics &lt;<a href=3D"mailto:rudalics@gm=
x.at" target=3D"_blank">rudalics@HIDDEN</a>&gt;,=C2=A0 Eli<br>
&gt;=C2=A0 Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">=
eliz@HIDDEN</a>&gt;,=C2=A0 <a href=3D"mailto:abdo.haji.ali@HIDDEN" targ=
et=3D"_blank">abdo.haji.ali@HIDDEN</a><br>
&gt; Date: Sun, 30 Mar 2025 09:35:09 +0300<br>
&gt; <br>
&gt; &gt; I&#39;ve been bitten by this same issue where kill-buffer /<br>
&gt; &gt; replace-buffer-in-windows doesn&#39;t take available tab-bar tabs=
 into<br>
&gt; &gt; consideration as viable replacement windows to restore when quitt=
ing the<br>
&gt; &gt; last window on a frame.=C2=A0 I looked at 29+, 30, 31 window.el/.=
c and<br>
&gt; &gt; tab-bar.el and I can&#39;t find if this was resolved or if there =
was a recipe<br>
&gt; &gt; to avoid this.<br>
&gt; &gt;<br>
&gt; &gt; I&#39;ve resorted to wrapping kill-buffer using a custom function=
, not advice,<br>
&gt; &gt; to inhibit deleting the frame.<br>
&gt; &gt;<br>
&gt; &gt; Do any of you recall if this bug was addressed and how?=C2=A0 If =
not, may I<br>
&gt; &gt; assist in some way?<br>
&gt; <br>
&gt; Sorry, I&#39;m still testing the fix attached below.<br>
&gt; Does it work for you?<br>
<br>
As I wrote, I don&#39;t understand what does deleting a window have to do<b=
r>
with tab-bar.=C2=A0 Can you explain why this is conceptually reasonable as<=
br>
the default behavior?<br></blockquote><div><br></div><div class=3D"gmail_de=
fault" style=3D"font-family:monospace">Because users=C2=A0have implicit exp=
ectations of what a frame&#39;s behavior should=C2=A0be in the presence of =
multiple tabs?=C2=A0 One condition contrary to my expectations are: more th=
an one=C2=A0tab &quot;open&quot; (yes, I know they aren&#39;t &quot;real&qu=
ot;), the current window configuration (aka current tab) has a single (non-=
dedicated) window with one buffer, no window prev-buffers.=C2=A0 If that so=
le buffer gets killed, the frame is deleted.=C2=A0 Docs for &#39;replace-bu=
ffer-in-windows&#39; say &quot;If that window is the only window on its fra=
me, delete its frame when there are other frames left [on the terminal].&qu=
ot;=C2=A0 However, the concept of &quot;only window&quot; when a user has i=
mplied windows in other dormant tabs, makes this behavior bothersome.</div>=
<div class=3D"gmail_default" style=3D"font-family:monospace"><br></div><div=
 class=3D"gmail_default" style=3D"font-family:monospace">&#39;tab-bar-selec=
t-restore-windows&#39; addresses a wholly different problem where a window =
configuration is set and a buffer referenced in the configuration is now no=
 longer live.</div></div></div>

--000000000000f1edac06318e8a5b--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 30 Mar 2025 07:43:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 03:43:12 2025
Received: from localhost ([127.0.0.1]:34483 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tynK4-0005XX-2X
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 03:43:12 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38502)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tynK0-0005XJ-FN
 for 71386 <at> debbugs.gnu.org; Sun, 30 Mar 2025 03:43:09 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tynJt-0006CY-Am; Sun, 30 Mar 2025 03:43:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=6JJPrSLGQaJVL4VGaLMXfvDUJlTd8tG9H6CJxvfAWDM=; b=eUJKez0A2UyS
 sepowJ7E0MELN/3/HtAH932sD4ePTEBreqzzwj0pR25e/QLFszNsfIaJsDi0vpBroTxvqiKDFctnH
 32iqFhWFZbHM8PAxxqKFBQpLFdskTySG6cFUryK/8Nhdvq5niZXAvUnrARPUu0mW7Ro8o9ekEQyuZ
 /eSH5OEDwGguQZ0HIgzAD4d62Z3OIOMcVBgtGQBW/LnslVy0ZR3Uq6or/Elv2aJQMHyX5EwrhyLXW
 u6EXWmwj4iajHhXUoH+86nl5I+l8X/38derXJ5ovtamS+miQepBuVXkOejx/xF7XrJpapk3bKVp4O
 DbuaJYiA31ll1z2mQHu2Kg==;
Date: Sun, 30 Mar 2025 10:42:57 +0300
Message-Id: <86iknr55ha.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87tt7bhxcm.fsf@HIDDEN> (message from Juri Linkov on
 Sun, 30 Mar 2025 09:35:09 +0300)
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 <87tt7bhxcm.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, shipmints@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: 71386 <at> debbugs.gnu.org,  martin rudalics <rudalics@HIDDEN>,  Eli
>  Zaretskii <eliz@HIDDEN>,  abdo.haji.ali@HIDDEN
> Date: Sun, 30 Mar 2025 09:35:09 +0300
> 
> > I've been bitten by this same issue where kill-buffer /
> > replace-buffer-in-windows doesn't take available tab-bar tabs into
> > consideration as viable replacement windows to restore when quitting the
> > last window on a frame.  I looked at 29+, 30, 31 window.el/.c and
> > tab-bar.el and I can't find if this was resolved or if there was a recipe
> > to avoid this.
> >
> > I've resorted to wrapping kill-buffer using a custom function, not advice,
> > to inhibit deleting the frame.
> >
> > Do any of you recall if this bug was addressed and how?  If not, may I
> > assist in some way?
> 
> Sorry, I'm still testing the fix attached below.
> Does it work for you?

As I wrote, I don't understand what does deleting a window have to do
with tab-bar.  Can you explain why this is conceptually reasonable as
the default behavior?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 30 Mar 2025 06:44:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 02:44:11 2025
Received: from localhost ([127.0.0.1]:34342 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tymOw-0002YH-Mx
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 02:44:11 -0400
Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]:52817)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1tymOv-0002Y1-4R
 for 71386 <at> debbugs.gnu.org; Sun, 30 Mar 2025 02:44:09 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 85DA4432F7;
 Sun, 30 Mar 2025 06:43:58 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
Organization: LINKOV.NET
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
Date: Sun, 30 Mar 2025 09:35:09 +0300
Message-ID: <87tt7bhxcm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddujeeifeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeettdeiieegfeehtddvgeekhfelvdeggfevfeevgeelvdffudekkedtledtgfekvdenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopegrsgguohdrhhgrjhhirdgrlhhisehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeejudefkeeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomh
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

> I've been bitten by this same issue where kill-buffer /
> replace-buffer-in-windows doesn't take available tab-bar tabs into
> consideration as viable replacement windows to restore when quitting the
> last window on a frame.  I looked at 29+, 30, 31 window.el/.c and
> tab-bar.el and I can't find if this was resolved or if there was a recipe
> to avoid this.
>
> I've resorted to wrapping kill-buffer using a custom function, not advice,
> to inhibit deleting the frame.
>
> Do any of you recall if this bug was addressed and how?  If not, may I
> assist in some way?

Sorry, I'm still testing the fix attached below.
Does it work for you?


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=tab-bar-frame.patch

diff --git a/lisp/window.el b/lisp/window.el
index befbc679b23..715b8e745c9 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4187,6 +4187,21 @@ window-deletable-p
 
   (let ((frame (window-frame window)))
     (cond
+     ((and tab-bar-mode
+           ;; Fall back to frame handling in case of less than 2 tabs
+           (> (length (funcall tab-bar-tabs-function frame)) 1)
+           ;; Close the tab with the initial window (bug#59862)
+           (or (eq (nth 1 (window-parameter window 'quit-restore)) 'tab)
+               ;; or with the dedicated window (bug#71386)
+               (and (window-dedicated-p window)
+                    (frame-root-window-p window)))
+           ;; Don't close the tab if more windows were created explicitly
+           (< (seq-count (lambda (w)
+                           (memq (car (window-parameter w 'quit-restore))
+                                 '(window tab frame same)))
+                         (window-list-1 nil 'nomini))
+              2))
+      'tab)
      ((frame-root-window-p window)
       ;; WINDOW's frame can be deleted only if there are other frames
       ;; on the same terminal, and it does not contain the active
@@ -5022,6 +5037,10 @@ window--delete
   (unless (and dedicated-only (not (window-dedicated-p window)))
     (let ((deletable (window-deletable-p window)))
       (cond
+       ((eq deletable 'tab)
+        (tab-bar-close-tab)
+        (message "Tab closed after deleting the last window")
+        'tab)
        ((eq deletable 'frame)
 	(let ((frame (window-frame window)))
 	  (cond
@@ -5388,13 +5407,7 @@ quit-restore-window
       ;; If the previously selected window is still alive, select it.
       (window--quit-restore-select-window quit-restore-2))
      ((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.
-      (window--quit-restore-select-window quit-restore-2))
-     ((and (not prev-buffer)
-	   (or (eq (nth 1 quit-restore) 'frame)
+	   (or (memq (nth 1 quit-restore) '(frame tab))
 	       (and (eq (nth 1 quit-restore) 'window)
 		    ;; If the window has been created on an existing
 		    ;; frame and ended up as the sole window on that

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 30 Mar 2025 05:25:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 01:25:29 2025
Received: from localhost ([127.0.0.1]:34057 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tylAm-0003TY-U0
	for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 01:25:29 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:58820)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>)
 id 1tylAj-0003TB-HW; Sun, 30 Mar 2025 01:25:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tylAc-00074n-PR; Sun, 30 Mar 2025 01:25:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=yldMqv/JNgyN2r4Pi8WKCeVskJ7ylqA0gdMzjjUor+w=; b=Gg0iWx8vLoXr
 0Uz4w8LZMB4C3dzqSceUZEGr8cx1ueENLWDLwAhcjw2R6PyEj54+6h4Xrxekou8IB7HomDsbLLJuh
 BlOm/bGsdaTTcsn+AqBR37wO1A0emp6HPi/H0lqgQHJy7ZnN44nCH962157xGgYcMGy2nBRxPPMx6
 vHYZ1GhPJBcqHt+d8UGtvuLKumOUFCF+GII9qarLLPB3e10tEozSsB7Eqkx3npW9q5TMIlLPdCkAU
 LlQPmD0D3T4cJyyKpBUcF1sLh/L3dk9fBiU1/KlICV3MLISjIWwOviMvFWxnAal1paZIQaIUS/TGX
 IYBU5KwqF5sGla1Fii1XcQ==;
Date: Sun, 30 Mar 2025 08:25:10 +0300
Message-Id: <86plhz5bux.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>
In-Reply-To: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
 (message from Ship Mints on Sat, 29 Mar 2025 19:11:40 -0400)
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
References: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org,
 juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

severity 71386 wishlist
thanks

> From: Ship Mints <shipmints@HIDDEN>
> Date: Sat, 29 Mar 2025 19:11:40 -0400
> Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, Juri Linkov <juri@HIDDEN>, 
> 	abdo.haji.ali@HIDDEN
> 
> I've been bitten by this same issue where kill-buffer / replace-buffer-in-windows doesn't take available
> tab-bar tabs into consideration as viable replacement windows to restore when quitting the last window on a
> frame.  I looked at 29+, 30, 31 window.el/.c and tab-bar.el and I can't find if this was resolved or if there was
> a recipe to avoid this.

The tab-bar tabs are just the visual representation of saved
window-configuration objects.  replace-buffer-in-windows never
supported selecting one of the available window-configurations to
replace the buffer shown in the single dedicated window of a frame.
Conceptually, I don't see any relation between these two features, and
no reason up front why replace-buffer-in-windows should select another
tab when a window is deleted because the buffer to which it is
dedicated is removed from display.

Also, the behavior you describe to delete the frame is only when the
window is dedicated to its buffer.  Is that what happened in your
scenario?

We have already a user option tab-bar-select-restore-windows; did you
try to customize it to get the effect you want?

In any case, I converted this bug report into a feature request, since
I don't see a bug in the behavior you describe.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 29 Mar 2025 23:12:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 29 19:12:00 2025
Received: from localhost ([127.0.0.1]:33425 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tyfLL-000722-W3
	for submit <at> debbugs.gnu.org; Sat, 29 Mar 2025 19:12:00 -0400
Received: from mail-vk1-xa30.google.com ([2607:f8b0:4864:20::a30]:48584)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tyfLJ-00071o-Fw
 for 71386 <at> debbugs.gnu.org; Sat, 29 Mar 2025 19:11:58 -0400
Received: by mail-vk1-xa30.google.com with SMTP id
 71dfb90a1353d-523dc190f95so1638165e0c.1
 for <71386 <at> debbugs.gnu.org>; Sat, 29 Mar 2025 16:11:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743289911; x=1743894711; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=ztZ0CQMY50RoVMzWFdUZTAPjgxiW18klQfELuxFVfGM=;
 b=YX/0kCB3LsMg68223E/E9ZWlzHMNeOza5rx4ueB46n24pMXLhHmUbZKSh1wOQojtam
 f9Qsr9DOJ32WKG9A8qUM0a++c3OQ0xBEOdZJ2ACUUHzCNhnFskVVl2Pt+R/d5LQ29goi
 TOV/VOjy02NYNw2OmcNe4tgZ0vSJBMUHFWOzx1/GWr9R8EnektAl1/tDb+u1PywUNPy3
 yl3Cnch4wq04AJtTIKbFvVQSFY/yPfw1qtlODVZFpm659qcz/9mLDL7xsg0XPOHJuk78
 Bv9vE5nWES4iOWsDKljrW4l0gbR3jPBU86tunzM+Pco/8ev2XX3ktZDIbPBV6myXrfEI
 9yxw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743289911; x=1743894711;
 h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=ztZ0CQMY50RoVMzWFdUZTAPjgxiW18klQfELuxFVfGM=;
 b=TdOhsb5Vj0n3WM/NAWXjUxt6k58v2j3md2FRH1WYsIKF6jy1gMcJl5Oog8eqZlhj1Q
 NZrAMiS5f6SjuhqXlhS+j9KGRLDwylfGbdQfK4AyIfm/3WiLl2xm7AthcB0gyW1KuSqM
 aa1Q5naa0E+DDchVVVqtLnRLYot2dD7EZJniuVAvZItSHVgxKuq8/SHQgN58b9imO9hc
 hypPQbYW765Bv6KwOxLiQvCSLdMOtazHZi19hHMLELAPPS3Lcea+lyqHCUzKoKdDOn8z
 UmSSnC8fpHeF1StIBhp+o96ESf7IbRuXGnosT61TKjJtHw72NZOQkBvPXpnjVCmklmv1
 JXCw==
X-Gm-Message-State: AOJu0YzFMkp1WWeDB5Fs9+HGoy6KmzAk1pEzdWGY0gW362yv7OBXB1wR
 l4TE4Yykwjmwtq1Q6g0BNwt7l9XGXdLHw4Bmo1cdaqzAkorsLuhjZsJuXM+V3S/Gqgm4uxKCtl1
 zi7qAW3B7nmQ96oWGJArEX6kzAganLJCV
X-Gm-Gg: ASbGnctQqmjr87RSXkdmwl5Us8/fShECELLcpR1bFsIqwp8MoPT1ZqDpOo/4LfHUbWN
 WCB6B1IRhlL9U56IPCdQLlNYz8pyIDSNTnCrObX+Njl7yTyfcbGIaFOkEFIro+RyCpO1nNBdgdw
 aWtKoXt+XbKqcREuK9CLk0cibZtw==
X-Google-Smtp-Source: AGHT+IFkHsVLmV4PVk8fTwpSOmGJabnPBQ9PQu4yrbje21Wq+samuvEwQ4hDaQgBO0GIJMCUcqTTzUIeqkezIvdeL50=
X-Received: by 2002:a05:6122:d87:b0:520:42d3:91b7 with SMTP id
 71dfb90a1353d-5261d3557c3mr2143612e0c.1.1743289911463; Sat, 29 Mar 2025
 16:11:51 -0700 (PDT)
MIME-Version: 1.0
From: Ship Mints <shipmints@HIDDEN>
Date: Sat, 29 Mar 2025 19:11:40 -0400
X-Gm-Features: AQ5f1Jr5MJMom3Fp9W7i2TdGWidvkZ3cBvW6BZk4rjnO3h59bqadEAiW7TDbAE8
Message-ID: <CAN+1HbqQPY84=__8AyA_9veQXZAbavRh4mzHm6L3vrgXUXZqtg@HIDDEN>
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
To: 71386 <at> debbugs.gnu.org
Content-Type: multipart/alternative; boundary="000000000000e9d9270631834f8e"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 abdo.haji.ali@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000e9d9270631834f8e
Content-Type: text/plain; charset="UTF-8"

I've been bitten by this same issue where kill-buffer
/ replace-buffer-in-windows doesn't take available tab-bar tabs into
consideration as viable replacement windows to restore when quitting the
last window on a frame.  I looked at 29+, 30, 31 window.el/.c and
tab-bar.el and I can't find if this was resolved or if there was a recipe
to avoid this.

I've resorted to wrapping kill-buffer using a custom function, not advice,
to inhibit deleting the frame.

Do any of you recall if this bug was addressed and how?  If not, may I
assist in some way?

-Stephane

--000000000000e9d9270631834f8e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e">I&#39;ve been bitten by this same issue where kill-buffer /=C2=A0replace=
-buffer-in-windows doesn&#39;t take available tab-bar tabs into considerati=
on as viable replacement windows to restore when quitting the last window o=
n a frame.=C2=A0 I looked at 29+, 30, 31 window.el/.c and tab-bar.el and I =
can&#39;t find if this was resolved or if there was a recipe to avoid this.=
</div><div class=3D"gmail_default" style=3D"font-family:monospace"><br></di=
v><div class=3D"gmail_default" style=3D"font-family:monospace">I&#39;ve res=
orted to wrapping kill-buffer=C2=A0using a custom function, not advice, to =
inhibit deleting the frame.</div><div class=3D"gmail_default" style=3D"font=
-family:monospace"><br></div><div class=3D"gmail_default" style=3D"font-fam=
ily:monospace">Do any of you recall if this bug was addressed and how?=C2=
=A0 If not, may I assist in some way?</div><div class=3D"gmail_default" sty=
le=3D"font-family:monospace"><br></div><div class=3D"gmail_default" style=
=3D"font-family:monospace">-Stephane</div></div>

--000000000000e9d9270631834f8e--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 20 Jun 2024 09:30:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 20 05:30:10 2024
Received: from localhost ([127.0.0.1]:50118 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKE7O-0003e7-AB
	for submit <at> debbugs.gnu.org; Thu, 20 Jun 2024 05:30:10 -0400
Received: from mout.gmx.net ([212.227.17.22]:60073)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sKE7L-0003bw-4c
 for 71386 <at> debbugs.gnu.org; Thu, 20 Jun 2024 05:30:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718875794; x=1719480594; i=rudalics@HIDDEN;
 bh=ZHiLLJOBaQP8N6npAnFHuRgaB2e9qLjPtVVIrxe/4Rc=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=BNqBjwFrQ2HMH+cIHu7pR5yPm/QHMod3N93mJTFeMOG6dwqQhqrKGnXQsuKfpL62
 9TkkZbTX/WSYZYVvwmC5S8B+FtTZo0bseEBMLUTnrIbpnq8TetFi8Q1jfMTlJgQnD
 DxK6AFIVgsCiVO+w26DJbVfcjC81TRRje8dItnsfAjnAyQNgpLKK/G4AQW0twgXDn
 b3RMi6mxzNAIo7MV6ZPiTWb7Ns5pwJtKilgchkNRiHlm7l51cHH7JcFPOva04/05R
 5UvErI+6u5KMzUJX/5FAU8GRFe7ZIthbspW5+BWTav2Ib0nrNyK4dZ1jfOn2NdsdY
 BkaEtQKi1DbvLem8bQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.96.230]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MQvD5-1ryPbR025P-00PYRH; Thu, 20
 Jun 2024 11:29:54 +0200
Message-ID: <949ea880-1b68-4cab-97f2-ff5b00f2c097@HIDDEN>
Date: Thu, 20 Jun 2024 11:29:51 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN> <m2frtdrwj1.fsf@HIDDEN>
 <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN> <m24j9rr1q5.fsf@HIDDEN>
 <d95a1014-9d29-4bd4-be36-ef44ea3bc4a8@HIDDEN> <m2zfrjpkpx.fsf@HIDDEN>
 <c9fcaadd-e936-40e1-b10c-d2d2d25e0509@HIDDEN> <m25xu6oywi.fsf@HIDDEN>
 <86h6dp1mcg.fsf@HIDDEN>
 <427a9100-dc84-42e6-bd07-44103e3475cd@HIDDEN>
 <864j9o155d.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <864j9o155d.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:CJ6l0JBMHh8vUFtVG0O7VqP+fzsXcKUelTzzbJEL/PXeNqKtNRj
 /Zy/kUW8U33zMwtPn1x2nY9Nx+QTw9X0mWGFxBT9Z+Kn+S2dzISWHT0iyJFJN5U+PFIgt/i
 HfnafWksxGstNNN9JHNVxdycid07ia5ARdTPQbXUWTb27qXUC6CI8+OEwgpRQTAe8MF3bvp
 GPei3UAypX1E+QWoBwNrQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:hkuV2uYSifY=;pZ9h9jxxXWtH6d6GCIZeT8pFekh
 7uiI2bGu3UYidQ4ItEkLRv20t/s67gQB1Y+8DVEMtHYoDCzb5AWCWkEhjFxmWdESePeRQrKOy
 Q/41icPi+OQfymtwEp/Fvrbe2PjLdFwZLBvP2HuX33m2AHeGYpWwvYkaDatHOibHA/7vKcX18
 KzLwv28+j0YvCxk4saBfUK1oZYmANHEJjvh3I+Oqo/zN6YB3lHQ11f2FlHhk6yg079BrgZElY
 2EpYeHEi578O9xIq3mQh1nUxrUlbm/14SMYgR/VcJI/KO13dqFvRb+qbVWdMf+jd0pAmw6FcS
 HtnCSRS9ruWov1+fxIQTn4WRkwqC6gJz28zTY6K6kgf0fJOBcdsC/Gw8vt9bYEX24IIe9GQ9K
 hw76Q4AOY+goFWAGxTcst6JWL6Kudl3x++p9bweg4OXcyFf24x/5+J/m1fIFaahTRvFqxOnTf
 12ZfBns05Lq/JgdQb9qUX++bz2C3XFyDwT5oI1peJXu9qIhSQ4gWVOsreuQHIQ+1qWarB05CW
 UzCAn6SRVlq6bLcbwU4y4u+PXmPMm7CQPrJggbYE6uhow5B6MvC6E3qmbnNa2tNE0sx5aNQK9
 j0qzGkH/YS7BgOUm69649O0lJJut7Hxc8KfmCCb6B3cTHzkiO6QmOGTFyloaFvFUqURVbbccC
 TGZvqj6QqgLaTeI9lH+LDiI6/+6WQ8+kHxS61u13vjHWvLoVhVZTWnB4tm/hcFXhV+CoxMbsy
 56tpTjpdEbVchEIPVETueOuEtiiQKoVdBW2XcBhUozmDY+M21imL2zPC+wUqB5+yUax1zwNqD
 sDgl0AZkvR/cuGuJTxXdgDyEj+V8gYUDeVy8/xRtPhid0=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, Al Haji-Ali <abdo.haji.ali@HIDDEN>,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > So the obstacle is that tab-bar-close-tab closes tabs only on the
 > selected frame?  I don't know, this never was a problem.

For example, 'quit-windows-on' has to deal with all windows showing a
specific buffer on all frames specified by the FRAME argument, killing
that buffer if KILL is non-nil.  If any such window was created by the
tab-bar code, that is, its second 'quit-restore' element equals 'tab',
'tab-bar-close-tab' has to take care of that window by deleting it or
showing some other buffer in it.

If 'tab-bar-close-tab' doesn't do that, 'kill-buffer' will kick in and
replace that window's buffer by some arbitrary other buffer.  If, as we
currently test with my other patch, 'replace-buffer-in-windows' calls
'quit-restore-window' and the buffer is again not replaced, then
'kill-buffer' will fall back on replace_buffer_in_windows_safely which
doesn't care about the 'quit-restore' parameter and puts some arbitrary
buffer in that window.

Now 'quit-windows-on' is already broken because when KILL is non-nil,
the buffer gets killed in the first call of 'quit-restore-window' which
means to call 'replace-buffer-in-windows' on it which on trunk deletes
windows only if they are dedicated.  This is probably not in the sense
of the caller but so far nobody protested.  In either case we have to
fix this eventually including the leak that results when 'quit-restore'
parameters reference dead buffers.  When we do that, the tab-bar
function called by 'quit-restore-window' should be prepared to handle
the scenario sketched above.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 20 Jun 2024 06:50:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 20 02:50:40 2024
Received: from localhost ([127.0.0.1]:45927 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKBd2-00045u-FG
	for submit <at> debbugs.gnu.org; Thu, 20 Jun 2024 02:50:40 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:53443)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sKBd1-00045e-3V
 for 71386 <at> debbugs.gnu.org; Thu, 20 Jun 2024 02:50:39 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 19BC320005;
 Thu, 20 Jun 2024 06:50:06 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <427a9100-dc84-42e6-bd07-44103e3475cd@HIDDEN> (martin rudalics's
 message of "Wed, 19 Jun 2024 11:37:52 +0200")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN>
 <m2frtdrwj1.fsf@HIDDEN>
 <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN>
 <m24j9rr1q5.fsf@HIDDEN>
 <d95a1014-9d29-4bd4-be36-ef44ea3bc4a8@HIDDEN>
 <m2zfrjpkpx.fsf@HIDDEN>
 <c9fcaadd-e936-40e1-b10c-d2d2d25e0509@HIDDEN>
 <m25xu6oywi.fsf@HIDDEN> <86h6dp1mcg.fsf@HIDDEN>
 <427a9100-dc84-42e6-bd07-44103e3475cd@HIDDEN>
Date: Thu, 20 Jun 2024 09:48:10 +0300
Message-ID: <864j9o155d.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, Al Haji-Ali <abdo.haji.ali@HIDDEN>,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> I don't know why Martin wants to avoid closing the tabs in window.el
>> when tabs have the same status as frames, and frames are deleted
>> in window.el.
>
> I don't want to avoid closing tabs in window.el.  But please make sure
> that the mechanism works for any window on any frame.  Whatever we
> choose, 'window-deletable-p' and 'window--delete' have to work for an
> arbitrary live window.

So the obstacle is that tab-bar-close-tab closes tabs only on the
selected frame?  I don't know, this never was a problem.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 19 Jun 2024 09:38:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 19 05:38:07 2024
Received: from localhost ([127.0.0.1]:38316 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJrlW-0007FH-Ow
	for submit <at> debbugs.gnu.org; Wed, 19 Jun 2024 05:38:06 -0400
Received: from mout.gmx.net ([212.227.17.20]:60301)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sJrlT-0007Ea-In
 for 71386 <at> debbugs.gnu.org; Wed, 19 Jun 2024 05:38:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718789873; x=1719394673; i=rudalics@HIDDEN;
 bh=+kBviaogNu7vyDsdSw+8UP2rj7qj6Mm+vQGSjzXgCfM=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=NP+kSulNI2exAo1SDFKlg7RaatQVwFTLOCJmrbV4PnWMDwyirSj7ZtdZTPIldVMG
 YI6VyrXrQuud8IISBuAHCIpCHkZBymZvFZ321tKC57j9u4t4Ibcrw3Va3SPMV93s2
 K9IEnHTEpYzDpjJSLE9WXMp6JQhf013+XIOKEbii5ILg5x/I2J8wNfWesnW94Ul+7
 MFzbDuf9jnr7CSvIPLbrGoPEha0mB2202xmlOZFbSY+PhCBCqQjcQL/A5gKMcGtP7
 6LMLwWiAxHUTAvkqa/Dnr+3ILmQrXflAf60O205JLGPwUADfyY2DBJ7CCATOOIw3S
 CAA5KYp7Xzh3ObdCGw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.224]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MCbEp-1sAkwU2Kah-0089OC; Wed, 19
 Jun 2024 11:37:53 +0200
Message-ID: <427a9100-dc84-42e6-bd07-44103e3475cd@HIDDEN>
Date: Wed, 19 Jun 2024 11:37:52 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>, Al Haji-Ali <abdo.haji.ali@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN> <m2frtdrwj1.fsf@HIDDEN>
 <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN> <m24j9rr1q5.fsf@HIDDEN>
 <d95a1014-9d29-4bd4-be36-ef44ea3bc4a8@HIDDEN> <m2zfrjpkpx.fsf@HIDDEN>
 <c9fcaadd-e936-40e1-b10c-d2d2d25e0509@HIDDEN> <m25xu6oywi.fsf@HIDDEN>
 <86h6dp1mcg.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86h6dp1mcg.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:nZkrGgSRJgWC+N4b7oOScbNUNQ7vsaQFMCJG7/UfEJP4/lCc+G5
 1MpI85P7BwbeYNnTtu5hMMzJLKvccr89YwVyhK+W61TfOsVviSY3JrRYCqE4oxdDa7B13Zv
 efvevZxWPz4y2C8s+D6Sl7D5eVQe2vgR+en9vLY2hwDmUc8bSMtfKom7QLmVrKg0slkmYV+
 mpdUFAVjsO4Z0pMQdQ2CA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:EN5mwqQ0a1A=;6hrUqrm7JlCOhklRp7tVeUC5Taj
 XTH8DTXELzNaWlL5ep4n2CvtQYZ6Uj49Mi7dTRuqpM0ow26rwvWcFVC1pWsimdQejhyLDw5VM
 TgEbod8zffGELN6PaqL8d8eSb3KT6B9VH2uJ2bi20Qx6DBMiwQCynPWP2qSsLs7iXj2xflcSb
 Ds+f9PKhOxb/KyyM3xGhou0rCiCNlw6TKH/VWkKXZY9xZt7BXjcrwK6/L+1Dm0Su9cUGWabc9
 8Q/cxiLM+ZE/2MjPyya/trZMQnRmpFB3yrNcsq8kR0bgAA3uvRTrjwwO58I0otrWN7oOuFUnz
 xn5aCvr9xdoCTTMo9daSTjEouXwpZRYYpfqfZY5WpfAB4ObCExbYUzOqMMuLfku51Kbmaosky
 ZJbIW5JdwWw8VpC7eWFBDDhKJj6qrCCIBR0fRugyYpPrSuihhaXDvhoMCWcOdJqoaNHZLjyE5
 RpE5V+uFxjixH204DTGPmuOdxvRsrpvjFZ80mwBIuoqFhPuArEDpleMeWyFWUheMxMLWscd4y
 vPeLWODgp5B5mFf1Q2c8ec2UNUFtyBnyNo4kLRrsQoun64vK3BQGNdM2KbBDQWENsVaFDmUlC
 DAGMk/rVyNMgTCVF4LlSFflzbbB+1p0QX8ZmdKBcvAZxYrnrPaLG3KRPT3KHk9/DYCfOnpLF9
 VpE/yupR7OQOrEGTlf1Q75Gypzi/Hd9HUgIIEoL4W8wJFhKGK7FMledwsmxxIZ02AahzQ8btz
 YH0dLWa210L+akL6ZaJJ8s6Ikwhuj64EchNx7G7hdsZgXgh1BM+OyPTJc/9mcdKOCoA8CFyIb
 abdks7wvHrmWPWf5G26/GnorMFDfU1LVO+ZqLmdcDcYtM=
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > I don't know why Martin wants to avoid closing the tabs
 in window.el > when tabs have the same status as frames, and frames are deleted
 > in window.el. I don't want to avoid closing tabs in window.el. But please
 make sure that the mechanism works for any window on any frame. Whatever
 we choose, 'window-deletable-p' and 'window--delete' have to work f [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [212.95.5.224 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.17.20 listed in list.dnswl.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
 [212.227.17.20 listed in wl.mailspike.net]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > I don't know why Martin wants to avoid closing the tabs
    in window.el > when tabs have the same status as frames, and frames are deleted
    > in window.el. I don't want to avoid closing tabs in window.el. But please
    make sure that the mechanism works for any window on any frame. Whatever
   we choose, 'window-deletable-p' and 'window--delete' have to work f [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [212.95.5.224 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.17.20 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
                             [212.227.17.20 listed in wl.mailspike.net]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

 > I don't know why Martin wants to avoid closing the tabs in window.el
 > when tabs have the same status as frames, and frames are deleted
 > in window.el.

I don't want to avoid closing tabs in window.el.  But please make sure
that the mechanism works for any window on any frame.  Whatever we
choose, 'window-deletable-p' and 'window--delete' have to work for an
arbitrary live window.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 19 Jun 2024 06:25:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 19 02:25:56 2024
Received: from localhost ([127.0.0.1]:34501 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJolY-0001KI-LP
	for submit <at> debbugs.gnu.org; Wed, 19 Jun 2024 02:25:56 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:60049)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sJolW-0001K3-6x
 for 71386 <at> debbugs.gnu.org; Wed, 19 Jun 2024 02:25:54 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 01EE51C0005;
 Wed, 19 Jun 2024 06:25:22 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <m25xu6oywi.fsf@HIDDEN> (Al Haji-Ali's message of "Tue, 18 Jun
 2024 20:04:45 +0100")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN>
 <m2frtdrwj1.fsf@HIDDEN>
 <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN>
 <m24j9rr1q5.fsf@HIDDEN>
 <d95a1014-9d29-4bd4-be36-ef44ea3bc4a8@HIDDEN>
 <m2zfrjpkpx.fsf@HIDDEN>
 <c9fcaadd-e936-40e1-b10c-d2d2d25e0509@HIDDEN>
 <m25xu6oywi.fsf@HIDDEN>
Date: Wed, 19 Jun 2024 09:24:31 +0300
Message-ID: <86h6dp1mcg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> We've been discussing changes to 'switch-to-prev-buffer' in Bug#69993
>> but ended up in disagreement on what to do.  Juri then implemented a
>> purely tab-bar based method.  For my Emacs I use an option that allows
>> it to switch to buffers that have been already displayed at least once
>> only and am quite happy with it (I've never managed to derive a suitable
>> regexp for all buffers I never want to switch to).
>
> I'll check Bug#69993 and try to figure out how to close the tab when
> it has a single dedicated window from `switch-to-prev-buffer`,

Unfortunately, there is nothing to figure out from Bug#69993,
because it was about tab-line, not tab-bar.

> or maybe Juri has some ideas?

I don't know why Martin wants to avoid closing the tabs in window.el
when tabs have the same status as frames, and frames are deleted
in window.el.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 18 Jun 2024 19:07:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 18 15:07:36 2024
Received: from localhost ([127.0.0.1]:48875 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJeB5-0002Pt-Mu
	for submit <at> debbugs.gnu.org; Tue, 18 Jun 2024 15:07:35 -0400
Received: from mail-wm1-f43.google.com ([209.85.128.43]:52487)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdo.haji.ali@HIDDEN>) id 1sJeB3-0002Pa-NH
 for 71386 <at> debbugs.gnu.org; Tue, 18 Jun 2024 15:07:34 -0400
Received: by mail-wm1-f43.google.com with SMTP id
 5b1f17b1804b1-4230366ad7bso52756555e9.1
 for <71386 <at> debbugs.gnu.org>; Tue, 18 Jun 2024 12:07:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1718737585; x=1719342385; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=92i5ueeWV1DxtSn/aL00+0PPzTCPJEHQjWZ45MtumOg=;
 b=JfSRyACv/CxKx94rb0JfKUnWgduJrpqRYxFpXsspKCINLZn3O6VfPnrUDX3LkdS30+
 qna3XrtLrf35zAuSlTly3kTmrLT3jvhxgd+T8H0n9WRkpPrjMqFwpwtXd2jTvACzDXek
 uE/2kgwrjolit4IEgZT1DMT8GVPiGmP62c3foUrfXsxvHpkNU4o9esP42ZKOAdaPfssO
 5hOqutvzDrqMfxvAS/fLrun1Y7ytiyu4iszCKTtVQCCeR35UaIPDrFvUZzL65RtRyunl
 MGgT8cXc0eywrxc+Hudd/82E0HNx99IqtFZNzjH0N2Bua+Ptedsuood9fVGCUizSpxPm
 1UDg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1718737585; x=1719342385;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=92i5ueeWV1DxtSn/aL00+0PPzTCPJEHQjWZ45MtumOg=;
 b=IyduPL3MrTdaSYM5szDl3CeoCeCUc8CcJEroZ5rxfIw6b1/mkJjP4dJ5Mso/WI/8Xt
 vJtDGu4RXUyjrHFPnJVyJ1ws+m930nq9D124w20V5ysRhgfHaZsPbbBy45jK7CxPDAEv
 mcGtweOcWgnNnOSMTGXq2tkonfZ0GIIccJhgQlibjHOndwYAnhdjLZiVEu/4Q8hSnHjo
 yLq0CaU4EBpmUy6JMgUZvsoOwi6FkSs/Mau1YB32gpEIcxBOuM/vTWSIKRbIvw+KGgOV
 9yaFQxcVz1S62AAsZLvaVtsguWdSu/g0fo63R4ssp3IPmojn+dBWtMBLgfEUPyFDN5Iw
 GzQA==
X-Forwarded-Encrypted: i=1;
 AJvYcCX6g2vrip7QPPljwrrmnpbRZzknbklufygKk7qFbe11J15ae6j5RULzLx9KoEkHgJdShJDtkZIrLBCb6wY33rOUCy1fzvY=
X-Gm-Message-State: AOJu0YzZLpdcuQu3nfX1AmRDbvgfn/OTodteSAsYIChmM04NQMCp1o5m
 gW/7BCZ65/HG2KdjdObSbmj5GbN5Wz77qFzyr8GST/Rdwr1gS3GoOHwsNw==
X-Google-Smtp-Source: AGHT+IHnnHIJc/Y/BDzmcwsBLZ5ayMOuyzSZk4/KEEcnR897vYG3c/iYo+LNgl9tc6sVpPXK5OAbcw==
X-Received: by 2002:adf:e84e:0:b0:361:78c8:2eb6 with SMTP id
 ffacd0b85a97d-363175b904emr404337f8f.25.1718737584607; 
 Tue, 18 Jun 2024 12:06:24 -0700 (PDT)
Received: from localhost
 (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-422870e986asm239050695e9.27.2024.06.18.12.06.24
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 18 Jun 2024 12:06:24 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <c9fcaadd-e936-40e1-b10c-d2d2d25e0509@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <868qzehxie.fsf@HIDDEN>
 <86msnu9fhg.fsf@HIDDEN> <86zfruc7qh.fsf@HIDDEN>
 <86ikyi9e2l.fsf@HIDDEN> <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN> <m2frtdrwj1.fsf@HIDDEN>
 <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN> <m24j9rr1q5.fsf@HIDDEN>
 <d95a1014-9d29-4bd4-be36-ef44ea3bc4a8@HIDDEN> <m2zfrjpkpx.fsf@HIDDEN>
 <c9fcaadd-e936-40e1-b10c-d2d2d25e0509@HIDDEN>
Date: Tue, 18 Jun 2024 20:04:45 +0100
Message-ID: <m25xu6oywi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


On 18/06/2024, martin rudalics wrote:
> We've been discussing changes to 'switch-to-prev-buffer' in Bug#69993
> but ended up in disagreement on what to do.  Juri then implemented a
> purely tab-bar based method.  For my Emacs I use an option that allows
> it to switch to buffers that have been already displayed at least once
> only and am quite happy with it (I've never managed to derive a suitable
> regexp for all buffers I never want to switch to).

I see. The change you suggested is definitely needed in any case and would address the main issue in this bug report (frame being deleted and losing tab configuration). I would just suggest that `window-deletable-functions` be renamed to `window-deletable-predicates` or `window-deletable-p-functions` (as Juri suggested in his very first patch) to emphasize that these should be side-effect-free predicates.

I guess the code that Juri originally suggested for tab-bar can also be used with `window-deletable-functions`.
,----
| (defun tab-bar-window-delete-frame-p (window kill)
|   "Prevent deletion of WINDOW and its frame when it contains tabs.
| Used in `'window-deletable-functions'."
|   (and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1)))
|   
| (add-hook 'window-deletable-functions #'tab-bar-window-delete-frame-p)
`----

I'll check Bug#69993 and try to figure out how to close the tab when it has a single dedicated window from `switch-to-prev-buffer`, or maybe Juri has some ideas?

-- Al




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 18 Jun 2024 09:52:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 18 05:52:39 2024
Received: from localhost ([127.0.0.1]:41916 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJVW3-0003Bs-A0
	for submit <at> debbugs.gnu.org; Tue, 18 Jun 2024 05:52:39 -0400
Received: from mout.gmx.net ([212.227.17.20]:40221)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sJVW0-0003Bb-OX
 for 71386 <at> debbugs.gnu.org; Tue, 18 Jun 2024 05:52:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718704344; x=1719309144; i=rudalics@HIDDEN;
 bh=O56NKoG6qzbJu4AAYeOOFix0nb/NTeSWq9Z+T9SrQF0=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=sXszDA4EkVjrkwkLpKn3/9AD+Re+BR5ebB9buSV4/rekk5cAsHIqudSLhpPDjveB
 kvhYZB8HLrwEUy6Z4+j69paap/dSXdheNJ7Z9Uoo3PoZvEP3GU4+ertuotJcvfhdv
 RIKG1DZmkcMq9warQo9U7pkgZaQYPPjA8Ax33ME3yw0B5KPty2cPhFnVt+7a9ryuM
 qryQR/N6H9sguBWhjOQDqPDy7ermGEO1gAudXMnsIcF8IHwQp6db4jIeZmxpTq3rF
 oBq+LUqIWOZxOc1WmBc965tZU3n6oeAvzDMAQyPk3sFyldodW2iKOmX9RpBSFIV5J
 aHo5koDtcY+miGXVaA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.96.227]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M1HZi-1sMFbG2hlC-000Ssj; Tue, 18
 Jun 2024 11:52:24 +0200
Message-ID: <c9fcaadd-e936-40e1-b10c-d2d2d25e0509@HIDDEN>
Date: Tue, 18 Jun 2024 11:52:23 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86y17gmxdg.fsf@HIDDEN>
 <m27cf0h9sy.fsf@HIDDEN> <868qzehxie.fsf@HIDDEN>
 <86msnu9fhg.fsf@HIDDEN> <86zfruc7qh.fsf@HIDDEN>
 <86ikyi9e2l.fsf@HIDDEN> <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN> <m2frtdrwj1.fsf@HIDDEN>
 <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN> <m24j9rr1q5.fsf@HIDDEN>
 <d95a1014-9d29-4bd4-be36-ef44ea3bc4a8@HIDDEN> <m2zfrjpkpx.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <m2zfrjpkpx.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:qYwbYgh0Z/G3/asaZDM/3e3GR807I1QkGgWAhn4xpzDMRtxpe5C
 cvdWYGC5QwcT70TjTm4yEB86f2ulgF9mrxCI8Z+KqVFKnXhoRiX+/BeA9bmdIzLKikfdRyq
 IXBJWQraCaqDaoPMEsk4ng7OK3GMsjXYWPQkumSMX2/6dUrroE9zbAeDixL/Z55ylgbuOCg
 mBu8nasX7Ta8WOJHQ7MCg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:C02AbDH5d4Y=;IJ5jaEh+ww1vKPp8VaPLw27kGtf
 rLIBlFJ+c5CadczACojLENAdTtvYBuNK97GyqiM24Z/ZNggxjLwW47re9dIk51JnY5nerT+FK
 LXNWjqTQvC+w9o+A9Pt3/paiD+a1qdhEIOZ/Yl7sO4LABdeAw8kLq7XpshZq7mgsnEwxMe2PG
 PfxHNDlfOr5LBQUPTzCNhjIEtepQxQ8gd1T3GNSZetF99QFie4aNXeup6XufHvVul2nF2sFty
 VoZv25B4zqXMrCvImE/AkAzl3k0PxWRXx8zu8P91jOUWDLbkhsrDp7lzogMIWOZOzL8PNzCsD
 WR3I+0NKlatv2WjirljtbeLTQgDO10IoC0nNaBSLsLN0EX8GUVvoO//3M4YEUMU6U2WcdQy7A
 kn/i8y6auSxbTEMt0ArEVNQUgmhK/OzAlIA47+Ce4acZPexFEsVJ7haVgI+IZmxEbAnybdCYQ
 ozUodACvr+ASiQZeTaAdSte/cTIehYKpiXFXFdeb3H5MwzuYtw+zBSoSTbSK6GwQ6EoKV+e6x
 Zus1KpW8b7Bp6PYv+YlaKnBAOAmJt8ZDNcDuiCdrIlrz1Pi2Pf3Npe8GxWqy+QjxCTuDQ4y85
 I+b+sU/eHxuFbkK+pdOKMsuU/JEJKB135K2twrt1GCud6NKROM/+MQj6DiQolN2aAp2GIWH5V
 q1/YZLBMJr0cu48TLELdSKpN2zXSbEteK/RmxjDJpmiATRoZegqbUE5QJWZE0tf7MbcZrYyL+
 vMaFMmbAMOveRv5LCCOLTJGUe/D0bYKUnw+vOrqj8e0tor8uRScNizCTksSJePUdrJZ4MHAL+
 0H90V4KmjioOpK+AvZgSoG4p8lgFuZ7tzjkF24n/MNRBk=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > However, `switch-to-prev-buffer` does not seem to allow hooks to
 > modify its behaviour (by the tab-bar code or otherwise), except to
 > skip buffers.  Are we open to adding such hooks as well?

We've been discussing changes to 'switch-to-prev-buffer' in Bug#69993
but ended up in disagreement on what to do.  Juri then implemented a
purely tab-bar based method.  For my Emacs I use an option that allows
it to switch to buffers that have been already displayed at least once
only and am quite happy with it (I've never managed to derive a suitable
regexp for all buffers I never want to switch to).

But I do not think that we need a hook for 'switch-to-prev-buffer'.  A
user may call it at any moment and the tab bar code must already know
how to deal with it via something like 'window-state-change-functions'
(and on a non-selected frame as well).

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 17 Jun 2024 17:03:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 17 13:03:46 2024
Received: from localhost ([127.0.0.1]:35269 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJFli-000659-A8
	for submit <at> debbugs.gnu.org; Mon, 17 Jun 2024 13:03:46 -0400
Received: from mail-lf1-f53.google.com ([209.85.167.53]:49202)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdo.haji.ali@HIDDEN>) id 1sJFlg-00064h-Jd
 for 71386 <at> debbugs.gnu.org; Mon, 17 Jun 2024 13:03:45 -0400
Received: by mail-lf1-f53.google.com with SMTP id
 2adb3069b0e04-52cc10b5978so688371e87.2
 for <71386 <at> debbugs.gnu.org>; Mon, 17 Jun 2024 10:03:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1718643756; x=1719248556; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=UiimQTuOGgiORmUwXlnQuO/lYE4OFbo1fVQnUHQHcgw=;
 b=YcSKg+e0D7frikTm4bB0yvkjeZqDt4dwmZXPYLHM/R6/ogrMaDzpZZ54IE4kmlQo0Z
 e12emrrWC//XgHf0CN+7MdoDYZltpOBWN1Wtn21YEMy95WTSZ6EcpeVNLBn/Zv0JAcfx
 K+ZGtk4Psa2a2ut+izLjbtPou1F4Tmoe2TyMDomcx9hLEXzd38NEQkUie/iUFaLCSi+R
 AxF0Gb+6AXwzYyJ2Hm8bhG8BbI2NgdByHtKPqY6rDNVimMCTeXuL25iAKlhmdqEkdBqZ
 W2HXwFfzeviQx91OPP2YpXq+AALMWFGMsbQkx7681ErbRJ+Jen69YSdWP0MTUAbqet+O
 3zqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1718643756; x=1719248556;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=UiimQTuOGgiORmUwXlnQuO/lYE4OFbo1fVQnUHQHcgw=;
 b=sB6PHoht3/D+65TLNyzpd+TnsXi8nqY2QL/ZA9zHCUe26l9cWuvMHg9NNj623gmnSz
 sVWjY8grHzn0KzKX2GdhXZTBlNZCyBiV8oXNmNYBxTUiIAOZIqFsupfQ5t+6RJKEw0Uo
 pgrx8HEbDQ6OTP+7GvUq8wcou2QJ+kZ+p3JRqV1hhX2WFRo45Rra9V3i2NpCeX1OuFNX
 vP6jy2PBIMKbzSW3+l/wPD0+kNDeqyohxhQSSSu5lZtaiGWGEQ+lWPKhwxpIwQBM0ZtR
 MNkoomklPsURI+KpDRpmUuLq3H8euDU9ASUqvnrSCumHJQmS3UE9bwDGUGkxvU+aqO2X
 sA7A==
X-Forwarded-Encrypted: i=1;
 AJvYcCUIh+Td+JS5L2fGDK36aAn6nBXCXvuEXixWvircglNYNsdgh6p7jgpltwdUF9x5wuvyVDossaFLOQVbt4M3yXJLDcJY6W0=
X-Gm-Message-State: AOJu0Yyu8wxwVKvhd76ilvlN+y+SHZqmvdU8ZEQRwAg9wXuQOh9D4kZi
 hu3FMhaIjeqny6K7H8LK8TC7M+o3ykwIx+WpteFDDMavP74LqA2J
X-Google-Smtp-Source: AGHT+IG00OBKNZDKMYKIHloLYCUMSQi3dc+9Lqvd76D09UJPotxTv5/Ik2TEzUzExz525og+6iJD7g==
X-Received: by 2002:a05:6512:743:b0:52c:859f:9f77 with SMTP id
 2adb3069b0e04-52ca6e65821mr6962828e87.19.1718643755943; 
 Mon, 17 Jun 2024 10:02:35 -0700 (PDT)
Received: from localhost
 (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-423072c21dbsm122077415e9.4.2024.06.17.10.02.35
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 17 Jun 2024 10:02:35 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <d95a1014-9d29-4bd4-be36-ef44ea3bc4a8@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86y17gmxdg.fsf@HIDDEN>
 <m27cf0h9sy.fsf@HIDDEN> <868qzehxie.fsf@HIDDEN>
 <86msnu9fhg.fsf@HIDDEN> <86zfruc7qh.fsf@HIDDEN>
 <86ikyi9e2l.fsf@HIDDEN> <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN> <m2frtdrwj1.fsf@HIDDEN>
 <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN> <m24j9rr1q5.fsf@HIDDEN>
 <d95a1014-9d29-4bd4-be36-ef44ea3bc4a8@HIDDEN>
Date: Mon, 17 Jun 2024 18:01:14 +0100
Message-ID: <m2zfrjpkpx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


On 17/06/2024, martin rudalics wrote:
>
> The patch I proposed will simply cause another buffer to be shown in
> that window.  How this affects the tab bar code is beyond the limits of
> 'quit-restore-window' and colleagues.  I suppose the tab bar code should
> do whatever it does when 'switch-to-prev-buffer' gets called.

Ah, this could work and I can see it being more foolproof than modifying `window--delete`.
However, `switch-to-prev-buffer` does not seem to allow hooks to modify its behaviour (by the tab-bar code or otherwise), except to skip buffers.
Are we open to adding such hooks as well?

-- Al




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 17 Jun 2024 16:47:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 17 12:47:25 2024
Received: from localhost ([127.0.0.1]:35241 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJFVt-0002ql-4C
	for submit <at> debbugs.gnu.org; Mon, 17 Jun 2024 12:47:25 -0400
Received: from mout.gmx.net ([212.227.17.20]:58129)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sJFVp-0002qX-QZ
 for 71386 <at> debbugs.gnu.org; Mon, 17 Jun 2024 12:47:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718642832; x=1719247632; i=rudalics@HIDDEN;
 bh=UhsuXz2ZOEEwlN1pOS2uMKRaSSaS8bM5gLnX6ZJUmAY=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=ONtvbrEecYfp9SNA1baViZNOlMDWZqtjf6opjemMkczV5kfVwZnxFKjb7LERUmq+
 TmbC8SRH8cy44HsxRIeUY6S3gLzrS3BzdULBN/vFBHKIqnwuCdF5MVKYbnZOGMwRT
 H2SlO4Vj65vwTIpYBobxcoJZHdximiO6RXNDZ7+J9pSVlN24Yk8MqyKDx1S2WQTsS
 5wIVanigekrHU9giR6eDIVlmvSKQbkrqW9731sSmHeZCvW70ECNAP9Z3uIB6O2+7p
 V0KIBfP5CAbITNwz/Yx+GfhUyi72cKXzaSMMJWaLGVvFpA/suNN0jEP2ThZ5eRui/
 qfGaTs20cFJpjgZoYA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.42]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MN5if-1s2xiH19fx-00Liq8; Mon, 17
 Jun 2024 18:47:12 +0200
Message-ID: <d95a1014-9d29-4bd4-be36-ef44ea3bc4a8@HIDDEN>
Date: Mon, 17 Jun 2024 18:47:08 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86msnw4qm4.fsf@HIDDEN>
 <86y17gej2x.fsf@HIDDEN> <86y17gmxdg.fsf@HIDDEN>
 <m27cf0h9sy.fsf@HIDDEN> <868qzehxie.fsf@HIDDEN>
 <86msnu9fhg.fsf@HIDDEN> <86zfruc7qh.fsf@HIDDEN>
 <86ikyi9e2l.fsf@HIDDEN> <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN> <m2frtdrwj1.fsf@HIDDEN>
 <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN> <m24j9rr1q5.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <m24j9rr1q5.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:uf6QTbpnCxtxdIuWS9rleEDOB6QtIGItKcAKN/8X0JRks3/dqpc
 M7GjTtZiiIHmYoAQ5ac3KJ7o99SxZ8ro4GGKmqZwscH2saclLBovxTCoUp3R0Aj6Vt3SIek
 /uIUxInz/9vxgLFcFSMDduk6vd+Ufuze1o3MF3Rug5DJz2D41NzU+MxdRzw6vvm5mdNfDB4
 qeXvBH9ZE6hg4/uQTqxjQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:9x0gm6x+pX0=;gq5oatUEwC8To7nHUUMLjVL7z3N
 RckguzCY2SO1SxpiEhWRbnE+V0n4/sBGJaL623UfeUrziFXRjqESmyEGLCyAQibJHjXIe3KT8
 AabCw37QEoLnIDAIOZgBpZmuQmv7Cew4kfYV9ClArx8/3WkHBvCw46A6/ts5V5nvxDiXnEL2q
 32YHHo1/EwCASmaC47SqfnauBtcLtzPopamBppu4r0ALSZZDWHX2LjkIv/ZGEOVlwKfgDzhyb
 m3/HyA0fD2VDV9peN4b9O1vI6qDBZY2Kl593FGUSeeFyCCJJ9aP1VmDz7sIH96xTeL/4UY0ej
 Vrfc+DAmwwZ0M12BrU9ZVtLvUQRG42d+A0FBtJpFYEmaMGBmkzLvMuryTMt/yatk6NH3GfSO2
 EbwqyxMYExa35mqusrAG4egUxyN/Jm4ZibGBqxIGHqKqJwkN3FH9iPykG2fFIAtvxCf5rwUC/
 o8BLXh/WwcT6g1OvkkOryJwxuOOh5tzV7PkpRQVxDc7UqY9zzxYIXnrFktEZ7oHkJwnvukuaq
 qeJiT6QjvjQWpdcwZAEPAnZyW7/j1AYjSscaMy4wxbdV0pGPqyejiUNHZbfhAEHGeb3AI0SbW
 nBNuiD4U/c3yccpM9d7LUh2Y0FifOykSk56+fwRN9yp2ZYTCU5prAVyO2/BxO86GbWKe09wzO
 rEsC6kJK6rAT2uq++MnG8EuJJEaUEcGlb8kZzljLKvTITbVY2pzO4MCXoJrVv1X4PagFgmxb9
 CWSH0xkCykN93qdmHv0R5GTmISaykzWalDf49YS8QyjkVUXeGtYzXUEK0etv3uWuq7RWnczHf
 c6nD9Vo6O7ayohBkcZgZQ1To6Q5VlpRCf9d8Zi5npNjcg=
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: > It would be great if the fix is done entirely in
 `window-deletable-p`, 
 > but is the idea functions in `window-deletable-functions` could have >
 side-effects even though they are called from a predi [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [212.95.5.42 listed in zen.spamhaus.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
 [212.227.17.20 listed in wl.mailspike.net]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.17.20 listed in list.dnswl.org]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > It would be great if the fix is done entirely in `window-deletable-p`,
    > but is the idea functions in `window-deletable-functions` could have >
   side-effects even though they are called from a predi [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [212.95.5.42 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.17.20 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
                             [212.227.17.20 listed in wl.mailspike.net]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

 > It would be great if the fix is done entirely in `window-deletable-p`,
 > but is the idea functions in `window-deletable-functions` could have
 > side-effects even though they are called from a predicate?

No.  We could emphasize that in the doc-string.  The idea is that such a
function can have 'window-deletable-p' return nil instead of 'frame' or
t.  WOW all functions on 'window-deletable-functions' have to agree that
'window-deletable-p' may return any non-nil value it initially proposes.

 > For tabs, I believe an ideal fix would close the tab in lieu of
 > deleting the frame when the buffer of a dedicated window is killed
 > (similar to what Juri does in per patches).

The patch I proposed will simply cause another buffer to be shown in
that window.  How this affects the tab bar code is beyond the limits of
'quit-restore-window' and colleagues.  I suppose the tab bar code should
do whatever it does when 'switch-to-prev-buffer' gets called.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 17 Jun 2024 16:10:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 17 12:10:12 2024
Received: from localhost ([127.0.0.1]:35191 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJEvs-0001sn-Jl
	for submit <at> debbugs.gnu.org; Mon, 17 Jun 2024 12:10:12 -0400
Received: from mail-wr1-f51.google.com ([209.85.221.51]:43147)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdo.haji.ali@HIDDEN>) id 1sJEvq-0001sa-Ic
 for 71386 <at> debbugs.gnu.org; Mon, 17 Jun 2024 12:10:11 -0400
Received: by mail-wr1-f51.google.com with SMTP id
 ffacd0b85a97d-35f2c9e23d3so3694793f8f.0
 for <71386 <at> debbugs.gnu.org>; Mon, 17 Jun 2024 09:10:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1718640542; x=1719245342; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=L1zWDFQEX9PfNy3EPowh+QmoZr1p0+hGxbJLCDT3CbA=;
 b=cNs/jM6qvcKf4l1+beXdFj5bBT9PA9Pusa67BYRytzqPn4daxgM4xU37fIiD55KthC
 Y68FqD310U9lGsEIA3z4ugeqEKGOBj3go2Z0VrH+vYdnJtG01pliyrvZ+MF/0eWCpzwk
 5k1E6VKm2pgJdEND1+i22CW+urgeXVF3kJlSiJ3uGDA2xGuDUmnmKrd2l/C3CcAZcQ2W
 zAhnyiIgJvVQnpS6cNCRQdhLpJ9zYYT//41X6QKzn/oiB0mjU2N9yBWSH1FkIIWftmdi
 3QTiRDcYDFQsOwqJVKGhyByYAhzdg0EvoYUqQp7LIDogQjSNnL533KMOsiKaIyEJBkO6
 +Eeg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1718640542; x=1719245342;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=L1zWDFQEX9PfNy3EPowh+QmoZr1p0+hGxbJLCDT3CbA=;
 b=pU/3P6pWhWh74o5MTpNL0NfxNTsOv2R+VCru93RVIal8hdUu/Q83DFkFR/UxCz6WED
 jeuLHIfGhUxooWVvy92enrthtd1eD6ddK8QsIHUmFRuFy1rt+p7ZygXZccKNsNe9YPRt
 U0BFZhPpGsHx8fLQ5qYySfyMhBF7xNLqjS+qXrxRy/TuNKR5e1DqpdsYCICl5O1sQCSd
 1KhckQuSFNSv3pXgJTWYMtTho+5HozlBTuM5s6pMRSGE+78O/2nuM+VCfhxxjN8W+UA9
 hU9BuJw5qegWyCGLWbJUbInFk6HUldx2Vontt148xYJBFar8UNGlM79hxFiqslENunuf
 xbJQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCXmnpzSpjCt8boIlRjheyVTxCmCvADOYAjddMKbtxiIqcEOfuYVKGpHx2FWKJcEhjruMvsBY5UJYUTXGMrDzfmd8jKC6iw=
X-Gm-Message-State: AOJu0Yx/+zvWFEAssnwgNiK7xpkxOqu20pS956/UKFh6S5A9FCfzfOqF
 njWVXnCn+qWYkAFyOQYvkF7f2as7Nh2rB6qEEQj+1Q0nqV+aPj7H
X-Google-Smtp-Source: AGHT+IG2NV0KrYrhLWbcgCxns/3j/DP/2+MQWdTNU/NmFom3Swg7FN6NzCfJKa84TFu5Ohsp22nP7A==
X-Received: by 2002:a5d:6ac2:0:b0:360:9333:c69 with SMTP id
 ffacd0b85a97d-3609eaa9059mr74510f8f.33.1718640542350; 
 Mon, 17 Jun 2024 09:09:02 -0700 (PDT)
Received: from localhost
 (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-360750acd7csm12189655f8f.52.2024.06.17.09.09.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 17 Jun 2024 09:09:01 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86msnw4qm4.fsf@HIDDEN>
 <86y17gej2x.fsf@HIDDEN> <86y17gmxdg.fsf@HIDDEN>
 <m27cf0h9sy.fsf@HIDDEN> <868qzehxie.fsf@HIDDEN>
 <86msnu9fhg.fsf@HIDDEN> <86zfruc7qh.fsf@HIDDEN>
 <86ikyi9e2l.fsf@HIDDEN> <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN> <m2frtdrwj1.fsf@HIDDEN>
 <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN>
Date: Mon, 17 Jun 2024 17:08:34 +0100
Message-ID: <m24j9rr1q5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


On 17/06/2024, martin rudalics wrote:
> This means that we should do the entire fix within 'window-deletable-p',
> right?  That's not an internal function, so we can, in all conscience,
> supply an abnormal hook as in the roughly tested patch attached.

It would be great if the fix is done entirely in `window-deletable-p`, but is the idea functions in `window-deletable-functions` could have side-effects even though they are called from a predicate?

For tabs, I believe an ideal fix would close the tab in lieu of deleting the frame when the buffer of a dedicated window is killed (similar to what Juri does in per patches).

-- Al




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 17 Jun 2024 14:47:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 17 10:47:51 2024
Received: from localhost ([127.0.0.1]:34964 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJDeB-00087W-5m
	for submit <at> debbugs.gnu.org; Mon, 17 Jun 2024 10:47:51 -0400
Received: from mout.gmx.net ([212.227.17.20]:41297)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sJDe9-00087G-1P
 for 71386 <at> debbugs.gnu.org; Mon, 17 Jun 2024 10:47:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718635660; x=1719240460; i=rudalics@HIDDEN;
 bh=QMd8zafktqRYhZKHjTER12eAEn3gKuX67YgG+GcGlk8=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=NLkkAc8BDj8OjYbRsSbE5+M2vhJFtZl+0ucaFqzRBo/khPLldB5KUb1pTvc4tE/Y
 t7NomSvCGBEcdSAXnmbRG21yfvuCr3wQRXRM8v6RbLuFpqvE7q+/erDuLtdXJwIKp
 9nZxRTx3J9lgcwbCWFGr4uMmS8mL2o4GI3GZpbs8CcYeaMsJsyDBTMl+e67npiWyD
 ydwN5p1bPBJEwj8xWGZyOSvioIUPK0rqw5FuBuyznbo8+QnROQu8JHOW85hWRyh0w
 hJdYBriAMLAJo0UOr8PON3Uoru4hskk2guSbaXupHz6RLC11k5gULmWMDbxVVNeFI
 izW8DOwzXWIsCw8bsg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.42]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MTiTt-1rwLk90y21-00SGv5; Mon, 17
 Jun 2024 16:47:40 +0200
Message-ID: <dbafc5da-dc0a-4fbe-a902-01cf60310f00@HIDDEN>
Date: Mon, 17 Jun 2024 16:47:38 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN>
 <86a5jksv4k.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86a5jksv4k.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:Rwj803zp55wJLqxpkWK+0SGNlPtqpq5xKBiLAHdjDpYuFjQ0hQf
 tgZCvdIotvCFpzcDEjuq4oHRfMmfpk4LGFgqGgJR4mVxAZuiq4rDlzvgSzPmektGKmbX0PT
 PeMaLosgPUOf/xfItt5QFGOJf7pvApRFhuD89RyGi689u0xnL4O4occE2G3YTmA43KhC9qv
 n3HkAYvQkNZBU6QhQfo6Q==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:MxZjSBj/Ta8=;U0FYTViMS6H0Fp7O5A20P0nbrnD
 ljmFIcaIa9dorD+ZIvlN+mqRb/NbsUgbgvyFmZzcy3QksCaoJLbMwIXy3iY4Ffw0FQa2nZfot
 h2PGMFHPcJ7+Z2GszsAn5TIHd0sFcjx2ZLNCcDNAPhHp8GtTQ5AlqtUjQwxFK0q3NxOXxFDQz
 fMwOy8ox+lBU91zcD6sQrgMF8sl3NAFFUH3FiHBjzf8Hh0/ce2XbRNfsYa63pzDoRjzlV8xkL
 I5W3p+pp/OtNn6XVMnrQfxeccabrH8NdjEkO9vCqLrO6I8S9n8zJU28h8HN/QqtpkGWzaGizv
 JaWEjBO82d09Qhh7bL8nQOV1zsORC0x5oLS74+jNkRRf45p3z747W8vfOdttX13HkXpgisQvm
 iIJzNuLHlC4GXpk8a+7aOOXb98FrOzwDlmb2eI3IIhi6cI3LV2C+TWvN1fSOUlhxRqow049H2
 zWKXWHUbHzbOZr7VAqjOjIdJDIxIuCJ0wuuaLk77ytMRJaCV3DsVUeNLitCddkRSLNxKEZ61j
 kypIqrDzqEKUUpVCb5u1X04okes0w5O60TJCPD6TQkAZkil+AtzcIjd6vMbRlcpQ+hKBOUdU+
 fjNEWwOlgPfFCzG+LprbT/VKBoEit8Piu+UCnmF0U2yXJAK6Shl+xDg+c/jCjaaVy0mbiEzAe
 TE6QJRHbf022ggOyXisrFQYuZQ4hDKPbhNseHV1mP4gubKSLWVukcVanJiidJ8KaGZY1DID1L
 Wy/gZPd6iNwqbzIXaJ0s6HKTVIrots37RLmCY4PBS9u3l0oGamWMuLqEOuXK8RCw+dDC6+hC+
 oIhNR82A241SUjKTtfYOKGtcZUGzj0InQFmHdIUaQnXL8=
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: > This patch just copies the logic of frame handling to tab
 handling. > There is no customization for frame handling,
 There is: 'auto-hide-function'.
 > so there is > no customization for tab handling. 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [212.95.5.42 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.17.20 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
 [212.227.17.20 listed in wl.mailspike.net]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > This patch just copies the logic of frame handling to tab
    handling. > There is no customization for frame handling, There is: 'auto-hide-function'.
    > so there is > no customization for tab handling. 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [212.95.5.42 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.17.20 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
                             [212.227.17.20 listed in wl.mailspike.net]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

 > This patch just copies the logic of frame handling to tab handling.
 > There is no customization for frame handling,

There is: 'auto-hide-function'.

 > so there is
 > no customization for tab handling.

But we want to customize the new behavior whether to retain a frame
because it has outstanding tabs or not.

 > In window-deletable-p there is hard-coded 'frame-root-window-p'
 > that checks if the frame has only 1 window.  So the patch
 > does the same by checking if there is only 1 tab on the frame.
 >
 > Also in window--delete the call of 'tab-bar-close-tab'
 > corresponds to the call 'delete-frame'.

And if a user wants to auto-hide the frame?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 17 Jun 2024 14:47:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 17 10:47:25 2024
Received: from localhost ([127.0.0.1]:34960 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJDdk-00086o-MW
	for submit <at> debbugs.gnu.org; Mon, 17 Jun 2024 10:47:25 -0400
Received: from mout.gmx.net ([212.227.17.20]:34327)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sJDdg-00086U-NY
 for 71386 <at> debbugs.gnu.org; Mon, 17 Jun 2024 10:47:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718635631; x=1719240431; i=rudalics@HIDDEN;
 bh=sEWsOmCfQPuFa8BLn6F7WIWuJDLnfnaT/ZV7KMm9Mpg=;
 h=X-UI-Sender-Class:Content-Type:Message-ID:Date:MIME-Version:
 Subject:To:Cc:References:From:In-Reply-To:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=ZgkdNEuLBzggFHnDM8e3Um1keiZrmdD73CmlpSxr5VYujJfDgVCuV3t9Gw7LJCQG
 sReAJaBqN2xgDNhb44TZrGnjUY408gDVnLE38C0zXecJFw9jtLDs22os2fmtDeAyO
 2Y4xV3h+SClWxH4TYyKWhV9ADh1MMSh/uyPCZzyabbL2xLwcnIvCIJhqsK2+hQC9F
 9zyOktNpVazGz6AuYKkB78gXW8aVuCb2QHzxMis9osphwQFq5TYuu6ECZkmcE7tTI
 DYcisXZ8/Y12mfbnHorJe7GhOOcPsJCgFV345+9JcboqmL3TtEka+Oz0nbosMO36d
 CmT3Fj5gU7+8hX5UsA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.42]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MQMuX-1rxRd806wj-00UkrK; Mon, 17
 Jun 2024 16:47:11 +0200
Content-Type: multipart/mixed; boundary="------------0zQl5pzA8P2OcERiXsfniyJ3"
Message-ID: <87b7ee75-7c63-42ac-8551-c0d20a46ea43@HIDDEN>
Date: Mon, 17 Jun 2024 16:47:07 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN> <m2frtdrwj1.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <m2frtdrwj1.fsf@HIDDEN>
X-Provags-ID: V03:K1:iLeTvu495NgQJvOCuiiGgIq45GiVM5Pez+GLzkmmWWJngC7Kj+w
 Am6JBBTfkMBum8VQjEh4MD+55lgAc0V3rLbz6Di1z8ZcTh47r6mh09W51Wm1KlBr0dl0WqZ
 jS2ErOxXyVmk5DI8SGXMmM98GG+4aFz9CP2y0ABN1U1UUrmyL/ar4b/O9ftnN+sNfldK5zh
 gnzqJqK9SAApQARp+yJYA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:AH6EXGb1YwY=;rLBW52VG+iMqBFR41biGO0BQo56
 iN94/EE3GxiZCGmBmDO+4dD7WkM4IHGi9lTpQnU51mk7RFBPTW6mjjcXSeqHcWqjZ0jL0NHRy
 6MOSBMWj7RN10FPQFgJuvp74rpwqHrYhUpnZxb+KxwFtAfH+ml1qhrJU7nFChbptN8X5cQabV
 l2C+8dqYYpUqZed2qqnNmd4jSrEIks3CdAF9Ino0SlwdKfGraERD3Ll0n2Bo+7O2Jooa0y+6m
 MgX2MXut26trvF10YZPc+GkCygReyEOYDw0JPPxGTebRUUbhe6JBWVKiVsHDqwtYkxRzirxWn
 n1LfuuEkBBIeA7Q/I0SffSGa44AEa5JcxTnoPNikFoAsmk1rQUi1WaOvHiJYNs16vpcSM3cz+
 dDgCzCw3imYPSzvoBw4jCUABMoauNoy3WN99yTaSoqi3PD+ZcfbvXTrLCAkMPGas6hZ9ZwDPs
 IUfEbuuO+apd1VckgZW9yG4ufdEgmlKIEAXNrfmCqpd6pG66WYYEoXEf0Xt/nIjsPc0v7Fhri
 qzk3m2TOfN7Bq8BuBAOpw+utle9uvWITOrr57QrSS2FBmT7V9QoMNAo+kEJ9RcuLHZuJiV+ex
 NyvzfhL+uGg7W+Y3WBMGBIQOJC9saBz9RH/+UHeG1GvlskOhoMi2J2kBq3LUuRSGi40envbW5
 0XaoaqvAeArBTF2ruToz0QD0HKRyCGqdTqF8rgpLyfgagrty/UxpDEgeBAsVXsWNe3cDSm16W
 T4R6InNIqf2HXL6GWeX2M6xSMIMy9XuvbYzt2toK8GWrZ+KfU7LTkoMgabfUnn6Rdkzlq2kSH
 esFWRl48vzMOq1HlPmm4LZK6KVYS/89r3uNtQxvB8n6gM=
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > Also if the proposed change to `window-deletable-p` is
 adopted, then a > grep on `window-deletable-p` also reveals that,
 for consistency, 
 > `delete-windows-on` and even `calendar-exit` in `calendar [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.17.20 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
 [212.227.17.20 listed in wl.mailspike.net]
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [212.95.5.42 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > Also if the proposed change to `window-deletable-p` is
   adopted, then a > grep on `window-deletable-p` also reveals that, for consistency,
    > `delete-windows-on` and even `calendar-exit` in `calendar [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [212.95.5.42 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.17.20 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
                             [212.227.17.20 listed in wl.mailspike.net]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

This is a multi-part message in MIME format.
--------------0zQl5pzA8P2OcERiXsfniyJ3
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

 > Also if the proposed change to `window-deletable-p` is adopted, then a
 > grep on `window-deletable-p` also reveals that, for consistency,
 > `delete-windows-on` and even `calendar-exit` in `calendar.el` should
 > be modified similarly to `window--delete`.

This means that we should do the entire fix within 'window-deletable-p',
right?  That's not an internal function, so we can, in all conscience,
supply an abnormal hook as in the roughly tested patch attached.

martin
--------------0zQl5pzA8P2OcERiXsfniyJ3
Content-Type: text/x-patch; charset=UTF-8;
 name="window-deletable-functions.diff"
Content-Disposition: attachment; filename="window-deletable-functions.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2xpc3Avd2luZG93LmVsIGIvbGlzcC93aW5kb3cuZWwKaW5kZXggNjA0
Yjk4Njg5MjEuLjA0ZTM4ZmFhMDc0IDEwMDY0NAotLS0gYS9saXNwL3dpbmRvdy5lbAorKysg
Yi9saXNwL3dpbmRvdy5lbApAQCAtNDEwNCw2ICs0MTA0LDI3IEBAIG9uZS13aW5kb3ctcAog
CShuZXh0LXdpbmRvdyBiYXNlLXdpbmRvdyAoaWYgbm9taW5pICdhcmcpIGFsbC1mcmFtZXMp
KSkpCiAMCiA7OzsgRGVsZXRpbmcgd2luZG93cy4KKyhkZWZjdXN0b20gd2luZG93LWRlbGV0
YWJsZS1mdW5jdGlvbnMgbmlsCisgICAiQWJub3JtYWwgaG9vayB0byBkZWNpZGUgd2hldGhl
ciBhIHdpbmRvdyBtYXkgYmUgc2FmZWx5IGRlbGV0ZWQuCitUaGUgdmFsdWUgc2hvdWxkIGJl
IGEgbGlzdCBvZiBmdW5jdGlvbnMgdGhhdCB0YWtlIHR3byBhcmd1bWVudHMuICBUaGUKK2Zp
cnN0IGFyZ3VtZW50IGlzIHRoZSB3aW5kb3cgYWJvdXQgdG8gYmUgZGVsZXRlZC4gIFRoZSBz
ZWNvbmQgYXJndW1lbnQKK2lmIG5vbi1uaWwsIG1lYW5zIHRoYXQgdGhlIHdpbmRvdyBpcyB0
aGUgb25seSB3aW5kb3cgb24gaXRzIGZyYW1lIGFuZAorc2hvdWxkIGJlIGRlbGV0ZWQgdG9n
ZXRoZXIgd2l0aCBpdHMgZnJhbWUuICBUaGUgd2luZG93J3MgYnVmZmVyIGlzCitjdXJyZW50
IHdoZW4gcnVubmluZyB0aGlzIGhvb2suCisKK0lmIGFueSBvZiB0aGVzZSBmdW5jdGlvbnMg
cmV0dXJucyBuaWwsIHRoZSB3aW5kb3cgd2lsbCBub3QgYmUgZGVsZXRlZAorYW5kIGFub3Ro
ZXIgYnVmZmVyIHdpbGwgYmUgc2hvd24gaW4gaXQuICBUaGlzIGhvb2sgaXMgcnVuIGJ5Citg
d2luZG93LWRlbGV0YWJsZS1wJyB3aGljaCwgaW4gaXMgdHVybiwgaXMgY2FsbGVkIGJ5IGBk
ZWxldGUtd2luZG93cy1vbicKK2FuZCBgcXVpdC1yZXN0b3JlLXdpbmRvdycuICBJdCBpcyBu
ZWl0aGVyIHJ1biBieSBgZGVsZXRlLXdpbmRvdycgbm9yCitgZGVsZXRlLWZyYW1lJy4KKwor
VGhlIHB1cnBvc2Ugb2YgdGhpcyBob29rIGlzIHRvIGdpdmUgaXRzIGNsaWVudHMgYSBjaGFu
Y2UgdG8gc2F2ZSBhCit3aW5kb3cgb3IgaXRzIGZyYW1lIGZyb20gZGVsZXRpb24gYmVjYXVz
ZSB0aGV5IG1pZ2h0IHN0aWxsIHdhbnQgdG8gdXNlCit0aGF0IHdpbmRvdyBvciBmcmFtZSBm
b3IgdGhlaXIgb3duIHB1cnBvc2VzLiIKKyAgOnR5cGUgJ2hvb2sKKyAgOnZlcnNpb24gIjMw
LjEiCisgIDpncm91cCAnd2luZG93cykKKwogKGRlZnVuIHdpbmRvdy1kZWxldGFibGUtcCAo
Jm9wdGlvbmFsIHdpbmRvdykKICAgIlJldHVybiB0IGlmIFdJTkRPVyBjYW4gYmUgc2FmZWx5
IGRlbGV0ZWQgZnJvbSBpdHMgZnJhbWUuCiBXSU5ET1cgbXVzdCBiZSBhIHZhbGlkIHdpbmRv
dyBhbmQgZGVmYXVsdHMgdG8gdGhlIHNlbGVjdGVkIG9uZS4KQEAgLTQxMzcsMTQgKzQxNTgs
MjAgQEAgd2luZG93LWRlbGV0YWJsZS1wCiAJCSAgICAoYW5kIG1pbmlidWYgKGVxIGZyYW1l
ICh3aW5kb3ctZnJhbWUgbWluaWJ1ZikpCiAgICAgICAgICAgICAgICAgICAgICAgICAgKG5v
dCAoZXEgKGRlZmF1bHQtdG9wbGV2ZWwtdmFsdWUKICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICdtaW5pYnVmZmVyLWZvbGxvd3Mtc2VsZWN0ZWQtZnJhbWUpCi0gICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCkpKSkpCisgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgdCkpKSkKKwkJICAobm90ICh3aXRoLWN1cnJlbnQtYnVmZmVy
ICh3aW5kb3ctYnVmZmVyIHdpbmRvdykKKwkJCSAocnVuLWhvb2std2l0aC1hcmdzLXVudGls
LWZhaWx1cmUKKwkJCSAgJ3dpbmRvdy1kZWxldGFibGUtZnVuY3Rpb25zIHdpbmRvdyB0KSkp
KQogCSdmcmFtZSkpCiAgICAgICgod2luZG93LW1pbmlidWZmZXItcCB3aW5kb3cpCiAgICAg
ICA7OyBJZiBXSU5ET1cgaXMgdGhlIG1pbmlidWZmZXIgd2luZG93IG9mIGEgbm9uLW1pbmli
dWZmZXItb25seQogICAgICAgOzsgZnJhbWUsIGl0IGNhbm5vdCBiZSBkZWxldGVkIHNlcGFy
YXRlbHkuCiAgICAgICBuaWwpCi0gICAgICgob3IgaWdub3JlLXdpbmRvdy1wYXJhbWV0ZXJz
Ci0JICAobm90IChlcSB3aW5kb3cgKHdpbmRvdy1tYWluLXdpbmRvdyBmcmFtZSkpKSkKKyAg
ICAgKChhbmQgKG9yIGlnbm9yZS13aW5kb3ctcGFyYW1ldGVycworCSAgICAgICAobm90IChl
cSB3aW5kb3cgKHdpbmRvdy1tYWluLXdpbmRvdyBmcmFtZSkpKSkKKwkgICAod2l0aC1jdXJy
ZW50LWJ1ZmZlciAod2luZG93LWJ1ZmZlciB3aW5kb3cpCisJICAgICAocnVuLWhvb2std2l0
aC1hcmdzLXVudGlsLWZhaWx1cmUKKwkgICAgICAnd2luZG93LWRlbGV0YWJsZS1mdW5jdGlv
bnMgd2luZG93IG5pbCkpKQogICAgICAgOzsgT3RoZXJ3aXNlLCBXSU5ET1cgY2FuIGJlIGRl
bGV0ZWQgdW5sZXNzIGl0IGlzIHRoZSBtYWluIHdpbmRvdwogICAgICAgOzsgb2YgaXRzIGZy
YW1lLgogICAgICAgdCkpKSkK

--------------0zQl5pzA8P2OcERiXsfniyJ3--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 17 Jun 2024 06:17:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 17 02:17:51 2024
Received: from localhost ([127.0.0.1]:59317 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sJ5gc-0007fs-KC
	for submit <at> debbugs.gnu.org; Mon, 17 Jun 2024 02:17:50 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:57321)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sJ5gb-0007fT-1R
 for 71386 <at> debbugs.gnu.org; Mon, 17 Jun 2024 02:17:49 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 5F31BE0007;
 Mon, 17 Jun 2024 06:17:37 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <86a5jksv4k.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 16 Jun 2024 19:45:55 +0300")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN>
 <86a5jksv4k.fsf@HIDDEN>
Date: Mon, 17 Jun 2024 09:16:44 +0300
Message-ID: <861q4w14c3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> +     ((and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1))
>> +      'tab)
>>
>> How would users get back the old behavior?  By customizing
>> 'tab-bar-close-last-tab-choice', 'tab-bar-tab-prevent-close-functions'?
>
> This patch just copies the logic of frame handling to tab handling.
> There is no customization for frame handling, so there is
> no customization for tab handling.
>
> In window-deletable-p there is hard-coded 'frame-root-window-p'
> that checks if the frame has only 1 window.  So the patch
> does the same by checking if there is only 1 tab on the frame.
>
> Also in window--delete the call of 'tab-bar-close-tab'
> corresponds to the call 'delete-frame'.

Please see a more correct patch:

diff --git a/lisp/window.el b/lisp/window.el
index cf5c07395ab..588014b8f77 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4138,7 +4138,9 @@ window-deletable-p
                          (not (eq (default-toplevel-value
                                     'minibuffer-follows-selected-frame)
                                   t)))))
-	'frame))
+	(if (and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1))
+            'tab
+          'frame)))
      ((window-minibuffer-p window)
       ;; If WINDOW is the minibuffer window of a non-minibuffer-only
       ;; frame, it cannot be deleted separately.
@@ -4979,6 +4981,9 @@ window--delete
   (unless (and dedicated-only (not (window-dedicated-p window)))
     (let ((deletable (window-deletable-p window)))
       (cond
+       ((eq deletable 'tab)
+        (tab-bar-close-tab)
+        'tab)
        ((eq deletable 'frame)
 	(let ((frame (window-frame window)))
 	  (cond




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 16 Jun 2024 16:53:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 16 12:53:47 2024
Received: from localhost ([127.0.0.1]:43615 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sIt8U-0002T3-PH
	for submit <at> debbugs.gnu.org; Sun, 16 Jun 2024 12:53:47 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:58957)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sIt8S-0002Sf-W6
 for 71386 <at> debbugs.gnu.org; Sun, 16 Jun 2024 12:53:45 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 6A8F440003;
 Sun, 16 Jun 2024 16:53:34 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN> (martin rudalics's
 message of "Sun, 16 Jun 2024 09:52:26 +0200")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN>
Date: Sun, 16 Jun 2024 19:45:55 +0300
Message-ID: <86a5jksv4k.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> +     ((and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1))
> +      'tab)
>
> How would users get back the old behavior?  By customizing
> 'tab-bar-close-last-tab-choice', 'tab-bar-tab-prevent-close-functions'?

This patch just copies the logic of frame handling to tab handling.
There is no customization for frame handling, so there is
no customization for tab handling.

In window-deletable-p there is hard-coded 'frame-root-window-p'
that checks if the frame has only 1 window.  So the patch
does the same by checking if there is only 1 tab on the frame.

Also in window--delete the call of 'tab-bar-close-tab'
corresponds to the call 'delete-frame'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 16 Jun 2024 10:52:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 16 06:52:13 2024
Received: from localhost ([127.0.0.1]:45926 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sInUa-0005Js-Kl
	for submit <at> debbugs.gnu.org; Sun, 16 Jun 2024 06:52:13 -0400
Received: from mail-wr1-f44.google.com ([209.85.221.44]:57819)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdo.haji.ali@HIDDEN>) id 1sInUY-0005JV-UR
 for 71386 <at> debbugs.gnu.org; Sun, 16 Jun 2024 06:52:11 -0400
Received: by mail-wr1-f44.google.com with SMTP id
 ffacd0b85a97d-35dc9cef36dso3241673f8f.3
 for <71386 <at> debbugs.gnu.org>; Sun, 16 Jun 2024 03:52:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1718535064; x=1719139864; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=RAXAG/5vLd9YwUf7Y80TMRKtX0nbwclKw5ohxgB/0T4=;
 b=MAcYluCHbZ7eXcHj/EIqTSbidSgE8FLwMHPsbsOvjQZbOclTe89Qcwc+T9wMpxQDm5
 79Fevhl8PsVXIeJVlUwhCkRG1Gk/andTVmpWjRwHLBxic8HWODYHf+L8UZpuUglvol0U
 BRmZTXRnsmKMo4YiP3h71SxrEzyA7nChGrrqGs2HXiBKA7JFq5KeQv4+aD+S/8zeBNhM
 l0Edqf2gsIlwrXkUr7eFYYlRKuu4htidyZoBkJr8IeY/zkLW1Us+0EsPx7Ph4uUhiXjO
 ftZtGFTfvWvhOiqn6+SskAl4OWw9j0iZ4bFTDoSpnVgKuTBQrs/wq84ib7MkXpLvnmY5
 23bg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1718535064; x=1719139864;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=RAXAG/5vLd9YwUf7Y80TMRKtX0nbwclKw5ohxgB/0T4=;
 b=qzzXBaYPp5wN5b6TcumAtvmxU0Pd1ltbxK41c11ITM0ZOShmVczYHGoigseZoWYHKi
 xtgWHnxX8EF5my1FlXj7ib/rNUeCJ19amhGRq5RLPYy2Fxgn8Ru0d4qbzK2cg14IBSWg
 liOBkem6Tx7ZBcmrS3oLh5dqPir3/TJ67R6dSN3dvwjnMMQftXMAUr4dHdrE1Df1EYEp
 gpZweEyZS8xjDImiMFZwYBpdf8mzrRGKB4Gkg2waPhMqzEm0hCu8cPbMpygH+eypCqzi
 eKqCFlwUm1H9FO6+5Y0osRRR3Pe3oLh+SClQ1TkJqzFt2qimlz8GwTLdqMxHKCsYWAva
 qACQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCXvBC+N7W+bZfnu8Wc3f/HGJo7jfAkEb8iodJtthiEqC4qINn8urCoLGb5Yc6nwkL1qPHKSMIglg/dZeHQ2S8DD4ngN9OI=
X-Gm-Message-State: AOJu0YxcNGibFP48J/ATl7ZuXcNBDYuy2+kqx3LPWmrP2blR1y2weIPa
 jjUPXXcH8ooVxIQSrtgU2mRUml1z8tqqijuppM6GJad/oCEJMLsY
X-Google-Smtp-Source: AGHT+IGg87WZaQWCRlRWSMT5eS/rDBS4j2rRXA75cSkM2hl+uEIU9lwBKWziOU57QhYg6m3sHdoMlQ==
X-Received: by 2002:a05:6000:249:b0:35f:20eb:4831 with SMTP id
 ffacd0b85a97d-3607a75c664mr4384301f8f.38.1718535063447; 
 Sun, 16 Jun 2024 03:51:03 -0700 (PDT)
Received: from localhost
 (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-3607509c883sm9280788f8f.29.2024.06.16.03.51.02
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 16 Jun 2024 03:51:02 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
 <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN>
Date: Sun, 16 Jun 2024 11:50:58 +0100
Message-ID: <m2frtdrwj1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


On 15/06/2024, martin rudalics wrote:
> I'd still prefer a tab-bar specific option (like 'tab-bar-save-frame-p'
> as mentioned earlier) for two reasons.
>
This is probably the right approach to minimize unattended consequences and it would definitely address the issue (which is, to reiterate, is that fundamentally, tabs behave like windows in many situations, but not when deleting buffers with dedicated windows -- having two windows prevents deleting a frame, but not having two tabs).

I imagine Juri wanted to avoid having tab-specific code in `window.el` with the previous patch, hence the more generic hooks. The current patch of Juri should probably be protected with `featurep` or `fboundp` for tab-specific symbols.

Also if the proposed change to `window-deletable-p` is adopted, then a grep on `window-deletable-p` also reveals that, for consistency, `delete-windows-on` and even `calendar-exit` in `calendar.el` should be modified similarly to `window--delete`.

Best regards,
-- Al




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 16 Jun 2024 08:10:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 16 04:10:21 2024
Received: from localhost ([127.0.0.1]:35526 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sIkxw-0006mr-JM
	for submit <at> debbugs.gnu.org; Sun, 16 Jun 2024 04:10:21 -0400
Received: from mout.gmx.net ([212.227.15.18]:57833)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sIkgl-0005yE-J6
 for 71386 <at> debbugs.gnu.org; Sun, 16 Jun 2024 03:52:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718524347; x=1719129147; i=rudalics@HIDDEN;
 bh=5jJq9AIqbqervT1xEK4Vaex4a7/z1hW8SfjB62GhUJQ=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=cMZNpRg1JSGZ5qpZ7VdP2MaJ5NNrOWLEEMGk8y7XNpg2/FSYhVIQ6F4RmujEmIyZ
 tXe3T7mWMYMHsFRXiG2TQNglGXUFVLHAPiihL1UjGzrfqB6C3dWvfPxQjHQ+VQwT0
 CJri1qKQ4qdUjl26xOCvwom4aiVfzenGShDNiM7nM8sW8hlVK/OeflX7Jh8Di53Ir
 47QOYjeeVfR6umWLnIbiqgxUFtDtA3cERsk4tVsT5+kcXrd74YHDjvtFwtNNMbsBb
 F3i1Qfr8rtKLFymRP2mDOP8HBspxfX9SYfP9TsM0vroCKRcSo7GvZoFNWfgCxQpwT
 HcKcITi2n4OykB+ulg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.97.154]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N2V0H-1sNwG42C7T-00wnFj; Sun, 16
 Jun 2024 09:52:27 +0200
Message-ID: <eae268e4-16c4-4170-aede-5bd53a00d0e3@HIDDEN>
Date: Sun, 16 Jun 2024 09:52:26 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
 <86frtdtlns.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86frtdtlns.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:NyHR27kGLx71N6V44CLvjMVnr9dTg3z5Qpg0kovhPEjdunLdrea
 feAlYOx4Jj2Bs8C+mk5LfP1c13kwyzuitzPPxLBjHt+MhpG0+EpqzTl6XXzsBZacAJmZwso
 DM1v2VtkhYNO/QujCPbseZMHkZaD2zYEf6kR8wO3OLmaJF5sFPLnC6MskhkelQ9pcB624hz
 3cIuSTqkUSOrvLjbaF5Jg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:jhFq7nhIi6c=;nXUMF02GGOcRpos5sxhhtZjpE8/
 nGPAtJ7kDpjngdgkVVdJeb26iOPNakfqN+uWu1TgZseMcMhLG5jQzwwm61UlfMxwWf+ZziS34
 HgH9H3e0saeQfv3bIZiMpmz5krRkyH+78SqyKyokm/VxE5RdVoifGct/e6AB17iAbMI57uq5k
 ZjXaK24vshKjkoieYbSO+MqXZMZPXAk8QkfaMo31w/bb0ktDeN8ZY1DPvFMmPJd6i9HeUT8UQ
 WPktLSaRJQuA6o8dshsmOnDxm0DyAmfADA3hmoo7OUl0/gCCbdp/3crui7f3broKaqOeKLRCR
 YtJUqOBBxFHrSUHsAThQJuc3hfuJj8XuFYR4CdkkeRZcbO1gFK6+wZC5xB5TUp8DEX1CS1k4P
 Swz/M/VVG0NQrA0SM0mby6sBv8/tMhWIj43YNrUnvZbte/SB1uOoeOkRN3XbPXvHswH/NaZca
 dhz4E5sScnWksUtsPx2cMqCBWPfAqIq8ohUuOEC+QecsuQWuNTVFrZS5Iwp7JJzoOrEy5YN7B
 pGMg26WnRt3LKks0rfH9DFtXcg/DFO4Z/Spt7ODAbIImWl532gs/GETsdP0OGa3fSPpNEHwFB
 TYHZi2SucgS/PgvACvCpRe8Kr6M08uMw3lh/IGuAIh1ShgS5T5h37TFH1Fqi9cR6XkTRzCmdS
 58FWcSWWXG3ppr/DLfleZ0JbRIo3ZqAyAlEECOq0UILQdJ2rcTXN8c6IrW7OixV/YmDT0866H
 YUXM7lzoYoet2qUmGrbAU2sEnpPA7cusI05ULxL42/fLW9prk9m0F+GF9iKNXhMzXuSedwh+P
 uYqoE7XVU0azdb5HMIHyytx7hET6OF7woY8KQLseOb6Ao=
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: + ((and tab-bar-mode (> (length (funcall
 tab-bar-tabs-function
 frame)) 1)) + 'tab) How would users get back the old behavior? By customizing
 'tab-bar-close-last-tab-choice', 'tab-bar-tab-prevent-close-functions'? 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [212.227.15.18 listed in wl.mailspike.net]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.15.18 listed in list.dnswl.org]
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [213.142.97.154 listed in zen.spamhaus.org]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  + ((and tab-bar-mode (> (length (funcall tab-bar-tabs-function
    frame)) 1)) + 'tab) How would users get back the old behavior? By customizing
    'tab-bar-close-last-tab-choice', 'tab-bar-tab-prevent-close-functions'? 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [213.142.97.154 listed in zen.spamhaus.org]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.15.18 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [212.227.15.18 listed in wl.mailspike.net]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

+     ((and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1))
+      'tab)

How would users get back the old behavior?  By customizing
'tab-bar-close-last-tab-choice', 'tab-bar-tab-prevent-close-functions'?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 16 Jun 2024 07:04:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 16 03:04:51 2024
Received: from localhost ([127.0.0.1]:59445 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sIjwZ-0003n8-0J
	for submit <at> debbugs.gnu.org; Sun, 16 Jun 2024 03:04:51 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:35275)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sIjwX-0003mm-1n
 for 71386 <at> debbugs.gnu.org; Sun, 16 Jun 2024 03:04:49 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id CABE340002;
 Sun, 16 Jun 2024 07:04:20 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN> (martin rudalics's
 message of "Sat, 15 Jun 2024 10:42:05 +0200")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
 <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
Date: Sun, 16 Jun 2024 09:58:10 +0300
Message-ID: <86frtdtlns.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> +(defvar window-delete-frame-functions nil
> +  "A list of functions to handle the frame deletion.
>
> I'd still prefer a tab-bar specific option (like 'tab-bar-save-frame-p'
> as mentioned earlier) for two reasons.
>
> The first reason is that 'window--delete' is an internal function of
> window.el.  I wouldn't want an internal function run a hook "of its own"
> because that's difficult to explain to users.  OTOH I suppose that a
> function like 'tab-bar-save-frame-p' should be callable from any other
> function too, as soon as the need arises.
>
> The second reason is that I wouldn't want "anyone" to inhibit frame
> deletion.  Such a facility could have consequences I cannot fathom at
> the moment.  Would we want 'delete-frame' to obey it too and possibly
> spare the frame?

Ok, here is the right patch:

diff --git a/lisp/window.el b/lisp/window.el
index b7bd59bc813..872110a8321 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4120,6 +4120,8 @@ window-deletable-p
 
   (let ((frame (window-frame window)))
     (cond
+     ((and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1))
+      'tab)
      ((frame-root-window-p window)
       ;; WINDOW's frame can be deleted only if there are other frames
       ;; on the same terminal, and it does not contain the active
@@ -4979,6 +4981,9 @@ window--delete
   (unless (and dedicated-only (not (window-dedicated-p window)))
     (let ((deletable (window-deletable-p window)))
       (cond
+       ((eq deletable 'tab)
+        (tab-bar-close-tab)
+        'tab)
        ((eq deletable 'frame)
 	(let ((frame (window-frame window)))
 	  (cond




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 15 Jun 2024 08:42:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 15 04:42:16 2024
Received: from localhost ([127.0.0.1]:54701 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sIOzH-0005Iw-TE
	for submit <at> debbugs.gnu.org; Sat, 15 Jun 2024 04:42:16 -0400
Received: from mout.gmx.net ([212.227.17.20]:47539)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sIOzF-0005IT-Vk
 for 71386 <at> debbugs.gnu.org; Sat, 15 Jun 2024 04:42:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718440926; x=1719045726; i=rudalics@HIDDEN;
 bh=d3hP/J70rHVA2Wk3P9Vrgeo2UUr2AjLrHtYyieG7sHk=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=UosBEbLgwCMq5frmh+mwd8INWBzUEJhhJ6JXNEDdiiRpm+9OrG8u5ITKhCCbHmMg
 Swp56OYpUbs7ig++4ODZaUnIXDj5+kw2fuH0kCzTe7KVMd9MT0IVbyl9nuwBOck6v
 VPM2YRhtpN1stL5Darq/wedvA7YYxm5OJS9wa2Jb6ZENuysS0ax/BDKjObWaCaJ0l
 YLikHWZUluwvBUGwhIcn6LXdlgIYX0hUdykmcRQZU2G631QXW8QI+EYgEgvVychg+
 H+yGs9MSErOm6SHzIA4khpnSwC+rYBcnytHVwDggLBpjbR6tU49gcyjv+wzXvlvA7
 9bJUhEtWLmFIT4encg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.155]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MkYbu-1sgEU42HMc-00ddle; Sat, 15
 Jun 2024 10:42:06 +0200
Message-ID: <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@HIDDEN>
Date: Sat, 15 Jun 2024 10:42:05 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
 <8634pfe735.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <8634pfe735.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:I4Brdv1J+y4TbAbZz2QL9IYNRN28SFMJp/MOxFCsm01lLRXXs4A
 ACvOe3FcrBNqCztxaW4UqTPlmNoBau8E3y0aN1jsljTwYuJ7Na/ny4c94Ynujx9DtIZ9TQ4
 mhrBXC/dwPfbImS5usRhUD2QXOhoZi5fVJgXlq6BFUuuIRU8lOGD3N8Gb6L1UFcqSXRdbMk
 KGid07DXSBfHUrLu8a6/w==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:PlqkJroizbE=;ffQPEMDLwEcGvxrzJRN45qgTSf7
 IGFeQgfgyayDnV+cXpEGNrX22k1+NfChV87YPNa1y4fPr6Nak2cD7b0cYFTYaw9k2TkSnX4Au
 cTkahqGJiaJq8KerZ+iL0F7ZwiXszjIqxL/6kvrfj1Gk6zrEr5WWre9vvnCue1n9m0F2uHwjq
 KZykt8gj1l37OCW0a4NUXyW9ACTRRUwn/d5EEBCqx0nfogLNozhgKBfKjU+E1QZJvxFzUf18F
 rhuYAeAN9k/sf3TfwQtd32If5x7OL6QOYE92HP9LAx9u0pXUDBgEczuZKH6Z5IwP6ls/9w8kb
 Up32yTTBWtr8YVDdVUdHdn566cyW80/HX3giScVVHD4Gd7g5UHd+9v0uNO1XU970E4yBXYQFF
 J+b5KipIskPLLXp/3eIwR4LBUgFmxd/+TPAVp90a9mra82A9vLoqWMPzx3KFU5gqnpOrOvk6Q
 o5sEwNfLMhre/0A2IggO4AcxH+MxQGtuGEwkFmFADUUejAq/5gn1WNoIqyvAmdBjsl7YMAXvj
 neJiGsZHlphyN1JofoLQkOfbKFjb2VmjvJJ1qv4yTCcEbs5Boe3p96FglmhjXTylb2/8x7hKG
 Pd/LmYjRbwpOS4k19FsqjPIbZC3TqDVaCTzcRbYCq7fppN5KSp7kPGS9scw5vUiGEB3VsI9Zy
 6YJ4as+OhNy+RqyEl+cvWjvRmfYNoMmMm58BALXAbhTAlzb82xON8/rXR94PuLoQcZygt9heu
 rbn4NpgFxDA48uPi1nuS1SPH4YP86yd2ACoK1NGGcVy9+ZkrbpnBwr9qOJ382Qrjgol6KlAKS
 fOkWCrmJzrnwE+Et5nD3526y3aj990KgUEiVvDhtzZubo=
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: +(defvar window-delete-frame-functions nil + "A list of
 functions
 to handle the frame deletion. I'd still prefer a tab-bar specific option
 (like 'tab-bar-save-frame-p' as mentioned earlier) for two reasons. 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [212.95.5.155 listed in zen.spamhaus.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.17.20 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
 [212.227.17.20 listed in wl.mailspike.net]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  +(defvar window-delete-frame-functions nil + "A list of functions
    to handle the frame deletion. I'd still prefer a tab-bar specific option
   (like 'tab-bar-save-frame-p' as mentioned earlier) for two reasons. 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [212.95.5.155 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.17.20 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
                             [212.227.17.20 listed in wl.mailspike.net]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

+(defvar window-delete-frame-functions nil
+  "A list of functions to handle the frame deletion.

I'd still prefer a tab-bar specific option (like 'tab-bar-save-frame-p'
as mentioned earlier) for two reasons.

The first reason is that 'window--delete' is an internal function of
window.el.  I wouldn't want an internal function run a hook "of its own"
because that's difficult to explain to users.  OTOH I suppose that a
function like 'tab-bar-save-frame-p' should be callable from any other
function too, as soon as the need arises.

The second reason is that I wouldn't want "anyone" to inhibit frame
deletion.  Such a facility could have consequences I cannot fathom at
the moment.  Would we want 'delete-frame' to obey it too and possibly
spare the frame?

Let's see what Haji-Ali thinks.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 14 Jun 2024 18:04:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 14 14:04:54 2024
Received: from localhost ([127.0.0.1]:40893 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sIBIE-0004cg-0i
	for submit <at> debbugs.gnu.org; Fri, 14 Jun 2024 14:04:54 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:52389)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sIBI6-0004c5-Ce
 for 71386 <at> debbugs.gnu.org; Fri, 14 Jun 2024 14:04:49 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 18CE4E0003;
 Fri, 14 Jun 2024 18:04:18 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN> (martin rudalics's
 message of "Thu, 13 Jun 2024 10:21:43 +0200")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
Date: Fri, 14 Jun 2024 20:46:06 +0300
Message-ID: <8634pfe735.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

>>> But KILL means to delete the frame and the tab-bar code wants to prevent
>>> that.  Or what am I missing?
>>
>> For frames KILL defines whether to delete or iconify the frame.
>> There is no such thing as to "iconify" the tab.
>
> Don't you want to distinguish 'kill' non-nil where the frame should get
> deleted from 'kill' nil where nothing is done?  In the latter case the
> window cannot even be deleted because when the return value of
> 'window-deletable-p' equals 'frame' this implies that WINDOW is the root
> window of its frame.

This is the best that I can do, you can improve it if you want:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=window-delete-frame-functions.patch

diff --git a/lisp/window.el b/lisp/window.el
index 604b9868921..155b0b55482 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4948,6 +4968,13 @@ frame-auto-hide-function
   :group 'frames
   :version "26.1")
 
+(defvar window-delete-frame-functions nil
+  "A list of functions to handle the frame deletion.
+Each of functions is called with two arguments: FRAME and KILL where
+KILL means the buffer shown in window will be killed.  When one of functions
+returns a non-nil value then `window--delete' will not delete the frame.
+The function can also perform own action instead of deleting the frame.")
+
 (defun window--delete (&optional window dedicated-only kill)
   "Delete WINDOW if possible.
 WINDOW must be a live window and defaults to the selected one.
@@ -4962,6 +4989,10 @@ window--delete
        ((eq deletable 'frame)
 	(let ((frame (window-frame window)))
 	  (cond
+	   ((run-hook-with-args-until-success
+	     'window-delete-frame-functions
+	     frame kill)
+	    nil)
 	   (kill
 	    (delete-frame frame))
            ((functionp (frame-parameter frame 'auto-hide-function))
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 6ab6324540e..2f7578b842b 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -2659,6 +2659,17 @@ tab-switcher-mouse-select
   (goto-char (posn-point (event-end event)))
   (tab-switcher-select))
 
+
+(defun tab-bar-window-delete-frame (frame _kill)
+  "Handle frame deletion in `tab-bar-mode'.
+When there are more than one tab on the selected frame, then close
+the current tab.  In this case return t to not delete the frame
+in `window--delete'."
+  (and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1)
+       (progn (tab-bar-close-tab) t)))
+
+(add-hook 'window-delete-frame-functions #'tab-bar-window-delete-frame)
+
 
 (defun tab-bar--reusable-frames (all-frames)
   (cond

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 14 Jun 2024 06:16:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 14 02:16:53 2024
Received: from localhost ([127.0.0.1]:39604 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sI0F3-00086p-6T
	for submit <at> debbugs.gnu.org; Fri, 14 Jun 2024 02:16:53 -0400
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:52521)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sI0F0-00086a-F5
 for 71386 <at> debbugs.gnu.org; Fri, 14 Jun 2024 02:16:52 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 347DD1BF204;
 Fri, 14 Jun 2024 06:16:22 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN> (martin rudalics's
 message of "Thu, 13 Jun 2024 10:21:43 +0200")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
 <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
Date: Fri, 14 Jun 2024 09:13:16 +0300
Message-ID: <86a5jof3uv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> But KILL means to delete the frame and the tab-bar code wants to prevent
>>> that.  Or what am I missing?
>>
>> For frames KILL defines whether to delete or iconify the frame.
>> There is no such thing as to "iconify" the tab.
>
> Don't you want to distinguish 'kill' non-nil where the frame should get
> deleted from 'kill' nil where nothing is done?  In the latter case the
> window cannot even be deleted because when the return value of
> 'window-deletable-p' equals 'frame' this implies that WINDOW is the root
> window of its frame.

I still don't understand how frame deletion should be handled for tabs
for this bug report and for bug#59862.  Probably need to study more.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 13 Jun 2024 08:21:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 13 04:21:54 2024
Received: from localhost ([127.0.0.1]:33741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sHfiT-0006Nl-Le
	for submit <at> debbugs.gnu.org; Thu, 13 Jun 2024 04:21:53 -0400
Received: from mout.gmx.net ([212.227.17.22]:34357)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sHfiR-0006NM-DJ
 for 71386 <at> debbugs.gnu.org; Thu, 13 Jun 2024 04:21:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718266905; x=1718871705; i=rudalics@HIDDEN;
 bh=Qb6Rv+D17oCdXfxn9aNK5U59UQoa2C1FvbW+Ak666Kg=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=XY70qmFwVc3qQ/bY9fEHKCTnRlbT14F6EdHgwAmWwYovaOQZOd//rMwgrwyRM/UP
 /xuP6xYM1sVSVX/RomsZalfPqIJ0xHvKRhpXWJyGZnt/OhuChDcZ6ajCtDD2ZgETZ
 Kh2LAamy+uojhjIsvyLwu3O5vbmCCYfjCy87NpdXzlC4NMfI8OC08fT8NyEuRmk5C
 WKP1hC5w/gpq0u+I06LsTF93iwCYsNXtS7cgh/6VnvosmRIhdk0rGc6AfgpIeOXsu
 jmo6qJTC3BKrhqXfukhuajLDDRxlMSyiCPmuq63eywWiBQC/MeG24nt0XSLDRNkbQ
 V4BSMoceG4s0squK5w==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.56]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MNt0C-1s2LmT00YS-00SHje; Thu, 13
 Jun 2024 10:21:45 +0200
Message-ID: <db60970d-f5c8-4ad7-b7d1-e39c61a81580@HIDDEN>
Date: Thu, 13 Jun 2024 10:21:43 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
 <86r0d1iaxc.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86r0d1iaxc.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:QvLNVoku7l3G3U27Bt252whY/abDs/DCh9toBaSWbKXG6vL+MXI
 CH2XNArc64uegUogO5W5pQpQ/yG8irz6gDjA3w69sPVgH0KgLzQ6m+dkGRcVGw6FmR+vwbR
 h4ly8lf6OVEI3Co9X3lDkgKYJOVppRsHXzSYiaqFUZwSUqK4MggHaVXGGn2hmw4FgQRIFei
 Fx/tQhz3G854BVo6sTPJg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:qsqv1Q6sT78=;PSLdtIGIqFiT0HWyN9eie68Nq25
 l1Dcf2CT4V25M4fP1d8t1r62pYtMCPu4LO7KMhniejl9wwfzEqyoFzT08tqeZWhbXJC/HMA/e
 H4Wyq6uCq+BmFNGYQoNyTiHMHAAuPYcj34f+n9GXUoKOATLSVKIFfCQknJe/VFGjo/UjGTBkj
 X/Iqetv95sUY9J3jwiycOx6JoS1NwoCKwB1tgjG75VYH65ZUtpp84NB7f2CHRrE953NHaTDvR
 T8Z8OdXhchPLpi2aT4IoqmozZ1p2xrH83gCCXPFQdJpKnOaNSN9I8COQxNBnqNs8JiIQkyKQR
 HVI2o7AFQcCa+wp4P8exU+GgqC8uoSVArHjmw2oDwuiEZRtb4DWL0vOeYDWb1VdON9eTDJL2K
 XqmUHvuq0dIbCZ/SGEIT5MJhKEqeS8uhdfNfAF1USqNylzs+VAPnfq1Tkb6zv4Q36js3LVlIa
 qaAo13N1GMiYHQq9fmHxr83D1wGoQXS2cR4Ax+idTzYfvgQBKu5B6E2tlLqBLIO5XyKC6oZUM
 4h1Wr0yNPfsGteSYGmGvaYL17y4afqT0sn+ng0KsmdDUvYy5eH4ql7hcHW54CIpLLwgR7d9XZ
 JmjRJrJW3tGL+jexm3UunV2dud8tGT66cl6Nt9ffC70QOfZzSsWIusrw52fiNmSJQhAugFlkV
 HFf7J1O+or93AZ+Dd5uR34KhHdknFOaVyBG4AyqSaLUwgMiQop4CbdCnkFWhbFBV4gw0eZRIB
 M8jykDIjZskGsj72uabPUt8V1mx/y2D8I0u+QWvH8Cfrsvf0JcmDXXKG/u9EobQW9RCVQfHi5
 2AGIoZ/PwBA1/7fP1fw0OmzBlNPegBFSaeUHkKO+vct34=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> But KILL means to delete the frame and the tab-bar code wants to prevent
 >> that.  Or what am I missing?
 >
 > For frames KILL defines whether to delete or iconify the frame.
 > There is no such thing as to "iconify" the tab.

Don't you want to distinguish 'kill' non-nil where the frame should get
deleted from 'kill' nil where nothing is done?  In the latter case the
window cannot even be deleted because when the return value of
'window-deletable-p' equals 'frame' this implies that WINDOW is the root
window of its frame.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 13 Jun 2024 07:13:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 13 03:13:46 2024
Received: from localhost ([127.0.0.1]:57877 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sHeeY-0003X7-7G
	for submit <at> debbugs.gnu.org; Thu, 13 Jun 2024 03:13:46 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:58919)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sHeeT-0003WI-4c
 for 71386 <at> debbugs.gnu.org; Thu, 13 Jun 2024 03:13:41 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 0358540007;
 Thu, 13 Jun 2024 07:13:13 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <m234pjqwdd.fsf@HIDDEN> (Al Haji-Ali's message of "Tue, 11 Jun
 2024 17:26:06 +0100")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN> <m234pjqwdd.fsf@HIDDEN>
Date: Thu, 13 Jun 2024 09:50:23 +0300
Message-ID: <86zfrpib04.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> So it makes no sense to send the value of the KILL arg to tab-bar code?
>> Because there is nothing to decide based on its value?
>
> Perhaps, for consistency, the argument should be send in case
> `window-delete-frame-functions` is used for other reasons by the
> user. Also, perhaps the tab should not be closed if `kill` is nil (similar
> to how the frame is not killed if `kill` is nil) and another buffer should
> be shown.

If I read `window--delete` code correctly, the frame goes away
in any case:

	   (kill
	    (delete-frame frame))
           ((functionp frame-auto-hide-function)
	    (funcall frame-auto-hide-function frame))

If `kill` is nil, the frame gets hidden: the default value of
`frame-auto-hide-function` is `iconify-frame` that is like
closing the tab too.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 13 Jun 2024 07:13:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 13 03:13:27 2024
Received: from localhost ([127.0.0.1]:57849 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sHeeF-0003Vq-I4
	for submit <at> debbugs.gnu.org; Thu, 13 Jun 2024 03:13:27 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:40371)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sHeeE-0003VV-BI
 for 71386 <at> debbugs.gnu.org; Thu, 13 Jun 2024 03:13:26 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id A9BEAE0006;
 Thu, 13 Jun 2024 07:13:17 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN> (martin rudalics's
 message of "Wed, 12 Jun 2024 10:57:47 +0200")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
 <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
Date: Thu, 13 Jun 2024 09:53:03 +0300
Message-ID: <86r0d1iaxc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> So it makes no sense to send the value of the KILL arg to tab-bar code?
>> Because there is nothing to decide based on its value?
>
> But KILL means to delete the frame and the tab-bar code wants to prevent
> that.  Or what am I missing?

For frames KILL defines whether to delete or iconify the frame.
There is no such thing as to "iconify" the tab.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 12 Jun 2024 08:57:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 12 04:57:55 2024
Received: from localhost ([127.0.0.1]:37525 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sHJnn-0006Pp-2p
	for submit <at> debbugs.gnu.org; Wed, 12 Jun 2024 04:57:55 -0400
Received: from mout.gmx.net ([212.227.17.21]:46719)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sHJnl-0006Pb-TW
 for 71386 <at> debbugs.gnu.org; Wed, 12 Jun 2024 04:57:54 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718182668; x=1718787468; i=rudalics@HIDDEN;
 bh=6Pohvv7DyTM+UpEqMPvnMRENn2TNOaLgLQSPPGoiqAM=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=QMP56M4txRKUZtGkoSQ7rEk/FhYcvkEw2J5XsB/qxN7XWKrWp7iYULWto2RAA6D6
 O/a2vMX+6RuAExz5DAofpA6clTrmT5CXExtISdEuyzvQ3737vlS4W4V4jfvrj1GaK
 XW/gih9zKyj2hGNGOjm1Cyoy0nwP8NuQMtrNZEvkQj5oUi9nmqUF0sNPWz5my1Zgb
 V2dNEU6rrf8A9A789VElDLqKSodBQduqKyaJbEfvq0Ehhqvl3LhKaXEFIE4P/Gszk
 EfwvSn03+MHfBUctwNfbywzTsz9HS57woVsLliPrqhruYW0kNNVzoBLNg8h7vz8T6
 9pMJNIcK/fqOf7xleQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([46.125.249.118]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mo6ux-1skJlv0pvX-00mP0n; Wed, 12
 Jun 2024 10:57:48 +0200
Message-ID: <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@HIDDEN>
Date: Wed, 12 Jun 2024 10:57:47 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86frtkeyzo.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:f+kxt2emDxkkXmdGuKDhzDpnK0UQq4RGIpztic2ZaxMQ1bpAwbQ
 KenMSxfpF1NCLYPMfNQSEGYm9KoCv5qkahk4JlP1Ct9EAhps8UyW+7QNR+SniQyM4FYMiqE
 F7WArW3S8ln5B/AVGDNcivDxAyV0l5vxWBRLOV4uNqpvu5Oyle3p65aalVYCdoPajfJSoir
 hvP1HMlDVIqIU+t1n0JHA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:rLL2soZG4k8=;zTkTQ47VWPqXopKG6X/O2Jtrr4p
 rzXtudBLwRzMlA7AHeL5DVGWqtLjx98E+iQp/MDdR8GutPFiUkmRBI8LKYrtCI01fkMSrRz5P
 rGLGJsoYaW2yWx/xvXjPg3zzetg13U+LzXdiMnZBCRZ8GEIjUgVMF5ushHHToIK3Df8jQhKbW
 h3KS+8J3MDGEIXa8tRkra3MM2mf2/2JPCS5kN0/qFi3jr1bLvWRDubX1z0pB1r8CZyHV2sEoi
 7QA/qdLwAb16jqU6RwhGh+8SyUfIHMqTukyrS+NcM/pl4A+o++sY7G3lXtoCDtlh61okNM0cG
 lqYJBTmzMhqda2J8C0l/A34FvEVZv++jahvBn8WBloGG0z+tNph1OnOHzwq2IeRKEHFREfuUH
 2pk1Qha93NaSdipTtJDk4GLDPvUFDsmIuuabmNBHdCihE2sHGDkDZDbWaw9ZfolYBkfrZXqBA
 Dvvjkb5Wz7boEpPnWB3St+jwUxGff4skeSkR1u38+EQ2Ubvdb6iwUdjUJEV5bmVhWfLd6E32C
 bT8R9EsCMclJHhQ1dpkyIiAnOCqTRmfxsDBHVjte9xY9sq+EgxkrHNv2HbVZuMwIj12Qipuve
 ZENf+eg/tJsS8NsDE5+9FGvW6mTfMz0YCxhVwoH9BbsbmqixkiyKIVBBBLUpAhtdBJTtOT2hq
 QViwl/wnsAbXsJM4z4r183jOwzYvQnUNs79uLVatwofug2wl2mQMSuyLTwBd6xZ4id0mXbIoR
 nLxDDi3xqULsbssA/3ZR5slIKGQVbPPlESFgKAhO1MOY2NxYsQumz37A8yx8lU/GnvBVZOa3o
 LUecgepYP1j4BULdle95HUSLKeJnAI955jEdyXniBna9g=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > So it makes no sense to send the value of the KILL arg to tab-bar code?
 > Because there is nothing to decide based on its value?

But KILL means to delete the frame and the tab-bar code wants to prevent
that.  Or what am I missing?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 11 Jun 2024 16:27:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 12:27:44 2024
Received: from localhost ([127.0.0.1]:36038 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH4LY-0001qL-Aa
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 12:27:44 -0400
Received: from mail-lf1-f41.google.com ([209.85.167.41]:47341)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdo.haji.ali@HIDDEN>) id 1sH4LV-0001q1-Um
 for 71386 <at> debbugs.gnu.org; Tue, 11 Jun 2024 12:27:42 -0400
Received: by mail-lf1-f41.google.com with SMTP id
 2adb3069b0e04-52961b77655so6415793e87.2
 for <71386 <at> debbugs.gnu.org>; Tue, 11 Jun 2024 09:27:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1718123197; x=1718727997; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=uySUrB9O/xl/+gsFtwOntcfS0/xzNCTYBo7cGGRbPFM=;
 b=PckrAMujnJhj4b2XlQt7dExK3pwufsffYU4Blyy/eoOfglwhbW6W5x7XSwLMAdjAs7
 HLOLqimmMunn+VRSRDi1+4ERagau9FV/S6bVs7emqBM0cJk2q9Msl9FvvqUrkFU3scCW
 IuM7fSPS5FYemvD3m6KOnvwZzvNnx5TtKGtxz4d+9k9rmhn3up95xrQR9bVardC0SJW3
 z0XuMjzrvv0V6cKAP1awrt1/rC6H6gXayLGkcSL1ymZJQGfm9npkrsPcD6Tnr6umuOis
 sKokPP6Ey+quKTL+vb1U4NxV3Pr2a/4bctr8hWQGQ4WU2oQC0P0oPJsMvKKpCtyN8+Z/
 eMMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1718123197; x=1718727997;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=uySUrB9O/xl/+gsFtwOntcfS0/xzNCTYBo7cGGRbPFM=;
 b=aSmoOwqZOYoyUZQi9hqmDVrgz3tqqk+4QgVDFkSiE3xhB/KiwAMEamKw9piQ2Mfl5S
 57//zTD4T1HMN6XPOO/00yiTr6oSuEByNDopWNQ4EeXR9SMl3M5iAM6W4k/XwFRAjOfF
 IFeO1jgb8S16fqj7n8n+d0wm4SsmSN/Dn82fa2i5AJk2kSImuFNeu3a10Hoaftks8c2D
 mzptD9zPoyp8Eg3gsq8ZalI46IZhwbXT7BDyAZj2kr/NNsiOkTjzTW+29tbYoT7i7BJI
 5J/qpSz8EeUEGjgz7bhWQ5AmF5n4oxdWCrHD+lCie2/uOBAynC3AJJlcbjKDlnGH+HLl
 MGGw==
X-Forwarded-Encrypted: i=1;
 AJvYcCUKfvqTBYSrU93gmZ04LUprzXoDYDwGt08zTN9twC3C6jxRLNto7vrUPwohcj4yHA6gZOtjv8X+S48hODqij59ViRU8WYA=
X-Gm-Message-State: AOJu0YwTChAqHnh8hU7kySiKcn7z3qsL8RMQaEqj/Y11qp3nb/ctYDo+
 pLUfj4LrMgxZi7O5c0rcpcFMmdB7wyegIeS4IGL+DmBD4IuAUx0w
X-Google-Smtp-Source: AGHT+IF8ljdvgrsP0A18sTFBT/LZKYisKY64S0DdAPtOGPGgdKoOjjl4FbwMo8JrN+pg5SaHfG3iyw==
X-Received: by 2002:a05:6512:3189:b0:52c:8a37:6d00 with SMTP id
 2adb3069b0e04-52c8a376e4fmr4603713e87.8.1718123197035; 
 Tue, 11 Jun 2024 09:26:37 -0700 (PDT)
Received: from localhost
 (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4215c19e567sm184606335e9.1.2024.06.11.09.26.36
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 11 Jun 2024 09:26:36 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <86frtkeyzo.fsf@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
 <86frtkeyzo.fsf@HIDDEN>
Date: Tue, 11 Jun 2024 17:26:06 +0100
Message-ID: <m234pjqwdd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 11/06/2024, Juri Linkov wrote:

> So it makes no sense to send the value of the KILL arg to tab-bar code?
> Because there is nothing to decide based on its value?

Perhaps, for consistency, the argument should be send in case `window-delete-frame-functions` is used for other reasons by the user. Also, perhaps the tab should not be closed if `kill` is nil (similar to how the frame is not killed if `kill` is nil) and another buffer should be shown.

-- Al




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 11 Jun 2024 15:54:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 11 11:54:47 2024
Received: from localhost ([127.0.0.1]:35840 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sH3pe-0000mn-P6
	for submit <at> debbugs.gnu.org; Tue, 11 Jun 2024 11:54:47 -0400
Received: from mslow1.mail.gandi.net ([217.70.178.240]:49713)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sH3pd-0000mg-EH
 for 71386 <at> debbugs.gnu.org; Tue, 11 Jun 2024 11:54:45 -0400
Received: from relay1-d.mail.gandi.net (unknown [217.70.183.193])
 by mslow1.mail.gandi.net (Postfix) with ESMTP id 1C68DC4E1B
 for <71386 <at> debbugs.gnu.org>; Tue, 11 Jun 2024 07:11:52 +0000 (UTC)
Received: by mail.gandi.net (Postfix) with ESMTPSA id AD43A240005;
 Tue, 11 Jun 2024 07:11:45 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN> (martin rudalics's
 message of "Mon, 10 Jun 2024 10:00:28 +0200")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
 <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
Date: Tue, 11 Jun 2024 09:58:19 +0300
Message-ID: <86frtkeyzo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, abdo.haji.ali@HIDDEN,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> But I don't understand the logic of using the KILL argument
>> in 'window--delete':
>>
>> 	   (kill
>> 	    (delete-frame frame))
>>
>> Maybe Martin could explain.
>
> KILL non-nil here comes from the prefix argument of 'quit-window' which,
> if provided, 'quit-window' passes as 'kill' via BURY-OR-KILL to
> 'quit-restore-window' which then passes t via the KILL argument to
> 'window--delete'.  'window--delete' itself does not deal with buffers,
> it handles windows only.
>
> 'quit-restore-window' calls 'kill-buffer' later when BURY-OR-KILL equals
> 'kill'.  At that time, the window should already have been taken care of
> - either by deletion or by showing another buffer.  The return value of
> 'window--delete' is used to make the last conjuncts in the first 'cond'
> of 'quit-restore-window' succeed or fail (in the latter case the next
> clause will be probed).
>
> The idea of deleting the frame comes from the fact that a killed buffer
> cannot be re-shown in that frame's sole window.  'quit-restore-window'
> calls 'window--delete' in this case iff that window has no previous
> other buffer to show instead, so deleting the window (and possibly its
> frame) is the obvious choice rather than showing some unrelated buffer
> in it.

So it makes no sense to send the value of the KILL arg to tab-bar code?
Because there is nothing to decide based on its value?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 10 Jun 2024 08:25:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 10 04:25:08 2024
Received: from localhost ([127.0.0.1]:44702 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sGaKx-00037J-Iv
	for submit <at> debbugs.gnu.org; Mon, 10 Jun 2024 04:25:08 -0400
Received: from mout.gmx.net ([212.227.15.19]:52569)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sGaKv-00036U-14
 for 71386 <at> debbugs.gnu.org; Mon, 10 Jun 2024 04:25:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1718007882; x=1718612682; i=rudalics@HIDDEN;
 bh=h0HtFdWRHKFhmb08VWB8ovAA3twtf17qfoGIW5fwGr4=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=SVpf6zjrN+FCfrPuYqZKO/Bpe29BYzJ7YFY5mmHtgW8gmrZ1/OpoBWAjzcosSJwp
 mo2zXOeuqShxrOFvk1QIdg3jP0k580EOhPEFXFShxuEB81sy6q5ecZS+bgbU3gf9y
 dZXEn5JsIJNYm9zMt5jHMMhRjsT8KaYTKZmGl5lyA/Dp1TP1zk6/FeYsUX8LWrz+x
 rZGvZOFCz5AEC2UqlNZ5Uhqgx7dT6K7pBm7/VyxxjH+EpCZA9JYkbwB4X2caDGSHP
 mKyMXyhK3L20QuImNKsZCockdbWCDhuPAcJpOxi34YxdNCAsIdfwa67a2vObEl9zJ
 DZDbJWJIPNqHWB2kVw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.60]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N95iH-1sSHmJ2Y6B-014Jh9; Mon, 10
 Jun 2024 10:00:32 +0200
Message-ID: <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@HIDDEN>
Date: Mon, 10 Jun 2024 10:00:28 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
 <86o78ac6ny.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86o78ac6ny.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:2XvnHYnQfWDnsxRLytD2msc33jcCC49D+adDc/uO1L/8h2lOvWH
 kMH2/ffiRqvzTPVkfu/30HS+3XsxQo0mi8VBKio4ULtFiKrmVwPBsUq4dXETNNPYHrtrOsm
 l1RpW3uhqYBlYFcz8hwj0WSGsuua587mOEQQOj7Q5Or1kL1tZXXBxOa/1QWmoLQ6UVl9pCz
 wBb3oL9Y3t1gIoMPlsCuA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:xkNCInNn64w=;GzisrPMBkNE3WAAAyNeP/XsYQYt
 7J0FHGL1p0Lpdz1U2yZ5ohBHlL3Jtudl8kSIxOzLpT8MzWLm0EyxLBe9KqeiXixa7ghSqgfln
 M4QxQFjfscDwE7nC7Ev136R68K0tiWUgaOYQEiKqmDc0fcCtvzdiWV/By9cSZyr+HARSNMI51
 s4YsbqO2eKY5Ozv/yrz6q+EuHgaUI2L51HxwaBuPS2zH1UzQLrVVNkhHB4F6XWz2sVCOp+9tG
 le+LxUzqpQ4r91gTrsT+zZkNQMPZtfp2YR0kHPaJxKcQ+cYDHn6/91WdnY9IWVquXCbPvg8Tf
 rD/pY4XJTAEj/rknKn/lHciEN5PgnOyvzws+MJ7M4RNFYOUQblb6qOvkthHZPBnvu+yuiL0aw
 OJKW8kq22T6Ri4pUBYVUfq0KQPYci2oF2Ye5rmVjDEX/GwU/A4udXcfBP3HRe4euP62lKUvu7
 8OPchhjnU81i4tahV55TLu2qxb6qPa7Agv9mXMUe3khfVTzr1zeb7WJR+ax4CVQb239tG0aiy
 6x9rLbs6ftZ5ttt4O7fkiLISLTUoGNHDU1K6p6bOgU0SFlnHV/kOcuTay9QC7h7R+l8lZpK0z
 /fQeOIGjQ6+DnWadEhVeu2TbyVsvKq1fxHlHLjyI1DWVsFLT5LS31hiHes9tNT0Ffyn6RDncY
 hkuGiFeFsfNwl5Zg9cms0Dm9VjdWWi2vjYZFGCKGMpfuD0e0oiQEj9MmBJuMeh/AFWAwDPJUD
 cbwSghsYCr2zj4fmCLRFGHf7f8uIWEN2DxZ47fScyz249Q8M2hdv3Re0iBJ4XyBm7ydxV5ire
 8vGBPEsap/SJgETOd4mTQv4hy961LZaQs6/R7xqgZpn8Q=
X-Spam-Score: 2.8 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  >> So KILL is a boolean, and if it's non-nil, it means the
 buffer will be >> killed? If so, will the buffer be killed even if the function
 returns >> non-nil? > > I don't know, I just copied the text [...] 
 Content analysis details:   (2.8 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [212.95.5.60 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.15.19 listed in list.dnswl.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 71386
Cc: abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.8 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  >> So KILL is a boolean, and if it's non-nil, it means the
    buffer will be >> killed? If so, will the buffer be killed even if the function
    returns >> non-nil? > > I don't know, I just copied the text [...] 
 
 Content analysis details:   (1.8 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [212.95.5.60 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.15.19 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

 >> So KILL is a boolean, and if it's non-nil, it means the buffer will be
 >> killed?  If so, will the buffer be killed even if the function returns
 >> non-nil?
 >
 > I don't know, I just copied the text from the doc string of 'window--delete'.
 > But I don't understand the logic of using the KILL argument
 > in 'window--delete':
 >
 > 	   (kill
 > 	    (delete-frame frame))
 >
 > Maybe Martin could explain.

KILL non-nil here comes from the prefix argument of 'quit-window' which,
if provided, 'quit-window' passes as 'kill' via BURY-OR-KILL to
'quit-restore-window' which then passes t via the KILL argument to
'window--delete'.  'window--delete' itself does not deal with buffers,
it handles windows only.

'quit-restore-window' calls 'kill-buffer' later when BURY-OR-KILL equals
'kill'.  At that time, the window should already have been taken care of
- either by deletion or by showing another buffer.  The return value of
'window--delete' is used to make the last conjuncts in the first 'cond'
of 'quit-restore-window' succeed or fail (in the latter case the next
clause will be probed).

The idea of deleting the frame comes from the fact that a killed buffer
cannot be re-shown in that frame's sole window.  'quit-restore-window'
calls 'window--delete' in this case iff that window has no previous
other buffer to show instead, so deleting the window (and possibly its
frame) is the obvious choice rather than showing some unrelated buffer
in it.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 9 Jun 2024 18:40:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 09 14:40:27 2024
Received: from localhost ([127.0.0.1]:54168 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sGNSr-0000Fw-Nl
	for submit <at> debbugs.gnu.org; Sun, 09 Jun 2024 14:40:27 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:42321)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sGNIn-0008Cw-5f
 for 71386 <at> debbugs.gnu.org; Sun, 09 Jun 2024 14:30:01 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 8334A20002;
 Sun,  9 Jun 2024 18:29:17 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <86ikyi9e2l.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 09 Jun
 2024 21:16:34 +0300")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN> <86ikyi9e2l.fsf@HIDDEN>
Date: Sun, 09 Jun 2024 21:28:17 +0300
Message-ID: <86o78ac6ny.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> I tried to improve these doc strings:
>
> Thanks, they are more clear now.  But one point still needs
> clarification, IMO:
>
>> +(defvar window-delete-frame-functions nil
>> +  "A list of functions to handle the frame deletion.
>> +Each of functions is called with two arguments: FRAME and KILL where
>> +KILL means the buffer shown in window will be killed.  When one of functions
>
> So KILL is a boolean, and if it's non-nil, it means the buffer will be
> killed?  If so, will the buffer be killed even if the function returns
> non-nil?

I don't know, I just copied the text from the doc string of 'window--delete'.
But I don't understand the logic of using the KILL argument
in 'window--delete':

	   (kill
	    (delete-frame frame))

Maybe Martin could explain.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 9 Jun 2024 18:40:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 09 14:40:24 2024
Received: from localhost ([127.0.0.1]:54160 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sGNSo-0000FJ-OS
	for submit <at> debbugs.gnu.org; Sun, 09 Jun 2024 14:40:23 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51440)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sGNHk-0008A3-Ca
 for 71386 <at> debbugs.gnu.org; Sun, 09 Jun 2024 14:28:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sGN5q-0006RD-Dx; Sun, 09 Jun 2024 14:16:38 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=dqtwR/+M8SXApgMidazdw480SHPS98BKcgKF7z92khM=; b=GED+zN0O2SGl
 DcMX1EJTrq/lI5GhzPbUvpBak6CbYDem7k1cAcCpJSKAhMnwOMo8ibUW5QJsUCcxIEhF0wRCPJ/1g
 66KCiSAZrFaOJAifKKKs+b1x1te4965Q0aV2xxjVa/fVx+pLCh9HloiSFm5MIAoXULIQ+eUSfOkZD
 vx5NrP6/SBHT9aybKAzasWsEXmmjfCfICO0H5Ad3bv5b0+QPdy4yKHS16EQiBF5PL+JyR1LTZuhlT
 RQ62rj/5pdgGoGPGQ3XbH2p0u4JiPW5QQ2cJosy0BQMZh40ugqcRWMaZCA6Ig1MW6pVMQl1N6zuj4
 QUt/W7eki1O/DvOmOtBYYA==;
Date: Sun, 09 Jun 2024 21:16:34 +0300
Message-Id: <86ikyi9e2l.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86zfruc7qh.fsf@HIDDEN> (message from Juri Linkov on
 Sun, 09 Jun 2024 20:58:10 +0300)
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
 <86zfruc7qh.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: abdo.haji.ali@HIDDEN,  rudalics@HIDDEN,  71386 <at> debbugs.gnu.org
> Date: Sun, 09 Jun 2024 20:58:10 +0300
> 
> >> +(defun tab-bar-window-delete-frame (frame _kill)
> >> +  "Whether FRAME should be deleted when other tabs are available for that frame.
> >> +Instead of deleting the frame, close the current tab.
> >
> > The first and the second sentences contradict each other.  The first
> > implies that this is a predicate which returns a boolean, whereas the
> > second says that it closes the tab and negtlets to say anything about
> > the return value.
> >
> >> +(defvar window-delete-frame-functions nil
> >> +  "Don't delete frame when one of functions returns t.
> >> +Each of functions is called with two arguments: FRAME and KILL.
> >> +The function can perform an action instead of deleting the frame.")
> >
> > This doc string should at least explain what is the KILL argument and
> > its meaning.
> 
> I tried to improve these doc strings:

Thanks, they are more clear now.  But one point still needs
clarification, IMO:

> +(defvar window-delete-frame-functions nil
> +  "A list of functions to handle the frame deletion.
> +Each of functions is called with two arguments: FRAME and KILL where
> +KILL means the buffer shown in window will be killed.  When one of functions

So KILL is a boolean, and if it's non-nil, it means the buffer will be
killed?  If so, will the buffer be killed even if the function returns
non-nil?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 9 Jun 2024 18:25:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 09 14:25:27 2024
Received: from localhost ([127.0.0.1]:53372 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sGNEN-0007y8-2G
	for submit <at> debbugs.gnu.org; Sun, 09 Jun 2024 14:25:27 -0400
Received: from mslow1.mail.gandi.net ([217.70.178.240]:60899)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sGMxt-0004Pw-9m
 for 71386 <at> debbugs.gnu.org; Sun, 09 Jun 2024 14:08:25 -0400
Received: from relay2-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::222])
 by mslow1.mail.gandi.net (Postfix) with ESMTP id B8A96C5A31
 for <71386 <at> debbugs.gnu.org>; Sun,  9 Jun 2024 17:00:53 +0000 (UTC)
Received: by mail.gandi.net (Postfix) with ESMTPSA id 216C240005;
 Sun,  9 Jun 2024 17:00:31 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <m27cf0h9sy.fsf@HIDDEN> (Al Haji-Ali's message of "Fri, 07 Jun
 2024 19:44:45 +0100")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
Date: Sun, 09 Jun 2024 19:59:29 +0300
Message-ID: <868qzehxie.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

> If I may interject a bit, I think it would be better if the tab is
> closed (i.e., tab-bar-close-tab is called) and another tab is
> displayed when the dedicated buffer is killed if its the only one in
> a window.

Thanks, good suggestion.

> For example, I changed `window--delete` on my machine to
> have this
>
> (if (and tab-bar-mode
>          (> (length (tab-bar-tabs)) 1))
>     (tab-bar-close-tab)
>   (delete-frame frame))
>
> In your patch, `tab-bar-window-delete-frame-p` doesn't do that, nor
> should it as it is a predicate.  Maybe
> `window-delete-frame-predicate-functions` should be renamed to
> `window-delete-frame-actions` or something and `tab-bar-close-tab`
> should be called in `tab-bar-window-delete-frame-p` (removing `-p`
> probably) -- in fact, the `delete-frame` code itself could be added as
> such an action, if we are not averse to changes to the interface.

It should be sufficient to rename it to just 'window-delete-frame-functions'.
Then it's not a predicate, and also follows the naming convention of hooks
having the '-functions' suffix.

> Also, just FYI, your patch doesn't allow the branches with
> `auto-hide-function` and `frame-auto-hide-function` to be called when
> `kill` is nil.  I don't know the side-effects of not calling these
> functions in such cases, but might be worth checking.

Probably the frame should not be hidden after closing the tab,
so these branches should not be handled.

Ok, here is the patch that supports your initial case:

--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=tab-bar-window-delete-frame.patch

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 6ab6324540e..485ea1d5dd0 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -2659,6 +2659,16 @@ tab-switcher-mouse-select
   (goto-char (posn-point (event-end event)))
   (tab-switcher-select))
 
+
+(defun tab-bar-window-delete-frame (frame _kill)
+  "Whether FRAME should be deleted when other tabs are available for that frame.
+Instead of deleting the frame, close the current tab.
+Used via `window-delete-frame-predicate-functions' by `window--delete'."
+  (and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1)
+       (progn (tab-bar-close-tab) t)))
+
+(add-hook 'window-delete-frame-functions #'tab-bar-window-delete-frame)
+
 
 (defun tab-bar--reusable-frames (all-frames)
   (cond
diff --git a/lisp/window.el b/lisp/window.el
index 2208346ec8c..b1e877b82a8 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4968,6 +4968,11 @@ frame-auto-hide-function
   :group 'frames
   :version "26.1")
 
+(defvar window-delete-frame-functions nil
+  "Don't delete frame when one of functions returns t.
+Each of functions is called with two arguments: FRAME and KILL.
+The function can perform an action instead of deleting the frame.")
+
 (defun window--delete (&optional window dedicated-only kill)
   "Delete WINDOW if possible.
 WINDOW must be a live window and defaults to the selected one.
@@ -4982,6 +4987,10 @@ window--delete
        ((eq deletable 'frame)
 	(let ((frame (window-frame window)))
 	  (cond
+	   ((run-hook-with-args-until-success
+	     'window-delete-frame-functions
+	     frame kill)
+	    nil)
 	   (kill
 	    (delete-frame frame))
            ((functionp (frame-parameter frame 'auto-hide-function))

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 9 Jun 2024 18:25:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 09 14:25:27 2024
Received: from localhost ([127.0.0.1]:53367 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sGNEL-0007xz-K8
	for submit <at> debbugs.gnu.org; Sun, 09 Jun 2024 14:25:27 -0400
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:39959)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sGMx0-0004N7-Un
 for 71386 <at> debbugs.gnu.org; Sun, 09 Jun 2024 14:07:32 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id DD2AA1BF207;
 Sun,  9 Jun 2024 18:07:06 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <86msnu9fhg.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 09 Jun
 2024 20:46:03 +0300")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN> <86msnu9fhg.fsf@HIDDEN>
Date: Sun, 09 Jun 2024 20:58:10 +0300
Message-ID: <86zfruc7qh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> +(defun tab-bar-window-delete-frame (frame _kill)
>> +  "Whether FRAME should be deleted when other tabs are available for that frame.
>> +Instead of deleting the frame, close the current tab.
>
> The first and the second sentences contradict each other.  The first
> implies that this is a predicate which returns a boolean, whereas the
> second says that it closes the tab and negtlets to say anything about
> the return value.
>
>> +(defvar window-delete-frame-functions nil
>> +  "Don't delete frame when one of functions returns t.
>> +Each of functions is called with two arguments: FRAME and KILL.
>> +The function can perform an action instead of deleting the frame.")
>
> This doc string should at least explain what is the KILL argument and
> its meaning.

I tried to improve these doc strings:

diff --git a/lisp/window.el b/lisp/window.el
index 2208346ec8c..e97557b5bb2 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4968,6 +4968,13 @@ frame-auto-hide-function
   :group 'frames
   :version "26.1")
 
+(defvar window-delete-frame-functions nil
+  "A list of functions to handle the frame deletion.
+Each of functions is called with two arguments: FRAME and KILL where
+KILL means the buffer shown in window will be killed.  When one of functions
+returns a non-nil value then `window--delete' will not delete the frame.
+The function can also perform own action instead of deleting the frame.")
+
 (defun window--delete (&optional window dedicated-only kill)
   "Delete WINDOW if possible.
 WINDOW must be a live window and defaults to the selected one.
@@ -4982,6 +4989,10 @@ window--delete
        ((eq deletable 'frame)
 	(let ((frame (window-frame window)))
 	  (cond
+	   ((run-hook-with-args-until-success
+	     'window-delete-frame-functions
+	     frame kill)
+	    nil)
 	   (kill
 	    (delete-frame frame))
            ((functionp (frame-parameter frame 'auto-hide-function))
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 6ab6324540e..2f7578b842b 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -2659,6 +2659,17 @@ tab-switcher-mouse-select
   (goto-char (posn-point (event-end event)))
   (tab-switcher-select))
 
+
+(defun tab-bar-window-delete-frame (frame _kill)
+  "Handle frame deletion in `tab-bar-mode'.
+When there are more than one tab on the selected frame, then close
+the current tab.  In this case return t to not delete the frame
+in `window--delete'."
+  (and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1)
+       (progn (tab-bar-close-tab) t)))
+
+(add-hook 'window-delete-frame-functions #'tab-bar-window-delete-frame)
+
 
 (defun tab-bar--reusable-frames (all-frames)
   (cond




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 9 Jun 2024 17:55:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 09 13:55:25 2024
Received: from localhost ([127.0.0.1]:51947 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sGMlI-0003pI-Ne
	for submit <at> debbugs.gnu.org; Sun, 09 Jun 2024 13:55:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53746)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sGMch-0003QU-7w
 for 71386 <at> debbugs.gnu.org; Sun, 09 Jun 2024 13:46:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sGMcK-0001EN-82; Sun, 09 Jun 2024 13:46:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=VYSEzFTGIDxELuwSOocoZCMgmw28z/1i+ON58x6V8v0=; b=Fmd4J83VPjF/
 IMaEe3wcX+9CjUl6pY89LUrN3vFo++RWVAY30mynDWKVrXHXDDiwxYnHPhrx8ocrriYLvVLttXt25
 gmUi8zv3nlONf38gp8bjoIeipZ/ZCjggdv+ZD8Mrbw3u0d0HH/Lj0CKq3xFJ4UUw9IhqpBsZXNBf5
 nKgm7GO5qQ7zQzK3q4IEsl9sBUTAJYfGvFhQigXXT2W//Gy+oe8rIB4xbSzRIlflE6nQD6WjWjagg
 TvO3dqWv+4VIgV3pCwvZ3zYtBaSZt9mFkZqcEZlIoFSwDMykWtOWzypHyxrNev7TkjuZVAr87AQnw
 IxVxc2uSjbL9E5ihN+hvyg==;
Date: Sun, 09 Jun 2024 20:46:03 +0300
Message-Id: <86msnu9fhg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <868qzehxie.fsf@HIDDEN> (message from Juri Linkov on
 Sun, 09 Jun 2024 19:59:29 +0300)
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN> <m27cf0h9sy.fsf@HIDDEN>
 <868qzehxie.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  rudalics@HIDDEN,  71386 <at> debbugs.gnu.org
> Date: Sun, 09 Jun 2024 19:59:29 +0300
> 
> +(defun tab-bar-window-delete-frame (frame _kill)
> +  "Whether FRAME should be deleted when other tabs are available for that frame.
> +Instead of deleting the frame, close the current tab.

The first and the second sentences contradict each other.  The first
implies that this is a predicate which returns a boolean, whereas the
second says that it closes the tab and negtlets to say anything about
the return value.

> +(defvar window-delete-frame-functions nil
> +  "Don't delete frame when one of functions returns t.
> +Each of functions is called with two arguments: FRAME and KILL.
> +The function can perform an action instead of deleting the frame.")

This doc string should at least explain what is the KILL argument and
its meaning.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 7 Jun 2024 20:05:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 07 16:05:08 2024
Received: from localhost ([127.0.0.1]:57737 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFfpj-0002gj-Ss
	for submit <at> debbugs.gnu.org; Fri, 07 Jun 2024 16:05:08 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55802)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sFfph-0002fo-6K
 for 71386 <at> debbugs.gnu.org; Fri, 07 Jun 2024 16:05:06 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sFfbT-0008QG-7S; Fri, 07 Jun 2024 15:50:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=wSFtj/pODX4neyrY7k5epM6CuKlz1GHRoA8Mh9edVtU=; b=LaLNrsdrfHLv
 xDumobAXDrwwVYFQPCxDtKmNCh9I9eIN/BPhgIAoSG9tGuCAR0/at/XwLduVGc5Y4jxwXzJwA5/iL
 mWtzYsevZDk7LqLiZ75ZE/XDqASaUAdItna+yPkjiR1BJbAx0qGkeU5WoJLqIMdHJjXibC/TNVyCp
 dIS++r8M15bRYrDIqxy8WU5QTY9EX00GjhzM6G9m2YWIw+MoBeb3bGA5pVxgLKOD614YiF9Tu1ixW
 NleOZL2Swpojezy09dYISrGst73YmffJGOXrD8B7ykcER6ifldM1FJKc2fxUUKDwYgOKxQkllspFU
 rkc4jFIbxTfGrmTVsS6XWQ==;
Date: Fri, 07 Jun 2024 22:50:20 +0300
Message-Id: <86v82kedmr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86y17gmxdg.fsf@HIDDEN> (message from Juri Linkov on
 Fri, 07 Jun 2024 21:16:43 +0300)
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: rudalics@HIDDEN,  abdo.haji.ali@HIDDEN,  71386 <at> debbugs.gnu.org
> Date: Fri, 07 Jun 2024 21:16:43 +0300
> 
> >> Ok, here is a better patch:
> >
> > Thanks, but I think this should be controlled by a user option, since
> > it's quite a drastic change in behavior.
> 
> I'm against adding useless options to tab-bar.el

It is not useless IMO.

> since users can easily remove hook with 1 liner:
> 
> (remove-hook 'window-delete-frame-predicate-functions 'tab-bar-window-delete-frame-p)

If we document this in NEWS, it could be good enough.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 7 Jun 2024 18:55:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 07 14:55:39 2024
Received: from localhost ([127.0.0.1]:52041 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFekV-0007je-9Y
	for submit <at> debbugs.gnu.org; Fri, 07 Jun 2024 14:55:39 -0400
Received: from mail-wm1-f42.google.com ([209.85.128.42]:46431)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdo.haji.ali@HIDDEN>) id 1sFekT-0007jH-Gs
 for 71386 <at> debbugs.gnu.org; Fri, 07 Jun 2024 14:55:38 -0400
Received: by mail-wm1-f42.google.com with SMTP id
 5b1f17b1804b1-4216724ced1so10518365e9.1
 for <71386 <at> debbugs.gnu.org>; Fri, 07 Jun 2024 11:55:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1717786456; x=1718391256; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=R320gO8Zjg4tljSyOnJDKcc9DCf2UBHXaYyQIJFXBsM=;
 b=VPD9Ix0a3FN2RVt25W2UoiDPU1OqB2krv89noKPMogrl+F3tfDOIqhOoQgbwH3Xy6f
 IedJcYvvgc116N9D4aKPlmzmYgYp9l3uCAy4ZDn6nhTOtGQnmyT5iaXqW8TvPNC21PW3
 plI3ki7P30Rl23MnmXijORJqTfug3c0lAn96hC60DBsXX8oHrvfhM+/UVNsY6NHnE28K
 yB9L3C04fOMvZ7E/xnOug1VnhRG9Qu8SVLuusTNQne3A/EqfldM/vFXM+gJsDx0GJKJU
 PCsrVrBDbql06pY7PmzWcoOE3ilfJ2Lp/CQXtLbhT7LhJA6QmRiWPtUoWb8ztv3DjU/E
 h6yg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1717786456; x=1718391256;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=R320gO8Zjg4tljSyOnJDKcc9DCf2UBHXaYyQIJFXBsM=;
 b=sCytv1QZ7zjCdEcjezS+wa3yZL53BDrJrF1ER/uXQfjLz56LkM9Yx1czP7epP0ZVOx
 O/FMAYJ/Smqabp5/r5qzNGhyYtKM7Y+CaSFYFl/hMwnr/dGvZUaj8r3szuL+TPRfL/Zc
 GKfPcSEkwKNaTvzufr8qOXf5H/PxjVF9fzaLqUoZSb0BLqxG6807t1WLueutjrku4L/s
 2mN6nTLIP7dcTP9X3/f5LtPuSEJWGTJmA1+x+dszCrb3ChggW68Kess2yGgdRxmazHTU
 QLa9Ab4aCb+XQdP3RBI1Bnea0lu5WfJriegLKZ8x5hu8pI3Jwf4zSEKyaeVegUhwVJ1r
 /7Tw==
X-Forwarded-Encrypted: i=1;
 AJvYcCWlCQW2Dm0jUyveC3jPFsg3id2H6K/PADw9q3WTyM1eFpGeH9Yoo+VU6SX8hxFf3+qfeZLCBBxquOV1ur1TYbL4ztD8w38=
X-Gm-Message-State: AOJu0YwYLVSdfrCXH994Qvb2IPhwnSyiLkbjoEePaI3NG5PaYS6iBEe7
 /AMQnoQFJ5kikVbqKyHNl5joUJWiL0+birHJyLQVY/Mhib7LFKD0tjKlPQ==
X-Google-Smtp-Source: AGHT+IFe/oFJzSxIs40eqNnU9CE9hDlcpSWFO2Ov2XhYnesTzX+nKr0lgSSGViwo+k+Y7lAmdJkZCg==
X-Received: by 2002:a05:600c:a382:b0:417:fbc2:caf8 with SMTP id
 5b1f17b1804b1-42164a03077mr28549445e9.23.1717785895542; 
 Fri, 07 Jun 2024 11:44:55 -0700 (PDT)
Received: from localhost
 (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4215c2c7dafsm60966225e9.35.2024.06.07.11.44.54
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 07 Jun 2024 11:44:54 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <86y17gmxdg.fsf@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
 <86y17gmxdg.fsf@HIDDEN>
Date: Fri, 07 Jun 2024 19:44:45 +0100
Message-ID: <m27cf0h9sy.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


On 07/06/2024, Juri Linkov wrote:
> Ok, here is a better patch:

Hello Juri,

If I may interject a bit, I think it would be better if the tab is closed (i.e., tab-bar-close-tab is called) and another tab is displayed when the dedicated buffer is killed if its the only one in a window. For example, I changed `window--delete` on my machine to have this

(if (and tab-bar-mode
         (> (length (tab-bar-tabs)) 1))
    (tab-bar-close-tab)
  (delete-frame frame))

In your patch, `tab-bar-window-delete-frame-p` doesn't do that, nor should it as it is a predicate. Maybe `window-delete-frame-predicate-functions` should be renamed to `window-delete-frame-actions` or something and `tab-bar-close-tab` should be called in `tab-bar-window-delete-frame-p` (removing `-p` probably) -- in fact, the `delete-frame` code itself could be added as such an action, if we are not averse to changes to the interface.

Also, just FYI, your patch doesn't allow the branches with `auto-hide-function` and `frame-auto-hide-function` to be called when `kill` is nil. I don't know the side-effects of not calling these functions in such cases, but might be worth checking.

-- Al




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 7 Jun 2024 18:18:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 07 14:18:54 2024
Received: from localhost ([127.0.0.1]:49067 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFeAv-0005xU-UX
	for submit <at> debbugs.gnu.org; Fri, 07 Jun 2024 14:18:54 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:56591)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sFeAt-0005x6-Ly
 for 71386 <at> debbugs.gnu.org; Fri, 07 Jun 2024 14:18:52 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 04ED8C0003;
 Fri,  7 Jun 2024 18:18:08 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <86y17gej2x.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 07 Jun
 2024 20:52:38 +0300")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN> <86y17gej2x.fsf@HIDDEN>
Date: Fri, 07 Jun 2024 21:16:43 +0300
Message-ID: <86y17gmxdg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Ok, here is a better patch:
>
> Thanks, but I think this should be controlled by a user option, since
> it's quite a drastic change in behavior.

I'm against adding useless options to tab-bar.el
since users can easily remove hook with 1 liner:

(remove-hook 'window-delete-frame-predicate-functions 'tab-bar-window-delete-frame-p)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 7 Jun 2024 18:12:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 07 14:12:36 2024
Received: from localhost ([127.0.0.1]:48468 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFe4q-0005d2-5W
	for submit <at> debbugs.gnu.org; Fri, 07 Jun 2024 14:12:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44972)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sFe4n-0005ca-GZ
 for 71386 <at> debbugs.gnu.org; Fri, 07 Jun 2024 14:12:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sFdlb-00046M-M4; Fri, 07 Jun 2024 13:52:43 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=V8xR7R37h0y+nsMNHteCphPLbCin14kJUzKL3e+mk5k=; b=baFvtQ2L4HUA
 lu64lw2I9/xavAAhVN6hyE60ib9hNUfsXSgkxzVJXh9fWnkZp5qByfmlwYcX1BNlLP+YO1PBzxtgK
 0EWS/rg4CLvt6djAeqetW4VAlYNL8BkqyKDOrFwkgtfSmjk2typcaABDJO8JX1DRb0cJd3zyw5rk8
 adw7FfHRcS4KXAhW6lx3Y5JRCmUxDdldFv7/qt3tNxbDCwRg4vsA7/dr/n60bKRq3L9vbatHq3/NN
 RRZ76Ru+htACrTYkWbsAAS3OSJAsEnfOv0ypW71eHs31B7AEuUG8cK81RMsMc+Pixo0nWDPS8vs2N
 1dSp+vsqF2i4kKScIT8XQw==;
Date: Fri, 07 Jun 2024 20:52:38 +0300
Message-Id: <86y17gej2x.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86msnw4qm4.fsf@HIDDEN> (message from Juri Linkov on
 Fri, 07 Jun 2024 20:20:03 +0300)
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
 <86msnw4qm4.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  Al Haji-Ali <abdo.haji.ali@HIDDEN>,
>   71386 <at> debbugs.gnu.org
> Date: Fri, 07 Jun 2024 20:20:03 +0300
> 
> > Provide an option, say 'tab-bar-save-frame', that allows users to
> > customize whether a frame should be deleted when "other tabs are
> > available for that frame".  And provide a function, say
> > 'tab-bar-save-frame-p', 'window--delete' could call thusly
> 
> Ok, here is a better patch:

Thanks, but I think this should be controlled by a user option, since
it's quite a drastic change in behavior.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 7 Jun 2024 17:22:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 07 13:22:39 2024
Received: from localhost ([127.0.0.1]:44676 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFdIV-0003HR-AB
	for submit <at> debbugs.gnu.org; Fri, 07 Jun 2024 13:22:39 -0400
Received: from mslow1.mail.gandi.net ([217.70.178.240]:47443)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sFdIT-0003H6-Md
 for 71386 <at> debbugs.gnu.org; Fri, 07 Jun 2024 13:22:38 -0400
Received: from relay5-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::225])
 by mslow1.mail.gandi.net (Postfix) with ESMTP id 802BBC6C10
 for <71386 <at> debbugs.gnu.org>; Fri,  7 Jun 2024 17:21:48 +0000 (UTC)
Received: by mail.gandi.net (Postfix) with ESMTPSA id 338A01C0003;
 Fri,  7 Jun 2024 17:21:26 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN> (martin rudalics's
 message of "Fri, 7 Jun 2024 10:23:52 +0200")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
 <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
Date: Fri, 07 Jun 2024 20:20:03 +0300
Message-ID: <86msnw4qm4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, Al Haji-Ali <abdo.haji.ali@HIDDEN>,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

>> Sorry, I don't understand what I should do in tab-bar-mode
>> for quit-restore-window.  I expected that changes should be
>> in window.el.
>
> Provide an option, say 'tab-bar-save-frame', that allows users to
> customize whether a frame should be deleted when "other tabs are
> available for that frame".  And provide a function, say
> 'tab-bar-save-frame-p', 'window--delete' could call thusly

Ok, here is a better patch:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=window-delete-frame-predicate-functions.patch

diff --git a/lisp/window.el b/lisp/window.el
index 2208346ec8c..abc9f1b4011 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4968,6 +4968,10 @@ frame-auto-hide-function
   :group 'frames
   :version "26.1")
 
+(defvar window-delete-frame-predicate-functions nil
+  "Don't delete frame when one of functions returns t.
+Called with two arguments: FRAME and KILL.")
+
 (defun window--delete (&optional window dedicated-only kill)
   "Delete WINDOW if possible.
 WINDOW must be a live window and defaults to the selected one.
@@ -4982,6 +4986,10 @@ window--delete
        ((eq deletable 'frame)
 	(let ((frame (window-frame window)))
 	  (cond
+	   ((run-hook-with-args-until-success
+	     'window-delete-frame-predicate-functions
+	     frame kill)
+	    nil)
 	   (kill
 	    (delete-frame frame))
            ((functionp (frame-parameter frame 'auto-hide-function))
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index dac57ce2070..25bfefbc205 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -2631,6 +2631,14 @@ tab-switcher-mouse-select
   (goto-char (posn-point (event-end event)))
   (tab-switcher-select))
 
+
+(defun tab-bar-window-delete-frame-p (frame _kill)
+  "Whether FRAME should be deleted when other tabs are available for that frame.
+Used via `window-delete-frame-predicate-functions' by `window--delete'."
+  (and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1)))
+
+(add-hook 'window-delete-frame-predicate-functions #'tab-bar-window-delete-frame-p)
+
 
 (defun tab-bar--reusable-frames (all-frames)
   (cond

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 7 Jun 2024 08:25:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 07 04:25:25 2024
Received: from localhost ([127.0.0.1]:34717 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFUua-00063a-KJ
	for submit <at> debbugs.gnu.org; Fri, 07 Jun 2024 04:25:24 -0400
Received: from mout.gmx.net ([212.227.15.18]:38437)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sFUtU-0005zl-HX
 for 71386 <at> debbugs.gnu.org; Fri, 07 Jun 2024 04:24:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1717748634; x=1718353434; i=rudalics@HIDDEN;
 bh=VvOVNb67Y6zYhXrUsdwR/l6D1z2aTJJOpcPavNKgzx4=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=IZqnBJ8T9EU6cL537l8nL51FAw3g0QOMPExmtrYWmOh/ZSI7lZ/p//+XXPXdj20D
 XyQZj5/zUbRV6PO3bJJJAs7/1+sR244cJDZwz3P8eM0jN3ub6PlQ+sv+heUQ/8HdY
 tH3kYSmX+99mjWZtYV9l84uODa43lhoJb+48rBRAfW9zyDfhWnpZUKbq9y9Dg9+5o
 fe33P/uneo9paInYbSZcDfWdOIxeaEqKqP8F1egEY1eNpWbCo16k0tIoRLYhC6DLK
 1IhQpZ86I+QSimML5mymp9gBm6NmcqwVRfYzzZYa4fpzKL27ky6bPuNYgztVBZiDQ
 P6KRNtZScj1T1z9Nxg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.97.105]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N95iH-1sTMqb2Ytj-014Jds; Fri, 07
 Jun 2024 10:23:54 +0200
Message-ID: <8561a63a-66d3-44cd-872f-73d26af7edbe@HIDDEN>
Date: Fri, 7 Jun 2024 10:23:52 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
 <86zfrx8ec0.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86zfrx8ec0.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:nxhTjspmSbfTRsbK7+apmip+gl0PVYVd3YPYSgw8UF4I4R9KlaY
 tUAOqNyy9tf66IEzxq5tF+jQnqZNsa7/Oj7ru83EF4czT4ujeGpAmQCt6rOzAdAGXrwgYe1
 ql6+Bou5ytfjS88HFkfzzFWPshQOURvxVhIhN8fwvA8SBW+1Frl8bJ0lHKFnK6rjEaV1Ek0
 YWJIezEy9QH39TR/f7Z4w==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:VcEX1o5slUc=;aztULhX/GVi4CYo/R64opIDtv4U
 3pgePWJIQTMlhk59vGu3tvQ9HsMMnlZDlj94GxEODpdzJMItVgusBY98NpDPvzyFifreNLq9P
 p0vd2m75p8Olxf/MEn+BwaNLmg9fcCUwE0ECPnPg5xH5B5Mlaz8DbKYry+Qv8BRlK9Gir6PsV
 9rdeW/kFyjR6XG+1fjgGDkEjv9sZaSKGP070YPOY6JlRUTGrbWokNiulxnPONrDkBGcFNahrG
 mSge+ReqmnZx/6Fx4wT+nzx6uxWsSuqWLSqigyvlb66GjQGBu1cfVjwnjZ31aq6BHRn8ftA80
 5hjmYIl2yKIV+9t/LscjU5U738IGj4ARHVu7KDPgLNu24DOv682ycELCv0Kl+O7cUGkvHHVW/
 ssdq0O8DghvuG8KNXECmBCAXMbmImBroWHNNTB7KrfnIxrGl5eK/cb+vWMNW6eKbqZlvWB1u1
 uk/LaaH+lLqkir7GHX3BVlMuP/v8hcnP/Bb3La8XYB/F3tClcMNs/q3m48OCakNt0rDsn8ury
 vCxDQ6o7Uu7ufXAZPKrNZeG+SfCXsrGwzdP1rSOTe+jYU89H58Amnf+n+a2h38qrepQFuvu3r
 xLVCe0JYPsd0JxKi1UoKQA9TyWIxW1ahqU1FRanTF4Yreo4qBlEUBfy3EFJA5SlreISCdh/rK
 beBYn1k2Rohw6GRpnrdL60f1wM79FIlwhOQUR8FjcYnWib1Hal3ePnbYmSljfIhusbeFZhALs
 SpcoGW2M5i/2p/OyOnotJ4JWIGvS1Skk3SF7NmWW9zEiVpbxIXhvhpqvtMW+qd2DZVrVdw+LE
 nj4dnUiN2/mNxgGUAJ8CDWz0YYId3rS7I4wkCb3q7t1O8=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, Al Haji-Ali <abdo.haji.ali@HIDDEN>,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > Sorry, I don't understand what I should do in tab-bar-mode
 > for quit-restore-window.  I expected that changes should be
 > in window.el.

Provide an option, say 'tab-bar-save-frame', that allows users to
customize whether a frame should be deleted when "other tabs are
available for that frame".  And provide a function, say
'tab-bar-save-frame-p', 'window--delete' could call thusly

     (let ((deletable (window-deletable-p window)))
       (cond
        ((eq deletable 'frame)
	(let ((frame (window-frame window)))
	  (cond
	   ((and (fboundp 'tab-bar-save-frame-p)
		 (tab-bar-save-frame-p frame kill))
	    nil)
	   (kill
	    (delete-frame frame))

thus avoiding to kill the frame when that function returns non-nil.
'tab-bar-save-frame-p' itself would be free to do with the frame
whatever it wants according to the value of 'tab-bar-save-frame'.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 7 Jun 2024 06:55:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 07 02:55:22 2024
Received: from localhost ([127.0.0.1]:55827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFTVR-0001Sn-MK
	for submit <at> debbugs.gnu.org; Fri, 07 Jun 2024 02:55:22 -0400
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:47043)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sFTIe-0000nW-L2
 for 71386 <at> debbugs.gnu.org; Fri, 07 Jun 2024 02:42:09 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 7186AFF80C;
 Fri,  7 Jun 2024 06:41:26 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN> (martin rudalics's
 message of "Thu, 6 Jun 2024 11:19:59 +0200")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
Date: Fri, 07 Jun 2024 09:39:20 +0300
Message-ID: <86zfrx8ec0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Eli Zaretskii <eliz@HIDDEN>, Al Haji-Ali <abdo.haji.ali@HIDDEN>,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> If I open a frame with multiple tabs, and one of the tabs has a
>>> dedicated window, then kill the buffer with the dedicated window, the
>>> frame is deleted along with its tabs.
>>>
>>> I understand that this is the documented behaviour, however my
>>> expectation is that the tab should be deleted but the frame should
>>> stay when other tabs are available, similar to how the frame is not
>>> deleted if other windows are visible.
>>
>> I'm not sure I agree with you.  Tabs are just saved frame
>> configurations, they are not real windows.  If we make this behavior
>> dependent on tab-bar-mode, we basically introduce an incompatible
>> behavior change in this particular case, which people and Lisp
>> programs out there might not expect or like.
>
> The current behavior of 'replace-buffer-in-windows' has been taken over
> from 'quit-window' which Richard initially designed as
>
>     ;; Get rid of the frame, if it has just one dedicated window
>     ;; and other visible frames exist.
>
> It is not carved in stone but if we want to change it for the tabs case
> we should leave it in place.  So I think that Juri should provide a tabs
> option that has 'quit-restore-window' (which 'replace-buffer-in-windows'
> should call) spare the frame in that case.  Which buffer to show in that
> window instead (especially if it never showed another buffer in its
> whole life) is another question.

Sorry, I don't understand what I should do in tab-bar-mode
for quit-restore-window.  I expected that changes should be
in window.el.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 6 Jun 2024 10:10:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 06 06:10:52 2024
Received: from localhost ([127.0.0.1]:52454 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFA55-0001ln-Sc
	for submit <at> debbugs.gnu.org; Thu, 06 Jun 2024 06:10:52 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53652)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sFA54-0001la-7C
 for 71386 <at> debbugs.gnu.org; Thu, 06 Jun 2024 06:10:50 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sFA4f-0005S7-D8; Thu, 06 Jun 2024 06:10:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=5ns4WGmZeW2fyXXAPFgtfab7uxFXhHqTSqbc5iuS5RI=; b=oVTUJVW5bYkz
 SW+k40Zqf6kL1uthi1uDSLonC8KunZgcwOYnsqLkN/4obFgQn2i/werSC2yDaPwRmK+efGjjZ8l9C
 I5u3RHd4tyJX4A1pha1EdhuM+iQ1rhVC+/koZe7RteQa6SX23ZqsC8unglC0B/XOxer8+VktSpMbr
 VtfqTtZGyZtRYImAvmV4x+RFdC2KhFpnOje3J9WmdzedOBbK9mY/h7g4VYyYlsXf9mlOfZO9h09/P
 o+3JilRJx4FSoDeVzP9wnQMsndEJoV0OQ7HENA2/DaZ54Aszi6kBXBCveobmq47a4mj0DLJyuLHVn
 vMjQaWIkiqx1kOdNnVJ9aQ==;
Date: Thu, 06 Jun 2024 13:10:14 +0300
Message-Id: <8634pqidq1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86plsuppl1.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 06 Jun 2024 09:12:10 +0300)
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <86plsuppl1.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71386
Cc: rudalics@HIDDEN, abdo.haji.ali@HIDDEN, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Al Haji-Ali <abdo.haji.ali@HIDDEN>,  martin rudalics
>  <rudalics@HIDDEN>,  71386 <at> debbugs.gnu.org
> Date: Thu, 06 Jun 2024 09:12:10 +0300
> 
> >> If I open a frame with multiple tabs, and one of the tabs has
> >> a dedicated window, then kill the buffer with the dedicated window,
> >> the frame is deleted along with its tabs.
> >> 
> >> I understand that this is the documented behaviour, however my
> >> expectation is that the tab should be deleted but the frame should
> >> stay when other tabs are available, similar to how the frame is not
> >> deleted if other windows are visible.
> >
> > I'm not sure I agree with you.  Tabs are just saved frame
> > configurations, they are not real windows.  If we make this behavior
> > dependent on tab-bar-mode, we basically introduce an incompatible
> > behavior change in this particular case, which people and Lisp
> > programs out there might not expect or like.
> >
> > I'm adding Juri and Martin to this discussion.
> 
> I don't understand the logic of window--delete.  But maybe
> window-deletable-p should also check for existing tabs in tab-bar-mode
> and return 'tab' instead of 'frame'.  Then window--delete
> could close the tab instead of deleting the frame.

Sure, technically it should not be hard to make this change.  I just
am not sure we should.  Martin, WDYT?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 6 Jun 2024 09:20:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 06 05:20:36 2024
Received: from localhost ([127.0.0.1]:52343 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sF9IS-0000Qm-Jt
	for submit <at> debbugs.gnu.org; Thu, 06 Jun 2024 05:20:36 -0400
Received: from mout.gmx.net ([212.227.15.19]:50025)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sF9IR-0000Qa-4y
 for 71386 <at> debbugs.gnu.org; Thu, 06 Jun 2024 05:20:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1717665614; x=1718270414; i=rudalics@HIDDEN;
 bh=+094daeID3uAmayPFg7KHLfmKHJLSmfyKat6GLxlOYQ=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=R/4eV8r6laj4bJaFtfqsEj7Sso1LEaKKs/MblernBkZfPU2ALR+vgpxbHLxTUo3w
 bI7ZG+sBM7+mSlzB5Md7kjf4lQC2U+TLyhD4p8ydQVWJcsC5lf/uKRpexdMZanpP+
 j/GDhXezRh+ZPh57D35PcHEeNBaSuvmWd7WRRSZSbIgb5zimwQjK8IMXj4kDKErEV
 QHqr2FubV1sfOx0seTeu1QSNrW46vKmGCznZQ+6ryWETGhuRqYPTwZTXAI3XeEKj5
 x4yflAf9i9HRwwtJxRc1v3nc6V5Nnlkrsm03iPsj0hEfroKDseoquv0Dr25FYgNvo
 XJa/bJg6JD9Kg/jLPw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.83]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N49lD-1sNhtf0KAb-011Zy2; Thu, 06
 Jun 2024 11:20:14 +0200
Message-ID: <7d1c9de4-bbdd-4bd2-bd1e-60ef91d8b8c1@HIDDEN>
Date: Thu, 6 Jun 2024 11:20:13 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
 <86plsuppl1.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86plsuppl1.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:joLInnHm93fG2ZBT6HwwBjJoN4M+B8Np3eY2VZ9miUJSGiN+wdL
 nk1Z3JkIppQEWq9HkJ5R5+kOpsv50olCyHfSjAn2eyJ25hDeqqzX1sGoGu6CUKLqJern0Jy
 fITmLYkR+rNCtum8k9OGuIYmA0m31LBsRMLAAe8IsRGm8W0lQUpPVsrk8Pf6ERP1pWNGa5y
 2AcXYDQ7HTVQlp9vP9/zg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:tGCR4BkvRUs=;WQNp+1MMwwIyNQhWt74gAviObEe
 oPRo2EBSLP8AHwKVSCYcOxU7MBzk0hx1EIt0cLWkJ8gfbcVG/w/Wk1wekbkM50801fVhUS44q
 m0acHYmQK076XbMrw9hhKj7btsw3WgkdgrEVApmIbj/0GIWl7XR9HQCGIR2GoGMcJTB7vrgey
 eVWw5BjsM8gOAHj8rJ4XYDvNlIbTxMT4UXI3ZlGDw1+pyWs+9k+CloLXcC1v9lO2nryXqn7b9
 yu5lXipUkzyYN/I6Nn2EFvk6dQjjXU4AG1KRR5c1INak3oJotYHmCxUlVE6BGotIkXWiIs3pq
 6xHnMHUA7m51wF7/3tfN9PuPaJ4AyCsj75r8V+jt2DngZlJ5Nb/77tgaO+w0jklvgZMkuUZaQ
 u7BdXdVxnRWwYP4Q8WQiKtWCqIFfekbpgGLWW29u7gtefzDATUEjtdKTP0HfU4aUCN7jXDK5I
 rf8v4nXgNNGshfzjCot4CyOFMBtktkSCkITj9EItJNSW2LfjcRsQ604iD6GBPUqjzsLQR+bRl
 CyHJkjLyXYIJBd0VRjJD49vUrrO0dg7S1Bpl+DoZW2KSIuPXa5fDFJhblxr6rgOrIxDJUV9AZ
 +eaMywetvHKz5+RuIOlu9J6BszfkEpc4cYdzcB8xPSFWqxjdadRzkhk/bnNDqQrvFl105K8Ki
 qFM8HGAVwfH36/Dl4ld6ZBEtJ1RXfY6GrA5UMQ739LHa5MogqyXbUfAxHTvCxnqN++wzh1Jvh
 gMKWSotvjuvyHsR+z7XxBQvOuYOYdxrYdLkgdXSfc+WYxQF+5IuPlhsirGyD2voblDfCo2EZw
 iepxgCQG8O1XmFkivvmHweZlyjZTJ6YGpDZN3KtgkrTG0=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: Al Haji-Ali <abdo.haji.ali@HIDDEN>, 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > I don't understand the logic of window--delete.

It mainly tries to deal with the auto hide mechanism.  Other then that
it looks pretty innocuous to me.

 > But maybe
 > window-deletable-p should also check for existing tabs in tab-bar-mode
 > and return 'tab' instead of 'frame'.  Then window--delete
 > could close the tab instead of deleting the frame.

Governed by an option in the tabs code, I would say.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 6 Jun 2024 09:20:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 06 05:20:23 2024
Received: from localhost ([127.0.0.1]:52340 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sF9IF-0000QK-8c
	for submit <at> debbugs.gnu.org; Thu, 06 Jun 2024 05:20:23 -0400
Received: from mout.gmx.net ([212.227.15.15]:44593)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1sF9ID-0000Q6-Kv
 for 71386 <at> debbugs.gnu.org; Thu, 06 Jun 2024 05:20:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1717665600; x=1718270400; i=rudalics@HIDDEN;
 bh=Qxo9zjF+NymQJMU8HklyUiKNfZLxnBwogPDYETiXdng=;
 h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
 References:From:In-Reply-To:Content-Type:
 Content-Transfer-Encoding:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=rXoxfB4e4iZcmeO7Lbyol6sH4RbTDs64o6E0WiYJkarfzublTf/OX5TKBi9HfmGn
 AzLmYSr6s/EvKUUW8QrOv+akRTKKFhABNkHQHgVV5erw6NdlSQaAQsT/ITkeCydg6
 /mqrdebYxcBfEW9049avHo9+MxwcjjGO12S03z0u9o1raNNkFkowoC3Cy2QfAGl29
 5A8sqp4rW5tDn2Re7OMGZ0u0SMfEFZ9DipRIwITGYiEQSQOwACrK5+1bAFLJT6Jbp
 cKHDTZjpQVsijCm/s3Jxc6gSP91e+uLf4OaKKVPfKwCwX2c2ricCtJzWolfuWNyTA
 4LQCIrLIQLlfMKLNsA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.83]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MC34h-1s9KH71COr-00C5VX; Thu, 06
 Jun 2024 11:20:00 +0200
Message-ID: <7269c7c4-86a1-44bf-8d5d-378c3584027a@HIDDEN>
Date: Thu, 6 Jun 2024 11:19:59 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has multiple
 tabs
To: Eli Zaretskii <eliz@HIDDEN>, Al Haji-Ali <abdo.haji.ali@HIDDEN>,
 Juri Linkov <juri@HIDDEN>
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86ikymipzx.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:q3gESVkSxSbm8NEGcqCFkcLaom48+MGVRbLiEy4hKWCWMiSBacU
 hIKboOcfVqhgVQ4ZQC382msm/vKC1QUQXygAlBHPFJnTAXtB7AvLJHcQPDCKf0pRh5QzFHF
 ZM9YBcudrMtPTmy56MfcYYsqwOBKhQdNrQaVjvIgixpTgnAP0wv2v4MnkWw6WzmnHnVv52C
 7/WfY6RKXdMAw3czb5/VQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:LkpJACSyBVo=;AwiVbs4MYC8Yg5tjgZDBQqCnOZQ
 CBRknvlZY7bHfcF3JqL92ieXUDk8YUr8mfFEEIEI33+lHkzZ/+AlY5YXvoHIblGMcs7tIETm2
 HywtnmhaacMHSkzoxonHA6AV1a8Ng4Dl9sR57cqv12jiZSrHTaUx9qr7ncAdn18FZnb8qr7Cw
 9ZKh4WXh9qcYteNYHKsQBaDqLRFTQzhgf5gvls6IsNsNt+XLV4b8ZE3vHm7MvcQ1G2Q9lsBop
 xEQXb+zV1+sGzIi+iY12AVTmkucH1X7dWAxYY9kj2LMtGR31ayIXL+D+2M2ZXQqkYDO2o86Pz
 hOeyvvJvOpnct/wrY0kVZMD3VWagmziM6WCVIEb8nljvGGrHgjpbz+GBWyHMqnT9IhR1h7Hpz
 Nd8rPr5jTali67td6USw26C1w7FciFdl3U3AlHiqXqcUum9jpG6vF/nl2dQoOaHXsrDiGj+Bc
 /Dw8v/kUmFdfS/ROebYnX+CjtRgZ3fgjeVdYltgb7Fs/+MHqOFJ7XCaA/4k1Ea+p1LfxHIDKc
 S3i568CHuWAX8jvAfkpkCa/sQLMl1TJTObP7nLuMJSZ+t5s5KdeJE5zQ2Xm61wM9jaB24XYxy
 tlGRCLmwHrQ9HtLfYfDVMNfonxEITELkU1bHO7O63HyCdQ2YwCTZpYeX2WKCwL/B9KuKX/ilU
 3ntKCHz44kvIAugJWHXuwZk8WC0T8DGay0+eiehqOweWRcwacYzCXRvtJ2eLmWu0jtVTsgFMO
 SEc78BSUV8v/WOWpnjMJSJnwUK4qTbsUlXLe/fDb9lccd76Xx4xeT56hG7wt/98P0XMEWZvJC
 MnXVoOkk+yw+RFppyN350ZwHdmeRAaFSUqfW14034znF4=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> If I open a frame with multiple tabs, and one of the tabs has a
 >> dedicated window, then kill the buffer with the dedicated window, the
 >> frame is deleted along with its tabs.
 >>
 >> I understand that this is the documented behaviour, however my
 >> expectation is that the tab should be deleted but the frame should
 >> stay when other tabs are available, similar to how the frame is not
 >> deleted if other windows are visible.
 >
 > I'm not sure I agree with you.  Tabs are just saved frame
 > configurations, they are not real windows.  If we make this behavior
 > dependent on tab-bar-mode, we basically introduce an incompatible
 > behavior change in this particular case, which people and Lisp
 > programs out there might not expect or like.

The current behavior of 'replace-buffer-in-windows' has been taken over
from 'quit-window' which Richard initially designed as

     ;; Get rid of the frame, if it has just one dedicated window
     ;; and other visible frames exist.

It is not carved in stone but if we want to change it for the tabs case
we should leave it in place.  So I think that Juri should provide a tabs
option that has 'quit-restore-window' (which 'replace-buffer-in-windows'
should call) spare the frame in that case.  Which buffer to show in that
window instead (especially if it never showed another buffer in its
whole life) is another question.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 6 Jun 2024 06:24:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 06 02:24:40 2024
Received: from localhost ([127.0.0.1]:41736 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sF6YC-00015N-L1
	for submit <at> debbugs.gnu.org; Thu, 06 Jun 2024 02:24:40 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:49089)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1sF6YA-000157-QQ
 for 71386 <at> debbugs.gnu.org; Thu, 06 Jun 2024 02:24:39 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id A592C60002;
 Thu,  6 Jun 2024 06:23:57 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#71386: 29.1; Frame is auto-deleted even when it has
 multiple tabs
In-Reply-To: <86ikymipzx.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 06 Jun
 2024 08:45:06 +0300")
Organization: LINKOV.NET
References: <m2frtrhs4j.fsf@HIDDEN> <86ikymipzx.fsf@HIDDEN>
Date: Thu, 06 Jun 2024 09:12:10 +0300
Message-ID: <86plsuppl1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71386
Cc: martin rudalics <rudalics@HIDDEN>, Al Haji-Ali <abdo.haji.ali@HIDDEN>,
 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> If I open a frame with multiple tabs, and one of the tabs has
>> a dedicated window, then kill the buffer with the dedicated window,
>> the frame is deleted along with its tabs.
>> 
>> I understand that this is the documented behaviour, however my
>> expectation is that the tab should be deleted but the frame should
>> stay when other tabs are available, similar to how the frame is not
>> deleted if other windows are visible.
>
> I'm not sure I agree with you.  Tabs are just saved frame
> configurations, they are not real windows.  If we make this behavior
> dependent on tab-bar-mode, we basically introduce an incompatible
> behavior change in this particular case, which people and Lisp
> programs out there might not expect or like.
>
> I'm adding Juri and Martin to this discussion.

I don't understand the logic of window--delete.  But maybe
window-deletable-p should also check for existing tabs in tab-bar-mode
and return 'tab' instead of 'frame'.  Then window--delete
could close the tab instead of deleting the frame.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at 71386 <at> debbugs.gnu.org:


Received: (at 71386) by debbugs.gnu.org; 6 Jun 2024 06:02:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 06 02:02:58 2024
Received: from localhost ([127.0.0.1]:40577 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sF6DB-00009P-Mw
	for submit <at> debbugs.gnu.org; Thu, 06 Jun 2024 02:02:58 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49620)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sF6D7-00008r-RN
 for 71386 <at> debbugs.gnu.org; Thu, 06 Jun 2024 02:02:54 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sF5vy-00025A-18; Thu, 06 Jun 2024 01:45:10 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=73z2TLx+Qy1OJuS7f5DKJA3M+JviVVmWHxCOi0m4N+A=; b=d2X8VnZCpc+s
 25Sv6nZ+S+Oci+nNRx/bImPzgNC7AGZzBNG2WSYNI80DoogcQFV0iqFS8FYnoC+84ekoEQdyFstdA
 phntBtMMvXZZcuxkeouSed90NtI5Nbe4/xylzGW/fUsTFBVKryEl/HsyLq2gDriQZsYGuBaA18tDx
 Fy8yEI1Nr/tCpdycpqNN506KCpF+5nHyb0SlMAYsjC7rsOeAuMFexYaWnmmtasS/sADp1gkvHqHGu
 PzTtLhErwj2JrbKtT2IR4O7D4W5rgjCFeyP6YyUD7oMfT5FEDuJYPNoFOWQhxwcoejvxR4otRpYyH
 VAtqD72VVi4fAloI09sUnQ==;
Date: Thu, 06 Jun 2024 08:45:06 +0300
Message-Id: <86ikymipzx.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>, Juri Linkov <juri@HIDDEN>,
 martin rudalics <rudalics@HIDDEN>
In-Reply-To: <m2frtrhs4j.fsf@HIDDEN> (message from Al Haji-Ali on Thu, 06
 Jun 2024 00:44:28 +0100)
Subject: Re: bug#71386: 29.1;
 Frame is auto-deleted even when it has multiple tabs
References: <m2frtrhs4j.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71386
Cc: 71386 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
> Date: Thu, 06 Jun 2024 00:44:28 +0100
> 
> 
> If I open a frame with multiple tabs, and one of the tabs has a dedicated window, then kill the buffer with the dedicated window, the frame is deleted along with its tabs.
> 
> I understand that this is the documented behaviour, however my expectation is that the tab should be deleted but the frame should stay when other tabs are available, similar to how the frame is not deleted if other windows are visible.

I'm not sure I agree with you.  Tabs are just saved frame
configurations, they are not real windows.  If we make this behavior
dependent on tab-bar-mode, we basically introduce an incompatible
behavior change in this particular case, which people and Lisp
programs out there might not expect or like.

I'm adding Juri and Martin to this discussion.

> The following code illustrates the issue:
> 
> ,----
> | (with-selected-frame (make-frame)
> |     (tab-bar-mode)
> |     (switch-to-buffer (generate-new-buffer "test"))
> |     (tab-bar-new-tab)
> |     (switch-to-buffer (generate-new-buffer "test2"))
> |     (set-window-dedicated-p (selected-window) t)
> |     ;;(kill-buffer)  ;; Kill buffer manually to see the issue
> | )
> `----
> 
> I am unable to test this on Emacs 30, but I checked the source code and `window--delete` in `window.el`, which is the function that I think should be changed, seems to do the same as in Emacs 29.1.

Emacs 30 behaves the same in this regard.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Jun 2024 00:10:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 05 20:10:21 2024
Received: from localhost ([127.0.0.1]:49530 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sF0ht-0001wg-4B
	for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 20:10:21 -0400
Received: from lists.gnu.org ([209.51.188.17]:58024)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <abdo.haji.ali@HIDDEN>) id 1sF0Ma-0000zh-US
 for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 19:48:17 -0400
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 <abdo.haji.ali@HIDDEN>)
 id 1sF0MM-0003XW-D9
 for bug-gnu-emacs@HIDDEN; Wed, 05 Jun 2024 19:48:02 -0400
Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1sF0MK-00081c-Uo
 for bug-gnu-emacs@HIDDEN; Wed, 05 Jun 2024 19:48:02 -0400
Received: by mail-wm1-x32d.google.com with SMTP id
 5b1f17b1804b1-4210aa00c94so4310775e9.1
 for <bug-gnu-emacs@HIDDEN>; Wed, 05 Jun 2024 16:48:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1717631279; x=1718236079; darn=gnu.org;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=x3Od+kHQiYw10KJUCEWfl19VRFpwdq31FvZ+w9rMBwk=;
 b=UgZcV+4+3dLMgPjoSj/Y+Xv3ilfC2FneLUE947mnGQ7SVQgByEhJhcm3iLgeuwCTiR
 vfwCFbkfauNYw2z4zCM+NomHh+LDCnr/3PGjN7PM5w03H1YPBs+VKioO0iqRbyRmE9L9
 AsWQpRVeIXWN1RPoUsasZi8ksCqDUAcL0+Ons+AmUvoxQ44IC8Hj9jqi3JqJvdDLaTvw
 xviGQJUdHl6CUoV0LxSL/lP3YhCzWJJHijAvvTxEq2yDexUhCU8U/pQwixNikYujgnUS
 mH79kB8NP8RW9zz+0/y7u/Yu1vaY2d8yaGObDWKz6CggLb0ghc1BAtRSVNuaXWfSO8Y0
 DTXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1717631279; x=1718236079;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=x3Od+kHQiYw10KJUCEWfl19VRFpwdq31FvZ+w9rMBwk=;
 b=hBfSChgRpXlQSL0lpo2tnVgVHGiDQmYnZyurlriBFev2OdAl4BI8Deg3iYPkJh8d/I
 UoDa9IqlMilYxv/YPiKb+ENYBkNcHpHEMaCYkGCSSDICGDjmsbfQb/lGjcVh1U/af3Bg
 K9JhMRP2+QtWksv+djhAfDQBUE7OV2MtzkFIbebhcpdtgbw1oV/EUZ7Uue1+0/vjfEVx
 0v3986Pw01qvZJkS6/DogeUNsrNwEtjaqQvd7WulSNOevVVL8JSYfY2XGBVTQam6jyu2
 pmlItOPBX6ER7Z7Bb8uZgomxNvQnAXG1A7z/RCMcuwkpHsvq7EGcZkz9Aw3STqhC9fYf
 nutQ==
X-Gm-Message-State: AOJu0YzvkqA/QbddzddEs1QvHJEe5stBbQm6gGVFzM2j040tfbCNf5Xc
 KVdb+y1Hu7VL5IsnHhfwgEOkMjwQxVldOuOT19GGmEUbhJGBpj0l8Mi7cw==
X-Google-Smtp-Source: AGHT+IEPZBuKNU1xrSjK9yVdIw6j3QtCYitqYpnx/KjWPq6rXszr3B03IowdD5G0/uTcollRdnn2mw==
X-Received: by 2002:a05:600c:3108:b0:421:2cb3:160 with SMTP id
 5b1f17b1804b1-421562df35amr31929455e9.8.1717631278587; 
 Wed, 05 Jun 2024 16:47:58 -0700 (PDT)
Received: from localhost
 (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-42158102ab8sm37741965e9.18.2024.06.05.16.47.57
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 05 Jun 2024 16:47:57 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.1; Frame is auto-deleted even when it has multiple tabs 
Date: Thu, 06 Jun 2024 00:44:28 +0100
Message-ID: <m2frtrhs4j.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::32d;
 envelope-from=abdo.haji.ali@HIDDEN; helo=mail-wm1-x32d.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


If I open a frame with multiple tabs, and one of the tabs has a dedicated window, then kill the buffer with the dedicated window, the frame is deleted along with its tabs.

I understand that this is the documented behaviour, however my expectation is that the tab should be deleted but the frame should stay when other tabs are available, similar to how the frame is not deleted if other windows are visible.

The following code illustrates the issue:

,----
| (with-selected-frame (make-frame)
|     (tab-bar-mode)
|     (switch-to-buffer (generate-new-buffer "test"))
|     (tab-bar-new-tab)
|     (switch-to-buffer (generate-new-buffer "test2"))
|     (set-window-dedicated-p (selected-window) t)
|     ;;(kill-buffer)  ;; Kill buffer manually to see the issue
| )
`----

I am unable to test this on Emacs 30, but I checked the source code and `window--delete` in `window.el`, which is the function that I think should be changed, seems to do the same as in Emacs 29.1.

-- Al




Acknowledgement sent to Al Haji-Ali <abdo.haji.ali@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#71386; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 3 Apr 2025 16:45:01 UTC

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