2

I have this in my .init.el file:

(setq backup-directory-alist
      `((".*" . "~/.saves")))
(setq auto-save-file-name-transforms
      `((".*" "~/.saves" t)))

Yet I am still getting random backup files in both the working directory and my home directory.

How can I fix this? Is there another setting I'm missing?

  • 1
    Try not have ~ in the path, instead use the full path. (I don't know if this is needed, but I have it in my init file, there must have been a reason for it.) Also, make sure the auto-save directory exists. – Lindydancer Dec 8 '15 at 20:17
  • Thanks, I tried, but they are still being created. The .save directory is there and I changed it to the full user path. – Adam Thompson Dec 9 '15 at 7:34
  • The documentation for backup-directory-alist says "On MS-DOS filesystems without long names this variable is always ignored." Do you use an Emacs that is compiled as an MS-DOS application? – pst Dec 10 '15 at 15:27
1

Try without the star in backup-directory-alist and add slash at the end of directory name

 (setq backup-directory-alist
        '(("." . "~/.saves/"))) ;; remove the star
 (setq auto-save-file-name-transforms
        `((".*" ,"~/.saves/" t)))
| improve this answer | |
  • Ahhhh, never mind still happening. Is it weird that they are appearing in the $HOME directory? – Adam Thompson Dec 12 '15 at 1:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.