From c3091b1df1d2f4a8ecad6984d6d76593c9248279 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Mon, 3 Feb 2025 16:15:05 -0500 Subject: [PATCH] Add minimal-emacs-user-directory to recentf-exclude --- init.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/init.el b/init.el index e977fcb..ab5e641 100644 --- a/init.el +++ b/init.el @@ -220,6 +220,16 @@ (recentf-cleanup))) (add-hook 'kill-emacs-hook #'minimal-emacs--cleanup-hook) +;; Update recentf-exclude +(setq recentf-exclude nil) +(dolist (item (list "^/\\(?:ssh\\|su\\|sudo\\)?:" + (concat "^" + (regexp-quote + (abbreviate-file-name + minimal-emacs-user-directory))))) + (when item + (push item recentf-exclude))) + ;;; saveplace ;; `save-place-mode' enables Emacs to remember the last location within a file