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#71386: 29.1; Frame is auto-deleted even when it has multiple tabs Date: Mon, 10 Jun 2024 10:00:28 +0200 Message-ID: <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@gmx.at> References: <86ikymipzx.fsf@gnu.org> <7269c7c4-86a1-44bf-8d5d-378c3584027a@gmx.at> <86zfrx8ec0.fsf@mail.linkov.net> <8561a63a-66d3-44cd-872f-73d26af7edbe@gmx.at> <86msnw4qm4.fsf@mail.linkov.net> <86y17gej2x.fsf@gnu.org> <86y17gmxdg.fsf@mail.linkov.net> <868qzehxie.fsf@mail.linkov.net> <86msnu9fhg.fsf@gnu.org> <86zfruc7qh.fsf@mail.linkov.net> <86ikyi9e2l.fsf@gnu.org> <86o78ac6ny.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="941"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: abdo.haji.ali@gmail.com, 71386@debbugs.gnu.org To: Juri Linkov , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 10 10:26:10 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 1sGaLy-000AYT-Dg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Jun 2024 10:26:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGaLc-00027D-1P; Mon, 10 Jun 2024 04:25:48 -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 1sGaLZ-00025u-V7 for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 04:25:45 -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 1sGaLZ-0001pK-My for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 04:25:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sGaLq-0003BP-G8 for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 04:26: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: Mon, 10 Jun 2024 08:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71386 X-GNU-PR-Package: emacs Original-Received: via spool by 71386-submit@debbugs.gnu.org id=B71386.171800790811990 (code B ref 71386); Mon, 10 Jun 2024 08:26:02 +0000 Original-Received: (at 71386) by debbugs.gnu.org; 10 Jun 2024 08:25:08 +0000 Original-Received: from localhost ([127.0.0.1]:44702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGaKx-00037J-Iv for submit@debbugs.gnu.org; Mon, 10 Jun 2024 04:25:08 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:52569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGaKv-00036U-14 for 71386@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@gmx.at; 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 Original-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 Content-Language: en-US In-Reply-To: <86o78ac6ny.fsf@mail.linkov.net> X-Provags-ID: V03:K1:2XvnHYnQfWDnsxRLytD2msc33jcCC49D+adDc/uO1L/8h2lOvWH kMH2/ffiRqvzTPVkfu/30HS+3XsxQo0mi8VBKio4ULtFiKrmVwPBsUq4dXETNNPYHrtrOsm l1RpW3uhqYBlYFcz8hwj0WSGsuua587mOEQQOj7Q5Or1kL1tZXXBxOa/1QWmoLQ6UVl9pCz wBb3oL9Y3t1gIoMPlsCuA== 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 cbwSghsYCr2zj4fmCLRFGHf7f8uIWEN2DxZ47fScyz249Q8M2hdv3Re0iBJ4XyBm7ydxV5ir 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:287018 Archived-At: >> 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