From b7560fb63dce3a1c7cc7048ebcfca7c694e566d2 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 7 Jun 2025 21:35:57 +0200 Subject: [PATCH] ; Use completion category 'recentf' in 'recentf-open' * lisp/recentf.el (recentf-open): Specify a completion category, 'recentf', when prompting for a recent file name. This allows users the customize the behavior of recent file name completion via 'completion-category-overrides'. (Bug#78596) --- lisp/recentf.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/recentf.el b/lisp/recentf.el index a773ea9ec01..006b3159bb9 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -505,7 +505,9 @@ Enable `recentf-mode' if it isn't already." (list (progn (unless recentf-mode (recentf-mode 1)) (completing-read (format-prompt "Open recent file" nil) - recentf-list nil t)))) + (completion-table-with-metadata + recentf-list '((category . recentf))) + nil t)))) (when file (funcall recentf-menu-action file)))