Discussion:
numbered backups
(too old to reply)
anobo
2005-09-15 19:45:46 UTC
Permalink
Hello,

I am still a very newbie to emacs and I do getting to like it.


I am very sorry, if it should be a FAQ, which I didn't found yet.

Is there a possibility to backup the files I save in a numbered style?

Based on a file foo.txt:

1st read -> do nothing
1st save -> save file foo.txt and backup foo.txt~
2nd save -> save file foo.txt and backup foo.txt1~ or some kind of that
3rd save -> save file foo.txt and backup foo.txt2~ and so on

and even better save all these foo.txt1~, foo.txt2~,... backups in a
specified directory.


Thanks a lot in advance and happy emacs-ing.


Andreas
Otto Diesenbacher
2005-09-15 21:15:27 UTC
Permalink
Post by anobo
1st read -> do nothing
1st save -> save file foo.txt and backup foo.txt~
2nd save -> save file foo.txt and backup foo.txt1~ or some kind of that
3rd save -> save file foo.txt and backup foo.txt2~ and so on
and even better save all these foo.txt1~, foo.txt2~,... backups in a
specified directory.
from a source, I don't remember: :)

;; ========== Place Backup Files in Specific Directory ==========

;; Enable backup files.
(setq make-backup-files t)

;; Enable versioning with default values (keep five last versions, I think!)
(setq version-control t)

;; Save all backup file in this directory.
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))


in your .emacs should place numbered backups into .emacs_backups


But may I address a question to the experts: How can I switch off the
nasty questions "Delete excess backups ..."? I want emacs simply
making infinite backups and will delete theme occasionally manual.
Post by anobo
Andreas
otto

Loading...