From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar 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, 17 Jul 2024 01:14:09 +0300 Message-ID: <44289.2625973158$1721168146@news.gmane.org> References: <86fsds8mlm.fsf@mail.linkov.net> <86plsxmc6d.fsf@mail.linkov.net> <86r0d4ezdc.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> <1fb1cc7a-b8ea-4d6d-ac6d-19abffef44f3@gmx.at> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16087"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: rudalics@gmx.at, juri@linkov.net To: 59862@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 17 00:15:38 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 1sTqSP-0003vf-MN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Jul 2024 00:15:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTqRs-0006md-91; Tue, 16 Jul 2024 18:15:04 -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 1sTqRq-0006m7-DR for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 18:15:02 -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 1sTqRo-0002ZM-Dh for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 18:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sTqRr-0005mH-0G for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 18:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Jul 2024 22:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59862 X-GNU-PR-Package: emacs X-Debbugs-Original-To: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: martin rudalics , 59862@debbugs.gnu.org, juri@linkov.net Original-Received: via spool by 59862-submit@debbugs.gnu.org id=B59862.172116806222128 (code B ref 59862); Tue, 16 Jul 2024 22:15:02 +0000 Original-Received: (at 59862) by debbugs.gnu.org; 16 Jul 2024 22:14:22 +0000 Original-Received: from localhost ([127.0.0.1]:34548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTqRC-0005kq-69 for submit@debbugs.gnu.org; Tue, 16 Jul 2024 18:14:22 -0400 Original-Received: from thaodan.de ([185.216.177.71]:38468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTqR9-0005kU-J4 for 59862@debbugs.gnu.org; Tue, 16 Jul 2024 18:14:20 -0400 Original-Received: from odin (dsl-trebng12-50dc75-154.dhcp.inet.fi [80.220.117.154]) by thaodan.de (Postfix) with ESMTPSA id 96491D00030; Wed, 17 Jul 2024 01:14:10 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1721168050; bh=JkUCfw3/Iuujbfnmh21NeLuyyO7tsB5IxRhMqbbVY5Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=nv5sK/7GLyPMBoe9XhFyVZJBVlhN+PxH6WHKux/M/lPXbR2/XxIAI8nQ4aqJznuxG O2JigzzyWWx9Wp1LtbHS1zoturd4x0oHZyP+lotFNh1LGWeE9t0nYtIUFdVeajd9s0 eZy6Lw38QxClI6djGj2q4hnQN18JgriyFWcFXzKwJliHGF5E9Z7WHjHUuy6B1xwO2Y lNmqoQ79ricEhReyw+HqIT1Wt9ehEhz6yFwwcQU+Yq4r8ZfT5V8FZM8RRN75SqP3Jj 3+6uytSYP2ZMaujSikhDOHHjlylEMwOjJydGMbSnRy5ERaL0VT3UBsZbzAl7ta7PeP fDxwgPQwBGFNzXsvWRPVC5ncXqBse8n9LV8q3lOl0JIV7Webgia8o60qnLhEdG1UKm I3T8HOQFAdRA94PoVmwdl2FoPdaNUdvlWX1fAYrg8Yyc+bPTz3rMW66hknmwSPioJs c2hxSwUTPkYGlsQpPT584ercZL4v9NxQwABWlS1LD6mjjaKyws36YeDdsOiyU346Rj mMwWymWcBUuXuFYP3isMNAjOWtgqTmSsBCeAjsMZM/bB8hdNQURG2S/Eib3eeWQdm6 rJwz99Ug9r6jTTzrhZzjI6UL+G9H6IMwIxFgv+pDWG5lalP0iOvESvIlE8XPyYvOHi r0rErZ9LfT4maR1Dz9CESgCQ= In-Reply-To: (martin rudalics via's message of "Tue, 16 Jul 2024 10:22:34 +0200") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH 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:288897 Archived-At: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: >> What about use cases where the frame was only spawned for that >> particular window? >> >> For a frame focused setup frames mostly contain only one window and >> don't close when the only window in it is killed > > Do you mean "window" or "buffer" here? C-x 0 in a frame containing only > one window gets you an "Attempt to delete minibuffer or sole ordinary > window" error. I suppose you meant "buffer" here. I meant window. Same as you explain further below in your message I call quit-window on a dedicate window the frame also dies with it. >> leaving a window with >> the scratch buffer around. > > Let's distinguish two different cases: If, after evaluating > > (custom-set-variables > '(display-buffer-alist '(("\\*info\\*" display-buffer-same-window))) > '(frame-auto-hide-function 'delete-frame)) > > you do C-x 5 2 then C-h i and finally q, the second frame will stay > around and show *scratch*. Alternatively, you can evaluate > > (custom-set-variables > '(display-buffer-alist '(("\\*info\\*" display-buffer-same-window)))) > > do C-x 5 2 then C-h i and finally C-u q which also kills the *info* > buffer. These are the behaviors needed for handling the Bug#12764 > scenario. > > If instead you evaluate > > (custom-set-variables > '(display-buffer-alist '(("\\*info\\*" display-buffer-pop-up-frame))) > '(frame-auto-hide-function 'delete-frame)) > > and then do C-h i followed by q, the second frame gets deleted. > Alternatively you can get the same visual behavior via > > (custom-set-variables > '(display-buffer-alist '(("\\*info\\*" display-buffer-pop-up-frame)))) > > followed by C-h i and C-u q where the latter also kills the *info* > buffer. > > In the thread of Bug#12764 I argued that deleting the frame would make > sense in the first scenario too. But then we would have to look into > the history of the last window on that frame to decide whether the > buffer it previously showed should be restored or not. Even if there is > no previous buffer for that window we should at least optionally allow > the frame to stay alive. > I very much agree with you on that point. I think if the window inside of a frame didn't contain any other buffer than the initial buffer and a new buffer that uses the same window there could be the argument that the window should die and thus the frame too.