diff options
| author | 2023-04-11 20:09:32 -0700 | |
|---|---|---|
| committer | 2023-04-11 20:09:32 -0700 | |
| commit | f460c3a19fb9477d63c5f7bbda90c7c7c283dcca (patch) | |
| tree | f5a501b56a52c502f540c004fb6345beb6079a9e | |
| parent | 9c1ef54e74308eca1049b4f99b37fe03c542eb0d (diff) | |
| download | emacs-config-f460c3a19fb9477d63c5f7bbda90c7c7c283dcca.tar.gz emacs-config-f460c3a19fb9477d63c5f7bbda90c7c7c283dcca.zip | |
[oni-elfeed] Fix tagger that removes duplicates of Planet Emacslife
First: the match needs to be any entry that does match the names of the people
whos blogs I already follow.
Second: The search regular expression can't contain spaces. It seems to be the
same as any search query. So when a regular expression contains a space it's
considered two different search terms. This doesn't work when we're searching
for one option with a space in it (“Irreal” or “Sacha Chua” or “Andrea”) since
the syntax for the regular expression gets all messed up. Quickest workaround is
to match any whitespace instead.
| -rw-r--r-- | oni-elfeed.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/oni-elfeed.el b/oni-elfeed.el index a5ba02d..8f85fb2 100644 --- a/oni-elfeed.el +++ b/oni-elfeed.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 2023.0401.234314 +;; Version: 2023.0411.200412 ;; Package-Requires: (elfeed olivetti) ;; This program is free software; you can redistribute it and/or modify @@ -106,13 +106,16 @@ ;;; Mark any post from Planet Emacslife read if I also follow the originating ;;; blog. This way I won't have so many duplicates. -(add-hook 'elfeed-new-entry-hook - (elfeed-make-tagger :feed-url (rx "planet.emacslife.com") - :entry-title `(not ,(rx bos (or "Irreal" - "Sacha Chua" - "Andrea") - ":")) - :remove 'unread)) +(defvar oni-elfeed-duplicate-tagger + (elfeed-make-tagger :feed-url (rx "planet.emacslife.com") + :entry-title (rx bos (or "Irreal" + (seq "Sacha" whitespace "Chua") + "Andrea") + ":") + :remove 'unread) + "Tagger for elfeed that marks certain posts as read for Emacslife.") + +(add-hook 'elfeed-new-entry-hook oni-elfeed-duplicate-tagger) (add-hook 'elfeed-show-mode-hook #'oni-elfeed-enable-olivetti-mode) |
