Follow the quick start guide here to get started using gnus for gmail.
This cheatsheet, should give you the basics of how to use gnus, but the official gnus manual has more detail. Before you read the Gnus manual, here is a word of caution. The official Gnus manual blurs the distinction between news and email. News is public and email is private. Gnus was designed to read and post questions on usenet, which is a little like reddit. Later on, Gnus became an email client. If you read a section in the manual that mentions news or nntp, then it is probably referring to usenet, and you may safely skip that section. If it refers to "mail", then it really means email.
GNUS has a few buffers that you need to know how to use:
Each of these buffers has various assorted commands with them. When you first set up gnus, you need to call gnus by executing
M-x gnus
As gnus starts, you should see the emacs icon. Gnus will show you the icon until you press
t
Then you should see the default group buffer.
An article is one piece of information. it'll have a to and a from. it could be an email or an rss iteam
a backend is one way for guns to get articles rss backend backend for getting stuff from the uniq spool
Currently Gnus is kind of slow at accessing your email, because it Gnus only understands how to connect to a server, like IMAP. Meaning if you want to read your email from gmail, then Gnus has to connect to gmail and download your message.
Other mail clients (MUAs), like Thunderbird, store your email locally. This makes searching your mail super fast.
One way to make Gnus faster is by storing your mail locally and having running a local Mail Transfer Agent, probably running an IMAP server.
One program that does this is Dovecot. Unfortunately dovecot won't send your mail. You'll have to configure another program, probably postfix, to send your email. You'll also have to find a way to synchronize your local email and the remote email. You could use offlineimap or mbsync.
Gnus supports several backends. The most commonly used is the nnimap backend, which uses IMAP to access email. This is how Gnus can read your hotmail or your gmail accounts.
Unfortunately, Gnus does not support Maildir, which is the cooler local mail format at this time. If you wish Gnus to access local mail quickly, the best way to do it is via creating an Maildir via isync, running a local dovecot server to turn it into an local IMAP server, and then configuring Gnus to point to that.
(setq gnus-select-method '(nnimap "gmail" (nnimap-inbox "Google") (nnimap-address "imap.gmail.com") ; it could also be imap.googlemail.com if that's your server. (nnimap-server-port "993") (nnimap-stream ssl) (nnimap-split-methods default))) #+END_SRC
gnus-select-method is your native group. Any other news that you get is a secondary group or a foreign group.
Also note that a group is just the mail connections you have to 1 server. ie: my "news.gwene.org" is a group, BUT I have several different feeds from it. I have xkcd, etc.
Also, if you need to change servers, think before you change gnus-select-methods. When you change gnus-select-methods, your .newsr file becomes worthless, and gnus no longer knows what articles you have read.
Just read info:gnus#Changing Servers before you change gnus-select-method
Of course. You can specify more sources for articles in the variable gnus-secondary-select-methods. These are secondary groups. NOT foreign groups. Add something like this in ‘~/.gnus.el’:
#+BEGIN_SRC emacs-lisp (add-to-list 'gnus-secondary-select-methods '(nntp "news.yourSecondProvider.net")) (add-to-list 'gnus-secondary-select-methods '(nntp "news.yourThirdProvider.net")) #+END_SRC
This is the way that GNUS recommends to do it in the manual.
G m
make a new group, and gnus will prompt you for a address and such.Gnus writes information to .newsrc and .newsrc.eld. This is a duplication. I can safely tell GNUS to using the .newsrc file, and just use .newsrc.eld.
#+BEGIN_SRC elisp (setq gnus-save-newsrc-file nil gnus-read-newsrc-file nil gnus-startup-file "~/.newsrc.eld" ) #+END_SRC
By default when GNUS starts it will read "~/.gnus.elc". If that file is not there, then it will check "~/.gnus.el", and finally it checks "~/.gnus".
The Group Buffer is the various folders buffer. It looks like:
0:*nnimap+imap.fastmail.com:INBOX 0: nnimap+imap.fastmail.com:Sent 0: nnimap+imap.fastmail.com:Fun Stuff 0: nnimap+imap.fastmail.com:mailing list 1
You can customize how you want your group buffer to display your groups.
m
n
p
P
go to the previous groupN
go to the next groupc
mark all unread articles in this group as read.G p/c
show the group parameters. p shows you the lisp, c shows you the customize interface.Enter
over an attachment when open the attachment#+BEGIN_SRC org # url text/html; w3m -I %{charset} -T text/html; copiousoutput;
# image viewer image/*; feh -F -d -S filename '%s';
# pdf application/pdf; zathura '%s'; image/pdf; zathura '%s'
# video video/* ; mplayer '%s' audio/* ; mplayer '%s'
# Office files. application/msword; soffice '%s' application/rtf; soffice '%s' text/richtext; soffice '%s' application/vnd.ms-excel; soffice '%s' application/vnd.ms-powerpoint; soffice '%s'
#+END_SRC
SPC
open this group and read the first unread articleC-u 10 SPC
opens the first 10 unread articles and starts reading the first oneC-u RET
opens all emailA u
lists all groups whether they have unread articles or not.G S u
sort by number of unread articlesS l
list the level of the current group. You are reccommeded to keep all of your groups on level 1 or 2 (low).G S v
sort by group scoreC
marked all articles in the buffer (even the ticked ones) as readc
mark all unticked articles as read#
mark groupsG G
with point on a folder, will search the server side for email matching the search term that is in that folder//
limit the mails by subject at the summary buffer (this is done locally)/a
limit by author at the summary buffer (this is done locally)/A
limit by address From/To/Cc match a given address/w
to cancel the current filterS l
will set the level of subscribedness for the group.B
lets you browse a foreign server and look for groupsu
to toggle subscription to the group or not.Gnus Emacs -- I wuw it! 3: comp.emacs 2: alt.religion.emacs Naughty Emacs 452: alt.sex.emacs 0: comp.talk.emacs.recovery Misc 8: comp.binaries.fractals 13: comp.sources.unix
Just press "t" to try it out. To make it permanent, do a
#+BEGIN_SRC emacs-lisp (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) #+END_SRC
Once you have enabled this minor mode you can sort out your groups into topics.
T n
create a new topicT TAB
indent the current topic so it becomes a subtopic on the previous topic.M TAB
unindent the current topicC-k
and C-y
work to seamlessly to reorganize the groups by topic.RET
or SPC
either fold a group or select a groupT m
move the group to a topicT j
jump to a topicShow the unread article with the highest score. (setq gnus-auto-select-first 'best) You can specify that specific groups have mail-to addresses.
info:gnus#Group Parameters
gnus-parameters variable
(to-address . "bransj@hotmail.com")
You can set this via
info:gnus#Group Parameters
I can also set mail to be auto-expirable.
(setq gnus-parameters '(("mail\\..*" (gnus-show-threads nil) (gnus-use-scoring nil) (gnus-summary-line-format "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n") (gcc-self . t) (display . all))
("^nnimap:\\(foo.bar\\)$" (to-group . "\\1"))
("mail\\.me" (gnus-use-scoring t))
("list\\..*" (total-expire . t) (broken-reply-to . t))))
(setq gnus-group-sort-function 'gnus-group-sort-by-score)
OR
(setq gnus-group-sort-function 'gnus-group-sort-by-rank) The summary buffer contains all of your unread email from a email folder. Your summary buffer could be your inbox, or your sent folder.
//
limit local mail by subject. Limiting means to search mail locally./a
C-c C-f
SPC
scrolls the article forward by one pageRET
scrolls the article backward by one page>
go to end of article<
go to beginning of articleu
or =!= ticks the message. The next time you open that folder, this message will be there EVEN if it is already readW w
wraps long lines. Which might make the message prettier.W r
Decodes ROT13, which fixes the quotes from the microsoft products.E
makes an email as expirable. That means that gnus will automatically delete my email for me in a week aftero
over an attachment will save the fileT n
go to the next article in threadT p
go to the previous article in threadC-M-S n
go to the next article in threadC-M-S p
go to the next article in thread*
mark the email as persistent. The email won't be deleted.o
save the attached MIME part of the emailK o
save the attached MIME part of the email^
show the parent of the current articleM-g or C-u M-g
fetch new or old articles.S z
kill zombie groupsS L
reply to the mailing list with the content of the previous email.l
list all groups that have unread articlesA !
list groups with ticked articlesC-c C-s
sorts the groupsG S a
sort via alphbeticallyG S u
by number of unread emailsG n
go to the next article with the same subjectG p
go to the previous article with the same subjectb
delete bogus groupsF
find new groups and process 'emC-c C-M-x
run expire on all groups. DELETE expired articlesB
browse foriegn server looking for groupsf
follow up to article w/o including articleF
follow up to the article an include the articler
replies without including the original messageR
replies and includes the original message. I might want to swap those.//
limit by subject/ s
limit by subject/ a
limit by authorT T
toggle threadingT h
hide the current subthreadT l
lower the score of the current articleT i
increase the score of the current articleT k
kill all articles in the current threadT d
descend the threadT a
ascend the threadT o
go to the top of the thread(setq gnus-show-threads t) The summary buffer shows the articles in a group. You can show all sorts of cool stuff with it via (setq gnus-summary-line-format "%B%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
The B option looks particularly cool. It sorts messages via thread.
info:gnus#Summary Buffer Lines
apparently it's possible to change the ASCII of the messages to tiny images and look super rad.
C-c C-a
to attach a fileC-c C-m f
C-c C-m C-s
C-c C-m C-e
C-c C-m C-c
I could customize Gnus to only show me the author of the email and the subject and hide all other headers
(setq gnus-visible-headers "^From:\\|^Subject:") info:gnus#Hiding Headers
info:gnus#Signing and encrypting After subscribing the group INBOX, the INBOX could still be invisible if INBOX does not contain unread emails. That makes no sense for an email client (It does make sense for a stone age news reader)! Anyway, the solution is simple, `C-u 5 gnus-group-list-all-groups` will get desired result. I assigned hotkey "o" to it. Here is my elisp code you could paste into your .emacs. See the Gnus Manual on Listing Groups for more details. Or just press j
#+BEGIN_SRC emacs-lisp (defun my-gnus-group-list-subscribed-groups () "List all subscribed groups with or without un-read messages" (interactive) (gnus-group-list-all-groups 5) ) (add-hook 'gnus-group-mode-hook ;; list all the subscribed groups even they contain zero un-read messages (lambda () (local-set-key "o" 'my-gnus-group-list-subscribed-groups )) ) #+END_SRC
These messages are usually the unread messages. pressing C-u RET will show you all messages http://www.xsteve.at/prg/gnus/
info:gnus#Changing Servers info:gnus#The Active File info:gnus#Group Highlighting https://www.emacswiki.org/emacs/NotMuch#toc1 https://www.rath.org/whats-wrong-with-gnus.html