Sams Teach Yourself Emacs in 24 Hours

ContentsIndex

Hour 20: Gnus Basics

Previous HourNext Hour

Sections in this Hour:

 

Hour 20
Gnus Basics

I guess you already are using an email client and a news reader, right? And I guess that you're asking yourself, "Why should I take the time to learn a new email client and news reader?" Right?! The answer is simple; Gnus is without a doubt the best news reader available. Because Gnus is simply an extension to Emacs, you can use all of Emacs's features, including macros, incremental searching, and all the editing commands such as transposing and dynamic abbreviation. If you are not convinced, please think carefully about your normal mail clients and news readers, and ask yourself whether you have ever needed the power of Emacs.

The description of Gnus is split over two hours. This hour should give you enough knowledge to get up and running, and Hour 21, "Advanced Gnus," takes you farther and shows you some of the features that makes Gnus such a fantastic program. These include

Tip - In this hour the names of the functions invoked by the keys described are not listed. The reason for this is that the functions often have very long names, and I will tell you about many keybindings in these hours. Furthermore it is unlikely that any of these keybindings are changed (compared to the keybindings for the normal Emacs use).


Caution - At the moment I write this, the newest version of Gnus that these two hours describe is still being developed. This means that there might be some points that are not correct in the book. So please visit the book's home page at www.mcp.com, for a list of changes since this was written.


Note - Windows does not come with a UNIX-style mail transport agent (MTA), and most Windows users get their mail from a remote Post Office Protocol (POP) server. To get your mail from a POP server, get the latest version of the EPOP3 package. For details, see the NT Emacs FAQ. Setup is straightforward. Read the file epop3mail.el for the details. Don't forget to prepend po: to your email address when you set it in your .emacs file.

(setq rmail-primary-inbox-list '("po:login@my.isp.com"))

If you want to see exactly what EPOP3 is doing, add this to your .emacs:

; debug tool:
(setq epop3-mail-debug t)

To handle attachments, see the FAQ for information on the metamail package.

Introducing Gnus


Gnus is a combined news and mail reader and, of course also a news and mail writer. At first glance, it might seem like a strange thing that Gnus does both, but the following lists of similarities and dissimilarities should make it clear that news and mail aren't that different.

The following are the similarities:

The following are the differences:

It is important to study these items, because they list both why you should use the same tool for mail and news and some of the pitfalls you should be careful about. The major pitfall with using the same tool is that you might start projecting some of your habits from news reading onto mail reading, for example, the ease with which you can discard news.

The Gnus Interface

In Gnus you work in four different buffers. These buffers are as follows:

Figure 20.1
The Group buffer.

Figure 20.2
The Summary buffer.

Figure 20.3
The Article buffer (viewing messages).

Figure 20.4
The Message buffer (sending messages).

The Way Gnus Works with Email

Gnus works a bit differently than other email programs (that is, other email programs not working in Emacs). When you receive a letter, Gnus copies this letter from your inbox to a special directory where only Gnus has access to it. This is to avoid all the problems that otherwise often are involved with two processes accessing the same files simultaneously, and also to make Gnus work faster.

The directory Gnus copies the file to can be chosen from one of the following:

Each of these methods are often referred to as mail backends .

Sams Teach Yourself Emacs in 24 Hours

ContentsIndex

Hour 20: Gnus Basics

Previous HourNext Hour

Sections in this Hour: