Import Oort Gnus v0.13.
[elisp/gnus.git-] / texi / gnus.texi
index 3ad4657..1dcfeda 100644 (file)
@@ -33,7 +33,7 @@
 \makeindex
 \begin{document}
 
-\newcommand{\gnusversionname}{Oort Gnus v0.10}
+\newcommand{\gnusversionname}{Oort Gnus v0.13}
 \newcommand{\gnuschaptername}{}
 \newcommand{\gnussectionname}{}
 
 
 \thispagestyle{empty}
 
-Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003
 Free Software Foundation, Inc.
 
 
@@ -317,7 +318,7 @@ license to the document, as described in section 6 of the license.
 
 This file documents Gnus, the GNU Emacs newsreader.
 
-Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
         Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
@@ -347,7 +348,8 @@ license to the document, as described in section 6 of the license.
 @page
 
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003
         Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
@@ -383,7 +385,7 @@ can be gotten by any nefarious means you can think of---@sc{nntp}, local
 spool or your mbox file.  All at the same time, if you want to push your
 luck.
 
-This manual corresponds to Oort Gnus v0.10.
+This manual corresponds to Oort Gnus v0.13.
 
 @end ifinfo
 
@@ -858,8 +860,8 @@ Thwarting Email Spam
 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
 * SpamAssassin::                How to use external anti-spam tools.
 * Hashcash::                    Reduce spam by burning CPU time.
-* Filtering Spam Using spam.el::  
-* Filtering Spam Using Statistics (spam-stat.el)::  
+* Filtering Spam Using The Spam ELisp Package::  
+* Filtering Spam Using Statistics with spam-stat::  
 
 Appendices
 
@@ -1471,6 +1473,7 @@ startup files.  If you want to turn backup creation off, say something like:
 @end lisp
 
 @vindex gnus-init-file
+@vindex gnus-site-init-file
 When Gnus starts, it will read the @code{gnus-site-init-file}
 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
@@ -1622,7 +1625,7 @@ in a while from the group buffer instead (@pxref{Group Maintenance}).
 If non-@code{nil}, the startup message won't be displayed.  That way,
 your boss might not notice as easily that you are reading news instead
 of doing your job.  Note that this variable is used before
-@file{.gnus.el} is loaded, so it should be set in @code{.emacs} instead.
+@file{.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
 
 @item gnus-no-groups-message
 @vindex gnus-no-groups-message
@@ -1778,6 +1781,9 @@ Number of ticked articles.
 @item R
 Number of read articles.
 
+@item U
+Number of unseen articles.
+
 @item t
 Estimated total number of articles.  (This is really @var{max-number}
 minus @var{min-number} plus 1.)
@@ -2114,6 +2120,7 @@ be fetched.
 
 @vindex gnus-select-group-hook
 @vindex gnus-auto-select-first
+@vindex gnus-auto-select-subject
 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
 automatically when entering a group with the @kbd{SPACE} command.
 Which article this is is controlled by the
@@ -2878,7 +2885,7 @@ See also @code{gnus-group-ignored-charsets-alist}.
 
 @item posting-style
 @cindex posting-style
-You can store additional posting style information for this group only
+You can store additional posting style information for this group
 here (@pxref{Posting Styles}).  The format is that of an entry in the
 @code{gnus-posting-styles} alist, except that there's no regexp matching
 the group name (of course).  Style elements in this group parameter will
@@ -2891,6 +2898,7 @@ like this in the group parameters:
 @example
 (posting-style
   (name "Funky Name")
+  ("X-My-Header" "Funky Value")
   (signature "Funky Signature"))
 @end example
 
@@ -2960,6 +2968,7 @@ presents you with a Customize-like interface.  The latter helps avoid
 silly Lisp errors.)  You might also be interested in reading about topic
 parameters (@pxref{Topic Parameters}).
 
+@vindex gnus-parameters
 Group parameters can be set via the @code{gnus-parameters} variable too.
 But some variables, such as @code{visible}, have no effect.  For
 example:
@@ -4029,7 +4038,8 @@ For example:
 @vindex gnus-group-name-charset-group-alist
 An alist of regexp of group name and the charset for group names.  It
 is used to show non-ASCII group names.  @code{((".*" utf-8))} is the
-default value if UTF-8 is supported, otherwise the default is nil.
+default value if UTF-8 is supported, otherwise the default is
+@code{nil}.
 
 For example:
 @lisp
@@ -4137,10 +4147,10 @@ Fetch the control messages for the group from the archive at
 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
 group if given a prefix argument.
 
-If @code{gnus-group-fetch-control-use-browse-url} is non-nil, Gnus
-will open the control messages in a browser using @code{browse-url}.
-Otherwise they are fetched using @code{ange-ftp} and displayed in an
-ephemeral group.
+If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
+Gnus will open the control messages in a browser using
+@code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
+and displayed in an ephemeral group.
 
 Note that the control messages are compressed.  To use this command
 you need to turn on @code{auto-compression-mode}
@@ -4291,14 +4301,14 @@ regenerate the Sieve script.
 
 @vindex gnus-sieve-crosspost
 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
