From da61356cd30f47671f585fde3399f9120f609dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Alvari=C3=B1o?= Date: Tue, 6 Jun 2023 20:15:04 +0200 Subject: [PATCH] Add no-littering basic configuration --- init.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/init.el b/init.el index eccbf6f..faf998a 100644 --- a/init.el +++ b/init.el @@ -33,6 +33,25 @@ (straight-use-package 'use-package) (setq straight-use-package-by-default t) ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Keep emacs clean! +;; Use no-littering to automatically set common paths to the new user-emacs-directory +(use-package no-littering + :init + ;; set paths for no-littering etc and var directories + ;; instead of this paths, you could use + ;; (setq user-emacs-directory (expand-file-name "~/.cache/emacs")) + (setq no-littering-etc-directory (expand-file-name "~/.cache/emacs/etc") + no-littering-var-directory (expand-file-name "~/.cache/emacs/var") + ) + :config + ;; set sensible defaults for backups + (no-littering-theme-backups) + ;; set paths for url-history-file and custom-file + (setq url-history-file (no-littering-expand-etc-file-name "url/history") + custom-file (no-littering-expand-etc-file-name "custom.el")) + ) +;; ;; (provide 'init) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;