Zamansky 31: Elfeed (3)

Mike Zamansky has the latest video in his Using Emacs series up. This is the third in his set of videos on Elfeed. This time he considers using macros and hydras with Elfeed. In the second video, Zamansky showed how to use a hydra to pull up all the feed entries with a given tag.

That was a big improvement over having to type in a search to narrow the menu to a given set of feed entries but Zamansky wasn’t satisfied. The problem is that an active Elfeed workflow doesn’t define a given set of tags upfront. New tags are always being created and some are even being deleted. That means that you have to constantly update the hydra to keep the list of targets up to date.

Zamansky solves this problem by programmatically obtaining a list of active tags from Elfeed, generating a list hydra target entries, and dynamically generating the hydra. All this happens each time he invokes his Elfeed “jump to target” function. Rather than just invoke the hydra, it first builds the hydra with an up-to-date list of active tags.

That sounds complicated and perhaps even a bit magical but using a macro to define the hydra it becomes almost trivial. Most of the work is deciding which key to use for a given tag. See Zamansky’s post or video for the details. The video is 11 minutes, 22 seconds long so it shouldn’t be hard to find time to watch it.

This entry was posted in General and tagged . Bookmark the permalink.