Difference between revisions of "Gnus"

From WikEmacs
Jump to: navigation, search
(small changes)
(33 intermediate revisions by 11 users not shown)
Line 1: Line 1:
You can read news (and mail) from within Emacs by using Gnus.  The news can be gotten by any nefarious means you can think of--NNTP, local spool or your mbox file. All at the same time, if you want to push your luck.
+
{{Package
 +
|name=Gnus
 +
|description=Gnus is an e-mail client, a news client and a feed aggregator.
 +
|maintainer=[[Lars Magne Ingebrigtsen]]
 +
|source=http://git.gnus.org/cgit/gnus.git/
 +
|in_emacs=yes
 +
|Development status=active
 +
|website=http://gnus.org
 +
}}
  
Provide a simple example of how to access Gmail using Gnus.
+
== Gnus with ''virtual servers'' ==
 +
Gnus has unified interface to e-mail, feed, news, and others. ''virtual server'' are created for different source of information, and Gnus talks to this ''virtual server'' as if they are the same.
  
 +
So, when someone want Gnus to work with particular source of information, he register a vertural server to Gnus as a ''select methods'', for example:
 +
 +
=== Using Gnus with Gmail ===
 +
# Make sure gnutls-bin or starttls package is installed on your system
 +
# Create a Gmail account
 +
# Enable IMAP in Gmail accout, by settings->forwarding POP/IMAP
 +
# Use Gmail’s IMAP as a (secondary) select method, by adding following line into ~/.gnus.el
 +
 +
<syntaxhighlight lang="lisp">
 +
(add-to-list 'gnus-secondary-select-methods '(nnimap "gmail"
 +
                                  (nnimap-address "imap.gmail.com")
 +
                                  (nnimap-server-port 993)
 +
                                  (nnimap-stream ssl)))
 +
</syntaxhighlight>
 +
 +
or use Gmail as primary select method
 +
 +
<syntaxhighlight lang="lisp">
 +
(setq gnus-select-method '(nnimap "gmail"
 +
  (nnimap-address "imap.gmail.com")
 +
  (nnimap-server-port 993)
 +
  (nnimap-stream ssl)))
 +
</syntaxhighlight>
 +
 +
5. Put following line  in your ~/.authinfo <br/>
 +
machine imap.gmail.com login username@gmail.com password secret port 993 <br/>
 +
6. (optional) Enable using gmail’s SMTP server by put following line in ./gnus.el
 +
 +
<syntaxhighlight lang="lisp">
 +
(setq message-send-mail-function 'smtpmail-send-it
 +
      smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
 +
      smtpmail-auth-credentials '(("smtp.gmail.com" 587 "username@gmail.com" nil))
 +
      smtpmail-default-smtp-server "smtp.gmail.com"
 +
      smtpmail-smtp-server "smtp.gmail.com"
 +
      smtpmail-smtp-service 587
 +
      smtpmail-local-domain "yourcompany.com")
 +
</syntaxhighlight>
 +
 +
=== Using Gnus with Gmane ===
 +
you can easily read news from Gmane with Gnus
 +
# in group buffer , press B (browser foreign server)
 +
# type "nntp" when asked "which back end"
 +
# type web.gmane.org when asked "address"
 +
# browse different groups, press u to subscribe
 
For managing your address book, see [[:Category:Contact Management|Contact Management]].
 
For managing your address book, see [[:Category:Contact Management|Contact Management]].
  
[[Category:Email]][[Category:News (NNTP)]]
+
==Showing your sent messages in the thread with email folders==
 +
