diff options
author | User Mms <mms@voyager.local> | 2024-10-17 21:08:50 +0200 |
---|---|---|
committer | User Mms <mms@voyager.local> | 2024-10-17 21:08:50 +0200 |
commit | 8fbff6319173bb19d2c74db70e4568fd08b01ee6 (patch) | |
tree | 58697a5b114fe41f83a49b8dd3bed3e885df1d43 /content/cool-emacs/reading-rss-elfeed.md | |
parent | 56a32cb861e698cbe633b037e4a9bc42dd7403c3 (diff) |
tidy up
Diffstat (limited to 'content/cool-emacs/reading-rss-elfeed.md')
-rw-r--r-- | content/cool-emacs/reading-rss-elfeed.md | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/content/cool-emacs/reading-rss-elfeed.md b/content/cool-emacs/reading-rss-elfeed.md deleted file mode 100644 index 550b8ab6..00000000 --- a/content/cool-emacs/reading-rss-elfeed.md +++ /dev/null @@ -1,127 +0,0 @@ -+++ -title = "Read RSS with Elfeed" -author = ["MichaĆ Sapka"] -date = 2023-05-19T23:00:00+02:00 -categories = ["emacs"] -draft = false -weight = 3001 -image_dir = "cool-emacs" -image_max_width = 480 -primary_menu = "cool-emacs-ways" -abstract = "Setting up config inside an org file" -aliases = ["/2023/moving-my-rss-reading-to-emacs-with-elfeed/", "/emacs/moving-my-rss-reading-to-emacs-with-elfeed/", "/emacs/elfeed-literate-config/"] -[menu] - [menu.cool-emacs-ways] - weight = 3001 - identifier = "read-rss-with-elfeed" -+++ - -Since Emacs became my shell of choice[^fn:1], I am abandoning more and more dedicated applications in favor of different packages. -As it turns out, Emacs packages are very feature rich. -This time: I moved my RSS reading from newsboat[^fn:2] to elfeed[^fn:3]. - -Elfeed has very simple keybindings: - -- g will refresh the items list -- G will refresh the items list and fetch new items -- r will mark currently selected item is read (remove unread tag)[^4] -- b will open item in the browser - -One huge upside of elfeed compared to newsboat is image support. -Emacs is a GUI application, so all images are present in their glory! - -{{< image class="centered" alt="An Emacs screenshot showing a list using a dark mode" file="elfeed-list.png" >}} -List of articles -{{< /image >}} - -{{< image class="centered" alt="An Emacs screenshot showing Elfeed in a dark mode with a vintage PC case in the middle" file="elfeed-details.png" >}} -Images! -{{< /image >}} - -My setup is near stock. -I have a few dozen feeds that are auto-tagged. -Three essential tags are "important", "news", and "company". -I want to read each "important", then I want to see all normal, and finally I can just skim "news" and "company". -Adding auto-tagging is very simple: just define the tag when defining the RSS feed list: - -```emacs-lisp -("https://rubenerd.com/feed/" blog important) -("https://www.pine64.org/feed/" company) -``` - -Now, each new article will be tagged with matching tags. -Elfeed allows to define of custom faces that will be applied to items matching tag[^fn:4]: - -```emacs-lisp -(defface important-elfeed-entry - '((t :foreground "#f77")) - "Marks an important Elfeed entry." - :group 'elfeed) - -(defface nonimportant-elfeed-entry - '((t :foreground "#C0C0C0")) - "Marks an nonimportant Elfeed entry." - :group 'elfeed) - -(push '(important important-elfeed-entry) - elfeed-search-face-alist) -(push '(company nonimportant-elfeed-entry) - elfeed-search-face-alist) -(push '(news nonimportant-elfeed-entry) - elfeed-search-face-alist) -``` - -Now important items will be dark red, while company & news will be dark gray - -<div class="img-c"> - -No important things to read at this moment. - -</div> - -Elfeed has a few packages expanding its functionality, but I found the default behavior to be exactly right. - - -## Elfeed-org {#elfeed-org} - -One of the packages expanding capabilities of elfeed is elfeed-org[^fn:5]. -It allows configuring the list of feeds with a standard org tree. -Since my config is now also an org file, nothing stops me from adding the list as an org-tree inside my config org-file! I set it up via: - -{{<highlight lisp "linenos=table,linenostart=199,hl_lines=7">}} - -```org -*** elfeed-org - -#+BEGIN_SRC emacs-lisp -(use-package elfeed-org - :ensure t - :config - (setq rmh-elfeed-org-files (list "~/.emacs.d/config.org")) - (elfeed-org)) -#+END_SRC -``` - -Therefore, I am now pointing at the same file to become the data source for elfeed-org as the rest of my config. -Just a few lines down, I start to define my list of subscriptions: - -```org -*** Feeds :elfeed: - -**** Blogs - -***** https://gideonwolfe.com/index.xml :important: -***** https://fabiensanglard.net/rss.xml. :important: - -**** Emacs - -***** https://protesilaos.com/master.xml :important: -``` - -Much more readable! Elfeed-org will ignore the entire outer tree and extract the feeds from leaves under the `:elfeed:` tag. - -[^fn:1]: [Emacs as a Shell](/2023/emacs-as-a-shell/) -[^fn:2]: [Newsboat homepage](https://newsboat.org/) -[^fn:3]: [Elfeed repository on Github](https://github.com/skeeto/elfeed) -[^fn:4]: my elisp-fu not good -[^fn:5]: <https://github.com/remyhonig/elfeed-org> |