The question you really have to ask is how do I never lose revision of any file that I edit in Emacs, including ~ / .emacs?
Answer versiond backups . The variable that controls this function is called version-control , which is confusing because it refers entirely to backups, not VCS.
This is also a feature of Emacs; There is no additional package to install. Almost everything that I work on is in VCS, but I still find it extremely useful that all changes to my work are easily accessible. Storage is so cheap, so why not?
EDIT: describe the save-buffer aspect of backing up each file.
You should read the documentation ( Ch k Cx Cs ) save-buffer to understand the nuances, but basically transferring it to Cu Cu will force it to back up after each save. I activate it in my own function
(defun le::save-buffer-force-backup (arg) "save buffer, always with a 2 \\[universal-argument]'s see `save-buffer' With ARG, don't force backup. " (interactive "P") (if (consp arg) (save-buffer) (save-buffer 16))) (global-set-key [remap save-buffer] 'le::save-buffer-force-backup)
source share