Hacker News new | past | comments | ask | show | jobs | submit login

Despite being quite young, I've used mutt (and to a lesser extent mh) during most of my life. I am now transitioning to some combination Gnus and notmuch do to its excellent integration with org-mode.

If you hang around lkml or any other big free software mailing list, you will see how a big chunk of people are sending emails with either mutt or gnus.

I hate seeing how email is slowly degrading by HTML-only messages, incompatible with many clients, or people moving to walled gardens like WhatsApp (which is ironically a slimmed down version of XMPP, arguably THE Internet chat protocol along with IRC).

Well you need to follow some trends your circles follow. WhatsApp is not really like IRC as it's mostly messages between two peers, and for many it's impractical to not use it.

I receive lots of HTML mail, most of them spam or newsletters I follow, and then there are those where Gmail, GitHub or whatnot adds a text/html version automatically. I just view it in the browser if it's a newsletter I expected (and there are quite a bit of them exclusively in HTML).

We can't shape the outer world, but we can transform it a bit to fit our needs. Gnus and Emacs helps quite a bit. I wish sth. similar existed for WhatsApp, but they don't have APIs AFAIK.

WRT Gnus, you should use Gmane to view mailing lists if you don't already, and with Gnus Agent you can make sure articles are available offline. Also, if you split your e-mail carefully into relevant mailboxes and use the topics mode, notmuch or alike become less necessary. I just work with Gnus and isearch, and haven't yet needed any other search tool. And my favourite line of configuration for Gnus is:

  (add-hook 'gnus-summary-prepared-hook 'gnus-summary-hide-all-threads)

> they don't have APIs AFAIK

They don't have public APIs you mean. With a bit of effort you could reverse engineer what their app is doing. The real pain is maintaining it, keeping up with changes. Hence why nobody bothers.

Yeah certainly what I meant.

Would you care to share your full gnus configuration?

