From d5652d27798d9f7bf48d6885d805943f0e8ca75f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 11 Jun 2017 23:50:50 +0200 Subject: [PATCH] Change what recentf ignores; add doom-host-dir var --- CHANGELOG.org | 3 +++ core/core-editor.el | 13 +++++++++---- core/core.el | 10 ++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 093255a88..466d1fd5f 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -68,9 +68,12 @@ + =tools/password-store= -- Emacs as a password manager, using [[https://www.passwordstore.org/][pass]] as a backend (contributed by [[https://github.com/bandresen][brandresen]]). + =app/irc= -- Emacs as an IRC client, using circe (contributed by [[https://github.com/bandresen][brandresen]]). + =core= + + New variable: ~doom-host-dir~, as a base path for ~doom-etc-dir~ and ~doom-cache-dir~. + =core-ui= + Add quit confirmation when trying to close a frame that contains real buffers. + Fix quit confirmations for clients connected to ~emacs --daemon~ with ~emacsclient~. + + =core-editor= + + Change what files recentf will ignore: everything in ~doom-host-dir~ is now ignored and anything else in ~doom-local-dir~ won't be. + =core-packages= + When a quelpa package is deleted, its build repo (in ~quelpa-build-dir~) is now deleted with it. + =feature= diff --git a/core/core-editor.el b/core/core-editor.el index babfcb9c7..032849d55 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -114,11 +114,16 @@ fundamental-mode) for performance sake." :defer 1 :config (setq recentf-save-file (concat doom-cache-dir "recentf") - recentf-exclude (list "/tmp/" "/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$" - "^/var/folders/.+$" doom-local-dir) recentf-max-menu-items 0 - recentf-max-saved-items 250 - recentf-filename-handlers '(abbreviate-file-name)) + recentf-max-saved-items 300 + recentf-filename-handlers '(abbreviate-file-name) + recentf-exclude + (list "^/tmp/" "^/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$" + "^/var/folders/.+$" + ;; ignore private DOOM temp files (but not all of them) + (concat "^" (replace-regexp-in-string + (concat "@" (regexp-quote (system-name))) + "@" (abbreviate-file-name doom-host-dir))))) (quiet! (recentf-mode 1))) diff --git a/core/core.el b/core/core.el index a17032c50..a9f014ced 100644 --- a/core/core.el +++ b/core/core.el @@ -42,15 +42,17 @@ line or use --debug-init to enable this.") that are safe to share across systems (if this config is symlinked across several computers).") -(defvar doom-etc-dir - (concat doom-local-dir "@" (system-name) "/etc/") +(defvar doom-host-dir (concat doom-local-dir "@" (system-name)) + "Directory for hostname-specific file storage. Used by `doom-etc-dir' and +`doom-cache-dir'.") + +(defvar doom-etc-dir (concat doom-host-dir "/etc/") "Host-namespaced directory for non-volatile storage. These are not deleted or tampored with by DOOM functions. Use this for dependencies like servers or config files that are stable (i.e. it should be unlikely that you need to delete them if something goes wrong).") -(defvar doom-cache-dir - (concat doom-local-dir "@" (system-name) "/cache/") +(defvar doom-cache-dir (concat doom-host-dir "/cache/") "Host-namespaced directory for volatile storage. Deleted when `doom/clean-cache' is called. Use this for transient files that are generated on the fly like caches and temporary files. Anything that may need to be cleared if