Set centralised autosave directory for emacs

This commit is contained in:
Evie Litherland-Smith 2023-11-19 07:53:06 +00:00
parent cccd46d7a2
commit 30e5cc59d7
2 changed files with 13 additions and 1 deletions

View file

@ -41,6 +41,10 @@
;; Make shebang (#!) file executable when saved
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
(setq backup-directory-alist '(("." . "~/.local/state/emacs/backups"))
tramp-backup-directory-alist backup-directory-alist
tramp-auto-save-directory "~/.local/state/emacs/backups")
(when (require 'package nil :noerror)
(add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
@ -564,6 +568,7 @@
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
message-send-mail-function #'message-send-mail-with-sendmail
message-auto-save-directory nil
message-kill-buffer-on-exit t
mail-user-agent 'mu4e-user-agent
read-mail-command 'mu4e

View file

@ -50,6 +50,12 @@
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
#+END_SRC
** TODO Auto-save file settings
#+begin_src emacs-lisp :tangle yes
(setq backup-directory-alist '(("." . "~/.local/state/emacs/backups"))
tramp-backup-directory-alist backup-directory-alist
tramp-auto-save-directory "~/.local/state/emacs/backups")
#+end_src
** package-archive with priorities
#+begin_src emacs-lisp :results output silent
(when (require 'package nil :noerror)
@ -674,6 +680,7 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
'(kbd-mode . (:url "https://github.com/kmonad/kbd-mode"))))
(use-package kbd-mode)
#+end_src
* Internet
** Email
#+BEGIN_SRC emacs-lisp
@ -682,6 +689,7 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
message-send-mail-function #'message-send-mail-with-sendmail
message-auto-save-directory nil
message-kill-buffer-on-exit t
mail-user-agent 'mu4e-user-agent
read-mail-command 'mu4e
@ -1020,4 +1028,3 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
(with-eval-after-load 'pdf-tools
(setq-default pdf-view-display-size 'fit-width)))
#+END_SRC