# Elfeed

I’ve become pretty addicted to the Elfeed RSS reader. However, I haven’t made much use of its tagging capabilities until recently. I noticed that, whenever I thought I might want to keep track of the content of a blog, I would mark it “unread” after I’d read it, to make sure I didn’t lose it in the deep mists of time. This worked for the first 4 months or so, but now my list of unreads is growing enormously. So I wanted to have a “starred” tag which would do this work for me. I also wanted a keybinding that would apply the tag right away.

The code below does that for me.

(eval-after-load 'elfeed-search
'(define-key elfeed-search-mode-map (kbd "<tab>") 'mwp/elfeed-star))
(defun mwp/elfeed-star ()
“add a star tag to marked”
(interactive)
(elfeed-search-tag-all (list starred))
)
(defun mwp/elfeed-star ()
“Apply TAG to all selected entries."
(interactive )
(let* ((entries (elfeed-search-selected))
(tag (intern “starred”)))
<span style="color: #707183;">(</span><span style="color: #a020f0;">cl-loop</span> for entry in entries do <span style="color: #707183;">(</span>elfeed-tag entry tag<span style="color: #707183;">))</span>
<span style="color: #707183;">(</span>mapc #'elfeed-search-update-entry entries<span style="color: #707183;">)</span>
<span style="color: #707183;">(</span><span style="color: #a020f0;">unless</span> <span style="color: #707183;">(</span>use-region-p<span style="color: #707183;">)</span> <span style="color: #707183;">(</span>forward-line<span style="color: #707183;">))))</span>



I also wanted a visual cue to tell me the tagging had been successful – now easy to do, thanks to a very recent commit. I filed an issue as a question – can I do this? – and within 24 hours skeeto had added the functionality. First you have to define an appropriate face for the tag:

(defface elfeed-search-starred-title-face
'((t :foreground "#f77"))
"Marks a starred Elfeed entry.")


And then simply add an entry to elfeed-search-face-alist. You can do this via Customize, or follow the instructions in the README, which instruct you to (push '(starred elfeed-search-starred-title-face) elfeed-search-face-alist).

All of this works great for me, and simplifies things quite a bit.