app/rss: fix empty rmh-elfeed-org-files

Due to overeager cleanup that we now defer until elfeed-org consults
rmh-elfeed-org-files.
This commit is contained in:
Henrik Lissner 2021-02-26 21:19:28 -05:00
parent 9a77626804
commit bbdea54b77

View file

@ -67,8 +67,12 @@ easier to scroll through.")
:preface :preface
(setq rmh-elfeed-org-files (list "elfeed.org")) (setq rmh-elfeed-org-files (list "elfeed.org"))
:config :config
(and (let ((default-directory org-directory)) (elfeed-org)
(setq rmh-elfeed-org-files (defadvice! +rss-skip-missing-org-files-a (&rest _)
(cl-remove-if-not :before '(elfeed rmh-elfeed-org-mark-feed-ignore elfeed-org-export-opml)
#'file-exists-p (mapcar #'expand-file-name rmh-elfeed-org-files)))) (unless (file-name-absolute-p (car rmh-elfeed-org-files))
(elfeed-org))) (let* ((default-directory org-directory)
(files (mapcar #'expand-file-name rmh-elfeed-org-files)))
(dolist (file (cl-remove-if #'file-exists-p files))
(message "elfeed-org: ignoring %S because it can't be read" file))
(setq rmh-elfeed-org-files (cl-remove-if-not #'file-exists-p files))))))