-is generated.  If it is non-nil (the default) articles is placed in
-all groups that have matching rules, otherwise the article is only
-placed in the group with the first matching rule.  For example, the
-group parameter @samp{(sieve address "sender"
+is generated.  If it is non-@code{nil} (the default) articles is
+placed in all groups that have matching rules, otherwise the article
+is only placed in the group with the first matching rule.  For
+example, the group parameter @samp{(sieve address "sender"
 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
-code if @code{gnus-sieve-crosspost} is nil. (When
-@code{gnus-sieve-crosspost} is non-nil, it looks the same except that
-the line containing the call to @code{stop} is removed.)
+code if @code{gnus-sieve-crosspost} is @code{nil}. (When
+@code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
+except that the line containing the call to @code{stop} is removed.)
 
 @example
 if address "sender" "owner-ding@@hpc.uh.edu" @{
@@ -4480,7 +4490,52 @@ for example, @samp{1.2k} or @samp{0.4M}.
 Indentation based on thread level (@pxref{Customizing Threading}).
 @item B
 A complex trn-style thread tree, showing response-connecting trace
-lines.
+lines.  A thread could be drawn like this:
+
+@example
+>
++->
+| +->
+| | \->
+| |   \->
+| \->
++->
+\->
+@end example
+
+You can customize the appearance with the following options.  Note
+that it is possible to make the thread display look really neat by
+replacing the default ASCII characters with graphic line-drawing
+glyphs.
+@table @code
+@item gnus-sum-thread-tree-root
+@vindex gnus-sum-thread-tree-root
+Used for the root of a thread.  If @code{nil}, use subject
+instead. The default is @samp{> }.
+
+@item gnus-sum-thread-tree-single-indent
+@vindex gnus-sum-thread-tree-single-indent
+Used for a thread with just one message.  If @code{nil}, use subject
+instead.  The default is @samp{}.
+
+@item gnus-sum-thread-tree-vertical
+@vindex gnus-sum-thread-tree-vertical
+Used for drawing a vertical line.  The default is @samp{| }.
+
+@item gnus-sum-thread-tree-indent
+@vindex gnus-sum-thread-tree-indent
+Used for indenting.  The default is @samp{  }. 
+
+@item gnus-sum-thread-tree-leaf-with-other
+@vindex gnus-sum-thread-tree-leaf-with-other
+Used for a leaf with brothers.  The default is @samp{+-> }.
+
+@item gnus-sum-thread-tree-single-leaf
+@vindex gnus-sum-thread-tree-single-leaf
+Used for a leaf without brothers.  The default is @samp{\-> }
+
+@end table
+
 @item T
 Nothing if the article is a root and lots of spaces if it isn't (it
 pushes everything after it off the screen).
@@ -4960,7 +5015,9 @@ the server and display it in the article buffer.
 @item gnus-select-article-hook
 @vindex gnus-select-article-hook
 This hook is called whenever an article is selected.  By default it
-exposes any threads hidden under the selected article.
+exposes any threads hidden under the selected article.  If you wish
+that the Agent saves all articles you read, putting
+@code{gnus-agent-fetch-selected-article} on this hook should do it.
 
 @item gnus-mark-article-hook
 @vindex gnus-mark-article-hook
@@ -5495,7 +5552,7 @@ execute the @code{gnus-delay-send-queue} function.
 @findex gnus-delay-initialize
 By default, this function installs @code{gnus-delay-send-queue} in
 @code{gnus-get-new-news-hook}.  But it accepts the optional second
-argument @code{no-check}.  If it is non-nil,
+argument @code{no-check}.  If it is non-@code{nil},
 @code{gnus-get-new-news-hook} is not changed.  The optional first
 argument is ignored.
 
@@ -5937,6 +5994,13 @@ or
 @subsection Setting Process Marks
 @cindex setting process marks
 
+Process marks are displayed as @code{#} in the summary buffer, and are
+used for marking articles in such a way that other commands will
+process these articles.  For instance, if you process mark four
+articles and then use the @kbd{*} command, Gnus will enter these four
+commands into the cache.  For more information,
+@pxref{Process/Prefix}.
+
 @table @kbd
 
 @item M P p
@@ -6325,7 +6389,7 @@ article.  @code{gnus-summary-dummy-line-format} is used to specify the
 format of the dummy roots.  It accepts only one format spec:  @samp{S},
 which is the subject of the article.  @xref{Formatting Variables}.
 If you want all threads to have a dummy root, even the non-gathered
-ones, set @code{gnus-summary-make-false-root-always} to t.
+ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
 
 @item empty
 Gnus won't actually make any article the parent, but simply leave the
@@ -8281,13 +8345,36 @@ an attempt to provide more quoting characters.  If you see something
 like @code{\222} or @code{\264} where you're expecting some kind of
 apostrophe or quotation mark, then try this wash.
 
-@item W k
-@kindex W k (Summary)
+@item W Y f
+@kindex W Y f (Summary)
 @findex gnus-article-outlook-deuglify-article
 @cindex Outlook Express
-Deuglify broken Outlook (Express) articles and redisplay
+Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
+unwrap lines, repair attribution and rearrange citation.
 (@code{gnus-article-outlook-deuglify-article}).
 
+@item W Y u
+@kindex W Y u (Summary)
+@findex gnus-article-outlook-unwrap-lines
+Unwrap lines that appear to be wrapped citation lines.  You can control
+what lines will be unwrapped by frobbing
+@code{gnus-outlook-deuglify-unwrap-min} and
+@code{gnus-outlook-deuglify-unwrap-max}, indicating the miminum and
+maximum length of an unwrapped citation line.
+(@code{gnus-outlook-deuglify-article}).
+
+@item W Y a
+@kindex W Y a (Summary)
+@findex gnus-article-outlook-repair-attribution
+Repair a broken attribution line.
+(@code{gnus-article-outlook-repair-attribution}).
+
+@item W Y c
+@kindex W Y c (Summary)
+@findex gnus-article-outlook-rearrange-citation
+Repair broken citations by rearranging the text.
+(@code{gnus-article-outlook-rearrange-citation}).
+
 @item W w
 @kindex W w (Summary)
 @findex gnus-article-fill-cited-article
@@ -8364,10 +8451,10 @@ If a prefix is given, a charset will be asked for.
 
 @vindex gnus-article-wash-function
 The default is to use the function specified by
-@code{mm-inline-text-html-renderer} (@pxref{Customization, , , emacs-mime})
-to convert the @sc{html}, but this is controlled by the
-@code{gnus-article-wash-function} variable.  Pre-defined functions you
-can use include:
+@code{mm-text-html-renderer} (@pxref{(emacs-mime)Display
+Customization}) to convert the @sc{html}, but this is controlled by
+the @code{gnus-article-wash-function} variable.  Pre-defined functions
+you can use include:
 
 @table @code
 @item w3
@@ -8708,6 +8795,12 @@ they'll be removed.
 Display an @code{X-Face} in the @code{From} header.
 (@code{gnus-article-display-x-face}).
 
+@item W D d
+@kindex W D d (Summary)
+@findex gnus-article-display-face
+Display a @code{Face} in the @code{From} header.
+(@code{gnus-article-display-face}).
+
 @item W D s
 @kindex W D s (Summary)
 @findex gnus-treat-smiley
@@ -8926,13 +9019,29 @@ To have all Vcards be ignored, you'd say something like this:
       '("text/x-vcard"))
 @end lisp
 
+@item gnus-article-loose-mime
+@vindex gnus-article-loose-mime
+If non-@code{nil}, Gnus won't required the @samp{MIME-Version} header
+before interpreting the message as a @sc{mime} message.  This helps
+when reading messages from certain broken mail user agents.  The
+default is @code{nil}.
+
+@item gnus-article-emulate-mime
+@vindex gnus-article-emulate-mime
+There are other, non-@sc{mime} encoding methods used.  The most common
+is @samp{uuencode}, but yEncode is also getting to be popular.  If
+This variable is non-@code{nil}, Gnus will look in message bodies to
+see if it finds these encodings, and if so, it'll run them through the
+Gnus @sc{mime} machinery.  The default is @code{t}.
+
 @item gnus-unbuttonized-mime-types
 @vindex gnus-unbuttonized-mime-types
 This is a list of regexps.  @sc{mime} types that match a regexp from
 this list won't have @sc{mime} buttons inserted unless they aren't
 displayed or this variable is overridden by
 @code{gnus-buttonized-mime-types}.  The default value is
-@code{(".*/.*")}.
+@code{(".*/.*")}.  This variable is only used when
+@code{gnus-inhibit-mime-unbuttonizing} is nil.
 
 @item gnus-buttonized-mime-types
 @vindex gnus-buttonized-mime-types
@@ -8940,6 +9049,8 @@ This is a list of regexps.  @sc{mime} types that match a regexp from
 this list will have @sc{mime} buttons inserted unless they aren't
 displayed.  This variable overrides
 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
+This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
+is nil.
 
 To see e.g. security buttons but no other buttons, you could set this
 variable to @code{("multipart/signed")} and leave
@@ -9009,7 +9120,7 @@ such unenlightened users, you can make live easier by adding
 @end lisp
 
 @noindent
-to your @file{.gnus} file.
+to your @file{.gnus.el} file.
 
 @end table
 
@@ -9655,7 +9766,7 @@ will tell you (@code{gnus-summary-respool-query}).
 @kindex B t (Summary)
 @findex gnus-summary-respool-trace
 Similarly, this command will display all fancy splitting patterns used
-when repooling, if any (@code{gnus-summary-respool-trace}).
+when respooling, if any (@code{gnus-summary-respool-trace}).
 
 @item B p
 @kindex B p (Summary)
@@ -9710,6 +9821,13 @@ suggestions you find reasonable.  (Note that
 @end menu
 
 @table @code
+@vindex gnus-summary-display-while-building
+@item gnus-summary-display-while-building
+If non-@code{nil}, show and update the summary buffer as it's being
+built.  If @code{t}, update the buffer after every line is inserted.
+If the value is an integer, @var{n}, update the display every @var{n}
+lines.  The default is @code{nil}.
+
 @vindex gnus-summary-mode-hook
 @item gnus-summary-mode-hook
 This hook is called when creating a summary mode buffer.
@@ -10198,8 +10316,10 @@ however you need some external programs to get things to work:
 
 @enumerate
 @item
-To handle PGP messages, you have to install mailcrypt or gpg.el as
-well as a OpenPGP implementation (such as GnuPG).
+To handle PGP and PGP/MIME messages, you have to install an OpenPGP
+implementation such as GnuPG.  The lisp interface to GnuPG included
+with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG Manual}), but
+Mailcrypt and gpg.el are also supported.
 
 @item
 To handle @sc{s/mime} message, you need to install OpenSSL.  OpenSSL 0.9.6
@@ -10223,6 +10343,18 @@ Option of decrypting encrypted parts.  @code{never}, no decryption;
 @code{always}, always decrypt; @code{known}, only decrypt known
 protocols. Otherwise, ask user.
 
+@item mml1991-use
+@vindex mml1991-use
+Symbol indicating elisp interface to OpenPGP implementation for PGP
+messages.  The default is @code{pgg}, but @code{mailcrypt} and
+@code{gpg} are also supported although deprecated.
+
+@item mml2015-use
+@vindex mml2015-use
+Symbol indicating elisp interface to OpenPGP implementation for
+PGP/MIME messages.  The default is @code{pgg}, but @code{mailcrypt}
+and @code{gpg} are also supported although deprecated.
+
 @end table
 
 @node Mailing List
@@ -10487,7 +10619,10 @@ message/external-body @sc{mime} type.
 @item c (Article)
 @kindex c (Article)
 Copy the @sc{mime} object to a fresh buffer and display this buffer
-(@code{gnus-mime-copy-part}).
+(@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
+@file{.bz2} are automatically decompressed if
+@code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
+Accessing Compressed Files, emacs, The Emacs Editor}).
 
 @findex gnus-mime-print-part
 @item p (Article)
@@ -10934,10 +11069,20 @@ that have none when you do a @kbd{a}.
 
 @item gnus-confirm-mail-reply-to-news
 @vindex gnus-confirm-mail-reply-to-news
-If non-@code{nil}, Gnus requests confirmation when replying to news.
+This can also be a function receiving the group name as the only
+parameter which should return non-@code{nil} if a confirmation is
+needed, or a regular expression matching group names, where
+confirmation is should be asked for.
+
 If you find yourself never wanting to reply to mail, but occasionally
 press R anyway, this variable might be for you.
 
+@item gnus-confirm-treat-mail-like-news
+@vindex gnus-confirm-treat-mail-like-news
+If non-@code{nil}, Gnus also requests confirmation according to
+@code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
+useful for treating mailing lists like newsgroups.
 @end table
 
 
@@ -11435,10 +11580,6 @@ format or @sc{pgp/mime} or @sc{s/mime}.  For decoding such messages,
 see the @code{mm-verify-option} and @code{mm-decrypt-option} options
 (@pxref{Security}).
 
-For PGP, Gnus supports two external libraries, @sc{gpg.el} and
-@sc{Mailcrypt}, you need to install at least one of them.  The
-@sc{s/mime} support in Gnus requires the external program OpenSSL.
-
 Often, you would like to sign replies to people who send you signed
 messages.  Even more often, you might want to encrypt messages which
 are in reply to encrypted messages.  Gnus offers
@@ -11496,7 +11637,7 @@ Remove security related MML tags from message.
 
 @end table
 
-Also @xref{Security, ,Security, message, Message Manual}.
+@xref{Security, ,Security, message, Message Manual}, for more information.
 
 @node Select Methods
 @chapter Select Methods
@@ -12420,19 +12561,19 @@ Where the news lib dir is (@file{/usr/lib/news/} by default).
 
 @item nnspool-active-file
 @vindex nnspool-active-file
-The path to the active file.
+The name of the active file.
 
 @item nnspool-newsgroups-file
 @vindex nnspool-newsgroups-file
-The path to the group descriptions file.
+The name of the group descriptions file.
 
 @item nnspool-history-file
 @vindex nnspool-history-file
-The path to the news history file.
+The name of the news history file.
 
 @item nnspool-active-times-file
 @vindex nnspool-active-times-file
-The path to the active date file.
+The name of the active date file.
 
 @item nnspool-nov-is-evil
 @vindex nnspool-nov-is-evil
@@ -12547,7 +12688,7 @@ mail back end of your choice into @code{gnus-secondary-select-methods},
 and things will happen automatically.
 
 For instance, if you want to use @code{nnml} (which is a "one file per
-mail" back end), you could put the following in your @file{.gnus} file:
+mail" back end), you could put the following in your @file{.gnus.el} file:
 
 @lisp
 (setq gnus-secondary-select-methods '((nnml "")))
@@ -12732,7 +12873,7 @@ Keywords:
 
 @table @code
 @item :path
-The path of the file.  Defaults to the value of the @code{MAIL}
+The file name.  Defaults to the value of the @code{MAIL}
 environment variable or the value of @code{rmail-spool-directory}
 (usually something like @file{/usr/mail/spool/user-name}).
 @end table
@@ -12743,7 +12884,7 @@ An example file mail source:
 (file :path "/usr/spool/mail/user-name")
 @end lisp
 
-Or using the default path:
+Or using the default file name:
 
 @lisp
 (file)
@@ -12797,7 +12938,7 @@ Keywords:
 
 @table @code
 @item :path
-The path of the directory where the files are.  There is no default
+The name of the directory where the files are.  There is no default
 value.
 
 @item :suffix
@@ -12931,7 +13072,7 @@ Keywords:
 
 @table @code
 @item :path
-The path of the directory where the mails are stored.  The default is
+The name of the directory where the mails are stored.  The default is
 taken from the @code{MAILDIR} environment variable or
 @samp{~/Maildir/}.
 @item :subdirs
@@ -13608,7 +13749,7 @@ However, if you change group parameters, you'd have to update
 @code{nnmail-split-fancy} manually.  You can do it by running
 @code{gnus-group-split-update}.  If you'd rather have it updated
 automatically, just tell @code{gnus-group-split-setup} to do it for
-you.  For example, add to your @file{.gnus}:
+you.  For example, add to your @file{.gnus.el}:
 
 @lisp
 (gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
@@ -13651,18 +13792,18 @@ Here's how:
 Go to the group buffer.
 
 @item
-Type `G f' and give the path to the mbox file when prompted to create an
+Type @kbd{G f} and give the file name to the mbox file when prompted to create an
 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
 
 @item
-Type `SPACE' to enter the newly created group.
+Type @kbd{SPACE} to enter the newly created group.
 
 @item
-Type `M P b' to process-mark all articles in this group's buffer
+Type @kbd{M P b} to process-mark all articles in this group's buffer
 (@pxref{Setting Process Marks}).
 
 @item
-Type `B r' to respool all the process-marked articles, and answer
+Type @kbd{B r} to respool all the process-marked articles, and answer
 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
 @end enumerate
 
@@ -13738,7 +13879,7 @@ By default, if you have auto expiry switched on, Gnus will mark all the
 articles you read as expirable, no matter if they were read or unread
 before.  To avoid having articles marked as read marked as expirable
 automatically, you can put something like the following in your
-@file{.gnus} file:
+@file{.gnus.el} file:
 
 @vindex gnus-mark-article-hook
 @lisp
@@ -15436,6 +15577,15 @@ Example:
 
 Nnmail equivalent: @code{nnmail-split-fancy}.
 
+@item nnimap-split-download-body
+@findex nnimap-split-download-body
+@vindex nnimap-split-download-body
+
+Set to non-nil to download entire articles during splitting.  This is
+generally not required, and will slow things down considerably.  You
+may need it if you want to use an advanced splitting function that
+analyses the body to split the article.
+
 @end table
 
 @node Expiring in IMAP
@@ -16956,13 +17106,6 @@ toggles the plugged/unplugged state of the Gnus Agent.
 * Server Agent Commands::       
 @end menu
 
-You can run a complete batch command from the command line with the
-following incantation:
-
-@cindex gnus-agent-batch
-@example
-$ emacs -batch -l ~/.gnus.el -f gnus-agent-batch
-@end example
 
 
 
@@ -17031,10 +17174,13 @@ Mark the article for downloading (@code{gnus-agent-mark-article}).
 Remove the downloading mark from the article
 (@code{gnus-agent-unmark-article}).
 
+@cindex %
 @item @@
 @kindex @@ (Agent Summary)
 @findex gnus-agent-toggle-mark
-Toggle whether to download the article (@code{gnus-agent-toggle-mark}).
+Toggle whether to download the article
+(@code{gnus-agent-toggle-mark}).  The dowload mark is @samp{%} by
+default. 
 
 @item J c
 @kindex J c (Agent Summary)
@@ -17303,9 +17449,12 @@ Having the Gnus Agent fetch articles (and post whatever messages you've
 written) is quite easy once you've gotten things set up properly.  The
 following shell script will do everything that is necessary:
 
+You can run a complete batch command from the command line with the
+following incantation:
+
 @example
 #!/bin/sh
-emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
+emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
 @end example
 
 
@@ -17319,7 +17468,9 @@ may ask:
 @table @dfn
 @item If I read an article while plugged, do they get entered into the Agent?
 
-@strong{No}.
+@strong{No}.  If you want this behaviour, add
+@code{gnus-agent-fetch-selected-article} to
+@code{gnus-select-article-hook}.
 
 @item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
 
@@ -18225,13 +18376,6 @@ The headers you can score on are @code{from}, @code{subject},
 on the @code{References} header using the @code{Message-ID} of the
 current article, thereby matching the following thread.
 
-You can also score on @code{thread}, which will try to score all
-articles that appear in a thread.  @code{thread} matches uses a
-@code{Message-ID} to match on the @code{References} header of the
-article.  If the match is made, the @code{Message-ID} of the article is
-added to the @code{thread} rule.  (Think about it.  I'd recommend two
-aspirins afterwards.)
-
 If you use this scheme, you should set the score file atom @code{mark}
 to something small---like -300, perhaps, to avoid having small random
 changes result in articles getting marked as read.
@@ -19601,8 +19745,8 @@ You can redefine the function that moves the point to the colon.  The
 function is called @code{gnus-goto-colon}.
 
 But perhaps the most convenient way to deal with this, if you don't want
-to have a colon in your line, is to use the @samp{%C} specifier.  If you
-put a @samp{%C} somewhere in your format line definition, Gnus will
+to have a colon in your line, is to use the @samp{%*} specifier.  If you
+put a @samp{%*} somewhere in your format line definition, Gnus will
 place point there.
 
 
@@ -19841,7 +19985,7 @@ might be used:
                      (vertical 0.24
                                (if (buffer-live-p gnus-summary-buffer)
                                    '(summary 0.5))
-                               (group 1.0)))))
+                               (group 1.0))))
 @end lisp
 
 One common desire for a multiple frame split is to have a separate frame
@@ -19959,7 +20103,7 @@ satisfied.  This will result in the new specs being byte-compiled, and
 you'll get top speed again.  Gnus will save these compiled specs in the
 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
 this function, though---you should compile them yourself by sticking
-them into the @code{.gnus.el} file and byte-compiling that file.)
+them into the @file{.gnus.el} file and byte-compiling that file.)
 
 
 @node Mode Lines
