Emacs: Changing the location of auto-save files

Posted by Dominic Rodger on Super User See other posts from Super User or by Dominic Rodger
Published on 2012-04-13T08:48:44Z Indexed on 2012/04/13 11:33 UTC
Read the original article Hit count: 218

Filed under:

I've currently got:

(setq backup-directory-alist
      `((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
      `((".*" ,temporary-file-directory t)))

in my .emacs, but that doesn't seem to have changed where auto-save files get saved (it has changed where backup files get saved. M-x describe-variable shows that temporary-file-directory is set to /tmp/, but when I edit a file called testing.md and have unsaved changes, I get a file called .#testing.md in the same directory. How can I make that file go somewhere else (e.g. /tmp/)?

I've had no luck with these suggestions, so any suggestions welcome!

If it helps, I'm on GNU Emacs 23.3.1, running Ubuntu.

© Super User or respective owner

Related posts about emacs