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, 10 Jul 2024 11:16:24 +0200 Message-ID: <61c4f245-3dd8-4e24-9c84-7ddd4cfe3c49@gmx.at> 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> <86y169kafb.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="23227"; 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 Jul 10 11:17: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 1sRTRt-0005lh-HU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jul 2024 11:17:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRTRb-0001eE-Ef; Wed, 10 Jul 2024 05:16:59 -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 1sRTRZ-0001dx-5y for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 05:16:57 -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 1sRTRY-0007Sq-Od for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 05:16:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sRTRe-0006g5-Bu for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 05:17: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, 10 Jul 2024 09:17: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.172060300125635 (code B ref 59862); Wed, 10 Jul 2024 09:17:02 +0000 Original-Received: (at 59862) by debbugs.gnu.org; 10 Jul 2024 09:16:41 +0000 Original-Received: from localhost ([127.0.0.1]:54873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRTRJ-0006fO-0N for submit@debbugs.gnu.org; Wed, 10 Jul 2024 05:16:41 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:54921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRTRG-0006fA-I4 for 59862@debbugs.gnu.org; Wed, 10 Jul 2024 05:16:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1720602985; x=1721207785; i=rudalics@gmx.at; bh=Ru7+jHGMSCmVOt5p+Qc4LU3joUNgqnWrZjVlg8ZDgUI=; 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=Pcnqnm0gmU1zSNlpWlGIfIQoo5pJF/SAlILIETv/aQn3jW2v4LSmlYn3iJLjqh7a iZHZGU8tr6ZB08e6ujuzISEVODAdc3omjCh9mF08jN/rP1cAhB6YZKWo9IjwEZUk3 hLVgP+7i86kGxM1Sifr4HOda6xWEGBFNSXeJfPVDqFwi1aL1ozLawBsMbVgdVi44a x6fKbftP8u43i5svUQGLqb8yhTPj6wjb/sdJYAuQpv3uDzqbxkhgZcRAxcKiQA8s/ Dc9m5UUNHZkX6THjYSYrir5vX8aISCJ8/OXpji1PlGMiYnqhJ0HDQAfEIon85DkUC SljmnU8cYk0pv0tfQw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.5]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N63Vi-1sKy8H2Cee-010Exo; Wed, 10 Jul 2024 11:16:25 +0200 Content-Language: en-US In-Reply-To: <86y169kafb.fsf@mail.linkov.net> X-Provags-ID: V03:K1:w/jfLKvtCZA2UlgZqLNntCEa0gFL8hjJX1p/4/kpfXh/zBpgcEN 6/bCR+B3V3x+B4rxNyEzLnNNJA5cAm/mYjV2OLKJVf0a7rVPUYCKh7Z9BU2hp+/6b44qG/P 8z5JK3A9bGT/AofBbuk3GPuR95Lv2LGVLsdZo5AQm47P8JXlUUwA/K/7hOfG+BpYG+iFLiS GnyqCC9VxFPdgP3MdRqoA== UI-OutboundReport: notjunk:1;M01:P0:z9J2uk1PNhg=;qKsdvLdoAln+vCQwobj8hxFqwOI iVGL3JQiRCB4cWb7lRDN2qvUSmtsTu1xRs8u3x+dR+8wRhsMEf0ggvzpQBsVPAOjWT2zJw/qM xml6NaznNIY1v288ymYIXGz0h95vkwDDSpYuznE1Q25DGX5HmANOvBhJhzLLZrmuI2w3tQxLz kBiBPHagq5UfVVN8Tb3Z6OazKmC3ScYfwT+W4uqM7yOXUlfURUK6CmJalkyW7TNLqn8UkXbA0 U1T1LbLD3ba4YZNtyYPgfAa1pJcXGX7wtvd6E4SL1vt0ZR6n4w1qnqWw7PIFbc6HtJgYUI6Zr bbE0Kg7YpIZwKNhxmeie6C8KKCdmiyIKLjzRTnuXtMt2OO86pZ/LUdfwx8vQpr6Cf/mrRdEsX yZniv34M5yd/YvGdNGjWHNTWTGcyguCmp8ChS68KmO+4kDx93vIKlk7CftQybYNYwO+XWYL8w lOWZbvrafExs7vMscnIHh6EqIIWUPiDIOIgHDf1PnCuQnWhs97gLhz3HNLSnd6z4Umv4DtkFq trLmSgZlPVzz3l+zp4qw+NpxDb+37cNKsEfVWEjAfGuwK6bqtphooV4h656bP6yL1QMV5xWHM fGxRA4ikSii3v5yOC8g4svJk8rlDEch4F2BYHTSYYeAx0oaI6oEI5/vm7WSd4oBH877JMFYGy hJ10AR4SNgB5e/pGe8uRQeWmNuSi7j6iV4hF2qd/UloPn0KaBvUCT413uO/B5N+B3fmOYcKE+ WrDzmix1eRk7LUG3VoaJLqpgYsZQsauVWXS1mebuNB1uiOVS6cKq44xUv0lONLv1kTwGyjsx 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:288666 Archived-At: > But there is no *scratch* in the list of previous buffers for 'C-x t t C-h i' > (that can be confirmed when tab-line is enabled), so the user won't expect > to show *scratch*. And indeed the frame case doesn't show *scratch*. 'window--display-buffer' resets that window's previous buffers here (when (memq type '(window frame tab)) (set-window-prev-buffers window nil)) In the "window" and "frame" case these are actually not needed because when making a new window (on the same or a new frame), that window's previous buffers are automatically set to nil - by make_window in the release version and by the allocation routine with my patch. I reset them just to make sure. When you show *info* in an already existing window, that window's previous buffers are not reset. So the presence of "tab" in the form above is not entirely correct in this regard. > I hoped that it would be possible for the tab case to do the same, > but I don't know how the frame case is handled to do the right thing. In 'quit-restore-window' you count the windows with a 'quit-restore' parameter. In the scenario at hand this gives 2 so you don't close the tab. If you told me in detail what this counting is supposed to accomplish, I might be able to help you. martin