unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Is it possible to prevent emacs auto saving the filename~?
Date: Sun, 03 May 2009 21:19:16 +0200	[thread overview]
Message-ID: <87iqkiq9jf.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: 87iqkiw111.fsf@iki.fi

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





  reply	other threads:[~2009-05-03 19:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.6483.1241369266.31690.help-gnu-emacs@gnu.org>
2009-05-03 17:26 ` Is it possible to prevent emacs auto saving the filename~? Teemu Likonen
2009-05-03 19:19   ` Tassilo Horn [this message]
2009-05-03 19:24     ` Drew Adams
2009-05-04  2:50     ` 明覺
2009-05-05  6:54     ` 明覺
2009-05-03 11:34 明覺
2009-05-03 17:18 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iqkiq9jf.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).