Force emacs recent files using recentf to ignore specified files (.windows and .revive for example)
Asked Answered
S

1

12

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.

Swamper answered 6/11, 2011 at 3:49 Comment(0)
D
20

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.

Durazzo answered 6/11, 2011 at 5:1 Comment(8)
That appeared not to work. Are those regexps right? Should they remove the \'. I don't know regexps very well.Swamper
@J Spen: "\\'" just marks the end of the string, you may leave it out, of course.Durazzo
I even tried without using regexp already and just put ".windows". This didn't work either. How do I check in emacs what recentf-exclude current value is. Also, I thought it might be because save files is already has that saved in it.Swamper
Sorted it out. It was the latter of what I said in the comment above. The ones already stored never got removed. Once I deleted them they didn't show back up. Cheers for the help.Swamper
Running M-x recentf-cleanup will update your recentf-list with the new recentf-exclude rules.Townsfolk
@JSpen So the \\ at the beginning and the end of the regexps are pointless?Hako
I hace tried this to exclude __init__.py file but it did not work @Victor DeryaginMargrettmarguerie
What should I write to ignore Ibuffer* buffer ?Margrettmarguerie

© 2022 - 2024 — McMap. All rights reserved.