From f96c666460dc7de701d5cbe77615d04db215fd30 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jun 2022 14:58:07 +0200 Subject: [PATCH] tweak: add $XDG_RUNTIME_DIR to recentf-exclude Ref: eb170a7a3826 --- core/core-editor.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 62a8deeef..8bb87c3da 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -306,8 +306,10 @@ tell you about it. Very annoying. This prevents that." (abbreviate-file-name (file-truename (tramp-file-name-localname tfile))) file)) - ;; Anything in the runtime folders (i.e. $XDG_RUNTIME_DIR) - (add-to-list 'recentf-exclude "^/run") + ;; Anything in runtime folders + (add-to-list 'recentf-exclude + (concat "^" (regexp-quote (or (getenv "XDG_RUNTIME_DIR") + "/run")))) ;; Resolve symlinks, strip out the /sudo:X@ prefix in local tramp paths, and ;; abbreviate $HOME -> ~ in filepaths (more portable, more readable, & saves