Keep emacs' ~ files versioned in a directory
Using emacs and tired of all those *~ files ? One quick and dirty solution is the classic find . -name \*~ -delete but there is a better way, those files can actually save you hours of work in case something bad happens.
Add this to your ~/.emacs or whatever configuration file you use:
(setq
backup-by-copying t
backup-directory-alist '(("." . "~/.saves"))
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t)
Now all those ~ files will be kept inside ~/.saves and versioned.
Cheers
Written by Grégoire Morpain
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best #Emacs Authors
Related Tags
#emacs
Sponsored by #native_company# — Learn More
#native_title# #native_desc#