With newsgroups, your sent mail shows up in the thread and you can easily press `^' to move up the thread whether you sent the message or someone else. But when you're in e.g. INBOX, only messages sent to you show up, messages you send will be in your Sent folder (see http://gnus.org/manual/gnus_153.html for how to archive sent messages, or you could subscribe to your IMAP's Sent folder).
 +
 
 +
But getting a full "conversation view" is quite simple. In the group buffer, first press `G V' to create an empty nnvirtual group, name it e.g. "INBOX" (it'll end up being shown as "nnvirtual:INBOX"). Then put the point over the real INBOX and press `G v' and enter "nnvirtual:INBOX". Now you have a virtual folder that shows just your inbox … then find your Sent folder, press `G v' and enter "nnvirtual:INBOX". Now when you enter nnvirtual:INBOX (and perhaps press `T T' to turn on threading), both sent and received messages are shown in the thread, and you can click `^' to move up the thread to find out what you really wrote :)
 +
 
 +
Note: your real INBOX folder will still show up in the *Group* buffer, press `u' over it to hide it (don't use `k', if you kill it, gnus won't look for the read/unread marks in your INBOX, and your nnvirtual folder will show everything as unread).
 +
 
 +
[[Category:Email]][[Category:News (NNTP)]] [[Category:Mail Client]][[Category:Built-in Package]][[Category:Popular Package]]

Revision as of 07:16, 21 October 2012

Gnus
Description Gnus is an e-mail client, a news client and a feed aggregator.
Author name of author
Maintainer Lars Magne Ingebrigtsen
Source http://git.gnus.org/cgit/gnus.git/
Part of Emacs yes

Gnus with virtual servers

Gnus has unified interface to e-mail, feed, news, and others. virtual server are created for different source of information, and Gnus talks to this virtual server as if they are the same.

So, when someone want Gnus to work with particular source of information, he register a vertural server to Gnus as a select methods, for example:

Using Gnus with Gmail

  1. Make sure gnutls-bin or starttls package is installed on your system
  2. Create a Gmail account
  3. Enable IMAP in Gmail accout, by settings->forwarding POP/IMAP
  4. Use Gmail’s IMAP as a (secondary) select method, by adding following line into ~/.gnus.el
(add-to-list 'gnus-secondary-select-methods '(nnimap "gmail"
                                  (nnimap-address "imap.gmail.com")
                                  (nnimap-server-port 993)
                                  (nnimap-stream ssl)))

or use Gmail as primary select method

(setq gnus-select-method '(nnimap "gmail"
				  (nnimap-address "imap.gmail.com")
				  (nnimap-server-port 993)
				  (nnimap-stream ssl)))

5. Put following line in your ~/.authinfo
machine imap.gmail.com login username@gmail.com password secret port 993
6. (optional) Enable using gmail’s SMTP server by put following line in ./gnus.el

(setq message-send-mail-function 'smtpmail-send-it
      smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
      smtpmail-auth-credentials '(("smtp.gmail.com" 587 "username@gmail.com" nil))
      smtpmail-default-smtp-server "smtp.gmail.com"
      smtpmail-smtp-server "smtp.gmail.com"
      smtpmail-smtp-service 587
      smtpmail-local-domain "yourcompany.com")

Using Gnus with Gmane

you can easily read news from Gmane with Gnus

  1. in group buffer , press B (browser foreign server)
  2. type "nntp" when asked "which back end"
  3. type web.gmane.org when asked "address"
  4. browse different groups, press u to subscribe

For managing your address book, see Contact Management.

Showing your sent messages in the thread with email folders

With newsgroups, your sent mail shows up in the thread and you can easily press `^' to move up the thread whether you sent the message or someone else. But when you're in e.g. INBOX, only messages sent to you show up, messages you send will be in your Sent folder (see http://gnus.org/manual/gnus_153.html for how to archive sent messages, or you could subscribe to your IMAP's Sent folder).

But getting a full "conversation view" is quite simple. In the group buffer, first press `G V' to create an empty nnvirtual group, name it e.g. "INBOX" (it'll end up being shown as "nnvirtual:INBOX"). Then put the point over the real INBOX and press `G v' and enter "nnvirtual:INBOX". Now you have a virtual folder that shows just your inbox … then find your Sent folder, press `G v' and enter "nnvirtual:INBOX". Now when you enter nnvirtual:INBOX (and perhaps press `T T' to turn on threading), both sent and received messages are shown in the thread, and you can click `^' to move up the thread to find out what you really wrote :)

Note: your real INBOX folder will still show up in the *Group* buffer, press `u' over it to hide it (don't use `k', if you kill it, gnus won't look for the read/unread marks in your INBOX, and your nnvirtual folder will show everything as unread).