I've extracted the relevant bits below, the rest is the usual SMTP setup everybody uses. I didn't just copy and paste because it's intertwined with the rest of my config that I'd have to publish all of it [1]and also I removed some private stuff. I suggest you pick what you like but reading the documentation carefully. With Gmane, when you first run Gnus you should pick the newsgroups you want to follow, hit ^ on Group buffer to get the server buffer and subscribe with `u' to any group you like on the server.

[1] I'd have to kill the mercurial repo and start brand new if I wanted to publish my emacs.d, thus I don't publish it. Maybe one day I'll get around to figure out if I ever had any really confidential stuff in there and publish it if not.

  (require 'rx)
  (require 'mail-source)
  (require 'spam)
  (require 'gnus)
  (require 'message)

    ;; Gmail does not like parens.
    message-from-style 'angles)

  ;;; Mail sources:
   `((pop :server "some server" :user "user name" :port 995)
     ,(let ((f (expand-file-name (user-login-name) "/var/mail"))) ;system mailbox
        (list 'file :path f))))
  ;;; Spam:
   spam-use-BBDB t                        ; whitelist from BBDB contacts
   spam-use-spamassassin t
   spam-assassin-program (gk-executable-ensure "spamc")
   gnus-spam-newsgroup-contents '(("spam" gnus-group-spam-classification-spam))
  ;;; Splitting mail:
   nnmail-split-methods 'nnmail-split-fancy
   nnmail-split-fancy-match-partial-words t
   `(| (: spam-split)
       ;; Github:
       ("List-Id" "cadadr/" "inbox") ; Github issues on my github repos.
       ("From" "notifications@github.com" "github") ; other
       ;; News:
       (| ("From" "newsletter@newspaper.com" "news"))
       ;; Announcements:
       (| ("To" "info-gnu@gnu.org" "announcements"))
       ;; Links:
       ("Subject" "_link_" "link")
       ;; Files:
       ("Subject" "_file_" "file")
       ;; Self mail:
       ("From" ,(macroexpand `(rx ,user-mail-address)) "self")
       ("From" ,(rx "my other email address") "self")
       ("From" ,(rx "another address of mine") "self")
       ;; Rest goes to the inbox:
  ;;; Gnus:
  ;;;; Mail sources:
   gnus-select-method '(nnml "")          ;uses mail-sources
   '((nntp "gmane"
           (nntp-address "news.gmane.org")))
  ;;;; Mime:
   '("multipart/signed" "multipart/alternative" "text/html" "text/x-diff"
     "text/x-patch" "text/vcard" "text/x-org"))
  ;;;; Keys:
  ;; Render article in browser.
  (define-key gnus-article-mode-map "\C-cw" 'gnus-article-browse-html-article)
  ;;;; Gnus ui:
  (require 'gnus-sum)
   ;; U: read status
   ;; R: A if replied to,‘ ’ if not
   ;; z: zscore (char)
   ;; B: trn-style indentation based on thread level
   ;; f: contents of the from or to headers.
   ;; s: subject or empty str if not thread root
   gnus-summary-line-format "%U%R%z %B%(%-23,23f%) %s \n")
  ;; Switch topics on and collapse all threads.  Collapsed threads
  ;; expand automatically when you hit RET on them, and there's a
  ;; threads menu for the summary buffer where many commands are listed.
  ;; I suggest you keep menu-bar-mode on for at least Gnus as it is very
  ;; helpful when discovering new commands.
  (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
  (add-hook 'gnus-summary-prepared-hook 'gnus-summary-hide-all-threads)


Do you know nnir has a notmuch backend now? So one can avoid running Dovecot locally and still have great search capabilities with a mbsync+notmuch setup.

You're welcome, and yes, I recall having read that somewhere, and I've used notmuch (and mairix) with emacs in the past, but I've found out that searching subject lines in the summary buffer is sufficient %90-95 of the time, so I did not set Gnus up with a search helper to avoid complexity (YMMV). I just pop all my mail and store it locally anyways (except NNTP which I don't copy locally) so it's fast to make Gnus show thousands of messages and isearch through them (not accumulating all messages in a single group and aggressive spam checks help).

I tried to use gnus in the past as a nntp and smtp client and I hated it. When for example I had set my user-mail-address and mail-host-address to something specific that I wanted but that gnus did not like (even though it was a valid address) it would silently replace it with some bullshit like "i-did-not-set--mail-host-address--so-tickle-me" at the from header (or was that at the message-id header? I don't exactly remember).

It also made it a pain in the butt to use a socks proxy with it. Moreover it failed to un-base64 images in emails (failing to display them), when I tried to make it open an image it would just pass the base64 string to mpv instead of bothering to un-base64 it.

I moved to mutt since then but I do want to try some other emacs clients (mostly due to the emacs and org-mode integration).

Gnus is a bit tricky, as it is an old application that has accumulated a lot of cruft. In particular, defaults are a bit bizarre for 2017.

But many users stick to it as its scoring system to prioritize emails is great at handling thousands of emails from mailing lists.

Mu4e and notmuch have excellent clients for Emacs. I slightly prefer notmuch as it has a simpler UI. Mu4e is a bit more polished, but I found its mail compose setup much less friendly than Gnus or notmuch.

One can set up notmuch as an excellent MUA centered around saved searches. I prefer such a workflow to tags or folders:


Thank you for your reply, I was not aware of Mu4e and notmuch before, I will try both of them.

Have you ever tried mew? I heard a few good comments about it in the past but I have no idea how it compares to these clients.

No, I haven't tried mew.

Mu4e and notmuch are Gmail-like clients. Quite modern and well-maintained. Centered around searching and tagging.

> I tried to use gnus in the past as a nntp and smtp client and I hated it.

One thing that I noticed with gnus was that it seemed to be very slow in threading messages (when dealing with more than 10000 headers). I'm not sure if it was a problem with my configuration though.

Applications are open for YC Winter 2021

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact