I renamed few files using Dired. I noticed helm shows old names in the list of recent files (helm-recentf
).
How do I remove the files that do not exist from recent files list?
How do I remove the files that do not exist from recent files list?
M-xrecentf-cleanup
RET
recentf-cleanup is an interactive compiled Lisp function in
‘recentf.el’.
(recentf-cleanup)
Cleanup the recent list.
That is, remove duplicates, non-kept, and excluded files.
See also the user options recentf-auto-cleanup
:
recentf-auto-cleanup is a variable defined in ‘recentf.el’.
Its value is ‘mode’
Documentation:
Define when to automatically cleanup the recent list.
The following values can be set:
- ‘mode’
Cleanup when turning the mode on (default).
- ‘never’
Never cleanup the list automatically.
- A number
Cleanup each time Emacs has been idle that number of seconds.
- A time string
Cleanup at specified time string, for example at "11:00pm".
Setting this variable directly does not take effect;
use M-x customize.
See also the command ‘recentf-cleanup’, that can be used to manually
cleanup the list.
You can customize this variable.
as well as recentf-keep
and recentf-exclude
for more granular control over what is allowed into recentf-list
. The default value of recentf-keep
ensures non-readable files are removed from the list.
See also M-xrecentf-edit-list
RET:
recentf-edit-list is an interactive compiled Lisp function in `recentf.el'.
(recentf-edit-list)
Show a dialog to delete selected files from the recent list.
recentf-cleanup
does not empty recentf-list
. Try setting recentf-list
to the empty list, either directly or by calling recentf-edit-list
, followed by recentf-save-list
.
customize-set-value
is only useful for interactive use, or for setting a variable-comment
property; otherwise you can just use setq
or setq-default
. If you want the function recentf-auto-cleanup
to be called after you set the user option recentf-auto-cleanup
, then you should use customize-set-variable
instead, as this makes sure to call the user option's custom :set
function.
helm-recentf
. Because it only shows a text field that is used to filter the list of recent files. As soon as I typeg
it is evaluated as the search pattern.