From 9ebf0dd0cda6c3472c548d8de2202cc65e6c62fe Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 11 Aug 2023 05:18:32 +0200 Subject: emacs: Do better backups --- .config/emacs/config.org | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.config/emacs/config.org b/.config/emacs/config.org index 4096b6b..0128e2b 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -40,7 +40,7 @@ is simply because I need to use them here. #+END_SRC -** TODO XDG Directories +** XDG Directories We want to define variables for the main XDG directories for Emacs to use. These are nice for keeping things organized and out of the way. @@ -84,8 +84,6 @@ We also need to ensure our directories actually exist. We don’t want to have all sorts of random garbage populating the configuartion directory; let’s throw it all in the cache directory instead. -# TODO: https://stackoverflow.com/a/151946 - #+BEGIN_SRC elisp (setq user-emacs-directory mm-cache-directory @@ -919,3 +917,17 @@ this file. #+END_SRC +** Backup Files + +It’s always good to have backups. I would know — I’ve wiped both =~= and +=~/.config= before! Despite the name, ~version-control~ actually just adds +version numbers to the backup names — it doesn’t start using a VCS. + +#+BEGIN_SRC elisp + + (setq delete-old-versions t + version-control t + kept-new-versions 2 + kept-old-versions 6) + +#+END_SRC -- cgit v1.2.3