0

I have the following line in my .emacs to keep auto-saved files in a specific directory:

(setq backup-directory-alist (quote ((".*" . "C:/temp/emacsbackup"))))

And it works, I see the file, say "c:/myworkingdirectory/the_current_working_file", in that C:/temp/emacsbackup as "!drive_c!myworkingdirectory!the_current_working_file".

However, whenever I change the content in the_current_working_file, before I save it, I also see this two files in the working directory c:/myworkingdirectory/:

#the_current_working_file#
.#the_current_working_file

When I save the file the_current_working_file, these two backup disappear.

How do I prevent emacs from creating these two backups in the current working directory?

3
  • 1
    Say C-h i g (emacs) Auto Save and read the whole section. In particular, when disaster strikes, you might be thankful to have those files. BTW, auto-save and backup are different things.
    – NickD
    Commented Jun 24, 2021 at 1:49
  • 1
    What @NickD said. As a start, you seem to be confusing backup files with auto-save files.
    – Drew
    Commented Jun 24, 2021 at 2:01
  • I didn't mean to disable auto-save, I just want the auto-save files to be in a different directory other than the directory I am working on. Is that possible? I cannot find anything for it with M-x apropos auto-save.
    – tony
    Commented Jun 26, 2021 at 5:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.