Change what recentf ignores; add doom-host-dir var

This commit is contained in:
Henrik Lissner 2017-06-11 23:50:50 +02:00
parent 10eef78d43
commit d5652d2779
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 18 additions and 8 deletions

View file

@ -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]]). + =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]]). + =app/irc= -- Emacs as an IRC client, using circe (contributed by [[https://github.com/bandresen][brandresen]]).
+ =core= + =core=
+ New variable: ~doom-host-dir~, as a base path for ~doom-etc-dir~ and ~doom-cache-dir~.
+ =core-ui= + =core-ui=
+ Add quit confirmation when trying to close a frame that contains real buffers. + Add quit confirmation when trying to close a frame that contains real buffers.
+ Fix quit confirmations for clients connected to ~emacs --daemon~ with ~emacsclient~. + 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= + =core-packages=
+ When a quelpa package is deleted, its build repo (in ~quelpa-build-dir~) is now deleted with it. + When a quelpa package is deleted, its build repo (in ~quelpa-build-dir~) is now deleted with it.
+ =feature= + =feature=

View file

@ -114,11 +114,16 @@ fundamental-mode) for performance sake."
:defer 1 :defer 1
:config :config
(setq recentf-save-file (concat doom-cache-dir "recentf") (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-menu-items 0
recentf-max-saved-items 250 recentf-max-saved-items 300
recentf-filename-handlers '(abbreviate-file-name)) 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))) (quiet! (recentf-mode 1)))

View file

@ -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 that are safe to share across systems (if this config is symlinked across
several computers).") several computers).")
(defvar doom-etc-dir (defvar doom-host-dir (concat doom-local-dir "@" (system-name))
(concat doom-local-dir "@" (system-name) "/etc/") "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 "Host-namespaced directory for non-volatile storage. These are not deleted or
tampored with by DOOM functions. Use this for dependencies like servers 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 config files that are stable (i.e. it should be unlikely that you need to delete
them if something goes wrong).") them if something goes wrong).")
(defvar doom-cache-dir (defvar doom-cache-dir (concat doom-host-dir "/cache/")
(concat doom-local-dir "@" (system-name) "/cache/")
"Host-namespaced directory for volatile storage. Deleted when "Host-namespaced directory for volatile storage. Deleted when
`doom/clean-cache' is called. Use this for transient files that are generated on `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 the fly like caches and temporary files. Anything that may need to be cleared if