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: Mon, 22 Apr 2024 09:46:00 +0300 Organization: LINKOV.NET Message-ID: <86pluhao9j.fsf@mail.linkov.net> References: <3fe7e4b4-bc9a-4303-a87f-a360765c597f@gmx.at> <86le6wpok4.fsf@mail.linkov.net> <86msrbutsu.fsf@mail.linkov.net> <1305821a-6a0e-4cbc-82fb-bac229599c1b@gmx.at> <86sf0y2fg8.fsf@mail.linkov.net> <86il0rgh5a.fsf@mail.linkov.net> <86o7aiiiy8.fsf@mail.linkov.net> <86a5m1jg0g.fsf@mail.linkov.net> <8634rrnmre.fsf@mail.linkov.net> <86ttk68su0.fsf@mail.linkov.net> <86wmorb39z.fsf@mail.linkov.net> <0999f1dc-c56e-4395-b3bd-e0f5b135abbd@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="39613"; 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 Mon Apr 22 08:58:23 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 1rynd9-000ACU-Gk for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Apr 2024 08:58:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ryncl-0004QA-RW; Mon, 22 Apr 2024 02:57: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 1ryncc-0004OA-Tg for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2024 02:57:52 -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 1ryncZ-00085d-DU for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2024 02:57:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ryncp-0006AW-37 for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2024 02:58:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Apr 2024 06:58:03 +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.171376906323594 (code B ref 68235); Mon, 22 Apr 2024 06:58:03 +0000 Original-Received: (at 68235) by debbugs.gnu.org; 22 Apr 2024 06:57:43 +0000 Original-Received: from localhost ([127.0.0.1]:45592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryncV-00068T-DD for submit@debbugs.gnu.org; Mon, 22 Apr 2024 02:57:43 -0400 Original-Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]:45873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryncH-000664-L2 for 68235@debbugs.gnu.org; Mon, 22 Apr 2024 02:57:30 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 1944760011; Mon, 22 Apr 2024 06:57:06 +0000 (UTC) In-Reply-To: <0999f1dc-c56e-4395-b3bd-e0f5b135abbd@gmx.at> (martin rudalics's message of "Sun, 21 Apr 2024 10:56:15 +0200") 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:283813 Archived-At: >> I noticed that now 'find-alternate-file' has such a problem >> that it updates the modification timestamp of the directory. >> >> This is because 'find-alternate-file' calls 'rename-buffer' >> before setting back the value of 'buffer-file-name'. >> So this code in 'rename-buffer' is fired and changes >> the directory modification timestamp: >> >> if (NILP (BVAR (current_buffer, filename)) >> && !NILP (BVAR (current_buffer, auto_save_file_name))) >> call0 (intern ("rename-auto-save-file")); > > Why does an auto-save file exist at all in this situation? If the > original buffer was modified, 'find-alternate-file' should have saved it > into its file and deleted the auto-save file. Does your code rely on > fine tuned directory timestamps? Nothing special is done. The problem is reproducible in 'emacs -Q' with the original test case. This is because image-mode modifies the timestamp unless a special handling is used such as in 'image-toggle-display-image': (let ((create-lockfiles nil)) ; avoid changing dir mtime by lock_file (add-text-properties (point-min) (point-max) props) (restore-buffer-modified-p modified)) But 'rename-buffer' can't do the same. >> A possible fix would be to swap the order of >> setting of 'buffer-file-name' and 'rename-buffer': > > I see no problems doing that so please install. Thanks, so now installed.