syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.64k stars 4.89k forks source link

Auto-save filename hijacks `C-x C-s`: file contents are written to auto-save file and not to original filename #7927

Closed riccardomurri closed 4 years ago

riccardomurri commented 7 years ago

Description :octocat:

Auto save file name #file# replaces the "real" file name in C-x C-s save operations. In other words, when I press C-x C-s the auto-save file is updated and the file that I had originally opened is not written to.

In the buffer that shows this behavior, I can see this from Lisp code:

I have this in my .spacemacs.d/init.el::

;; Location where to auto-save files.
dotspacemacs-auto-save-file-location 'original
riccardomurri commented 7 years ago

Reproduction guide :beetle:

Unfortunately I cannot give steps for deterministically reproducing it. It happens frequenty on my setup, but I could not yet find out the exact conditions that trigger the bug.

Observed behaviour: :eyes: :broken_heart:

C-x C-s saves content to auto-save file.

Expected behaviour: :heart: :smile:

C-x C-s saves content to the file name that was originally opened.

System Info :computer:

riccardomurri commented 7 years ago

Screenshot shows the wrong filename (on line 1 of Emacs' buffer list).

spacemacs-autosave-bug

wolfv6 commented 6 years ago

I am having the same problem, and it seems intermittent. Happened twice today when I was frequently using 'SPC f s' (save-buffer), but I can not reproduce it. I have this in my .spacemacs file, defun dotspacemacs/init () (setq-default :

dotspacemacs-auto-save-file-location 'original

System Info :computer:

wolfv6 commented 6 years ago

This issue is probably related to https://github.com/syl20bnr/spacemacs/issues/10348

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!