Leaving Elfeed for Gnus

Table of Contents

A few weeks ago I was playing around with Gnus, I don't remember Why I stop using it but I just switched back to Elfeed, and before that I also spent my time with Newsticker, I wasn't convinced completely about the last one, so seriously start using other unix tools for reading news, like Newsraft.

Just few weeks ago the Elfeed's author announced that finally stop using Emacs in favor of Vim, and he vibecode his own solution called Elfeed2. Obviously this situation put at risk the original project in case that no one wants to become the maintainer. So I took the opportunity to revisit the built-in tools in Emacs and try Gnus again, because It gave me a better experience compared with Newsticker. For this reason, I have to say that the Emacs people who tend to prefer the built-in solutions and just hack around it, got it right.

After a couple of tutorials from Protesilaos and Amin Bandali, I could set up successfully Gnus while understanding the basic keys for navigation. Gnus is big, there is no doubt about that, in fact I still don't read all the documentation, but you need very little to start with it.

The last piece in the puzzle was to be able to set up mpv for specific use cases (like watching Youtube videos), I was searching a way to do this with some Gnus features, but later I just realize that with just changing the default browser, you can easily execute mpv when there are some extensions like "Youtube.com…"

1. Basic Tutorial

So what I recommend is following some servers, while Gnus has his own functions to extract rss (nnrss), I just recommend you to connect to Gwene.org and Feedbase.org via nntp to follow your blogs, mailing list and Youtube channels.

(use-package gnus
:ensure nil
:config

(setq gnus-select-method '(nnnil ""))
(setq gnus-secondary-select-methods
      '(
          ;; Connecting to gwene
          (nntp "news.gwene.org")
          ;; Connecting to Feedbase
          (nntp "feedbase"
                (nntp-open-connection-function nntp-open-tls-stream) ; feedbase does not do STARTTLS (yet?)
                (nntp-port-number 563) ; nntps
                (nntp-address "feedbase.org"))
          ;; Here can come another connections like your emails for example
)

With this basic setup, you can start Gnus and you should be able to connect to these servers, obviously nothing will appear because you didn't subscribe to anything yet, but if you press ^ you should be able to see all the servers you are connected to, select gwene, it will open all the groups in that server find your blogs, mailing lists and Youtube feeds, if you are missing some just add the rss to the respective websites (gwene.org) and in minutes, the new rss will appear on the list, you can subscribe to the group by putting the cursor on the group and pressing u.

After You subscribed to few groups close the servers with q and you should come back to Gnus Groups, you can update pressing g or just quick with q and enter again to Gnus, You should see the new groups you subscribed.

Another nice feature of Gnus is that you can create topics, this is just a simple way to sort your groups so it become easier to navigate through them. Press T-n to create a topic, and to move specific group to that topic just press T-m and then select the topic to send that group to it.

Finally, you want to read the news, select the group if it has too many articles Gnus will prompt you how many you wants to get, select 10 for example and then it will open the latest 10 articles, you can press Enter to open the article, n and p to move to the next and previous article unread, Space to reading through the article and q to close the Group and comeback to the main Gnus default. If you want to mark all the articles in the group as read, just press c and select y.

If you want to read the article from another way, let's say Youtube from mpv and blogs from eww, I recommend you to use a code I steal from Joshua:

  (defun my-browse-url-mpv (url &rest _args)
  "Open URL in mpv."
  (start-process "mpv" nil "mpv" url))

(defun my-browse-url-pdf (url &rest _args)
  "Fetch remote PDF and open in pdf-tools within Emacs."
  (let ((tmp (make-temp-file "emacs-pdf-" nil ".pdf")))
    (url-copy-file url tmp t)
    (find-file-other-window tmp)
    (pdf-view-mode)))

(setq browse-url-handlers
      '(("\\(youtube\\.com\\|youtu\\.be\\|vimeo\\.com\\|twitch\\.tv\\)" . my-browse-url-mpv)
        ("\\.mp4$" . my-browse-url-mpv)
        ("\\.pdf$" . my-browse-url-pdf)
        ("^gemini://" . elpher-browse-url-elpher)
        ("^gopher://" . elpher-browse-url-elpher)
        ("." . eww-browse-url)))

This allow me to open articles with eww, and youtube and other websites with mpv. I am sure there is a better way to handle the urls with Gnus but for now this solve my basic use.

2. Conclusions

Gnus is huge, and many people prefer the simplicity of Elfeed to access to news and blogs, but while that is true, I don't think you need to know that much about Gnus in order to consume information, surprisingly enough, Gnus has been a nice experience for reading news and emails. and I think We should appreciate that we have such a solid tool inside Emacs.