reddit / emacs

Why does my Emacs try to recover out-of-date file versions?

NeatSea7 ยท 2022-12-24 19:02
I'd be grateful for any help with a problem I've had for a while. When I close Emacs, I always make sure to save every open buffer before I do so -- it's an automatic reflex. Thus, the saved version of any given file will be the most current, and there should not be any need for autorecovery unless Emacs crashes without getting to save. Sometimes however, even after a normal close, my Emacs claims that a file has auto-save data, and prompts me to recover the file. If I recover the file and run a diff on it, I can see that the "recovered" file is actually an out-of-date version. Has anyone else encountered this, and could there something wrong with my config that's causing Emacs to try to "recover" out-of-date files? Below are the lines that I think could be relevant from my config: (setq version-control t) (setq vc-make-backup-files t) (setq auto-save-interval 20) (setq kept-old-versions 0) (setq delete-old-versions t) (setq backup-by-copying t) (setq kept-new-versions 10) Right now I'm on Emacs 28.2 on Apple M1, but I think this has been a problem I experienced on a past Linux machine as well, so I suspect the fault is with my config. Thank you!!