How do I prevent Emacs from creating backup copies of buffers I don't wish to save when I kill buffers that have not been saved?
+7
A:
See Here
Short version: put
(setq make-backup-files nil)
in you .emacs file, or toggle this feature at any time with M-x auto-save-mode
.
Here is the Emacs Manual Node.
kjfletch
2009-07-29 10:21:34
Links are OK, but it is better to copy the actual soution into StackOverflow then to count on it remaining indefinitly somewhere out on the web...
dmckee
2009-07-29 13:26:18
Thank you for editing. I have to admit I rushed it. If you look in the revision, I did post an example but was not in the situation to test it. So I removed it.
kjfletch
2009-07-29 13:42:16
I should point out that the OP asked how to disable `auto-save`, not how to disable `backup-files`, as this answer suggests.
Michiel Buddingh'
2010-01-19 05:28:13
+1
A:
I would advice you to use something like:
(defvar backup-dir "~/.emacs.d/backups/")
(setq backup-directory-alist (list (cons "." backup-dir)))
This way you can have all backup files in one directory.
simao
2009-07-29 10:41:36
+5
A:
If you don't want emacs to litter your drive with backup files try adding the following to your .emacs file:
(setq backup-directory-alist '(("." . "~/emacs-backups")))
This will store every backup in a single location.
indy
2009-07-29 10:43:49
You're right, I just assumed the reason that skurpur wanted to disable backups was because of all those messy droppings that Emacs leaves behind. Setting the backup-directory-alist variable is just a simple way of house training it.
indy
2009-07-29 13:27:43