syl20bnr Bump year in copyright headers
Happy New Year 2017!
Latest commit b252d25 Jan 5, 2017

Gnus layer


Table of Contents


To use this configuration layer, add it to your ~/.spacemacs. You will need to add gnus to the existing dotspacemacs-configuration-layers list in this file.

Basic Concepts

Gnus is a news reading application. The Gnus terminology can be confusing for new users so the basics are listed here:

A Newsgroup but can also be a RSS Feed or a mail directory
Newsgroups can be assigned to topics which will be used to structure the Group Buffer if Topic Mode is enabled(default).

Adding news sources

Adding news sources can be done in your .spacemacs file by adding the following:

;; Get email, and store in nnml
(setq gnus-secondary-select-methods
    (nntp "gmane"
           (nntp-address ""))
    (nntp "")
    (nntp "")
    (nntp "")

For adding RSS Feeds please see the keybindings section.

Configuring gmail

To configure Gnus with gmail support you can add the following to your .spacemacs file.

;; Get email, and store in nnml
(setq gnus-secondary-select-methods
  (nnimap "gmail"
           (nnimap-server-port 993)
           (nnimap-stream ssl))

;; Send email via Gmail:
(setq message-send-mail-function 'smtpmail-send-it
  smtpmail-default-smtp-server "")

;; Archive outgoing email in Sent folder on
(setq gnus-message-archive-method '(nnimap "")
    gnus-message-archive-group "[Gmail]/Sent Mail")

;; set return email address based on incoming email address
(setq gnus-posting-styles
    '(((header "to" "")
       (address ""))
  ((header "to" "")
     (address ""))))

;; store email in ~/gmail directory
(setq nnml-directory "~/gmail")
(setq message-directory "~/gmail")

Authentication for your gmail account is best stored in an authinfo or authinfo.pgp file. It must be of the form:

machine login password SUPER_SECRET_PASS
machine login port 993 password SUPER_SECRET_PASS

If you use two-step verification the password has to be an application specific password.

Org MIME in Org layer

It is possible to send beautiful HTML emails using org mode.

Pressing SPC m M in a message buffer will convert the current message from org mode to html. An org mode buffer can be sent via html email by pressing SPC m m in any org mode buffer.


Gnus has very modal default keybindings. Please see the manual for a complete list.

Basic and Spacemacs specific keybindings can be found in the following table.

Key BindingGnus mode - Description
SPC a gStarts Gnus
mNew Message
G RGroup Buffer - Add RSS feed
^Open Server Buffer. Browse Newsgroups.
T nGroup Buffer - new Topic
T mGroup Buffer - Move Group to Topic
KArticle Buffer - Previous article
JArticle Buffer - Next article
RETSummary Buffer(RSS) - Open article Link in browser
TABSummary Buffer(RSS) - Open article and switch to it