From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#68235: 29.1.90; Switching tabs stops following process output in selected window Date: Tue, 06 Feb 2024 20:03:35 +0200 Organization: LINKOV.NET Message-ID: <86plx95uls.fsf@mail.linkov.net> References: <86h6jlqh2i.fsf@mail.linkov.net> <5e438b04-6fb7-4114-a5a8-61db9809b297@gmx.at> <86cyu7m4kc.fsf@mail.linkov.net> <2f80855c-3bf9-4973-a484-059cdef3b8c7@gmx.at> <669371d8-7c65-4c5f-99a9-0d8298808d23@gmx.at> <86cyu5cc0p.fsf@mail.linkov.net> <868r4reoh3.fsf@mail.linkov.net> <0634c46f-db93-4492-be69-5ac6ca0102a8@gmx.at> <865xzuvdgu.fsf@mail.linkov.net> <86a5p5qv61.fsf@mail.linkov.net> <86edeg2ige.fsf@mail.linkov.net> <21dcf921-acc4-4f94-b383-8ad6d0a57c59@gmx.at> <86v87qpow0.fsf@mail.linkov.net> <4bc98faf-5ebe-4c22-8c9f-04755785fde5@gmx.at> <86wmrjl8m3.fsf@mail.linkov.net> <39fe71c5-db40-49d1-b22b-37b52ed13865@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25153"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 68235@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 06 19:16: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 1rXPzM-0006M3-ED for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Feb 2024 19:16:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXPz5-0006PA-0z; Tue, 06 Feb 2024 13:15:51 -0500 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 1rXPz3-0006Og-KN for bug-gnu-emacs@gnu.org; Tue, 06 Feb 2024 13:15:49 -0500 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 1rXPz3-0008OG-C5 for bug-gnu-emacs@gnu.org; Tue, 06 Feb 2024 13:15:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rXPzG-0007et-DU for bug-gnu-emacs@gnu.org; Tue, 06 Feb 2024 13:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Feb 2024 18:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68235 X-GNU-PR-Package: emacs Original-Received: via spool by 68235-submit@debbugs.gnu.org id=B68235.170724333929403 (code B ref 68235); Tue, 06 Feb 2024 18:16:02 +0000 Original-Received: (at 68235) by debbugs.gnu.org; 6 Feb 2024 18:15:39 +0000 Original-Received: from localhost ([127.0.0.1]:55092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXPys-0007eB-Pr for submit@debbugs.gnu.org; Tue, 06 Feb 2024 13:15:39 -0500 Original-Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]:54867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXPyr-0007du-0Q for 68235@debbugs.gnu.org; Tue, 06 Feb 2024 13:15:37 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 1F695FF809; Tue, 6 Feb 2024 18:15:15 +0000 (UTC) In-Reply-To: <39fe71c5-db40-49d1-b22b-37b52ed13865@gmx.at> (martin rudalics's message of "Tue, 6 Feb 2024 11:34:54 +0100") X-GND-Sasl: juri@linkov.net 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:279508 Archived-At: >> Is 'keep-windows' doable for 'window-state-put' as well? > > I attach a patch that adds a fourth argument to 'window-state-put'. It > and a new 'set-window-configuration' now use a new function I called > 'marker-last-position' that returns the last position of a marker even > after its buffer was killed. Thanks, will test it. > The patch also fixes a bug in 'window--state-put-2' that can be > reproduced with the following simple scenario > > (let ((buffer (get-buffer-create "*foo*")) > state) > (pop-to-buffer buffer) > (setq state (window-state-get)) > (kill-buffer buffer) > (window-state-put state)) > > Did you never see it? I have seen it when created the first version of the test case: (let (ws) (pop-to-buffer "*Messages*") (setq ws (window-state-get)) (kill-buffer "*Messages*") (window-state-put ws)) But then added both 'writable' to 'window-state-get' and at the same time 'safe' to 'window-state-put': (let (ws) (pop-to-buffer "*Messages*") (setq ws (window-state-get nil 'writable)) (kill-buffer "*Messages*") (window-state-put ws nil 'safe)) And it didn't fail anymore, so I assumed that 'safe' fixed it ;-) But now I see that actually 'writable' "fixed" it.