From f460c3a19fb9477d63c5f7bbda90c7c7c283dcca Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 11 Apr 2023 20:09:32 -0700 Subject: [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. --- oni-elfeed.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'oni-elfeed.el') 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 ;; 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) -- cgit v1.2.3-54-g00ecf