From b37df6dbc7d6eb1941c79ac4d1ceb03043046ed0 Mon Sep 17 00:00:00 2001 From: noa@gaiwan.org Date: Sun, 23 Jun 2024 10:39:12 +0000 Subject: Add a backup directory --- config.org | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'config.org') diff --git a/config.org b/config.org index 5440b11..3d428eb 100644 --- a/config.org +++ b/config.org @@ -1111,22 +1111,23 @@ Shift click to select region with the mouse. This annoyingly rings the bell for Backups are pointless in long emacs sessions imo, but autosaves are useful. #+begin_src elisp -(setopt remote-file-name-inhibit-auto-save t) -(setopt remote-file-name-inhibit-auto-save-visited t) -(setopt make-backup-files nil - backup-by-copying t - create-lockfiles nil - auto-save-mode 1 - auto-save-interval 6 ;; every six keystrokes - auto-save-timeout 5 ;; every 5 seconds - auto-save-default t - auto-save-no-message t - save-silently t - version-control t - ;; this will auto save to the current file - auto-save-visited-mode t) -(add-hook 'focus-out-hook (lambda () (interactive) (save-some-buffers t))) -(add-hook 'mouse-leave-buffer-hook (lambda () (interactive) (save-some-buffers t))) + (setopt remote-file-name-inhibit-auto-save t) + (setopt remote-file-name-inhibit-auto-save-visited t) + (setopt backup-directory-alist '(("." . "~/.config/emacs/backups/")) + make-backup-files nil + backup-by-copying t + create-lockfiles nil + auto-save-mode 1 + auto-save-interval 6 ;; every six keystrokes + auto-save-timeout 5 ;; every 5 seconds + auto-save-default t + auto-save-no-message t + save-silently t + version-control t + ;; this will auto save to the current file + auto-save-visited-mode t) + (add-hook 'focus-out-hook (lambda () (interactive) (save-some-buffers t))) + (add-hook 'mouse-leave-buffer-hook (lambda () (interactive) (save-some-buffers t))) #+end_src ** Keyfreq -- cgit 1.4.1-2-gfad0