[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it possible to prevent emacs auto saving the filename~?
From: |
Tassilo Horn |
Subject: |
Re: Is it possible to prevent emacs auto saving the filename~? |
Date: |
Sun, 03 May 2009 21:19:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) |
Teemu Likonen <tlikonen@iki.fi> writes:
Hi!
>> I know that emacs auto save a file named filename~ when I modified
>> the file filename, but I do not like the autosaved copy, could i stop
>> this function? thanks
>
> The variable that you are probably looking for is make-backup-files.
> Read also the related section in the Emacs reference manual:
>
> C-h r m Backup RET
As an addition to the previous tips. In general making backup files is
a good thing, so you most probably don't want to turn it off. But I
understand that you don't want to clutter the filesystem. But emacs
allows to place the backup files in one single directory. Here's the
config:
--8<---------------cut here---------------start------------->8---
(setq version-control t)
(setq kept-old-versions 0)
(setq kept-new-versions 20)
(setq delete-old-versions t)
(setq backup-directory-alist
'((".*" . "~/.emacs.d/backup-files/")))
--8<---------------cut here---------------end--------------->8---
This saves the last 20 versions of all files I edit in
~/.emacs.d/backup-files/. (Yes, I'm paranoid! Additionally all my
important files are under version control (git, svn), too.)
Bye,
Tassilo