diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-09-28 16:27:11 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-09-28 16:27:11 +0100 |
commit | 92d0d9dc1cb61f3ae60320ddb01d243af5bc572d (patch) | |
tree | cfae6175a46a181c16f10e2f51bfa644233f159c /Emacs | |
parent | 9a7b4c8336760e047fca639e32c063448da39066 (diff) | |
download | dotfiles-92d0d9dc1cb61f3ae60320ddb01d243af5bc572d.tar.gz dotfiles-92d0d9dc1cb61f3ae60320ddb01d243af5bc572d.tar.bz2 dotfiles-92d0d9dc1cb61f3ae60320ddb01d243af5bc572d.zip |
(Emacs)~no-littering is setup in init.el
This solves the bug with custom.el where it randomly resets and
forgets what I setup there already. Found this out through
the custom.el info, where setting a custom file yourself requires
loading it in post.
Diffstat (limited to 'Emacs')
-rw-r--r-- | Emacs/.config/emacs/config.org | 11 | ||||
-rw-r--r-- | Emacs/.config/emacs/init.el | 7 |
2 files changed, 7 insertions, 11 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 34b7efb..b16c13b 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -32,16 +32,6 @@ Set the encoding to UTF-8-Unix by default. (setq-default buffer-file-coding-system 'utf-8-unix save-buffer-coding-system 'utf-8-unix)) #+end_src - -Setup no-littering, which cleans up many of the default directories in -Emacs. -#+begin_src emacs-lisp -(use-package no-littering - :demand t - :init - (setq no-littering-etc-directory (expand-file-name ".config/" user-emacs-directory) - no-littering-var-directory (expand-file-name ".local/" user-emacs-directory))) -#+end_src ** File saves and custom file Setup automatic saving for files (in case of system failure) and auto-revert-mode (which refreshes the buffer on changes to the @@ -54,7 +44,6 @@ temporary customisation) in the etc folder. (setq backup-directory-alist `(("." . ,(no-littering-expand-var-file-name "saves/"))) global-auto-revert-non-file-buffers t auto-revert-verbose nil) - (setq custom-file (no-littering-expand-etc-file-name "custom.el")) :config (global-auto-revert-mode 1)) #+end_src diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el index 4c38d29..6011df4 100644 --- a/Emacs/.config/emacs/init.el +++ b/Emacs/.config/emacs/init.el @@ -47,6 +47,13 @@ (straight-use-package 'use-package) (straight-use-package 'org) +(straight-use-package 'no-littering) + +(setq no-littering-etc-directory (expand-file-name ".config/" user-emacs-directory) + no-littering-var-directory (expand-file-name ".local/" user-emacs-directory) + custom-file (no-littering-expand-etc-file-name "custom.el")) + +(load-file custom-file) ;;; Load literate (load-file (concat user-emacs-directory "elisp/literate.el")) |