From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59862: quit-restore per window buffer Date: Wed, 9 Oct 2024 10:46:05 +0200 Message-ID: <6272a373-1e7c-4df9-b0c2-e535ca3fe49b@gmx.at> References: <86fsds8mlm.fsf@mail.linkov.net> <0d01a044-d7d6-456a-9ba9-d987faad4332@gmx.at> <86frthjq4y.fsf@mail.linkov.net> <743dc4dd-cf09-4c5e-9209-b63a47480e0b@gmx.at> <86msnne7ut.fsf@mail.linkov.net> <86plsgrfvu.fsf@mail.linkov.net> <86le2b12ni.fsf@mail.linkov.net> <86y169kafb.fsf@mail.linkov.net> <61c4f245-3dd8-4e24-9c84-7ddd4cfe3c49@gmx.at> <86a5ioo269.fsf@mail.linkov.net> <867cdr3xs7.fsf@mail.linkov.net> <3f399d4f-3dd2-4624-b857-e198f70b5565@gmx.at> <86h6csct0w.fsf@mail.linkov.net> <38aedd8d-8966-44eb-afc0-79b4db412483@gmx.at> <86r0b9tqo3.fsf@mail.linkov.net> <22c18c89-b288-4c2e-83ae-11fd7cb1ec24@gmx.at> <86ed78w7t4.fsf@mail.linkov.net> <86msjefqfa.fsf@mail.linkov.net> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33576"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 59862@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 09 10:47:18 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sySLl-0008YX-TM for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Oct 2024 10:47:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sySLU-00066z-9P; Wed, 09 Oct 2024 04:47:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sySLN-00065x-SW for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 04:46:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sySLM-0002Oe-Sn for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 04:46:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=HTwuS9eSTBAZUn20YxzcEeCKpX5GLhNmlUITTK9LJ0M=; b=LXwppTIwv6Tmh/PJpHnynfLx1ErIpR1YsWE6O/RlSSeNwYrw3ls1QuTijP/zmZw4KRTqmbE4CR/GfoJ5P6F8EysAmt56dMd7AmpORzZX1nEUOQY60e091meTzvZZjEuGnNEUprNFC01BgjLaVVhEpDGzf0sie0J8s0TjDeON2i5EHnTKrAWC7IU9xSMh5GfX0SkgprsWQdmuNRRPv4FZIFsdomBzz0KM4ZAeV6dy2CJ69wHt5XbcjfnIm9QOpYvTVVLhrKVWxW3Lr9h2O46U9Fxinb+0Hv8EWZZPxigvOGLrVHPjjXG5t4fD7pSD++MgvCmavgYAeg2xbKUnBWhSXw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sySLW-0001KK-Ie for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 04:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2024 08:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59862 X-GNU-PR-Package: emacs Original-Received: via spool by 59862-submit@debbugs.gnu.org id=B59862.17284635855029 (code B ref 59862); Wed, 09 Oct 2024 08:47:02 +0000 Original-Received: (at 59862) by debbugs.gnu.org; 9 Oct 2024 08:46:25 +0000 Original-Received: from localhost ([127.0.0.1]:55587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sySKv-0001J3-HS for submit@debbugs.gnu.org; Wed, 09 Oct 2024 04:46:25 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:57713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sySKs-0001Im-Ld for 59862@debbugs.gnu.org; Wed, 09 Oct 2024 04:46:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1728463566; x=1729068366; i=rudalics@gmx.at; bh=HTwuS9eSTBAZUn20YxzcEeCKpX5GLhNmlUITTK9LJ0M=; 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=sItRkUtwoMZgb07qE7adGMr/kTFRqOxQU2Sta/0ByO3DAwszMOzu+qRKwxf4Y62o vW7PCblUsxn64HoyQqMHGtu0o7q4oN1KlfZbCYtkZ2AGEh1hpSVOf5JayES3jLUgO EtzqDQrlmcb4QPZTS9YXGxS2Gem9+sFArTuq/h7zPjTtovuIl/EENPcnL7BvAb0zX J21qW4Rr24ubEhL21P/yYxni2t94U4d7TNY+a3NdAadIiAsv5bF7V2H3PUvmXhe9C ZYpzZKLNtt3AJp5UHe0YCJNh/zgrj0BzXUuHMM/ky7WVwWhoDO7yj14m0shHRUU86 2xC5x/KqZmLBDTrFkg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.219]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M8hV5-1t39Id0skL-0011YJ; Wed, 09 Oct 2024 10:46:06 +0200 Content-Language: en-US In-Reply-To: <86msjefqfa.fsf@mail.linkov.net> X-Provags-ID: V03:K1:nMknrlrbcxuBpy2HdCniBt8a4bL3pIdsvbyYaGm4X4Q5Bbbjs+7 +gKFq+CJasBZo0vt9UrgG3yTOnhTzdtnJZEGmEh20Bl6we3PGfD2aRTBy9kc3iQqeH7pF2v g5PVI7fP5Vtv/8Khgms7w6Z0GoMUXjxjdl81rMvLIzFx5lveUqumSZnZ9YSq+BqA8MpRUm2 iKrUrB9KYb131QXVD2tHQ== UI-OutboundReport: notjunk:1;M01:P0:AVhTe4oJTbc=;Y8ZsyjI8bBlJ1tnbiicISkOQhmZ slnMKZgEOvUwDpqabzo8m4Ze/zqMHeJe9uXPV/T4dn0nRwDvs6Pbz5G9lbsmhBDFvdi60ehbU dZlgaCGnAtLq7/t3yBBrh6rlgwzZGB0TNvhO60XndJ7SZV4wDhAZnJ2GHTXVsMtpOEsZ+2EKM hcHQBZuDrgvE9mIdx3QqQlx8qXaoyJ5F1zEqk041rcs7KIaggBbolk/JnSFePdGxuF2d9Kltl yBQQQ2dxcQSYcbbNhDXhK+NeceY0uu4Mohz7MC7ZW/mEHL2ndpXHKKx3Ix9CPpV0FA0A1Drb2 dmK/8Vkssti/oXgh61nEF4lYJu0lJAJ0UJr0CXLOfM0n/KlpsjqfP452kf3nbvpnN6YtBgpIR toloE0S/pQOoYB3uOEZa5PdBbLEIZLVljspNR+N/F1o0YOsJS13kqe+MR413aVLcc1DzqJfWK djISmVbjdKGaxlAfh5Px7HifnhF070hKKvGR8MbMCYbBmJHnKcyeKLNwjJPB6I46HtEM7Ae6E h9KB5cxWzSmtsNqCERlJzldSAj12JZnbnPArwwgbvhagM3NbC26Uf+2J7rvPRZZcRZMkTaoxc +vpsFsK+ND4fXpJQky7EYkQlCKi6S9OyFmKrMH+CrZZ0I+oLFUFcNBWOTIuDL79j7Z6wPrfre 5Nn2Kms0VKEKHvT//niLxuNFGRNWwbVE9maMzD9j20cvwSrmxYKNRphH6o53ijEIQYD4xCszc z/ZF16U+WXbDs4wIRi3naOWeE2jWk0SNvB9DlouJCdTmvvJSVOV5Jq4vVKIF1SYZ/LlQwka0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293190 Archived-At: > > (defun tab-bar-window-deletable (window single) > (if (and single (eq (nth 1 (window-parameter window 'quit-restore)) 'tab)) > (progn (tab-bar-close-tab) nil) > t)) > > (add-hook 'window-deletable-functions 'tab-bar-window-deletable) > > But 'window-deletable-functions' is not called at all, > because 'window-deletable-p' first checks > > (frame-deletable-p (window-frame window)) > > and a single frame with tabs is not deletable. Why "with tabs" and not just "a single frame is not deletable"? > Also instead of 'frame-root-window-p' in 'window-deletable-p' > the tab-bar needs to use another code. I don't understand the problem yet. 'window-deletable-p' calls 'frame-deletable-p' iff WINDOW is the root window of the frame. At this time we can only either delete the frame or show another buffer in WINDOW; tertium non datur. What am I missing? martin