From e0318de85888e316d723da8e7baf642c7961caa2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:37:34 -0600 Subject: Better-configure elfeed --- init.el | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/init.el b/init.el index 36bfff0..d2997fb 100644 --- a/init.el +++ b/init.el @@ -826,19 +826,32 @@ See also `crux-reopen-as-root-mode'." (setup (:straight elfeed) (:also-load +elfeed) - (:option elfeed-use-curl t - elfeed-curl-extra-arguments '("--insecure") - elfeed-show-unique-buffers t - elfeed-db-directory (sync/ "elfeed/db/" t)) + (+define-dir elfeed/ (sync/ "emacs/elfeed/" t)) + (:option + elfeed-curl-program-name (executable-find "curl") + elfeed-use-curl elfeed-curl-program-name + elfeed-curl-extra-arguments '("--insecure") + elfeed-enclosure-default-dir (cl-loop for dir in '("~/var/download/" + "~/Downloads/") + if (file-exists-p dir) + return dir) + elfeed-search-filter "@1-month-ago +unread" + elfeed-search-trailing-width 24 + elfeed-search-title-min-width 24 + elfeed-search-title-max-width 78 + elfeed-show-unique-buffers t + elfeed-db-directory (elfeed/ "db/" t)) ;; https://old.reddit.com/r/emacs/comments/rlli0u/whats_your_favorite_defadvice/hphfh4e/ (advice-add #'elfeed-search-update--force :after #'elfeed-db-save) (:with-mode elfeed-show-mode (:bind "SPC" #'+elfeed-scroll-up-command "S-SPC" #'+elfeed-scroll-down-command) - (:hook #'reading-mode))) + (:hook #'reading-mode) + (define-advice elfeed-show-entry (:after (&rest _)) + (run-at-time 0 nil #'elfeed-show-refresh)))) (setup (:straight elfeed-org) - (:option rmh-elfeed-org-files (list (sync/ "elfeed/elfeed.org" t))) + (:option rmh-elfeed-org-files (list (elfeed/ "/elfeed.org" t))) (elfeed-org)) (setup (:straight embark) -- cgit 1.4.1-21-gabe81