From de51d94721efb90b153d70dc15691c16d0fbb46a Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 29 Jan 2021 06:46:14 +0100 Subject: Mention using buffer-list-update-hook in recentf-mode * lisp/recentf.el (recentf-mode): Mention using `buffer-list-update-hook' (bug#46153). --- lisp/recentf.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/recentf.el b/lisp/recentf.el index a28a3977a76..d39a523289f 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1352,7 +1352,14 @@ That is, remove duplicates, non-kept, and excluded files." When Recentf mode is enabled, a \"Open Recent\" submenu is displayed in the \"File\" menu, containing a list of files that -were operated on recently, in the most-recently-used order." +were operated on recently, in the most-recently-used order. + +By default, only operations like opening a file, writing a buffer +to a file, and killing a buffer is counted as \"operating\" on +the file. If instead you want to prioritize files that appear in +buffers you switch to a lot, you can say something like the following: + + (add-hook 'buffer-list-update-hook 'recentf-track-opened-file)" :global t :group 'recentf :keymap recentf-mode-map -- cgit v1.2.1