From 1921378227726ac21071e5575d565c3119dc8a38 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Mon, 24 Apr 2023 20:08:49 +0200 Subject: Improve Emacs data file locations Move `native-compile-target-directory' setup to early-init.el to avoid clutter, and move a couple more data dirs to ~/.local/share. --- tw/home/files/emacs-init.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tw/home/files/emacs-init.el') diff --git a/tw/home/files/emacs-init.el b/tw/home/files/emacs-init.el index 1469dab2..0662b914 100644 --- a/tw/home/files/emacs-init.el +++ b/tw/home/files/emacs-init.el @@ -20,10 +20,6 @@ ('state (or (getenv "XDG_STATE_HOME") "~/.local/var/lib/")) (_ (error "Unknown XDG directory type: %S" type))))) -;; Put native-compiled binaries in the cache. This is NOT a `customize' option. -(require 'comp) ; for `native-compile-target-directory' -(setq native-compile-target-directory (tw/xdg-emacs-subdir 'cache "eln/")) - ;; Global/built-in Custom settings ;; Apply these as early as possible so that e.g. the native-comp files go to the right place. (mapc (apply-partially #'apply #'customize-set-variable) @@ -49,7 +45,9 @@ (package-archives nil "Don't fetch packages from the internet; only get them from Guix.") ;; Don't clutter the disk with backup files. (make-backup-files nil "Don't create backup files. Backup files break hardlinks.") - ;; Recent files and history. + ;; Recent files and history. Keep them out of ~/.config. + (package-user-dir ,(tw/xdg-emacs-subdir 'data "elpa") "Save ELPA-related files here.") + (auto-save-list-file-prefix ,(tw/xdg-emacs-subdir 'data "auto-save-list/saves-") "Put auto-save lists here.") (recentf-max-saved-items 1000 "Save lots of recently-opened files.") (recentf-save-file ,(tw/xdg-emacs-subdir 'data "recentf.el") "Save recently-opened files here.") (recentf-mode t "Save recently-opened files.") -- cgit v1.2.3