Subject: bug#68235: 29.1.90; Switching tabs stops following process output in selected window

From: martin rudalics <[email-masked]>
Date: Sun, 21 Apr 2024 10:56:15 +0200

> 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?

 > 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, martin