To start GNUS, type M-x gnus.
Somehow or other, GNUS has to know how to find the current netnews. Usually this means it has to know the hostname of the NNTP server.
There are several ways that GNUS can get this information. Most often,
it comes from the environment variable NNTPSERVER. You can
specify a default when you install Emacs by setting the variable
gnus-nntp-server in the `site-init.el' file. If
neither this default nor the environment variable is defined, then GNUS
reads the server name using the minibuffer when you start it.
You can override the default by specifying a prefix argument for the
gnus command. Then it always reads the hostname to use.
GNUS can also bypass NNTP and read the news directly from the file system. This reduces the overhead, but the features for retrieving by their message IDs may fail to work (see section Local News Spool Specific Variables). To do this, specify `::' as the NNTP server "machine name".
You can also specify a subdirectory of your home directory to use as the current news spool. To do this, specify a colon and the subdirectory name as the NNTP server "machine name". For example, `:Mail' says to use the directory `~/Mail' as the news spool. This makes it possible to read mail stored in MH folders or articles saved by GNUS. The files in the directory with numeric names are considered news articles, and the other files in the directory are ignored.
A server specific startup file for each directory must exist before you start GNUS. For example, a startup file for the directory `~/Mail' should be a file named `.newsrc-:Mail'. See section The Startup File, for more information on the server specific startup file.
Each news server has its own active file which lists the numbers of the active articles in each newsgroup. Reading this file from the server is among the first things GNUS does when it starts. Commands such as g that report additional newly-arrived articles work by rereading the active file.
GNUS uses three Emacs buffers: the Newsgroup buffer, the Summary buffer,
and the Article buffer. Each has its own particular purpose and its own
major mode. GNUS often displays all three buffers at the same time,
with a configuration you can customize by setting the variable
gnus-window-configuration.
The Article buffer is where GNUS displays the text of an article. Its major mode is always Article Mode. Users rarely select this buffer because you can read the text while keeping the Summary buffer selected.
Newsgroup buffer contains a list of newsgroups. Its major mode is Group Mode. This is the first buffer that GNUS displays when it starts up.
Normally the list contains only the newsgroups which you subscribe to and which contain unread articles. It is normally empty if there is no such newsgroups. When you start GNUS, it displays the message `No news is good news.' in the echo area.
The format of the Newsgroup buffer looks like this:
sm number: newsgroup
The Summary buffer displays a summary of articles in a single newsgroup, including their subjects, their numbers, and who posted them. Its major mode is Summary mode. GNUS creates a Summary buffer for a newsgroup when you select the group in the Newsgroup buffer.
A Summary buffer contains a line for each article. Each line looks like this:
s number:c[lines:author] subject
Here is what the fields mean:
You can customize the format by setting the variable gnus-optional-headers.
The Newsgroup buffer normally lists the newsgroups which you subscribe to and which contain unread articles. But not always--some of the things you can do display additional newsgroups. The commands available in this buffer are mostly concerned with subscribing and unsubscribing.
Most of the newsgroup commands operate on the group described by the current line. To use them, you need to move the cursor to the group you want to act on. You can use ordinary Emacs motion commands, or these special commands:
gnus-group-next-unread-group).
gnus-group-prev-unread-group).
gnus-group-next-group).
gnus-group-prev-group).
gnus-group-jump-to-group).
beginning-of-buffer).
end-of-buffer).
gnus-group-restrict-groups).
The command j (gnus-group-jump-to-group) reads a
newsgroup name interactively, and moves point to it. If there is no
such newsgroup in the buffer, a line for the newsgroup is inserted at
the beginning of the buffer.
The command r (gnus-group-restrict-groups) restricts
visibility in the Newsgroup buffer to the region specified by point and
mark. It is not quite the same as C-x n; it includes all of the
line that the region starts in, and all of the line that the region ends
in. Type C-x w (widen) to widen visibility to the whole
buffer.
To start reading the articles in a newsgroup, move to that newsgroup
in the Newsgroup buffer and type SPC
(gnus-group-read-group) or =
(gnus-group-select-group).
gnus-group-read-group).
gnus-group-select-group).
Normally, when you select a newsgroup, GNUS prepares to read only the
unread articles (including saved articles). If the newsgroup has no
unread articles and you select it anyway, GNUS prepares to read all the
articles. You can force GNUS to include all the articles by giving a
prefix argument to the commands SPC and =
(gnus-group-read-group and gnus-group-select-group).
If the number of articles being selected is larger than the variable
gnus-large-newsgroup, GNUS prompts for the number of articles to
prepare. If your answer n is positive, GNUS prepares the last
n articles. If n is negative, GNUS prepares the first
-n articles. If you answer with the empty string, GNUS
prepares all articles.
This section explains how to subscribe and unsubscribe, as well as other related activities. Most of the commands operate on the newsgroup listed on the current line.
gnus-group-catchup).
gnus-group-catchup-all).
gnus-group-list-groups).
gnus-group-list-all-groups).
gnus-group-unsubscribe-current-group).
gnus-group-unsubscribe-group).
gnus-group-kill-group).
gnus-group-kill-region).
gnus-group-yank-group). It is
inserted just before the current line. Successive uses of C-y
yank earlier kills, in last-in first-out order.
gnus-group-transpose-groups).gnus-group-check-bogus-groups).
gnus-group-get-new-news).
The commands c and C (gnus-group-catchup and
gnus-group-catchup-all) mark all or most of the articles in a
newsgroup as read. They are useful if you have been away from news
reading for a while, and you don't want to slog through the backlog of
old postings. These commands do not take account of the cross-reference
information in the `Xref:' field, while the c command in
Summary Mode does.
Only subscribed newsgroups containing unread and saved articles are usually
displayed in the Newsgroup buffer. Type L
(gnus-group-list-all-groups) to show all newsgroups which are
currently active. Use l (gnus-group-list-groups) to go
back to the usual contents--only groups which have news for you to
read.
The command U (gnus-group-unsubscribe-group) reads a
newsgroup name interactively, and toggles its subscription flag. This
is the usual way to subscribe to new groups. (You can also type L
and then use u on the groups you want to read.) You can also
arrange to subscribe automatically to some or all newly created
newsgroups using the options line in your startup file, `~/.newsrc'.
See section The Startup File, for more information.
The command C-k (gnus-group-kill-group) kills a newsgroup
from both the Newsgroup buffer and the raw startup file. If you change
your mind, type C-y (gnus-group-yank-group); this yanks the
last newsgroup killed with the C-k command.
The command C-c C-l (gnus-list-killed-groups) pops up a buffer listing
the newsgroups you have killed. You can yank any of these newsgroups by
moving point to the entry for the newsgroup you want, and then typing
y or C-y (gnus-browse-killed-yank). So a convenient
way to change the order of newsgroups is to kill some of them, then go
to the list of killed groups and yank them in the order you want.
You are not limited to yanking only the groups that you killed in the current GNUS session. All the groups you have ever killed are remembered in the quick startup file, and you can restore them any time unless you lose the file.
A bogus newsgroup is one not in the list of active newsgroups in
the active file. Type b (gnus-group-check-bogus-groups) to
delete all the bogus newsgroups that you subscribe to. Bogus newsgroups
that you have unsubscribed or killed are deleted also.
The g command rereads the active file to get updated lists of articles available to be read.
gnus-group-suspend).
gnus-group-exit).
gnus-group-quit).
Suspending GNUS with z (gnus-group-suspend) kills all
GNUS buffers except for the Newsgroup buffer. To resume again, switch
to the Newsgroup buffer and type g
(gnus-group-get-new-news) to get newly arrived articles. It is a
good idea to update the startup file (see section The Startup File) before
suspending GNUS.
If you want to forget what you read this GNUS session, exit GNUS by
the command Q (gnus-group-quit). Otherwise, exit by the
command q (gnus-group-exit) to update the startup
file.
The hook gnus-exit-gnus-hook is called when exiting GNUS, and
the hook gnus-suspend-gnus-hook is called when suspending GNUS.
Other miscellaneous Group mode commands are described here.
gnus-group-post-news). See section Posting Articles, for more information.
gnus-group-edit-local-kill). See section Kill File, for more information.
gnus-group-edit-global-kill).
See section Kill File, for more information.
The Summary buffer shows you a summary of the contents of a single newsgroup, with one line for each article. You can move around in the Summary buffer, giving commands to view articles, save them, reply to them, and so on. When you view an article, its text appears in a separate buffer, but the Summary buffer remains current. In fact, there is hardly ever a reason to select the Article buffer; you can do almost all news reading tasks while staying in the Summary buffer.
The most basic command for reading articles is SPC
(gnus-summary-next-page). When you are viewing the middle of a
article, SPC scrolls the article forward. When you get to the end
of an article, SPC advances to the next article. You can read all
the unread articles straight through using just SPC.
Naturally, though, there are plenty of more advanced features available.
For moving around in the Summary buffer, you can use these special commands as well as the usual cursor motion commands.
gnus-summary-next-subject).
gnus-summary-prev-subject).
gnus-summary-next-unread-subject).
gnus-summary-prev-unread-subject).
gnus-summary-goto-subject).
gnus-summary-next-page)
gnus-summary-show-article). This command always rereads the
article text from the server even if the same article is already
selected.
gnus-summary-expand-window).
gnus-summary-toggle-truncation).
gnus-summary-stop-page-breaking).
gnus-summary-toggle-header).
gnus-summary-toggle-mime).
gnus-summary-caesar-message).
The command = (gnus-summary-expand-window) expands the
Summary window by deleting the Article window. Use it when you want to
concentrate on the Summary buffer. This command is different from
C-x 1 when more than two windows exist.
The command C-c C-r (gnus-summary-caesar-message) rotates
all letters in the body of the current article by 13/47 places. (This
encoding is often called "rot 13".) To undo this operation, run it a
second time.
If an article contains multiple pages, GNUS normally displays just one page at a time. To advance to the next page of an article, simply type SPC. It advances to the next page whenever the end of a page is on the screen.
The command w (gnus-summary-stop-page-breaking)
temporarily suspends page breaking; it makes the entire current article
visible. You can turn off page breaking all the time by setting the
variable gnus-break-pages to nil.
Page boundaries are defined by the variable
gnus-page-delimiter, whose value is a regular expression. The
default is to match a formfeed character at the beginning of a line.
GNUS normally hides many uninteresting header fields when it displays
an article. (The variable gnus-ignored-headers controls which
fields are ignored.) If you want to see the whole header, type t
(gnus-summary-toggle-header). Use t a second time to hide
the uninteresting header fields again.
This section describes the commands you can type in the Summary buffer to scroll the Article buffer. (If you want to scroll the Summary buffer, you can use the usual Emacs scrolling commands.)
gnus-summary-next-page). Select it first if no article is
selected yet. Select the next unread article automatically at the end of
the message.
gnus-summary-prev-page).
gnus-summary-scroll-up). A negative argument scrolls backward.
gnus-summary-beginning-of-article).
gnus-summary-end-of-article).
These commands move point in the Summary buffer to a different line and display that line's article.
gnus-summary-next-unread-article).
gnus-summary-prev-unread-article).
gnus-summary-next-article).
gnus-summary-prev-article).
gnus-summary-next-same-subject).
gnus-summary-prev-same-subject).
gnus-summary-first-unread-article).
gnus-summary-goto-last-article).
If the variable gnus-auto-select-same is non-nil, the
commands n and p (gnus-summary-next-unread-article
and gnus-summary-prev-unread-article) skip articles until they
come to another article with the same subject. If you are used to
reading news with `rn -S', set the variable to non-nil to
get familiar behavior.
If the variable gnus-auto-extend-newsgroup is non-nil,
the commands N and P (gnus-summary-next-article and
gnus-summary-prev-article) extend visible articles to forward and
backward if possible. The Summary buffer normally displays just a
subset of the extant articles; extending the buffer means that if you
try to move forward from the last article shown, it looks for later
articles that are not shown, and puts them into the buffer so you can
move to them.
The variable gnus-auto-select-next defines the behavior of GNUS
when there is no unread article in the current newsgroup and a command
selecting the next unread article is executed. If the variable is
non-nil, the next newsgroup containing unread articles is
selected automatically.
GNUS uses single-character marks to indicate the status of an article.
Both newly arrived articles and saved articles are considered unread.
The status is displayed at the beginning of each line of the Summary buffer. Here are some commands for changing these marks:
gnus-summary-mark-as-read-forward). This and the following similar
commands do not select an article; they only move point in the Summary
buffer.
gnus-summary-mark-as-unread-forward).
gnus-summary-clear-mark-forward). This sets the status to
"newly arrived".
gnus-summary-kill-same-subject-and-select). Use this when you
decide a certain discussion is not interesting.
gnus-summary-kill-same-subject).
gnus-summary-catchup-and-exit). This does not change the
status of articles that are saved.
gnus-summary-delete-marked-as-read).
gnus-summary-delete-marked-with).
You can make it easier to see the remaining unread articles in the
Summary buffer by deleting the lines describing the already read
articles. To do this, use the command x
(gnus-summary-delete-marked-as-read). The command X
(gnus-summary-delete-marked-with) deletes headers which have
certain specified marks. Thus, X D - RET deletes all
articles marked with `D' or `-'---which is to say, all read
and saved articles. (There are no spaces in that command; we inserted
spaces for clarity when showing it here.)
A thread is defined as a set of articles related by cross-reference. These references make use of header fields `References:' and `In-Reply-To:', which cite the message ID of another article.
Conversations in a newsgroup usually contain several threads under a single subject. This makes it difficult to know which article follows which without reading references directly. You can use the thread-based commands to do this automatically. You can follow threads of conversation, mark entire threads as read, and go up and down thread trees.
The command M-C-t (gnus-summary-toggle-threads) toggles
showing conversation threads in Summary mode. If it is turned on,
Summary buffer is displayed in a tree structured form which shows the
thread structure.
gnus-summary-toggle-threads).
gnus-summary-show-thread).
gnus-summary-hide-thread).
gnus-summary-next-thread).
gnus-summary-prev-thread).
gnus-summary-down-thread).
gnus-summary-up-thread).
gnus-summary-kill-thread).
Thread subtrees can be hidden by using the command C-M-h
(gnus-summary-hide-thread), and the hidden subtrees can be shown
by using the command C-M-s
(gnus-summary-show-thread).
If the variable gnus-thread-hide-killed is non-nil,
thread subtrees killed by the command C-M-k
(gnus-summary-kill-thread) are hidden automatically.
If you want to hide thread subtrees initially, set the variable
gnus-thread-hide-subtree to non-nil.
If you want to enable thread-based reading automatically, set the
variable gnus-show-threads to non-nil.
Digest article is a message containing many messages in digest format. Since a digest article contains many messages in one article, it is a little bit difficult to read it on a per message basis. The following commands make it easier to read each message in a digest.
gnus-summary-next-digest).
gnus-summary-prev-digest).
gnus-summary-rmail-digest).
The commands C-c C-n and C-c C-p
(gnus-summary-next-digest and gnus-summary-prev-digest)
scroll a digest article to the next and previous digested message,
respectively. The variable gnus-digest-separator specifies a
regexp which separates digested messages.
The command C-d (gnus-summary-rmail-digest) runs Rmail on
a digest article and makes it possible to read messages not in digest
form using Rmail Mode. See section 'Rmail' in The GNU Emacs Manual, for
more information on Rmail Mode. Use the hook
gnus-select-article-hook to run Rmail on digest articles
automatically.
Some newsgroups use a digest format that cannot be read using Rmail.
In this case, C-d displays `Article is not a digest' in the
echo area. It is, however, possible to read these incomplete digest
articles by modifying the message headers or bodies appropriately using
the hook gnus-select-digest-hook. See section Function Hooks, to modify
incomplete digest articles.
If the variable gnus-digest-show-summary is non-nil, a
summary of the digest article is also displayed automatically when Rmail
is invoked.
gnus-summary-isearch-article).
gnus-summary-search-article-forward). If regexp is empty,
the last regexp used is used again.
gnus-summary-search-article-backward). If regexp is empty,
the last regexp used is used again.
gnus-summary-execute-command). If
field is empty, the entire article is searched for.
The command s (gnus-summary-isearch-article) does an
incremental search on the current article. This is like switching to
the Article buffer and typing C-s except that the Summary buffer
remains selected. The command M-s
(gnus-summary-search-article-forward) searches for articles
containing a match for regexp. The search starts from the current point
of the current article. To search backwards, use the command M-r
(gnus-summary-search-article-backward).
The command & (gnus-summary-execute-command)
interactively reads a header field name, a regular expression, and a
valid key sequence. It then searches for all articles in which that
regular expression matches the contents of the specified header field.
It executes the key sequence in each such message.
gnus-summary-refer-parent-article). With a prefix
argument, go back to the child.
gnus-summary-refer-article).
The command ^ (gnus-summary-refer-parent-article) refers
to parent article of the current article. You can go back to the child
article with C-u ^.
^ and M-^ select a new article without moving point in the Summary buffer. As a consequence, you can use g to go back to the article in which you started the last sequence of ^ and M-^ commands.
You can use the r command in Article mode to follow a reference contained in the text of an article. See section Article Commands.
GNUS supports four different formats for saving articles: Rmail format, Unix mailbox format, MH folder, and article format.
gnus-summary-save-article).
gnus-summary-save-in-mail).
gnus-summary-pipe-output).
The variable gnus-default-article-saver controls the formats
used by the o command. By default, it uses Rmail format. If you
set the variable to gnus-summary-save-in-folder, o uses MH
format. If you set it to gnus-summary-save-in-file, o
saves the article text verbatim. The default value is
gnus-summary-save-in-rmail. (All three of these values are
commands that you can bind to other keys.)
The variable gnus-article-save-directory specifies the default
directory for saving articles. If you don't set this variable
explicitly, it is initialized from the SAVEDIR environment
variable, or, as a last resort, `~/News'.
GNUS can sort the Summary buffer by number, subject, date, or author of articles.
gnus-summary-sort-by-number).
gnus-summary-sort-by-subject).
gnus-summary-sort-by-date).
gnus-summary-sort-by-author).
Sorting is stable, which means that it does not disturb the relative order of articles whose sort keys are equal. So you can sort on multiple keys by using several sort commands in a row; the last sort command specifies the most powerful sort key. Thus, C-c C-s C-a C-c C-s C-d C-c C-s C-n sorts by author, and sorts the messages for each author by date, and any messages with the same author and date are sorted by number.
To sort in reverse order, give a prefix argument to the sort commands.
It is also possible to sort the headers automatically when a newsgroup
is selected using the hook gnus-select-group-hook
(see section Function Hooks).
gnus-summary-post-news).
gnus-summary-followup).
gnus-summary-followup-with-original).
gnus-summary-cancel-article).
Type a (gnus-summary-post-news) to post a new article.
If the variable gnus-interactive-post is non-nil, this
command reads the newsgroup, subject, and distribution interactively.
The command f (gnus-summary-followup) fills these values in
automatically from those of the selected article; thus, the article you
post will be a followup to the selected article.
Type C-c C-y (news-reply-yank-original) to include the
original article in the text of the followup. Unless the original
article is quite short, you should edit it to keep only the particular
sentences you are directly responding to.
The command F (gnus-summary-followup-with-original) yanks
the original article automatically. If you want to followup to several
articles in a single article and want to include them in it, type
F for each of them. You will be asked if a text being edited
should be erased. You should answer `n' to the question.
If the variable gnus-novice-user is non-nil, your
confirmations will be required for composing a new article.
The major mode for composing a new article is News Mode which is
borrowed from `rnewspost.el'. Type C-h m
(describe-mode) to get more help on News Mode.
Suppose you post an article and then later realize that you made a
horrible mistake. You really do not want anyone to see your article.
You want the article to be removed from any machines that it may have
reached. The command C (gnus-summary-cancel-article) is
intended to do this. First select the offending article as current,
then type C.
gnus-summary-reply).
gnus-summary-reply-with-original).
gnus-summary-mail-forward).gnus-summary-mail-other-window).
Use the command r (gnus-summary-reply) to mail a reply to
the author of the article. Type C-c C-y to yank the text of the
article you are replying to. The command R
(gnus-summary-reply-with-original) yanks the original article
automatically.
See section 'Mail Mode' in The GNU Emacs Manual, for information on how to finish sending the reply.
Exiting a newsgroup means going back to the Newsgroup buffer and (normally) saving the changes you have made in the status of articles.
gnus-summary-exit). This updates the startup file
to indicate the changes in article status in this newsgroup.
gnus-summary-quit). The effect is to cancel all the
status changes that took place while you were reading this newsgroup.
gnus-summary-reselect-current-group).
The command C-x C-s (gnus-summary-reselect-current-group)
selects the current newsgroup again after temporary exiting the
newsgroup. If no articles remain unread, all articles in the newsgroup
will be selected. A prefix argument to the command means to select all
articles in the newsgroup.
GNUS displays one article at a time, in a buffer called the Article buffer. When you select an article, GNUS puts the Article buffer on the screen and displays the article there.
If the Article buffer is not visible, it appears on the screen
whenever you select an article for display. You can specify the height
of the Article buffer as a fraction of the screen height by setting the
variable gnus-window-configuration.
The Article buffer has a special major mode, Article mode. It provides these commands:
gnus-article-next-page).
gnus-article-prev-page).
gnus-article-refer-article). A cross reference is specified by
a Message-ID included in the text of the article. Move point to a
message ID before using this command.
gnus-article-pop-article).gnus-article-show-summary). The occasion to use this
is when you have been editing a message to send or article to post.
Each user who reads news has a file called the startup file which records which groups he or she subscribes to and which articles have been read.
GNUS actually uses two startup files that contain the same information. The raw startup file, named `~/.newsrc', is the master copy of the information; this is the same file that other news readers use, and it is kept in the standard format. The quick startup file contains the same information in a format convenient for Lisp to read. GNUS automatically updates the quick startup file from the raw startup file whenever the latter is newer; but normally it saves time by reading only the quick startup file.
These commands in Group mode operate on the startup files:
gnus-group-restart).
gnus-group-force-update).
A kill file contains lisp expressions to be applied to a selected newsgroup. The purpose is to mark articles as read on the basis of some set of regexps.
There are two kinds of kill files, global and local. A global kill file is applied to every newsgroup, and a local kill file to a specified newsgroup.
A kill file is simply a file of Lisp code that is loaded (i.e., evaluated) while the Summary buffer is current. In order to work properly, the contents of the file must be designed to interact properly with GNUS. To make it easier to write a valid kill file, GNUS provides a general function which does the things users typically want to do in a kill file.
(gnus-kill field regexp &optional command all)
The gnus-kill function performs an action on each article that
matches a specified condition.
The two required arguments specify the condition. The argument
field specifies a portion of an article; it is either the name of
a header field to search, or "", which says to search the entire
article body. The argument regexp says what to search for. The
condition is this: an article is eligible if the specified portion of
the article contains a match for regexp.
The argument command says what to do when an article fits the
condition. It is either a valid key sequence in Summary mode, or a Lisp
expression which is a list, or nil. A key sequence stands for
its command definition in Summary mode; it means to execute that
command. A Lisp expression means to evaluate that expression.
nil says to mark the article with the character `X'.
If all is omitted or nil, gnus-kill checks only
newly arrived articles for meeting the condition. If all is
non-nil, it checks all articles.
Here as an example is how to mark all articles whose subjects contain the string `AI':
(gnus-kill "Subject" "AI")
If you want to mark articles with `D' instead of `X', you can use the following expression, which works by executing the d command.
(gnus-kill "Subject" "AI" "d")
The usual aim of a kill file is to delete certain articles. The way to
do this is to mark them with `X' and then call
gnus-expunge, like this:
(gnus-expunge "X")
gnus-expunge takes one argument, a string containing a number of
mark characters, and deletes all the lines that are marked with any of
those characters.
It works to use gnus-expunge for the marker `D', but you may
not like what it does, because this prevents you from ever rereading an
article marked as read in a previous session. That's why the default
marker for gnus-kill is `X' rather than `D'.
Searching in the Summary buffer normally ignores case; this includes the
searching inside of gnus-kill. If you do not want to ignore the
case, set the variable case-fold-search to nil.
After GNUS has finished applying the appropriate kill files, if the newsgroup has no articles left, GNUS exits that newsgroup right away.
You can use these GNUS commands to find a kill file for editing:
gnus-summary-edit-local-kill).
gnus-summary-edit-global-kill).
The same key sequences (M-k and M-K) are available in Group
mode also, but the commands that implement them are
gnus-group-edit-local-kill and
gnus-group-edit-global-kill.
The major mode of these buffers is Kill-File mode, which is like Emacs Lisp mode but with the following additional commands:
gnus-kill-file-kill-by-subject).
gnus-kill-file-kill-by-author).
gnus-kill-file-apply-buffer). This is a convenient way
to try out a kill file you have been editing.
gnus-kill-file-apply-last-sexp).
gnus-kill-file-exit).
The effects of C-c C-k C-s and C-c C-k C-a depend on how you began editing the kill file. If you gave the command M-k or M-K while in the Summary buffer, then the article that was current at that time supplies the string to search for, from its own subject or author.
This is a real example of a local kill file for newsgroup `control'.
;; Apply to the newsgroup `control' if the NNTP server is flab.
(if (string-equal gnus-nntp-server "flab")
(progn
(gnus-kill "Subject" "ihave flab\\|sendme")
(gnus-kill "Subject" "cancel\\|newgroup\\|rmgroup" "d")
(gnus-expunge "X")))
Kill files are kept in the directory specified by the variable
gnus-article-save-directory; its default value is `~/News'.
The variable gnus-kill-file-name specifies the global kill file's
name within that directory; the default is `KILL'.
The name of a local kill file is based on the newsgroup's name. If the
variable gnus-use-long-file-name is non-nil, then the file
name is `newsgroup.KILL'. Otherwise, it is
`news/group/KILL', where the subdirectory name is made
from the newsgroup name by changing all periods to slashes.
Kill processing can take a long time. If you don't want to wait for it, try background kill processing using the following shell command:
emacs -batch -l gnus -f gnus-batch-kill newsgroups...
where newsgroups are newsgroup names separated by whitespace. `!' preceding a newsgroup name means negation, and `all' specifies all newsgroups not yet decided. These interpretations are the same as the options line of the startup file (see section The Startup File).
Internally, applying kills means to run the hook
gnus-apply-kill-hook. It is called after the Summary buffer is
prepared for a selected newsgroup. The default hook is the function
gnus-apply-kill-file which loads a global kill file and a local
kill file in this order. A different style of the kill processing can
be implemented by customizing this hook.
For example, if you don't have a global kill file, you can use the following hook which applies only a local kill file. This change can save the time for checking the existence of a global kill file.
;; Get rid of the default hook.
(setq gnus-apply-kill-hook nil)
(add-hook 'gnus-apply-kill-hook
'(lambda ()
;; Apply a local kill file.
(load (gnus-newsgroup-kill-file gnus-newsgroup-name) t nil t)))
(As usual, you can put as many functions as you wish into this hook.
What is not usual is the fact that the hook is not initially empty.
Therefore, if you don't want the default hook value, you must set the
hook variable to nil.)
In contrast, the following example enables only a global kill file.
;; Get rid of the default hook.
(setq gnus-apply-kill-hook nil)
(add-hook 'gnus-apply-kill-hook
'(lambda ()
;; Apply a global kill file.
(load (gnus-newsgroup-kill-file nil) t nil t)))
Here is an advanced example that drastically reduces the time for applying kill files. This hook does the kill processing directly without loading the kill files.
;; Get rid of the default hook.
(setq gnus-apply-kill-hook nil)
(add-hook 'gnus-apply-kill-hook
'(lambda ()
;; Apply to the newsgroup `control'
;; if the NNTP server is flab.
(and (string-equal gnus-nntp-server "flab")
(string-equal gnus-newsgroup-name "control")
(progn
(gnus-kill "Subject" "ihave flab\\|sendme")
(gnus-kill "Subject" "cancel\\|newgroup\\|rmgroup" "d")
(gnus-expunge "X")))))
Appendix A describes the variables and hooks for simple customization and the variables for localization.
gnus-nntp-server
NNTPSERVER environment variable. If the
server name is preceded by a colon such as `:Mail', the user's
private directory `~/Mail' is used as a news spool. See section Telling GNUS Where To Find the News, for more information.
gnus-nntp-service
"nntp". In a
few instances, it must be the number 119. To use a local news
spool of your machine rather than NNTP, set the variable to nil.
See section Telling GNUS Where To Find the News, for more information.
gnus-local-domain
DOMAINNAME is used instead if defined. If the function
system-name returns the full Internet name, there is no need to
define the domain.
gnus-local-organization
ORGANIZATION is used instead if defined. If the value begins
with a slash, it is taken as the name of a file whose contents are read
for the value.
gnus-local-timezone
Specifies the local time zone you belong to. The value can be either a
time zone name such as `"JST"' or a difference in hour from GMT
such as `+0900'. If the variable is non-nil, a general time
zone handling package `timezone.el' is used to generate a valid
date for `Date:' field in terms of RFC822. Otherwise, if it is
nil, GNUS generate a date ignoring the local time zone. If you are
using Bnews, it is okay since `inews' will rewrite the invalid
date. However, if you are using Cnews or INN, you must set the variable
to the correct time zone or remove Date from the variable
gnus-required-headers since their `inews' do not rewrite the
wrong `Date:' field.
If you want to display the time of articles in your local time zone,
call the function gnus-gmt-to-local from the hook
gnus-article-prepare-hook.
gnus-local-distributions
gnus-use-generic-from
nil means the local host name of your machine will not appear
in the `From:' field of article headers. If the variable is a
string, it is used as your domain instead of the definition by the
variable gnus-local-domain or the environment variable
DOMAINNAME.
gnus-use-generic-path
nil means the NNTP server name will not appear in the
`Path:' field of article headers. If the variable is a string, it
is used in the `Path:' field as the NNTP server name instead of the
definition by the variable gnus-nntp-server.
gnus-ignored-newsgroups
Specify a regular expression used to ignore uninterested newsgroups in the active file. Any lines in the active file matching this regular expression are removed from the newsgroup list before anything else is done to it, thus making them effectively invisible. There is no way to know what newsgroups there are if they are ignored.
gnus-ignored-headers
Specifies header fields which should be ignored in an article.
gnus-required-headers
Specifies header fields which should be included in an article you will post. RFC977 and RFC1036 require From, Date, Newsgroups, Subject, Message-ID and Path fields. Organization, Distribution and Lines are optional. If you want GNUS not to generate some fields, remove them from the variable. If news system is Cnews, you may have to remove Date and to add Lines.
gnus-startup-file
gnus-signature-file
gnus-inews-insert-signature called from the hook
gnus-prepare-article-hook by default. If there is a file named
`.signature-distribution', it is used instead when the
distribution of the article is distribution. Set the variable to
nil to prevent appending the signature file automatically.
gnus-use-cross-reference
nil, cross references are ignored. If it is t,
articles in subscribed newsgroups are only marked as read. Otherwise,
if it is not nil nor t, articles in all newsgroups are
marked as read.
gnus-use-followup-to
nil, its value is ignored. If it is non-nil, its value is
used as followup newsgroups. Especially, if it is t and you are
going to followup to an article in which poster is specified,
your confirmation is required.
gnus-use-full-window
nil means to take up the entire screen of Emacs. If the
variable is nil, the windows used by GNUS will be restricted to
the bounds of the original window. This is very useful if you want to
read articles while you do other work in other windows.
gnus-window-configuration
The variable must be a list of `(action (g s
a))', where action is an action being performed, and
g, s, and a are the relative heights of the Group Mode
window, the Summary Mode window, and the Article Mode window,
respectively. action is summary, newsgroups, or
article.
The following example is the default window configuration:
(setq gnus-window-configuration
'((summary (0 1 0))
(newsgroups (1 0 0))
(article (0 3 10))))
The following is an example of yet another two windows mode. Article buffer is always displayed on a screen. This is useful on a slow terminal.
(setq gnus-window-configuration
'((summary (0 1 0))
(newsgroups (1 0 3))
(article (0 1 3))))
The following is an example of three windows mode. Three buffers are always displayed on a screen. This is also useful on a slow terminal.
(setq gnus-window-configuration
'((summary (1 4 0))
(newsgroups (1 1 3))
(article (1 1 3))))
gnus-large-newsgroup
gnus-author-copy
AUTHORCOPY environment variable. The specified file name is
inserted in `FCC:' field, so you have a chance to change the file
name or disable saving a copy by editing this field.
The `FCC:' field is processed by the function
gnus-inews-do-fcc called from the hook
gnus-inews-article-hook by default. Unless the first character
of the field is `|', the article is saved to the specified file
using the function specified by the variable
gnus-author-copy-saver. The default function rmail-output
saves in Unix mailbox format. Instead, if the first character is
`|', the contents of the article is send to a program specified
by the rest of the value. For example, articles can be saved in an MH
folder by the following:
(setq gnus-author-copy
"|/usr/local/lib/mh/rcvstore +Article")
gnus-author-copy-saver
rmail-output saves in Unix mailbox format.
gnus-use-long-file-name
nil means that a newsgroup name is used as a default file
name to save articles to. If it is nil, the directory form of a
newsgroup name is used instead. It is set to nil by default if the
variable system-type is either `usg-unix-v' or
`xenix'.
gnus-mail-save-name
gnus-rmail-save-name
gnus-folder-save-name
gnus-file-save-name
nntp-header-field and
gnus-header-field, respectively. The following functions
are provided as file name generators by default:
gnus-numeric-save-name
gnus-use-long-file-name.
gnus-Numeric-save-name
gnus-use-long-file-name.
gnus-plain-save-name
gnus-use-long-file-name.
gnus-Plain-save-name
gnus-use-long-file-name.
gnus-folder-save-name
gnus-use-long-file-name.
gnus-Folder-save-name
gnus-use-long-file-name.
gnus-summary-save-article. The function must be
interactively funcallable. In other words, it must be an Emacs command.
The functions currently provided are as follows:
gnus-summary-save-in-mail
gnus-summary-save-in-rmail
gnus-summary-save-in-folder
gnus-summary-save-in-file
gnus-summary-save-in-mail, gnus-summary-save-in-rmail, and
gnus-summary-save-in-file. The variable is initialized from the
SAVEDIR environment variable. Its default value is
`~/News'.
nil means you are a novice to USENET. If it is
non-nil, verbose messages may be displayed or your confirmations
may be required.
Non-nil means that your confirmation is required when catching up
a newsgroup in Group mode.
nil means that newsgroup, subject, and distribution are asked
for interactively when composing a new article.
Non-nil means that your confirmation is required when exiting
GNUS.
USER
and LOGNAME environment variables and the function
user-login-name, if undefined.
NAME
environment variable and the function user-full-name, if
undefined.
nil means all headers of an article are shown.
nil means all headers of an article are saved in a file.
nil means process a MIME message. The message is processed
by the function specified by the variable gnus-show-mime-method.
nil means conversation threads are displayed in a tree
structured form according to references in Summary Mode.
nil means subjects of lower level threads are hidden if the
thread-based reading is turned on.
nil means thread subtrees are hidden initially. If thread
subtrees are hidden, you have to run the command
gnus-summary-show-thread by hand or by using
gnus-select-article-hook to show them.
nil means killed thread subtrees are hidden
automatically.
nil means subject differences are ignored but only references
are taken into account in constructing threads trees. If it is
non-nil and thread subtrees are hidden, some commands that work
with subjects may not work properly.
nil means visible articles are automatically extended to
forward and backward if possible when the commands N and P
(gnus-summary-next-article and gnus-summary-prev-article)
are executed in Summary Mode.
nil means the first unread article is selected automatically
when a newsgroup is selected. If you'd like to prevent automatic
selection of the first unread article in some newsgroups, set the
variable to nil in the hook gnus-select-group-hook or
gnus-apply-kill-hook (see section Function Hooks).
nil means the next newsgroup is selected automatically at the
end of the newsgroup. If the value is t and the next newsgroup is
empty (no unread articles), GNUS will exit Summary Mode and go back to
Group Mode. If the value is neither nil nor t, GNUS won't
exit Summary Mode but will select the following unread newsgroup. If
the value is `quietly', the next unread newsgroup will be selected
without any confirmations.
nil means an article with the same subject as the current
article is selected automatically like `rn -S'.
nil means that the cursor is always kept centered in the
Summary Mode window.
nil means that inserts `To:' field which is filled with
the author of the article when followuping. Mail is sent using the
function specified by the variable gnus-mail-send-method.
nil means an article is broken into pages at page delimiters.
The page delimiter is specified by the variable
gnus-page-delimiter. This may not work with some versions of GNU
Emacs earlier than version 18.50.
"^\^L".
nil means that a summary of digest messages is shown when
reading a digest article using the command
gnus-summary-rmail-digest.
gnus-summary-next-digest and gnus-summary-prev-digest, but
not the command gnus-summary-rmail-digest.
nntp-header-field and gnus-header-field,
respectively.
GNUS provides two functions as follows:
gnus-optional-lines-and-from
gnus-optional-lines
See section Function Hooks, to change optional headers according to selected newsgroups.
Specifies a function to process a MIME message in current buffer. The
function metamail-buffer which process the buffer through
`metamail' is called by default.
Specifies a function to begin composing reply mail messages. The
function will be called with an optional argument which means yank
original article automatically if non-nil. To use Mail Mode, set
the variable to gnus-mail-reply-using-mail. To use mh-e letter
Mode, set the variable to gnus-mail-reply-using-mhe.
Specifies a function to forward the current message to another user. To
use Mail Mode, set the variable to gnus-mail-forward-using-mail.
To use mh-e letter Mode, set the variable to
gnus-mail-forward-using-mhe.
gnus-mail-other-window-using-mail. To use mh-e letter Mode, set
the variable to gnus-mail-other-window-using-mhe.
send-mail-function is the default function
which uses sendmail mail program.
gnus-subscribe-randomly
gnus-subscribe-alphabetically
gnus-subscribe-hierarchically
gnus-subscribe-interactively
The following two definitions illustrate how to write your favorite subscribing method. The following definition (is the definition of the function gnus-subscribe-randomly) adds new newsgroup at the beginning of newsgroups:
(setq gnus-subscribe-newsgroup-method
'(lambda (newsgroup)
(gnus-subscribe-newsgroup newsgroup
(car (car gnus-newsrc-assoc)))))
Instead, if you want to add new newsgroup at the end of newsgroups, use the following:
(setq gnus-subscribe-newsgroup-method
'(lambda (newsgroup)
(gnus-subscribe-newsgroup newsgroup nil)))
If you want to prevent adding new newsgroups automatically and want to
subscribe them later using the command U
(gnus-group-unsubscribe-group) in the Newsgroup buffer, use the
following:
(setq gnus-subscribe-newsgroup-method
'(lambda (newsgroup) nil)) ;Do nothing.
The following final example must be the most useful for you who want not to add new newsgroups automatically. This definition subscribes a new newsgroup first, and then kills it. The killed newsgroups can be added to the subscription list interactively using Browse-Killed Mode (see section Maintaining Subscriptions).
(setq gnus-subscribe-newsgroup-method
'(lambda (newsgroup)
(gnus-subscribe-newsgroup newsgroup)
(gnus-kill-newsgroup newsgroup)))
nntp-buggy-select
nil means the select routine of your operating system is
buggy. GNUS may hang up while waiting for NNTP server responses. The
problem may be solved by setting the variable to t.
nntp-maximum-request
nntp-large-newsgroup
nntp-debug-read
nil means display dots "..." every 10000 bytes of a message
being received. If it is a number, dots are displayed per the number.
Set the variable to nil if you are annoyed about verbose messages
while reading news from slow terminal.
tcp-program-name
"tcp". (the program tcp comes with GNU Emacs.) This
variable is relevant only if you load the library `tcp.el', which
you should do only if your Emacs does not have the function
open-network-stream.
nnspool-inews-program
news-inews-program which is default to `inews'.
nnspool-inews-switches
nnspool-request-post to pass
to the command `inews' for posting news. Its default value is
("-h").
nnspool-spool-directory
news-path which is default to `/usr/spool/news'.
nnspool-active-file
nnspool-newsgroups-file
nnspool-distributions-file
nnspool-history-file
mhspool-list-folders-method
mhspool-list-folders-using-ls and
mhspool-list-folders-using-sh are provided now.
mhspool-list-directory-switches
mhspool-list-folders-using-ls
to pass to the command `ls' for getting file listings in a private
directory. There should be one entry for each line. Its default value
is ("-R"). Some machines may require the ("-R1") switch.
gnus-group-mode-hook
nil. This hook is intended to customize Group Mode only
once. It is possible to define or change the NNTP server as you like in
this hook since the hook is called before GNUS is connected to an NNTP
server.
gnus-summary-mode-hook
nil. This hook is intended to customize Summary Mode only
once. All sorts of searches in Summary Mode normally ignore the case of
the text they are searching through. If you do not want to ignore the
case, set the variable case-fold-search to nil in this
hook.
The following example shows how to assign the functions
gnus-summary-next-group and gnus-summary-prev-group to
keys in Summary Mode.
(setq gnus-summary-mode-hook
'(lambda ()
(local-set-key "\C-cn" 'gnus-summary-next-group)
(local-set-key "\C-cp" 'gnus-summary-prev-group)))
gnus-article-mode-hook
nil. This hook is intended to customize Article Mode only
once.
gnus-kill-file-mode-hook
nil.
gnus-browse-killed-mode-hook
nil.
gnus-open-server-hook
nil.
gnus-startup-hook
nil. It is possible to change the behavior
of GNUS according to the server.
gnus-group-prepare-hook
gnus-summary-prepare-hook
gnus-article-prepare-hook
gnus-select-group-hook
The following is an example of sorting the headers listed in the Summary buffer by date and then by subject. Preceding `Re:' of subjects is ignored while comparing subjects.
(setq gnus-select-group-hook
'(lambda ()
;; First of all, sort by date.
(gnus-keysort-headers
(function string-lessp)
(function
(lambda (a)
(gnus-sortable-date (gnus-header-date a)))))
;; Then sort by subject ignoring `Re:'.
(gnus-keysort-headers
(function string-lessp)
(function
(lambda (a)
(if case-fold-search
(downcase (gnus-simplify-subject (gnus-header-subject a) t))
(gnus-simplify-subject (gnus-header-subject a) t)))))
))
The following is an example of simplifying subjects like the
gnus-summary-next-same-subject command does:
(setq gnus-select-group-hook
'(lambda ()
(mapcar (function
(lambda (header)
(nntp-set-header-subject
header
(gnus-simplify-subject
(gnus-header-subject header) 're-only))))
gnus-newsgroup-headers)))
In some newsgroups, author names are meaningless. It is possible to prevent listing author names in the Summary buffer as follows:
(setq gnus-select-group-hook
'(lambda ()
(cond ((string-equal "comp.sources.unix"
gnus-newsgroup-name)
(setq gnus-optional-headers
(function gnus-optional-lines)))
(t
(setq gnus-optional-headers
(function
gnus-optional-lines-and-from))))))
gnus-select-article-hook
nil.
The default hook definition shows conversation thread subtrees of the selected article automatically as follows:
(setq gnus-select-article-hook
'(lambda ()
(gnus-summary-show-thread)))
It is possible to run Rmail on a digest article automatically as follows:
(setq gnus-select-article-hook
'(lambda ()
(gnus-summary-show-thread)
(cond ((string-equal "comp.sys.sun"
gnus-newsgroup-name)
(gnus-summary-rmail-digest))
((and (string-equal "comp.text"
gnus-newsgroup-name)
(string-match "^TeXhax Digest"
(gnus-header-subject
gnus-current-headers)))
(gnus-summary-rmail-digest)
))))
gnus-select-digest-hook
nil. This hook is intended to modify an article so
that Rmail can work with it. See section Reading Digest Articles, for more
information on digest articles.
The following example is the default hook definition to modify incomplete digest articles:
(setq gnus-select-digest-hook
'(lambda ()
;; Reply-To: is required by
;; `undigestify-rmail-message'.
(or (mail-position-on-field "Reply-to" t)
(progn
(mail-position-on-field "Reply-to")
(insert (gnus-fetch-field "From"))))))
gnus-rmail-digest-hook
nil. This hook is intended to customize Rmail Mode
for reading digest articles.
gnus-apply-kill-hook
nil. This hook is intended
to apply kill files to the selected newsgroup. It is set to the
function gnus-apply-kill-file by default.
Since a general kill file is too heavy to use only for a few newsgroups, a lighter hook function is recommended. For example, if you'd like to apply kills to articles which contain the string `rmgroup' in subject in newsgroup `control', you can use the following hook:
(setq gnus-apply-kill-hook
'(lambda ()
(cond ((string-match "control" gnus-newsgroup-name)
(gnus-kill "Subject" "rmgroup")
(gnus-expunge "X")))))
See section Kill File, for more information on kill files.
gnus-mark-article-hook
nil. The hook is intended to mark an article
as read (or saved) automatically when it is selected.
The following example is the default definition of the hook:
(setq gnus-mark-article-hook
'(lambda ()
;; Mark the selected article as read.
(or (memq gnus-current-article gnus-newsgroup-marked)
(gnus-summary-mark-as-read gnus-current-article))
;; Put "+" on the current subject.
(gnus-summary-set-current-mark "+")
))
It is possible to mark as saved (`-') instead when an article is selected as follows:
(setq gnus-mark-article-hook
'(lambda ()
;; Mark the selected article as saved.
(gnus-summary-mark-as-unread gnus-current-article)
;; Put "+" on the current subject.
(gnus-summary-set-current-mark "+")
))
gnus-prepare-article-hook
nil. Text changes made by this hook does not affect on the
editing text. The default hook inserts a signature file by calling the
function gnus-inews-insert-signature.
gnus-inews-article-hook
nil. This hook is called just before sending an article to
the NNTP server or calling the `inews' program. Text changes made
by this hook does not affect on the editing text. It is no recommended
to alter the number of lines of the article since `Lines:' field
may be already there. The default hook does FCC (save an article to the
specified file) by calling the function gnus-inews-do-fcc.
gnus-exit-group-hook
nil. If your machine is so slow that exiting from Summary
Mode takes a long time, you can inhibit marking articles as read by
using cross-reference information in the `Xref:' field by setting
the variable gnus-newsgroup-headers to nil in this
hook.
gnus-exit-gnus-hook
nil. If you want to clear out Emacs buffers which were
created by GNUS and remain afterwards, you can use this hook.
The following example shows how to kill a buffer which was used for posting news.
(setq gnus-exit-gnus-hook
'(lambda ()
;; Kill a buffer used for posting news.
(and (get-buffer "*post-news*")
(kill-buffer "*post-news*"))))
gnus-suspend-gnus-hook
nil. The purpose is the same as the hook
gnus-exit-gnus-hook.
gnus-save-newsrc-hook
nil. This hook is intended to change the way
of backing up the startup file.
Emacs may hang up while waiting for NNTP server responses. This may
be caused by a buggy select routine of your operating system. If so,
the problem may be solved by loading the source code for the library
`nntp.el' instead of running the byte-compiled version. If you
still have problems with it, set the variable nntp-buggy-select
to t.
Emacs may hang up while retrieving headers of a large newsgroup. The
reason is that too many requests have been sent to the NNTP server
without reading replies to them. This causes a deadlock of Emacs and
the server. In this case, the number of requests sent to the server at
one time must be reduced. Set the variable nntp-maximum-request
to a lower value than the default. The optimal value depends on your
computing environment.
There are two mailing lists and one USENET newsgroup for discussing GNUS related topics. These are intended for exchanging useful information about GNUS, such as bug reports, useful hooks, and extensions of GNUS. If you have any questions or problems, feel free to ask about them. Suggestions are also welcome.
gnu.emacs.gnus
info-gnus-english@tut.cis.ohio-state.edu
info-gnus-english-request@tut.cis.ohio-state.edu
info-gnus@flab.Fujitsu.CO.JP
info-gnus-request@flab.Fujitsu.CO.JP
The major difference between info-gnus-english/gnu.emacs.gnus and info-gnus is the official language. There is no need to subscribe to info-gnus if you cannot read messages written in Japanese since most discussions and important announcements will be sent to info-gnus-english.
If you find a bug, it is important to report it and to report it in a way which is useful. If it is a bug of a lisp program, what is the most useful is an exact backtrace information of the lisp program together with the version number of GNUS that you are using.
To make the backtrace information, you must set the Emacs variable
debug-on-error to t before the error happens. A backtrace
obtained from a byte-compiled lisp program is not usually
understandable. To make a human readable backtrace, load the source
program which is not byte-compiled yet and then produce the
error.
@inforef{Bugs, Reporting Bugs, emacs}, for more information.
SAVEDIR environment variable