Add predicate to prune entries from removed feeds
This commit is contained in:
parent
564a8d63bf
commit
ad68b76076
1 changed files with 7 additions and 1 deletions
|
@ -65,7 +65,8 @@ to t you are aware of the risks."
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
(defcustom elfeed-prune-predicates
|
(defcustom elfeed-prune-predicates
|
||||||
(list #'elfeed-prune--entry-too-old-p)
|
(list #'elfeed-prune--entry-too-old-p
|
||||||
|
#'elfeed-prune--feed-unlisted-p)
|
||||||
"Entries that match *any* of these predicates are pruned.
|
"Entries that match *any* of these predicates are pruned.
|
||||||
|
|
||||||
Each predicate accepts an entry and a feed object and should
|
Each predicate accepts an entry and a feed object and should
|
||||||
|
@ -82,6 +83,11 @@ return t when the entry should be kept."
|
||||||
:group 'elfeed-prune
|
:group 'elfeed-prune
|
||||||
:type 'list)
|
:type 'list)
|
||||||
|
|
||||||
|
(defun elfeed-prune--feed-unlisted-p (entry feed)
|
||||||
|
(not (seq-contains-p (mapcar #'car elfeed-feeds)
|
||||||
|
(elfeed-feed-url feed)
|
||||||
|
#'string=)))
|
||||||
|
|
||||||
(defun elfeed-prune--entry-too-old-p (entry _)
|
(defun elfeed-prune--entry-too-old-p (entry _)
|
||||||
"Return t if the given ENTRY is considered too old.
|
"Return t if the given ENTRY is considered too old.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue