preserve recent files buffer after opening a file reddit / emacs ---------------------------------------------------------------------- Ok-Meal8379 · 2022-12-28 05:23 when I open a file in `recentf-open-files` buffer, the file buffer replaces the recent files list. is there a way to keep the list open so I can go back to it and open more recent files? I tried changing `recentf-menu-action` to `find-file-other-window`, but the list buffer still disappears ---------------------------------------------------------------------- nv-elisp · 2022-12-28 06:53 It looks like the `kill-buffer` is hardcoded in. You can define advise the function which kills it to get around that. e.g. (setq recentf-menu-action #'find-file-other-window) (define-advice recentf-open-most-recent-file (:around (fn &rest args) no-kill-buffer) (cl-letf (((symbol-function #'kill-buffer) 'ignore)) (apply fn args))) ---------------------------------------------------------------------- Ok-Meal8379 · 2022-12-28 08:47 this is my init now: (recentf-mode t) (setq recentf-menu-action #'find-file-other-window) (define-advice recentf-open-most-recent-file (:around (fn &rest args) no-kill-buffer) (cl-letf (((symbol-function #'kill-buffer) 'ignore)) (apply fn args))) and still seeing the same behavior. I don't know any lisp, did I do it wrong? ---------------------------------------------------------------------- Ok-Meal8379 · 2022-12-28 11:30 correction: this actually works but only if I use numbers to select the file and not press enter on them. thanks for this ---------------------------------------------------------------------- nv-elisp · 2022-12-28 20:51 Sorry I don't have time to offer any more support here. I would look up how to debug elisp and start there.