Change backup system
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
Change backup system         


Author: Florian Lindner
Date: Jul 28, 2008 12:00

Hello,

can I (I suppose I can, it's Emacs) and how can I change the way Emacs
backup files. The default is to create a filename~ in the same folder.

My idea is to copy the file to another folder. When I edit and save ~/
text/file.txt the backup is saved in ~/.emacs.d/backup/home/florian/
text/file.txt.n with n being a number incremted form 1 to x each save.

Can I configure Emacs like that?

Thanks,

Florian
5 Comments
Re: Change backup system         


Author: Evans Winner
Date: Jul 28, 2008 12:20

Florian Lindner writes:

My idea is to copy the file to another folder. When I
edit and save ~/ text/file.txt the backup is saved in
~/.emacs.d/backup/home/florian/ text/file.txt.n with n
being a number incremted form 1 to x each save.

I have a directory called ~/bu and this in my .emacs
(thought I am not sure which versions of Emacs it works
with):

(setq version-control t) ; Numbered backups.
(setq backup-directory-alist ; Backup directory
`(("." .
,(expand-file-name "~/bu"))))

I don't know if this is exactly what you mean.... I
occasionally clean out old stuff from my ~/bu directory.

The files are named like this:

!home!thorne!hacking!litmus!mla.tmac.~3~

with bang-path kinda names and the number at the end a
version number.

Here is some documentation about those variables:
Show full article (2.64Kb)
no comments
Re: Change backup system         


Author: Peter Dyballa
Date: Jul 28, 2008 12:57

Am 28.07.2008 um 21:00 schrieb Florian Lindner:
> Can I configure Emacs like that?

(setq auto-save-interval 125)
;; Backups to central location
(setq make-backup-files t ; backup my files
backup-by-copying t ; don't clobber sym-links
; backup-directory-alist '(("." . (concat (user-emacs-
directory "/Sicherungen")))) ; don't litter
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t ; use versioned backups
vc-make-backup-files t ; make backups for cvs projects
vc-follow-symlinks t)
(setq backup-directory-alist '(("." . "~/.emacs.d/
Sicherungen"))) ;don't litter

--
Mit friedvollen Grüßen
Show full article (0.86Kb)
no comments
Re: Change backup system         


Author: Thierry Volpiatto
Date: Jul 28, 2008 13:18

Peter Dyballa writes:
> Am 28.07.2008 um 21:00 schrieb Florian Lindner:
>
>> Can I configure Emacs like that?
>
> (setq auto-save-interval 125)
> ;; Backups to central location
> (setq make-backup-files t ; backup my files
> backup-by-copying t ; don't clobber sym-links
> ; backup-directory-alist '(("." . (concat (user-emacs-
> directory "/Sicherungen")))) ; don't litter
> delete-old-versions t
> kept-new-versions 6
> kept-old-versions 2
> version-control t ; use versioned backups
> vc-make-backup-files t ; make backups for cvs projects
> vc-follow-symlinks t)
> (setq backup-directory-alist '(("." . "~/.emacs.d/
> Sicherungen"))) ;don't litter
Show full article (1.14Kb)
no comments
Re: Change backup system         


Author: Xah
Date: Jul 29, 2008 02:29

On Jul 28, 12:00 pm, Florian Lindner wrote:
> Hello,
>
> can I (I suppose I can, it's Emacs) and how can I change the way Emacs
> backup files. The default is to create a filename~ in the same folder.
>
> My idea is to copy the file to another folder. When I edit and save ~/
> text/file.txt the backup is saved in ~/.emacs.d/backup/home/florian/
> text/file.txt.n with n being a number incremted form 1 to x each save.
>
> Can I configure Emacs like that?

Yes. I have the code that does exactly what you want.

----------------------------------

Q: How to set emacs so that all backups are directed into one folder?
(such as at a directory "~/myBackups")

Use the following lisp code in init file:
Show full article (2.43Kb)
no comments
Re: Change backup system         


Author: Florian Lindner
Date: Jul 29, 2008 11:12

On 29 Jul., 11:29, Xah gmail.com> wrote:
> On Jul 28, 12:00 pm, Florian Lindner wrote:
>
>> Hello,
>
>> can I (I suppose I can, it's Emacs) and how can I change the way Emacs
>> backup files. The default is to create a filename~ in the same folder.
>
>> My idea is to copy the file to another folder. When I edit and save ~/
>> text/file.txt the backup is saved in ~/.emacs.d/backup/home/florian/
>> text/file.txt.n with n being a number incremted form 1 to x each save.
>
>> Can I configure Emacs like that?
>
> Yes. I have the code that does exactly what you want.

[...]

I have now:
Show full article (1.42Kb)
no comments