0

Whenever I edit files on removable media, these files disappear from the recent files list, when I remove the media.

When I reinsert the media, I have no recent files for that medium and I have to browse anew.

Is this maybe a setting to eradicate? ;)

1 Answer 1

2

Customize recentf-keep and set it to nil if you don't want any checking. C-h v recentf-keep says:

recentf-keep is a variable defined in ‘recentf.el’.

Its value is (recentf-keep-default-predicate)

List of regexps and predicates for filenames kept in the recent list. Regexps and predicates are tried in the specified order. When nil all filenames are kept in the recent list. When a filename matches any of the regexps or satisfies any of the predicates it is kept in the recent list. The default is to keep readable files. Remote files are checked for readability only in case a connection is established to that remote system, otherwise they are kept in the recent list without checking their readability. A predicate is a function that is passed a filename to check and that must return non-nil to keep it.

See also the doc string and the source code of recentf-keep-default-predicate. Instead of getting rid of all checking, you might want to define your own predicate that does a subset of the checks that recentf-keep-default-predicate does.

Note that if you exit from Emacs and restart it, unreadable files will be purged from the recent file list, so make sure to mount the removable media before you start Emacs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.