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: Tue, 16 Jul 2024 10:22:34 +0200 Message-ID: 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> <87frs9kgve.fsf@> 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="6389"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: juri@linkov.net To: bjorn.bidar@thaodan.de, 59862@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 16 10:23:13 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 1sTdSq-0001Rl-TG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Jul 2024 10:23:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTdSg-0004JC-PB; Tue, 16 Jul 2024 04:23:02 -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 1sTdSe-0004I7-M2 for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 04:23:00 -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 1sTdSe-0000ei-Cg for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 04:23:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sTdSg-0003Zh-6B for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 04:23: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: Tue, 16 Jul 2024 08:23: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: =?UTF-8?Q?Bj=C3=B6rn?= Bidar , martin rudalics via Bug reports for GNU "Emacs, " the Swiss army knife of text editors X-Debbugs-Original-Cc: 59862@debbugs.gnu.org, Juri Linkov Original-Received: via spool by submit@debbugs.gnu.org id=B.172111817713731 (code B ref -1); Tue, 16 Jul 2024 08:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jul 2024 08:22:57 +0000 Original-Received: from localhost ([127.0.0.1]:60927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdSb-0003ZP-3s for submit@debbugs.gnu.org; Tue, 16 Jul 2024 04:22:57 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdSY-0003ZG-RG for submit@debbugs.gnu.org; Tue, 16 Jul 2024 04:22:55 -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 1sTdSW-0004HN-1k for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 04:22:52 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTdSU-0000Xo-38 for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2024 04:22:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1721118159; x=1721722959; i=rudalics@gmx.at; bh=ygpYlppB5HhVCRMnG3MPwCjQwpYhTW0+IXQ/+ZuEW+k=; 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=mxBpbgx5VoOfbIUvc6Z+H5VeKf2zv6eTUF14qu3j8T5QZpI/C13QAtV01ZsOC/YX 6jFLBu5jD9ZV0GnRy1m8qg7+eH0uh7McV3oDVq4KfoMOaDhIWsiyyMy2cXfBD1tRQ qXF8mP1z08prlTGaOgqWns6199uIxQdM6/LQwWA2yv2DfqCOuWDcL4ktQeIwoEQCM z4QvoXQkuAvFNnzlXfwX9vZjLK5yEdNV56ACgWKbrw764uSNh/j1QWJhol59utf/6 dkPg+h4bEwFHRO8X0Mj6xlZovB7ngNdbWmOvoZ10Hw0/FQMSjw33uPqBYCgmxQJt6 XX+uDl0uDUyak+sYFg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([46.125.249.102]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MDQeK-1sakTA03ny-002Aig; Tue, 16 Jul 2024 10:22:38 +0200 Content-Language: en-US In-Reply-To: <87frs9kgve.fsf@> X-Provags-ID: V03:K1:FiIVgqZdbamrxEH/JE1d7rT99w4pw3n6Wv5EX9CgjcEb0agG1ir AzHyHT+QH+GXd5CxGSoGISAGwhSTl3AVBbCXsoDn9Ku0smiZXjfyCG68/87VSYXs1Gt9vzb Cb2ccuowfpGI78yxu6pM8KkZD7YgY2+vqrwKlsWwhicZF3Z5IOJLp25VcQa8s1hgjuYptDI AvXrIM6J+jKQkmZXzpqtQ== UI-OutboundReport: notjunk:1;M01:P0:z0ymmL1P0Qc=;zIjQWwrUIapC4YxZPgZgRPpzBbY ZS4EWi+3iumQnuFiWCSZgOyhCwNH0nPfZu3kxrW1zjp58opj+IYLYYStViW3AKq3OepC7dKUQ RZNjthA018AoY2ItUsV3IX0HFbRj0AtSfl/YvHbBU2fXam8LCjR++sHt+JYeooKg7IoLPrQAA x349qWiD1Ig52jX0rAEsqkvqyroLGWNsrk+Z4OazEDIYuR8M1+MKV+b0M+Uf5U4nL/q0rZRgd isGoqXrRvLamgjQolDGl7ecQfUjF2OdsggdmVnhmCQ/eYLNC0v60inP4a8M4XWa57G0pT7ujG CRwcOkV8HIDuMu6H26Eexpqn6rkPFxMyipT4zciEedxXqt+A2F19XbRS/UDzeUWo1vCiXhvEo Esmxz/QJ1JUeDMDMX7yoXbC0gHlI/M55OVByj245PmHigYImZsfYO1b1uyPnUk431tBlKNGp3 t9wgECbAt2i2W7+o4aZ8SbeGXmthf/YM4oMoP86fodByKqVbViL07F9y1KDCxj/rWyM+GoCSg Z6riEYkENtNdp3gBuqdzmc0Mdq0ulLinhjBi1n9/4rIZDG+vX3LkKibrjK31xmSi+RzkCRCmS nRUZOXFRjxub+9GG+gwJ5cAJHuxCeUG1d9j67qhCQMzRaFMq/X+MFPywFQv/5AEAMZcThohQF 54pjG8dMNMOf2506PsMfcvn/EFupstcCsVv2WWF76M3ti8gaOO5L4eqxv7Qd7x+n6qUAiC1wk h5oq1r0rgUmhg5lMSBaErfCImhES7SppS35B2anOtOWul0927KmGhGRpnp9wHvZYYpuFyDFB Received-SPF: pass client-ip=212.227.15.19; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:288883 Archived-At: > 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. > 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. martin