GNU bug report logs -
#67946
30.0.50; [RFC PATCH] Add an option to not report "Wrote ..." when saving recentf.
Previous Next
Full log
Message #67 received at 67946 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>These kinds of messages interfere with minibuffer use when they appear. My recentf timer is hourly, yet I
> still notice it from time to time. I forcibly suppress the message in a messier way than I'd prefer.
I am saving recentf files on each new visited file or killed buffer
because, well, why wouldn't I? Why would I risk losing even a single
recentf entry if the impact of IO on an nvme is negligible, so I am
seeing this message all the time.
I have updated the patch, calling the variable
`recentf-inhibit-messages', because this is probably a better name, and
I have also made it a boolean.
I don't think that "saveplace" and "recentf" should share a variable,
because they are different packages, and people might be using them in
a different way.
[signature.asc (application/pgp-signature, inline)]
[0001-lisp-recentf.el-Add-verbosity-option.patch (text/x-patch, inline)]
From 1c557fa8d6cf0a3481d6028189074cd0b3fad671 Mon Sep 17 00:00:00 2001
From: Lockywolf <for_emacs-recentf-patch_2023-12-21 <at> lockywolf.net>
Date: Thu, 13 Feb 2025 11:51:50 +0800
Subject: [PATCH] lisp/recentf.el: Add verbosity option
* lisp/recentf.el: add verbosity (bug#67946)
recentf-verbosity: add defcustom to control verbosity
(recentf-save-list): make use of recentf-verbosity
---
etc/NEWS | 7 +++++++
lisp/recentf.el | 15 ++++++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index 33f5df84d4b..b7de9384fe7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -500,6 +500,13 @@ This user option controls the width of the type column on the bookmark
menu 'bookmark-bmenu-list'. The default value is 8 which is backwards
compatible.
+** Recentf
+
+---
+*** New user option 'recentf-verbose'.
+By default 'recentf-save-list' prints a message when saving the
+recentf list. The new option, if set to nil, suppresses this message.
+
** Saveplace
---
diff --git a/lisp/recentf.el b/lisp/recentf.el
index a282fbee3b1..36508acf2b3 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -320,6 +320,14 @@ recentf-show-file-shortcuts-flag
used as shortcuts to open the Nth file."
:group 'recentf
:type 'boolean)
+
+(defcustom recentf-inhibit-messages t
+ "Whether to show verbose messages about low-level recentf actions.
+t means to not show messages related to the recentf machinery.
+nil means show messages that were printed by default on Emacs <= 30.1."
+ :group 'recentf
+ :type 'boolean
+ :version "30.1")
;;; Utilities
;;
@@ -1331,7 +1339,12 @@ recentf-save-list
(format ";; coding: %s\n" recentf-save-file-coding-system)
";; End:\n")
(write-region (point-min) (point-max)
- (expand-file-name recentf-save-file))
+ (expand-file-name recentf-save-file)
+ nil
+ (if (or recentf-inhibit-messages
+ (not (called-interactively-p 'any)))
+ 1 nil)
+ )
(when recentf-save-file-modes
(set-file-modes recentf-save-file recentf-save-file-modes))
nil)
--
2.46.3
[Message part 4 (text/plain, inline)]
--
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)
This bug report was last modified 89 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.