Closed qinbill closed 5 years ago
Interesting, the reason the files don't end up there is because by default recentf-mode
hooks into file functions that assume a recent file is associated with a filename. This isn't the case here because the association with the filename is cut to avoid warnings about modified files or saving the file to destroy your EPUB.
I've recently added support for third-party packages to figure out the original filename by checking nov-file-name
. With this it's possible to add the opened file to recentf-list
:
(defun my-nov-add-to-recentf ()
(when nov-file-name
(recentf-add-file nov-file-name)))
(add-hook 'nov-mode-hook 'my-nov-add-to-recentf)
Does this work as expected for you?
Thanks. It worked.
I use spacemacs. it would be helpful if the Nov mode can automatically add the opened files into the recent files, ie recentf.