aboutsummaryrefslogtreecommitdiff
path: root/modules/dashboard-config.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-12 10:20:45 -0500
committerCraig Jennings <c@cjennings.net>2026-06-12 10:20:45 -0500
commite170eccc2bafd36befedc5edc0792530f9fd21d1 (patch)
tree6b3ba676c86206546e47e3b94de9cba9880b9adf /modules/dashboard-config.el
parent914d4ea036f56518876396ff1aec75d1edb6cf3d (diff)
downloaddotemacs-e170eccc2bafd36befedc5edc0792530f9fd21d1.tar.gz
dotemacs-e170eccc2bafd36befedc5edc0792530f9fd21d1.zip
fix(dashboard): add EMMS exclusion to recentf-exclude without clobbering it
dashboard-config used setq on recentf-exclude, discarding the five exclusions system-defaults adds earlier in init order (bookmarks, elpa, recentf, ElfeedDB, airootfs). Extract the EMMS exclusion into cj/--dashboard-exclude-emms-from-recentf (the :config side-effect was not reachable for a test) and use add-to-list so prior entries survive. Two ERT tests cover preservation and the added pattern.
Diffstat (limited to 'modules/dashboard-config.el')
-rw-r--r--modules/dashboard-config.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/dashboard-config.el b/modules/dashboard-config.el
index b4e4545d0..c70b78c2d 100644
--- a/modules/dashboard-config.el
+++ b/modules/dashboard-config.el
@@ -145,6 +145,12 @@ window."
;; --------------------------------- Dashboard ---------------------------------
;; a useful startup screen for Emacs
+(defun cj/--dashboard-exclude-emms-from-recentf ()
+ "Exclude the EMMS history file from recentf.
+Adds to `recentf-exclude' so entries set elsewhere (e.g. in
+system-defaults) are preserved rather than overwritten."
+ (add-to-list 'recentf-exclude "/emms/history"))
+
(use-package dashboard
:demand t
:hook (emacs-startup . cj/dashboard-only)
@@ -196,7 +202,7 @@ window."
(setq dashboard-bookmarks-show-path nil) ;; don't show paths in bookmarks
(setq dashboard-recentf-show-base t) ;; show filename, not full path
(setq dashboard-recentf-item-format "%s")
- (setq recentf-exclude '("/emms/history")) ;; exclude EMMS history from recent files
+ (cj/--dashboard-exclude-emms-from-recentf) ;; exclude EMMS history from recent files
(setq dashboard-set-footer nil) ;; don't show footer and quotes
;; == navigation