Added note about recentf-auto-cleanup.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 02 Jan 2021 19:44:27 +0200
changeset 1677 bfa894057550
parent 1676 2952c3c11261
child 1678 6a1398ccb866
Added note about recentf-auto-cleanup.
.emacs-my
--- a/.emacs-my	Sat Jan 02 19:15:13 2021 +0200
+++ b/.emacs-my	Sat Jan 02 19:44:27 2021 +0200
@@ -46,7 +46,6 @@
 ;; (recentf-load-list)
 (setq recentf-save-file (concat user-emacs-directory ".recentf"))
 
-(setq recentf-auto-cleanup 600)
 ;; Prevent TRAMP to login on remote host when loading. Its take time and ask passwords!
 (setq recentf-keep '(file-remote-p file-readable-p))
 (setq recentf-exclude                   ; Use ``M-x recentf-cleanup`` to update recentf-list.
@@ -59,7 +58,11 @@
 (setq recentf-max-menu-items 40)
 (setq recentf-show-file-shortcuts-flag nil)
 
-(recentf-mode t)
+;; Need to be defined before loading "recentf" because default value is
+;; "mode", meaning cleanup when turning the mode on.
+(setq recentf-auto-cleanup 600)
+
+(recentf-mode 1)
 
 (global-set-key (kbd "\e\eq") 'recentf-open-files)
 (global-set-key [?\s-q] 'recentf-open-files)