-->

Force emacs recent files using recentf to ignore s

2019-04-05 04:18发布

问题:

I have always been bugged by the fact that when exiting with revive.el and windows.el enabled it opens a file and writes to it called .revive and .windows. These are saved so it goes in the recent files list. Is there anyway to make it ignore these files or any other files I desire.

回答1:

A way to make recentf ignore some files is to add appropriate regexps to recentf-exclude list:

(add-to-list 'recentf-exclude "\\.windows\\'")
(add-to-list 'recentf-exclude "\\.revive\\'")

This will prevent any future entries of the above from being added to the recentf list. You need to delete the current entries in your recentf file for them to be permanently removed or wait until they are phased out from other entries.