Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Mar 2009 11:15:40 +0100
From:      =?ISO-8859-1?Q?Gr=FCnewald_Micha=EBl?= <michaelgrunewald@yahoo.fr>
To:        prad <prad@towardsfreedom.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: backup files from editor
Message-ID:  <DFFFB3C9-5628-4501-A11C-F205EC0F316E@yahoo.fr>
In-Reply-To: <20090305001531.75f2495b@gom.home>
References:  <20090305001531.75f2495b@gom.home>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi prad,

Le 5 mars 09 =E0 09:15, prad a =E9crit :

> editors can produce backup files - eg emacs adds a ~ to the backup
> file. the backup file keeps getting changed as you make changes to the
> original so you i'm wondering what the point of them is.

Please refer to the Emacs manual (info m Emacs) to learn about the =20
precise rule governing backup files. Just like you, I do not like to =20
have all of these backup files springing off everywhere in my =20
filesystem. Instead of turning backup off, I tell emacs to put them in
the `.emacs.d/backup' I created for this purpose:

(setq backup-directory-alist '((".*" . "~/.emacs.d/backup")))

You can get a finer control on backup location, read documentation for =20=

the bariable `backup-directory-alist' to discover how.

Note that this setup tends to produce super long file named in =20
`~/.emacs.d/backup' which may break some fragile systems (e.g. I =20
encountered problems when preparing ISO filesystems not supporting =20
these long names).

> i turn off backups (so my directory doesn't fill up with ~ files), but
> then i also don't space things properly and occasionally use cryptic
> names when programming (from what my son tells me), so i figure i =20
> should change some of these bad habits.
>
> how do people make use of the backup feature when they program?

Note that basic functionalities of RCS systems are well integrated in =20=

Emacs (see the Tools menu), and I systematically use SVN (in the =20
ports) as a sophisticated backup system when I edit files that count.

Note that the FreeBSD wiki features an intereting comparison of the =20
various RCS systems available, so if you are interested with this =20
approach, you can look for this comparison and make your choice.

You can also use RCS without the (moderate) hassle to set up a =20
repository, Emacs has support for an `immediate' RCS system, doubling =20=

the files you want to keep track of with a `,v' companion file, =20
containing revision history. (IIRC, this RCS system is the ancestor of =20=

CVS, but I cannot find again the name, sorry about this.)
--=20
All the best,
Micha=EBl




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DFFFB3C9-5628-4501-A11C-F205EC0F316E>