@@ -20213,7 +20357,7 @@ seconds.  This is 60 by default.  If you change that variable,
 all the timings in the handlers will be affected.)
 
 So, if you want to add a handler, you could put something like this in
-your @file{.gnus} file:
+your @file{.gnus.el} file:
 
 @findex gnus-demon-add-handler
 @lisp
@@ -20230,7 +20374,7 @@ Some ready-made functions to do this have been created:
 @code{gnus-demon-add-nntp-close-connection},
 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
 @code{gnus-demon-add-scanmail}.  Just put those functions in your
-@file{.gnus} if you want those abilities.
+@file{.gnus.el} if you want those abilities.
 
 @findex gnus-demon-init
 @findex gnus-demon-cancel
@@ -20893,17 +21037,24 @@ Gnus provides a few convenience functions and variables to allow
 easier insertion of X-Face headers in outgoing messages.
 
 @findex gnus-random-x-face
-@code{gnus-random-x-face} goes through all the @samp{pbm} files
-in @code{gnus-x-face-directory} and picks one at random, and then
+@code{gnus-random-x-face} goes through all the @samp{pbm} files in
+@code{gnus-x-face-directory} and picks one at random, and then
 converts it to the X-Face format by using the
 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
-@samp{pbm} files should be 48x48 pixels big.
+@samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
+header data as a string.
 
