2015-06-10 16:44:30 +00:00
|
|
|
#+TITLE: Gnus contribution layer for Spacemacs
|
2015-11-08 18:04:44 +00:00
|
|
|
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../../../css/readtheorg.css" />
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
[[file:img/gnus.gif]]
|
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
* Table of Contents :TOC_4_org:noexport:
|
|
|
|
- [[Install][Install]]
|
|
|
|
- [[Basic Concepts][Basic Concepts]]
|
|
|
|
- [[Adding news sources][Adding news sources]]
|
|
|
|
- [[Configuring gmail][Configuring gmail]]
|
|
|
|
- [[Org MIME in Org layer][Org MIME in Org layer]]
|
|
|
|
- [[Keybindings][Keybindings]]
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Install
|
|
|
|
|
2015-06-10 21:16:01 +00:00
|
|
|
To use this contribution layer add it to your =~/.spacemacs=
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers '(gnus))
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
* Basic Concepts
|
|
|
|
|
|
|
|
Gnus is a news reading application. The Gnus terminology can be confusing for
|
|
|
|
new users so the basics are listed here:
|
|
|
|
|
2015-06-10 21:16:01 +00:00
|
|
|
- Group :: A Newsgroup but can also be a RSS Feed or a mail directory
|
|
|
|
- Topic :: Newsgroups can be assigned to topics which will be used to structure
|
|
|
|
the Group Buffer if Topic Mode is enabled(default).
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Adding news sources
|
|
|
|
|
2015-06-10 21:16:01 +00:00
|
|
|
Adding news sources can be done in your =.spacemacs= file by adding the
|
2015-06-10 16:44:30 +00:00
|
|
|
following:
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
;; Get email, and store in nnml
|
|
|
|
(setq gnus-secondary-select-methods
|
|
|
|
'(
|
|
|
|
(nntp "gmane"
|
|
|
|
(nntp-address "news.gmane.org"))
|
|
|
|
(nntp "news.eternal-september.org")
|
|
|
|
(nntp "nntp.aioe.org")
|
|
|
|
(nntp "news.gwene.org")
|
|
|
|
))
|
|
|
|
#+END_SRC
|
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
For adding RSS Feeds please see the [[Keybindings][keybindings section]].
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Configuring gmail
|
|
|
|
|
|
|
|
To configure Gnus with gmail support you can add the following to your
|
2015-06-10 21:16:01 +00:00
|
|
|
=.spacemacs= file.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
;; Get email, and store in nnml
|
|
|
|
(setq gnus-secondary-select-methods
|
|
|
|
'(
|
|
|
|
(nnimap "gmail"
|
|
|
|
(nnimap-address
|
|
|
|
"imap.gmail.com")
|
|
|
|
(nnimap-server-port 993)
|
|
|
|
(nnimap-stream ssl))
|
|
|
|
))
|
|
|
|
|
|
|
|
;; Send email via Gmail:
|
|
|
|
(setq message-send-mail-function 'smtpmail-send-it
|
|
|
|
smtpmail-default-smtp-server "smtp.gmail.com")
|
|
|
|
|
|
|
|
;; Archive outgoing email in Sent folder on imap.gmail.com:
|
|
|
|
(setq gnus-message-archive-method '(nnimap "imap.gmail.com")
|
|
|
|
gnus-message-archive-group "[Gmail]/Sent Mail")
|
|
|
|
|
|
|
|
;; set return email address based on incoming email address
|
|
|
|
(setq gnus-posting-styles
|
|
|
|
'(((header "to" "address@outlook.com")
|
|
|
|
(address "address@outlook.com"))
|
|
|
|
((header "to" "address@gmail.com")
|
|
|
|
(address "address@gmail.com"))))
|
|
|
|
|
|
|
|
;; store email in ~/gmail directory
|
|
|
|
(setq nnml-directory "~/gmail")
|
|
|
|
(setq message-directory "~/gmail")
|
|
|
|
#+END_SRC
|
|
|
|
|
2015-06-10 21:16:01 +00:00
|
|
|
Authentication for your gmail account is best stored in an =authinfo= or
|
|
|
|
=authinfo.pgp= file. It must be of the form:
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
#+BEGIN_EXAMPLE
|
2015-06-10 16:44:30 +00:00
|
|
|
machine smtp.gmail.com login name@gmail.com password SUPER_SECRET_PASS
|
|
|
|
machine imap.gmail.com login name@gmail.com port 993 password SUPER_SECRET_PASS
|
2015-10-30 11:20:58 +00:00
|
|
|
#+END_EXAMPLE
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
If you use two-step verification the password has to be an [[https://support.google.com/accounts/answer/185833?hl=en][application specific
|
|
|
|
password]].
|
|
|
|
|
2015-09-17 07:45:50 +00:00
|
|
|
* Org MIME in Org layer
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
It is possible to send beautiful HTML emails using org mode.
|
|
|
|
|
2015-09-17 07:45:50 +00:00
|
|
|
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.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Keybindings
|
|
|
|
|
|
|
|
Gnus has very modal default keybindings.
|
|
|
|
Please see the [[http://www.gnus.org/manual.html][manual]] for a complete list.
|
|
|
|
|
|
|
|
Basic and Spacemacs specific keybindings can be found in the following table.
|
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
| Key Binding | Gnus mode - Description |
|
|
|
|
|-------------+-----------------------------------------------------|
|
|
|
|
| ~SPC a g~ | Starts Gnus |
|
|
|
|
| ~m~ | New Message |
|
|
|
|
| ~G R~ | Group Buffer - Add RSS feed |
|
|
|
|
| ~^~ | Open Server Buffer. Browse Newsgroups. |
|
|
|
|
| ~T n~ | Group Buffer - new Topic |
|
|
|
|
| ~T m~ | Group Buffer - Move Group to Topic |
|
|
|
|
| ~K~ | Article Buffer - Previous article |
|
|
|
|
| ~J~ | Article Buffer - Next article |
|
|
|
|
| ~RET~ | Summary Buffer(RSS) - Open article Link in browser |
|
|
|
|
| ~TAB~ | Summary Buffer(RSS) - Open article and switch to it |
|