GNU bug report logs - #54401
28.0.91; Buffer visited file replaced with lockfile location

Previous Next

Package: emacs;

Reported by: Kenny Ballou <kb <at> devnulllabs.io>

Date: Tue, 15 Mar 2022 17:19:01 UTC

Severity: normal

Found in version 28.0.91

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kenny Ballou <kb <at> devnulllabs.io>
Cc: 54401 <at> debbugs.gnu.org
Subject: bug#54401: 28.0.91; Buffer visited file replaced with lockfile location
Date: Thu, 17 Mar 2022 12:20:37 +0100
Kenny Ballou <kb <at> devnulllabs.io> writes:

> This may be a "won't-fix", but I seemed to have stumbled onto an issue where
> the visited file of the current buffer is replaced by the lock file location on
> file renames when using `auto-save-visited-file-name`.
>
> The minimal configuration (`emacs -Q`) to trigger the bug is the following:
>
> ```
> (setq auto-save-visited-file-name t)
> (setq auto-save-default t)
> (setq auto-save-timeout 20)
> (setq auto-save-interval 20)

You only need the first, apparently.  And there's more bugginess going
on than described.

In Emacs 29:

emacs -Q
M-: (setq auto-save-visited-file-name t) RET
C-x C-f /tmp/foo1 RET
<type something> `C-x C-s'

Observe that the /tmp/foo1 file exists.

`C-x C-w /tmp/foo2 RET'

/tmp/foo1 no longer exists!  But /tmp/foo2 does.

<type something>
`M-x do-auto-save RET'

/tmp/#foo2# now exists!  And `buffer-file-name' in the "foo2" buffer is
now "/tmp/#foo2#'

So this is kinda totally broken.  Now, `auto-save-visited-file-name' was
made obsolete in Emacs 26.1, but perhaps these things should be fixed
anyway.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.