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