From eb19afa8c3cf4e69e50dfc098481f38daf2a543b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 4 Apr 2025 04:30:36 -0400 Subject: [PATCH] refactor: remove doom--recentf-file-truename-fn For the sake of reducing complexity, I stop Doom from stripping symlinks or the "/sudo:" prefix from tramp paths in recentf's file list. It's extra work that's not strictly necessary or unanimously desired. Also removes the tidbit about `recentf-show-abbreviated`; the variable was removed just prior to 29's release so it is no longer an option. --- lisp/doom-editor.el | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lisp/doom-editor.el b/lisp/doom-editor.el index 6f33b1a94..424cb36c8 100644 --- a/lisp/doom-editor.el +++ b/lisp/doom-editor.el @@ -307,26 +307,11 @@ tell you about it. Very annoying. This prevents that." (setq recentf-auto-cleanup nil ; Don't. We'll auto-cleanup on shutdown recentf-max-saved-items 200) ; default is 20 - (defun doom--recentf-file-truename-fn (file) - (if (or (not (file-remote-p file)) - (equal "sudo" (file-remote-p file 'method))) - (abbreviate-file-name (file-truename (tramp-file-name-localname file))) - file)) - - ;; REVIEW: Use this in lieu of `doom--recentf-file-truename-fn' when we drop - ;; 28 support. See emacs-mirror/emacs@32906819addd. - ;; (setq recentf-show-abbreviated t) - ;; 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 - ;; space) - (add-to-list 'recentf-filename-handlers #'doom--recentf-file-truename-fn) - ;; Text properties inflate the size of recentf's files, and there is ;; no purpose in persisting them (Must be first in the list!) (add-to-list 'recentf-filename-handlers #'substring-no-properties)