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, 9 Jul 2024 10:52:03 +0200 Message-ID: References: <86fsds8mlm.fsf@mail.linkov.net> <86ttibq1w1.fsf@mail.linkov.net> <8243325e-ed03-4e9e-b64f-c8225fb6dc60@gmx.at> <18173da7-32e1-4f14-bbea-9a8fa66af7dd@gmx.at> <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> 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="4386"; 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 Tue Jul 09 10:53:09 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 1sR6ay-0000os-Gg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Jul 2024 10:53:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sR6aq-0001zH-QN; Tue, 09 Jul 2024 04:53:00 -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 1sR6an-0001ys-EL for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2024 04:52:58 -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 1sR6am-0004V6-OQ for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2024 04:52:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sR6as-00040M-2Y for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2024 04:53: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, 09 Jul 2024 08:53: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.172051514115349 (code B ref 59862); Tue, 09 Jul 2024 08:53:02 +0000 Original-Received: (at 59862) by debbugs.gnu.org; 9 Jul 2024 08:52:21 +0000 Original-Received: from localhost ([127.0.0.1]:52117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sR6aD-0003zU-Gp for submit@debbugs.gnu.org; Tue, 09 Jul 2024 04:52:21 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:44043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sR6aB-0003zG-42 for 59862@debbugs.gnu.org; Tue, 09 Jul 2024 04:52:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1720515127; x=1721119927; i=rudalics@gmx.at; bh=EHgvQDcOqjrJiPQOpIx77zzL4evUofoAwj3FniKinU4=; 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=eMJWD5QkSlFxzcp6/D1fQQRE8LhYtHXZ+rxiJYMJRwGEK5jmhvy/M2GJU88AdvpK OzTg9zEqwotdiEIqaESaWfIoZG88TQDPwvJ4uK9IoJ2jcjEpjmaSvThjjf9edPqsu dwh9GYxsdSlG+BLcwn82FAGijMImi3jq/qIuMNj3B650bdcDHyGdHIEMXoDM4CqQo 82RUifmHn/z5e1NqikfYcYhBqjsPtKO/+K3TpGnVQ3ogXI/0csEPGF3xPt69ZkcC5 +b+FBJy0M/UtH7azkQ+aZ4DWyGc+AN3nZ1KM/WEUBMB2jWNxDIj1w2Fk1g3ZrlNY+ GiGfD3vidD7pFieqOQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([213.142.97.150]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MNt0C-1skoFq49Q8-00SHnU; Tue, 09 Jul 2024 10:52:07 +0200 Content-Language: en-US In-Reply-To: <86le2b12ni.fsf@mail.linkov.net> X-Provags-ID: V03:K1:3p17tgocLDQzym3lw6RuAXvyNdu4S8UG8xeMwCCJz4v3TrI3mAi XohZPnmZCQb3Lg4aV09nNUaCmsJBueGJTj/QgVsAVjFwYzDWDlDqmr+YZef0zNTIHmXbZLj sNsWC55yCQHeV//tmI4I9uawuYfHLro6rHTL7JqfZncU9oShn/qNGij/Qk6FajbxHQV2GuE qK3b8laxTULTXmsabIe0A== UI-OutboundReport: notjunk:1;M01:P0:twvukzr3B4w=;JHCo683RM02fWgkgLciYfb5HdI/ DR72UqjDK4H/ikf/al88uBa0SoJ54shetzsk7Xq9d+0fVcqw66rlyN6Tv482q57rLeYBe2g1c rRd1UU1JWi/uHrB2Rj8drSVl4MSj8FvHydkaxU1eIy9eVrndxI8KOlW9xr006u/+I7kwDKeJQ wO9naWQ1vbVWbYupzw1yazRK6a4Nh8YuB4+i0IpN4n+sRoOrpxHBLQjP21zzzcm3ETE+EaCKN BoE9LBRQ8zfUR6/e4bjO4SdyiwQR/9R+qIctSFgQKqhEgMFVyPq7/U9sjzpIb+5KOos9ui5ET IDKFnYw4qanNrl7LBXT+Uk57+AGaCTkJGWCMAMUHe9BR9gM0kZyHZq2mNWVoQ0p5TRsKuZ1gA WhvB4aWG2KtjyXysyH6cBBVf1GNzY4wFDONMSwdBMhJzzkrzGeJiFRer38S4ad/lynt3esPF5 RmNYNDfWDAFzWk4nIW2Q9GVB0P8cu91EjVENHj85N3VN01T17uJHEmV5EDwr3teM6sTfXhr0r BHKrWq8V7v75oKZ4XF+k/zi1vdudVf8FQz1whMfKj+dO952Vw5W91xwHo1YAMX+NTq/tsuGPT 2AnFDpr/z1FG3ljKjLQMslTLGRneOCIwd0fB2OLY2ngdAZ7o4B9bkisVGyqnkWlvVm9QoAgZu +KqG7ryTSJfjaS5Q0VXmIK0oKu4bhdgMBycSdhEkEu8sZaJj3FznOPhu2r6dFD7JUS7DUX7q2 3bbmjTr29rxHsFUV5Iywx/bpA/Rk/Prh+PIj2TWnTbH407QFJ1RbYGSOPyH/IzigexJVySZB 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:288627 Archived-At: > I suppose it will affect only interactive uses of 'kill-buffer'. Why? It affects all uses of 'kill-buffer'. > PS: I noticed one difference between handling of frames and tabs: > > C-x 5 5 ;; other-frame-prefix > C-h i ;; info > C-h e ;; view-echo-area-messages > q ;; quit-window > This deletes the Info window, and doesn't delete the frame. > Everything is correct. > > C-x t t ;; other-tab-prefix > C-h i ;; info > C-h e ;; view-echo-area-messages > q ;; quit-window > This doesn't close the tab (correct), > but doesn't delete the Info window. > This differs from the frame case that keeps > only the Messages window on the frame. Suppose you do C-h i ;; info C-h e ;; view-echo-area-messages q ;; quit-window Then the difference is obvious. The C-h i reuses the one existing window showing *scratch*. 'display-buffer-record-window' cannot tell this case apart from the one where a user does want to show *scratch* again in that window after being done with *info*. If we wanted a behavior that deleted the *info* window in this case (it could do that only if there is another window on that frame), the caller could add an alist entry, say 'delete-reused-window-if-possible', and add something like (when (and (eq type 'reuse) (assq 'delete-reused-window-if-possible alist)) (setq type 'window)) immediately before the (display-buffer-record-window type window buffer) call in 'window--display-buffer'. But you pass 'tab' as TYPE argument to 'window--display-buffer' and that would have to be handled in a maybe similar but still different way. martin