+@findex gnus-insert-random-x-face-header
+@code{gnus-insert-random-x-face-header} calls
+@code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
+randomly generated data.
+
+@findex gnus-x-face-from-file
 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
 converts the file to X-Face format by using the
 @code{gnus-convert-image-to-x-face-command} shell command.
 
-Here's how you would typically use the former function.  Put something
+Here's how you would typically use the first function.  Put something
 like the following in your @file{.gnus.el} file:
 
 @lisp
@@ -20912,7 +21063,7 @@ like the following in your @file{.gnus.el} file:
              (list '(X-Face . gnus-random-x-face))))
 @end lisp
 
-Using the latter function would be something like this:
+Using the last function would be something like this:
 
 @lisp
 (setq message-required-news-headers
@@ -21042,8 +21193,8 @@ This is annoying.  Here's what you can do about it.
 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
 * SpamAssassin::                How to use external anti-spam tools.
 * Hashcash::                    Reduce spam by burning CPU time.
-* Filtering Spam Using spam.el::  
-* Filtering Spam Using Statistics (spam-stat.el)::  
+* Filtering Spam Using The Spam ELisp Package::  
+* Filtering Spam Using Statistics with spam-stat::  
 @end menu
 
 @node The problem of spam
@@ -21337,14 +21488,16 @@ hashcash cookies, it is expected that this is performed by your hand
 customized mail filtering scripts.  Improvements in this area would be
 a useful contribution, however.
 
-@node Filtering Spam Using spam.el
-@subsection Filtering Spam Using spam.el
+@node Filtering Spam Using The Spam ELisp Package
+@subsection Filtering Spam Using The Spam ELisp Package
 @cindex spam filtering
-@cindex spam.el
+@cindex spam
 
 The idea behind @code{spam.el} is to have a control center for spam detection
 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
-filters incoming mail, and it analyzes mail known to be spam.
+filters incoming mail, and it analyzes mail known to be spam or ham.
+@emph{Ham} is the name used throughout @code{spam.el} to indicate
+non-spam messages.
 
 So, what happens when you load @code{spam.el}?  First of all, you get
 the following keyboard commands:
@@ -21362,7 +21515,8 @@ the following keyboard commands:
 
 Mark current article as spam, showing it with the @samp{H} mark.
 Whenever you see a spam article, make sure to mark its summary line
-with @kbd{M-d} before leaving the group.
+with @kbd{M-d} before leaving the group.  This is done automatically
+for unread articles in @emph{spam} groups.
 
 @item M s t
 @itemx S t
@@ -21371,51 +21525,101 @@ with @kbd{M-d} before leaving the group.
 @findex spam-bogofilter-score
 @code{spam-bogofilter-score}.
 
-You must have bogofilter processing enabled for that command to work
-properly.
+You must have Bogofilter installed for that command to work properly.
 
 @xref{Bogofilter}.
 
 @end table
 
-Gnus can learn from the spam you get.  All you have to do is collect
-your spam in one or more spam groups, and set the variable
-@code{spam-junk-mailgroups} as appropriate.  In these groups, all messages
-are considered to be spam by default: they get the @samp{H} mark.  You must
-review these messages from time to time and remove the @samp{H} mark for
-every message that is not spam after all.  When you leave a spam
-group, all messages that continue with the @samp{H} mark, are passed on to
-the spam-detection engine (bogofilter, ifile, and others).  To remove
-the @samp{H} mark, you can use @kbd{M-u} to "unread" the article, or @kbd{d} for
-declaring it read the non-spam way.  When you leave a group, all @samp{H}
-marked articles, saved or unsaved, are sent to Bogofilter or ifile
-(depending on @code{spam-use-bogofilter} and @code{spam-use-ifile}), which will study
-them as spam samples.
+Also, when you load @code{spam.el}, you will be able to customize its
+variables.  Try @code{customize-group} on the @samp{spam} variable
+group.
+
+The concepts of ham processors and spam processors are very important.
+Ham processors and spam processors for a group can be set with the
+@code{spam-process} group parameter, or the
+@code{gnus-spam-process-newsgroups} variable.  Ham processors take
+mail known to be non-spam (@emph{ham}) and process it in some way so
+that later similar mail will also be considered non-spam.  Spam
+processors take mail known to be spam and process it so similar spam
+will be detected later.
+
+Gnus learns from the spam you get.  You have to collect your spam in
+one or more spam groups, and set or customize the variable
+@code{spam-junk-mailgroups} as appropriate.  You can also declare
+groups to contain spam by setting their group parameter
+@code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
+by customizing the corresponding variable
+@code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
+parameter and the @code{gnus-spam-newsgroup-contents} variable can
+also be used to declare groups as @emph{ham} groups if you set their
+classification to @code{gnus-group-spam-classification-ham}.  If
+groups are not classified by means of @code{spam-junk-mailgroups},
+@code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
+considered @emph{unclassified}.  All groups are unclassified by
+default.
+
+In spam groups, all messages are considered to be spam by default:
+they get the @samp{H} mark when you enter the group.  You must review
+these messages from time to time and remove the @samp{H} mark for
+every message that is not spam after all.  To remove the @samp{H}
+mark, you can use @kbd{M-u} to "unread" the article, or @kbd{d} for
+declaring it read the non-spam way.  When you leave a group, all
+spam-marked (@samp{H}) articles are sent to a spam processor which
+will study them as spam samples.
 
 Messages may also be deleted in various other ways, and unless
-@code{spam-ham-marks-form} gets overridden below, marks @samp{R} and @samp{r} for
-default read or explicit delete, marks @samp{X} and @samp{K} for automatic or
-explicit kills, as well as mark @samp{Y} for low scores, are all considered
-to be associated with articles which are not spam.  This assumption
-might be false, in particular if you use kill files or score files as
-means for detecting genuine spam, you should then adjust
-@code{spam-ham-marks-form}.  When you leave a group, all _unsaved_ articles
-bearing any the above marks are sent to Bogofilter or ifile, which
-will study these as not-spam samples.  If you explicit kill a lot, you
-might sometimes end up with articles marked @samp{K} which you never saw,
-and which might accidentally contain spam.  Best is to make sure that
-real spam is marked with @samp{H}, and nothing else.
-
-All other marks do not contribute to Bogofilter or ifile
-pre-conditioning.  In particular, ticked, dormant or souped articles
-are likely to contribute later, when they will get deleted for real,
-so there is no need to use them prematurely.  Explicitly expired
-articles do not contribute, command @kbd{E} is a way to get rid of an
-article without Bogofilter or ifile ever seeing it.
-
-@strong{TODO: @code{spam-use-ifile} does not process spam articles on group exit.
-I'm waiting for info from the author of @code{ifile-gnus.el}, because I think
-that functionality should go in @code{ifile-gnus.el} rather than @code{spam.el}.}
+@code{spam-ham-marks} gets overridden below, marks @samp{R} and
+@samp{r} for default read or explicit delete, marks @samp{X} and
+@samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
+low scores, are all considered to be associated with articles which
+are not spam.  This assumption might be false, in particular if you
+use kill files or score files as means for detecting genuine spam, you
+should then adjust the @code{spam-ham-marks} variable.
+
+@defvar spam-ham-marks
+You can customize this variable to be the list of marks you want to
+consider ham.  By default, the list contains the deleted, read,
+killed, kill-filed, and low-score marks.
+@end defvar
+
+@defvar spam-spam-marks
+You can customize this variable to be the list of marks you want to
+consider spam.  By default, the list contains only the spam mark.
+@end defvar
+
+When you leave @emph{any} group, regardless of its
+@code{spam-contents} classification, all spam-marked articles are sent
+to a spam processor, which will study these as spam samples.  If you
+explicit kill a lot, you might sometimes end up with articles marked
+@samp{K} which you never saw, and which might accidentally contain
+spam.  Best is to make sure that real spam is marked with @samp{H},
+and nothing else.
+
+When you leave a @emph{spam} group, all spam-marked articles are
+marked as expired after processing with the spam processor.  This is
+not done for @emph{unclassified} or @emph{ham} groups.  Also, any
+@strong{ham} articles in a spam group will be moved to a location
+determined by either the @code{ham-process-destination} group
+parameter or a match in the @code{gnus-ham-process-destinations}
+variable, which is a list of regular expressions matched with group
+names (it's easiest to customize this variable with
+@code{customize-variable gnus-ham-process-destinations}).  The ultimate
+location is a group name.  If the @code{ham-process-destination}
+parameter is not set, spam articles are only expired.
+
+When you leave a @emph{ham} group, all ham-marked articles are sent to
+a ham processor, which will study these as non-spam samples.
+
+When you leave a @emph{ham} or @emph{unclassified} group, all
+@strong{spam} articles are moved to a location determined by either
+the @code{spam-process-destination} group parameter or a match in the
+@code{gnus-spam-process-destinations} variable, which is a list of
+regular expressions matched with group names (it's easiest to
+customize this variable with @code{customize-variable
+gnus-spam-process-destinations}).  The ultimate location is a group
+name.  If the @code{spam-process-destination} parameter is not set,
+the spam articles are only expired.
 
 To use the @code{spam.el} facilities for incoming mail filtering, you
 must add the following to your fancy split list
@@ -21429,20 +21633,42 @@ Note that the fancy split may be called @code{nnmail-split-fancy} or
 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
 nnimap back ends to retrieve your mail.
 
-The @code{spam-split} function will process incoming mail and send the mail
-considered to be spam into the group name given by the variable
-@code{spam-split-group}.  Usually that group name is @samp{spam}.
+The @code{spam-split} function will process incoming mail and send the
+mail considered to be spam into the group name given by the variable
+@code{spam-split-group}.  By default that group name is @samp{spam},
+but you can customize it.
+
+@emph{Note for IMAP users}
+
+The boolean variable @code{nnimap-split-download-body} needs to be
+set, if you want to split based on the whole message instead of just
+the headers.  By default, the nnimap backend will only retrieve the
+message headers.  If you use spam-check-bogofilter, spam-check-ifile,
+or spam-check-stat (the splitters that can benefit from the full
+message body), you should set this variable.  It is not set by default
+because it will slow IMAP down.
+
+@xref{Splitting in IMAP}.
+
+@emph{TODO: Currently, spam.el only supports insertion of articles
+into a backend.  There is no way to tell spam.el that an article is no
+longer spam or ham.}
+
+@emph{TODO: spam.el needs to provide a uniform way of training all the
+statistical databases.  Some have that functionality built-in, others
+don't.}
 
 The following are the methods you can use to control the behavior of
-@code{spam-split}:
+@code{spam-split} and their corresponding spam and ham processors:
 
 @menu
 * Blacklists and Whitelists::   
 * BBDB Whitelists::             
 * Blackholes::                  
 * Bogofilter::                  
-* Ifile spam filtering::        
-* Extending spam.el::           
+* ifile spam filtering::        
+* spam-stat spam filtering::    
+* Extending the spam elisp package::  
 @end menu
 
 @node Blacklists and Whitelists
@@ -21450,33 +21676,60 @@ The following are the methods you can use to control the behavior of
 @cindex spam filtering
 @cindex whitelists, spam filtering
 @cindex blacklists, spam filtering
-@cindex spam.el
+@cindex spam
 
 @defvar spam-use-blacklist
-Set this variables to t (the default) if you want to use blacklists.
+Set this variable to @code{t} if you want to use blacklists when
+splitting incoming mail.  Messages whose senders are in the blacklist
+will be sent to the @code{spam-split-group}.  This is an explicit
+filter, meaning that it acts only on mail senders @emph{declared} to
+be spammers.
 @end defvar
 
 @defvar spam-use-whitelist
-Set this variables to t if you want to use whitelists.
+Set this variable to @code{t} if you want to use whitelists when
+splitting incoming mail.  Messages whose senders are not in the
+whitelist will be sent to the @code{spam-split-group}.  This is an
+implicit filter, meaning it believes everyone to be a spammer unless
+told otherwise.  Use with care.
+@end defvar
+
+@defvar gnus-group-spam-exit-processor-blacklist
+Add this symbol to a group's @code{spam-process} parameter by
+customizing the group parameters or the
+@code{gnus-spam-process-newsgroups} variable.  When this symbol is
+added to a group's @code{spam-process} parameter, the senders of
+spam-marked articles will be added to the blacklist.
+@end defvar
+
+@defvar gnus-group-ham-exit-processor-whitelist
+Add this symbol to a group's @code{spam-process} parameter by
+customizing the group parameters or the
+@code{gnus-spam-process-newsgroups} variable.  When this symbol is
+added to a group's @code{spam-process} parameter, the senders of
+ham-marked articles in @emph{ham} groups will be added to the
+whitelist.  Note that this ham processor has no effect in @emph{spam}
+or @emph{unclassified} groups.
 @end defvar
 
 Blacklists are lists of regular expressions matching addresses you
 consider to be spam senders.  For instance, to block mail from any
 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
-blacklist.  Since you start out with an empty blacklist, no harm is
-done by having the @code{spam-use-blacklist} variable set, so it is
-set by default.  Blacklist entries use the Emacs regular expression
-syntax.
+blacklist.  You start out with an empty blacklist.  Blacklist entries
+use the Emacs regular expression syntax.
 
 Conversely, whitelists tell Gnus what addresses are considered
 legitimate.  All non-whitelisted addresses are considered spammers.
 This option is probably not useful for most Gnus users unless the
-whitelists is very comprehensive.  Also see @ref{BBDB Whitelists}.
-Whitelist entries use the Emacs regular expression syntax.
+whitelists is very comprehensive or permissive.  Also see @ref{BBDB
+Whitelists}.  Whitelist entries use the Emacs regular expression
+syntax.
 
-The Blacklist and whitelist location can be customized with the
-@code{spam-directory} variable (@file{~/News/spam} by default).  The whitelist
-and blacklist files will be in that directory, named @file{whitelist} and
+The blacklist and whitelist file locations can be customized with the
+@code{spam-directory} variable (@file{~/News/spam} by default), or
+the @code{spam-whitelist} and @code{spam-blacklist} variables
+directly.  The whitelist and blacklist files will by default be in the
+@code{spam-directory} directory, named @file{whitelist} and
 @file{blacklist} respectively.
 
 @node BBDB Whitelists
@@ -21484,23 +21737,33 @@ and blacklist files will be in that directory, named @file{whitelist} and
 @cindex spam filtering
 @cindex BBDB whitelists, spam filtering
 @cindex BBDB, spam filtering
-@cindex spam.el
+@cindex spam
 
-@defvar spam-use-bbdb
+@defvar spam-use-BBDB
 
 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
 Whitelists}), but uses the BBDB as the source of whitelisted addresses,
 without regular expressions.  You must have the BBDB loaded for
-@code{spam-use-bbdb} to work properly.  Only addresses in the BBDB
+@code{spam-use-BBDB} to work properly.  Only addresses in the BBDB
 will be allowed through; all others will be classified as spam.
 
 @end defvar
 
+@defvar gnus-group-ham-exit-processor-BBDB
+Add this symbol to a group's @code{spam-process} parameter by
+customizing the group parameters or the
+@code{gnus-spam-process-newsgroups} variable.  When this symbol is
+added to a group's @code{spam-process} parameter, the senders of
+ham-marked articles in @emph{ham} groups will be added to the
+BBDB.  Note that this ham processor has no effect in @emph{spam}
+or @emph{unclassified} groups.
+@end defvar
+
 @node Blackholes
 @subsubsection Blackholes
 @cindex spam filtering
 @cindex blackholes, spam filtering
-@cindex spam.el
+@cindex spam
 
 @defvar spam-use-blackholes
 
@@ -21520,56 +21783,188 @@ but you can try it and see if it works for you.
 
 @end defvar
 
+@defvar spam-blackhole-servers
+
+The list of servers to consult for blackhole checks.
+
+@end defvar
+
+@defvar spam-use-dig
+
+Use the @code{dig.el} package instead of the @code{dns.el} package.
+The default setting of @code{t} is recommended.
+
+@end defvar
+
+Blackhole checks are done only on incoming mail.  There is no spam or
+ham processor for blackholes.
+
 @node Bogofilter
 @subsubsection Bogofilter
 @cindex spam filtering
 @cindex bogofilter, spam filtering
-@cindex spam.el
+@cindex spam
 
 @defvar spam-use-bogofilter
 
-Set this variable if you want to use Eric Raymond's speedy Bogofilter.
-This has been tested with a locally patched copy of version 0.4.  Make
-sure to read the installation comments in @code{spam.el}.
+Set this variable if you want @code{spam-split} to use Eric Raymond's
+speedy Bogofilter.
 
 With a minimum of care for associating the @samp{H} mark for spam
 articles only, Bogofilter training all gets fairly automatic.  You
 should do this until you get a few hundreds of articles in each
-category, spam or not.  The shell command @command{head -1
-~/.bogofilter/*} shows both article counts.  The command @kbd{S t} in
-summary mode, either for debugging or for curiosity, triggers
-Bogofilter into displaying in another buffer the @emph{spamicity}
-score of the current article (between 0.0 and 1.0), together with the
-article words which most significantly contribute to the score.
+category, spam or not.  The command @kbd{S t} in summary mode, either
+for debugging or for curiosity, shows the @emph{spamicity} score of
+the current article (between 0.0 and 1.0).
+
+Bogofilter determines if a message is spam based on an internal
+threshold, set at compilation time.  That threshold can't be
+customized.
+
+If the @code{bogofilter} executable is not in your path, Bogofilter
+processing will be turned off.
+
+You should not enable this if you use @code{spam-use-bogofilter-headers}.
+
+@end defvar
+
+@defvar spam-use-bogofilter-headers
+
+Set this variable if you want @code{spam-split} to use Eric Raymond's
+speedy Bogofilter, looking only at the message headers.  It works
+similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
+must be in the message already.  Normally you would do this with a
+procmail recipe or something similar; consult the Bogofilter
+installation documents for details.
+
+You should not enable this if you use @code{spam-use-bogofilter}.
+
+@end defvar
+
+@defvar gnus-group-spam-exit-processor-bogofilter
+Add this symbol to a group's @code{spam-process} parameter by
+customizing the group parameters or the
+@code{gnus-spam-process-newsgroups} variable.  When this symbol is
+added to a group's @code{spam-process} parameter, spam-marked articles
+will be added to the Bogofilter spam database.
+@end defvar
+
+@defvar gnus-group-ham-exit-processor-bogofilter
+Add this symbol to a group's @code{spam-process} parameter by
+customizing the group parameters or the
+@code{gnus-spam-process-newsgroups} variable.  When this symbol is
+added to a group's @code{spam-process} parameter, the ham-marked
+articles in @emph{ham} groups will be added to the Bogofilter database
+of non-spam messages.  Note that this ham processor has no effect in
+@emph{spam} or @emph{unclassified} groups.
+@end defvar
+
+@defvar spam-bogofilter-database-directory
+
+This is the directory where Bogofilter will store its databases.  It
+is not specified by default, so Bogofilter will use its own default
+database directory.
 
 @end defvar
 
-@node Ifile spam filtering
-@subsubsection Ifile spam filtering
+The Bogofilter mail classifier is similar to ifile in intent and
+purpose.  A ham and a spam processor are provided, plus the
+@code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
+variables to indicate to spam-split that Bogofilter should either be
+used, or has already been used on the article.  The 0.9.2.1 version of
+Bogofilter was used to test this functionality.
+
+@node ifile spam filtering
+@subsubsection ifile spam filtering
 @cindex spam filtering
 @cindex ifile, spam filtering
-@cindex spam.el
+@cindex spam
 
 @defvar spam-use-ifile
 
-Enable this variable if you want to use Ifile, a statistical analyzer
-similar to Bogofilter.  Currently you must have @code{ifile-gnus.el}
-loaded.  The integration of Ifile with @code{spam.el} is not finished
-yet, but you can use @code{ifile-gnus.el} on its own if you like.
+Enable this variable if you want @code{spam-split} to use ifile, a
+statistical analyzer similar to Bogofilter.
+
+@end defvar
+
+@defvar spam-ifile-all-categories
+
+Enable this variable if you want @code{spam-use-ifile} to give you all
+the ifile categories, not just spam/non-spam.  If you use this, make
+sure you train ifile as described in its documentation.
+
+@end defvar
+
+@defvar spam-ifile-spam-category
 
+This is the category of spam messages as far as ifile is concerned.
+The actual string used is irrelevant, but you probably want to leave
+the default value of @samp{spam}.
 @end defvar
 
-@node Extending spam.el
-@subsubsection Extending spam.el
+@defvar spam-ifile-database-path
+
+This is the filename for the ifile database.  It is not specified by
+default, so ifile will use its own default database name.
+
+@end defvar
+
+The ifile mail classifier is similar to Bogofilter in intent and
+purpose.  A ham and a spam processor are provided, plus the
+@code{spam-use-ifile} variable to indicate to spam-split that ifile
+should be used.  The 1.2.1 version of ifile was used to test this
+functionality.
+
+@node spam-stat spam filtering
+@subsubsection spam-stat spam filtering
+@cindex spam filtering
+@cindex spam-stat, spam filtering
+@cindex spam-stat
+@cindex spam
+
+@xref{Filtering Spam Using Statistics with spam-stat}.
+
+@defvar spam-use-stat
+
+Enable this variable if you want @code{spam-split} to use
+spam-stat.el, an Emacs Lisp statistical analyzer.
+
+@end defvar
+
+@defvar gnus-group-spam-exit-processor-stat
+Add this symbol to a group's @code{spam-process} parameter by
+customizing the group parameters or the
+@code{gnus-spam-process-newsgroups} variable.  When this symbol is
+added to a group's @code{spam-process} parameter, the spam-marked
+articles will be added to the spam-stat database of spam messages.
+@end defvar
+
+@defvar gnus-group-ham-exit-processor-stat
+Add this symbol to a group's @code{spam-process} parameter by
+customizing the group parameters or the
+@code{gnus-spam-process-newsgroups} variable.  When this symbol is
+added to a group's @code{spam-process} parameter, the ham-marked
+articles in @emph{ham} groups will be added to the spam-stat database
+of non-spam messages.  Note that this ham processor has no effect in
+@emph{spam} or @emph{unclassified} groups.
+@end defvar
+
+This enables spam.el to cooperate with spam-stat.el.  spam-stat.el
+provides an internal (Lisp-only) spam database, which unlike ifile or
+Bogofilter does not require external programs.  A spam and a ham
+processor, and the @code{spam-use-stat} variable for @code{spam-split}
+are provided.
+
+@node Extending the spam elisp package
+@subsubsection Extending the spam elisp package
 @cindex spam filtering
-@cindex spam.el, extending
-@cindex extending spam.el
+@cindex spam elisp package, extending
+@cindex extending the spam elisp package
 
-Say you want to add a new back end called blackbox.  Provide the following:
+Say you want to add a new back end called blackbox.  For filtering
+incoming mail, provide the following:
 
 @enumerate
-@item
-documentation
 
 @item
 code
@@ -21593,8 +21988,64 @@ Write the @code{spam-check-blackbox} function.  It should return
 @code{spam-check-*} functions for examples of what you can do.
 @end enumerate
 
-@node Filtering Spam Using Statistics (spam-stat.el)
-@subsection Filtering Spam Using Statistics (spam-stat.el)
+For processing spam and ham messages, provide the following:
+
+@enumerate
+
+@item
+code 
+
+Note you don't have to provide a spam or a ham processor.  Only
+provide them if Blackbox supports spam or ham processing.
+
+@example
+(defvar gnus-group-spam-exit-processor-blackbox "blackbox"
+  "The Blackbox summary exit spam processor.
+Only applicable to spam groups.")
+
+(defvar gnus-group-ham-exit-processor-blackbox "blackbox"
+  "The whitelist summary exit ham processor.
+Only applicable to non-spam (unclassified and ham) groups.")
+
+@end example
+
+@item
+functionality
+
+@example
+(defun spam-blackbox-register-spam-routine ()
+  (spam-generic-register-routine
+   ;; the spam function
+   (lambda (article)
+     (let ((from (spam-fetch-field-from-fast article)))
+       (when (stringp from)
+          (blackbox-do-something-with-this-spammer from))))
+   ;; the ham function
+   nil))
+
+(defun spam-blackbox-register-ham-routine ()
+  (spam-generic-register-routine
+   ;; the spam function
+   nil
+   ;; the ham function
+   (lambda (article)
+     (let ((from (spam-fetch-field-from-fast article)))
+       (when (stringp from)
+          (blackbox-do-something-with-this-ham-sender from))))))
+@end example
+
+Write the @code{blackbox-do-something-with-this-ham-sender} and
+@code{blackbox-do-something-with-this-spammer} functions.  You can add
+more complex code than fetching the message sender, but keep in mind
+that retrieving the whole message takes significantly longer than the
+sender through @code{spam-fetch-field-from-fast}, because the message
+senders are kept in memory by Gnus.
+
+@end enumerate
+
+
+@node Filtering Spam Using Statistics with spam-stat
+@subsection Filtering Spam Using Statistics with spam-stat
 @cindex Paul Graham
 @cindex Graham, Paul
 @cindex naive Bayesian spam filtering
@@ -21663,19 +22114,25 @@ the the group @samp{nnml:mail.spam}), and you would call
 @file{~/Mail/mail/misc} (this usually corresponds the the group
 @samp{nnml:mail.misc}).
 
+When you are using IMAP, you won't have the mails available locally,
+so that will not work.  One solution is to use the Gnus Agent to cache
+the articles.  Then you can use directories such as
+@file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
+@code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
+
 @defvar spam-stat
 This variable holds the hash-table with all the statistics -- the
 dictionary we have been talking about.  For every word in either
 collection, this hash-table stores a vector describing how often the
 word appeared in spam and often it appeared in non-spam mails.
+@end defvar
 
 If you want to regenerate the statistics from scratch, you need to
 reset the dictionary.
 
-@end defvar
-
 @defun spam-stat-reset
 Reset the @code{spam-stat} hash-table, deleting all the statistics.
+@end defun
 
 When you are done, you must save the dictionary.  The dictionary may
 be rather large.  If you will not update the dictionary incrementally
@@ -21683,7 +22140,6 @@ be rather large.  If you will not update the dictionary incrementally
 can reduce the size of the dictionary by deleting all words that did
 not appear often enough or that do not clearly belong to only spam or
 only non-spam mails.
-@end defun
 
 @defun spam-stat-reduce-size
 Reduce the size of the dictionary.  Use this only if you do not want
@@ -21714,10 +22170,14 @@ This will load the necessary Gnus code, and the dictionary you
 created.
 
 Next, you need to adapt your fancy splitting rules:  You need to
-determine how to use @code{spam-stat}.  In the simplest case, you only have
-two groups, @samp{mail.misc} and @samp{mail.spam}.  The following expression says
-that mail is either spam or it should go into @samp{mail.misc}.  If it is
-spam, then @code{spam-stat-split-fancy} will return @samp{mail.spam}.
+determine how to use @code{spam-stat}.  The following examples are for
+the nnml back end.  Using the nnimap back end works just as well.  Just
+use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
+
+In the simplest case, you only have two groups, @samp{mail.misc} and
+@samp{mail.spam}.  The following expression says that mail is either
+spam or it should go into @samp{mail.misc}.  If it is spam, then
+@code{spam-stat-split-fancy} will return @samp{mail.spam}.
 
 @example
 (setq nnmail-split-fancy
@@ -21730,7 +22190,7 @@ The group to use for spam.  Default is @samp{mail.spam}.
 @end defvar
 
 If you also filter mail with specific subjects into other groups, use
-the following expression.  It only the mails not matching the regular
+the following expression.  Only mails not matching the regular
 expression are considered potential spam.
 
 @example
@@ -21775,66 +22235,58 @@ dictionary!
 The main interface to using @code{spam-stat}, are the following functions:
 
 @defun spam-stat-buffer-is-spam
-called in a buffer, that buffer is considered to be a new spam mail;
-use this for new mail that has not been processed before
-
+Called in a buffer, that buffer is considered to be a new spam mail.
+Use this for new mail that has not been processed before.
 @end defun
 
 @defun spam-stat-buffer-is-no-spam
-called in a buffer, that buffer is considered to be a new non-spam
-mail; use this for new mail that has not been processed before
-
+Called in a buffer, that buffer is considered to be a new non-spam
+mail.  Use this for new mail that has not been processed before.
 @end defun
 
 @defun spam-stat-buffer-change-to-spam
-called in a buffer, that buffer is no longer considered to be normal
-mail but spam; use this to change the status of a mail that has
-already been processed as non-spam
-
+Called in a buffer, that buffer is no longer considered to be normal
+mail but spam.  Use this to change the status of a mail that has
+already been processed as non-spam.
 @end defun
 
 @defun spam-stat-buffer-change-to-non-spam
-called in a buffer, that buffer is no longer considered to be spam but
-normal mail; use this to change the status of a mail that has already
-been processed as spam
-
+Called in a buffer, that buffer is no longer considered to be spam but
+normal mail.  Use this to change the status of a mail that has already
+been processed as spam.
 @end defun
 
 @defun spam-stat-save
-save the hash table to the file; the filename used is stored in the
-variable @code{spam-stat-file}
-
+Save the hash table to the file.  The filename used is stored in the
+variable @code{spam-stat-file}.
 @end defun
 
 @defun spam-stat-load
-load the hash table from a file; the filename used is stored in the
-variable @code{spam-stat-file}
-
+Load the hash table from a file.  The filename used is stored in the
+variable @code{spam-stat-file}.
 @end defun
 
 @defun spam-stat-score-word
-return the spam score for a word
-
+Return the spam score for a word.
 @end defun
 
 @defun spam-stat-score-buffer
-return the spam score for a buffer
-
+Return the spam score for a buffer.
 @end defun
 
 @defun spam-stat-split-fancy
-for fancy mail splitting; add the rule @samp{(: spam-stat-split-fancy)} to
-@code{nnmail-split-fancy}
+Use this function for fancy mail splitting.  Add the rule @samp{(:
+spam-stat-split-fancy)} to @code{nnmail-split-fancy}
+@end defun
 
-This requires the following in your @file{~/.gnus} file:
+Make sure you load the dictionary before using it.  This requires the
+following in your @file{~/.gnus} file:
 
 @example
 (require 'spam-stat)
 (spam-stat-load)
 @end example
 
-@end defun
-
 Typical test will involve calls to the following functions:
 
 @example
@@ -21873,14 +22325,14 @@ Save table: (spam-stat-save)
 @table @code
 
 @item gnus-home-directory
-All Gnus path variables will be initialized from this variable, which
-defaults to @file{~/}.
+All Gnus file and directory variables will be initialized from this
+variable, which defaults to @file{~/}.
 
 @item gnus-directory
 @vindex gnus-directory
-Most Gnus storage path variables will be initialized from this variable,
-which defaults to the @samp{SAVEDIR} environment variable, or
-@file{~/News/} if that variable isn't set.
+Most Gnus storage file and directory variables will be initialized from
+this variable, which defaults to the @samp{SAVEDIR} environment
+variable, or @file{~/News/} if that variable isn't set.
 
 Note that Gnus is mostly loaded when the @file{.gnus.el} file is read.
 This means that other directory variables that are initialized from this
@@ -22027,8 +22479,8 @@ XEmacs is distributed as a collection of packages.  You should install
 whatever packages the Gnus XEmacs package requires.  The current
 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
-@samp{xemacs-base}, and @samp{fsf-compat}.  The @samp{misc-games}
-package is required for Morse decoding.
+@samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
+@samp{misc-games} package is required for Morse decoding.
 
 
 @node History
@@ -22762,7 +23214,7 @@ manner, so it should be difficult to lose much data on what you have
 read if your machine should go down (@pxref{Auto Save}).
 
 @item
-Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
+Gnus now has its own startup file (@file{.gnus.el}) to avoid cluttering up
 the @file{.emacs} file.
 
 @item
@@ -24630,6 +25082,9 @@ this function in short order.
 The function should return a cons where the @code{car} is the group name and
 the @code{cdr} is the article number that the article was entered as.
 
+The group should exist before the backend is asked to accept the
+article for that group.
+
 There should be no data returned.
 
 
@@ -25505,10 +25960,10 @@ write the following:
 
 This function (really ``special form'') @code{setq} is the one that can
 set a variable to some value.  This is really all you need to know.  Now
-you can go and fill your @code{.emacs} file with lots of these to change
+you can go and fill your @file{.emacs} file with lots of these to change
 how Gnus works.
 
-If you have put that thing in your @code{.emacs} file, it will be read
+If you have put that thing in your @file{.emacs} file, it will be read
 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
 start Emacs.  If you want to change the variable right away, simply say
 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the