I would like for a new numbered backup file to be created every time I save a buffer. I.e. if I save a buffer ten times I want ten new backup files created.

To that end I have added the code below in my .spacemacs. But I only ever get one new file created in total, no matter how many times I save. Why please?

        make-backup-files t               ; backup of a file the first time it is saved.
        backup-by-copying t               ; don't clobber symlinks
        version-control t                 ; version numbers for backup files
        delete-old-versions t             ; delete excess backup files silently
        delete-by-moving-to-trash t
        kept-old-versions 6               ; oldest versions to keep when a new numbered backup is made (default: 2)
        kept-new-versions 9               ; newest versions to keep when a new numbered backup is made (default: 2)
        auto-save-default t               ; auto-save every buffer that visits a file
        auto-save-timeout 20              ; number of seconds idle time before auto-save (default: 30)
        auto-save-interval 200            ; number of keystrokes between auto-saves (default: 300)
  • I just found this answer, stackoverflow.com/questions/6916529/…, which gives me what I want. Maybe my understanding of the docs was wrong, but I had the impression that creating new backups on every save was do-able without setting buffer-backed-up manually. – user2567544 Aug 15 '19 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.