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#68235: 29.1.90; Switching tabs stops following process output in selected window Date: Sat, 13 Jan 2024 11:38:56 +0100 Message-ID: <2f80855c-3bf9-4973-a484-059cdef3b8c7@gmx.at> References: <83frzdy6if.fsf@gnu.org> <86edexnmv8.fsf@mail.linkov.net> <83mstlvvkj.fsf@gnu.org> <34a872a9-07b2-4671-837f-f8d98b37420d@gmx.at> <867ckmxto2.fsf@mail.linkov.net> <92085305-caad-4bb6-ac55-a81415404a26@gmx.at> <86v885je23.fsf@mail.linkov.net> <868r4ymn7x.fsf@mail.linkov.net> <86h6jlqh2i.fsf@mail.linkov.net> <5e438b04-6fb7-4114-a5a8-61db9809b297@gmx.at> <86cyu7m4kc.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="8833"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: daniel.c.mccarthy@gmail.com, Eli Zaretskii , 68235@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 13 11:40:28 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 1rObRC-0001za-Na for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jan 2024 11:40:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rObQz-0004dB-99; Sat, 13 Jan 2024 05:40:13 -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 1rObQu-0004ca-JF for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 05:40:09 -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 1rObQq-00086v-L2 for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 05:40:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rObQo-0003jQ-T7 for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 05:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jan 2024 10:40: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.170514234814254 (code B ref 68235); Sat, 13 Jan 2024 10:40:02 +0000 Original-Received: (at 68235) by debbugs.gnu.org; 13 Jan 2024 10:39:08 +0000 Original-Received: from localhost ([127.0.0.1]:38500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rObPw-0003hq-FD for submit@debbugs.gnu.org; Sat, 13 Jan 2024 05:39:08 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:49003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rObPs-0003hI-Ue for 68235@debbugs.gnu.org; Sat, 13 Jan 2024 05:39:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1705142338; x=1705747138; i=rudalics@gmx.at; bh=5LVEPCmJvKhRnU0/G4QLYxXR8Suij553V4qncusTI68=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=db+3zlHThCV6DiBEdL5iaCQyBB4wm9OjnCeE3gqOSlF/SVU6VN74vSeR56UPyEBJ sXX90zAoqyfGF4rxrffQvUe0ZWwrc0BbJcj4Gc3Q4y7tX+J1S75LiagIui41w44wu Uz4+7HeY1LdW+XhtYub0VsKggmc+evXY/AL2vZRpPxWTXFy06LJLgB1Ubq3m8q4wc 0QdTEjl+xH282UMoEOXEKJl+hh/BNFmE2VD+uRbFHa2rdVrtdTlD84W9vXbKza1T2 LGxixVdwr79W9SaZ4UYSslNSClhf1uX4SE44ZM9tRhf2Ju4IgWTYkjS76HIOETLZ3 nqTRjg3AVq8kCvHmTA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.124]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M9Wuq-1rU7jK2cAW-005czK; Sat, 13 Jan 2024 11:38:58 +0100 Content-Language: en-US In-Reply-To: <86cyu7m4kc.fsf@mail.linkov.net> X-Provags-ID: V03:K1:JTzj5gFRMgLZmPzTT1oriZaCtqI+72zQRgG97QiV7GyW9WB3QVg TdZv/HqxYUqaU66tw0KrpPWj6WU1x+lDSixkVL845++yisYGFavggEyHHICPvYEY6RRa5Ss qv/hr19KG7I822pVhyaVrwKOld+F0dZAcLr8FlnfRdlT2sH9ZWnLq6BC/44vROPcIDS7RYt NcPSKefVaHttIqSmiWJhg== UI-OutboundReport: notjunk:1;M01:P0:SCzisxf+bk0=;qDjACZspYUGCsZcTERtUem/zBAI Aj+UjP7/bfmyTA06eyInnBy8oBQFz4NRgU1xDKX5ZFdjV49zKEoLKkVYpD6ebSdqTLShK9b/D 0gnrv5dA+IcwINxL/dY20hTAJSNJOzi6uhIGHtdP2xIj2EGrTGXVnCaM7cU+u8zVrR7hQVoap h0OVQXQamkB2qtXW1c8TRQx/OvJHzo1gcD0+Q5pYTxP2ZswCruI5XpRiEtlIdkFNdNNTdSLbs 5wsxNh26BVn1uHotI8lvlZ6lJFmLaHuNvK7PiA+/QLgpg+oev/i+MAvZkqXB/qFmSOSj7hqX+ CoxJ6iOw7sRkCD96YE6+ITAiPT/99FMk6sL6i60rh/TNVG1wm8ka3Znk9zdiZvZtps+2P1s2y EyIxi9Q6dZd569GuCoIPAvDWGXSGiAJoFaEet3oGMHtNmX+qo2IXjJDGlk5ZjwHr122dQsIuA bBKtI/aSsLSC8AwiM+0Pr69/kwJWXaLSYpXGGIzwPGgKKDYFIQtiPOcWW1gp9kLz4vk1LOimr 9hqXkYBafacJS50cY8yAxuZiT7YOCwaPzLWerdcd/paxJiWSl3QB+kLM37NQD0n4mC+eqWjhL WTWviws+CFcZkSPHH1NOpdwJrFOGiou8FNnxSg2yII0Rz1n8QnzXpaJ3l2X9Soka8nZNGO66x kU7uUTBn9Z4sQTllVQttkvNw0Dn08gv574511QpCvhtmDsT680fOddTR7i8wh+r0l60sW8MKJ vQCWP4wV+ZwRkB26U1+p1y8Nqk8qV06g6lZqSYGnZo5KTTKtOEUGy8qfZN6Wme1P5flWtAbm 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:278118 Archived-At: >> IIUC 'dired-save-positions' and 'dired-restore-positions' are supposed >> to handle these bug scenarios in "normal" (user driven) dired reverting. >> Do they? If so, why does saving and restoring a window configuration >> not use them? > > This is because 'dired-save-positions' and 'dired-restore-positions' > can't update positions in all existing window configurations > that are not yet garbage-collected. So we'd need a persistent window parameter (1) whose value is set to dired's file name at point in 'current-window-configuration' (2) and allows to restore the window's point appropriately in 'set-window-configuration'. For (1) we have two possibilities. Either dired itself maintains it every time its window point changes which is very tedious. Or we make the parameter a function that is run by 'current-window-configuration' here: /* If the window has a value for the parameter, save it. */ p->window_parameters = Fcons (Fcons (XCAR (par), XCDR (par)), p->window_parameters); When XCAR (par) is a function, that function would store the current file name at the window's point in the cdr of the saved parameter. This would mean to offer one more facility for people to shoot themselves in their foot. For (2) we can either provide a hook that 'set-window-configuration' runs or in /* Always restore a non-nil value. */ Fset_window_parameter (window, XCAR (pers), XCDR (pers)); restore the saved position when XCAR (pers) is a function - the file name would be in XCDR (pers). Not for the faint of heart either, because of the current buffer/selected window dances in 'set-window-configuration'. martin