I want to get rid of invalid recentf entries, that is buffers that no longer exist on disk, because I renamed or just plain deleted them ; I just did a
M-x recentf-cleanup and apparently lost all my history :/ what would be a sure and safe way to clean this list up?
recentf-cleanup shouldn't remove all your history. According to the documentation (
C-h f recentf-cleanup RET):
recentf-cleanup is an interactive compiled Lisp function in ‘recentf.el’.
Cleanup the recent list. That is, remove duplicates, non-kept, and excluded files.
One can also edit recentf list manually with the following bit of elisp :
(delete "/the/file/you/want/to/remove.example" recentf-list)
(I'm not an expert, it may introduce bugs or there's probably a cleaner/more appropriate way to do it, I don't know. But it appears to work on my emacs.)
Edit : There's also :
M-x recentf-edit-list RET
recentf-edit-list is an interactive compiled Lisp function in ` recentf.el'.
Show a dialog to delete selected files from the recent list.