Release commit
[gnus] / texi / gnus.texi
index 3bd6114..6f5a309 100644 (file)
@@ -33,7 +33,7 @@
 \makeindex
 \begin{document}
 
-\newcommand{\gnusversionname}{Oort Gnus v0.07}
+\newcommand{\gnusversionname}{Oort Gnus v0.12}
 \newcommand{\gnuschaptername}{}
 \newcommand{\gnussectionname}{}
 
@@ -56,6 +56,7 @@
 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
+\newcommand{\gnuskey}[1]{`\gnustt{#1}'}
 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
 \newcommand{\gnusdfn}[1]{\textit{#1}}
 \newcommand{\gnusi}[1]{\textit{#1}}
 
 \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.
 
 
@@ -316,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
@@ -346,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
@@ -382,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.07.
+This manual corresponds to Oort Gnus v0.12.
 
 @end ifinfo
 
@@ -427,6 +430,13 @@ the program.
 * Index::                       Variable, function and concept index.
 * Key Index::                   Key Index.
 
+Other related manuals
+
+* Message:(message).            Composing messages.
+* Emacs-MIME:(emacs-mime).      Composing messages; MIME-specific parts.
+* Sieve:(sieve).                Managing Sieve scripts in Emacs.
+* PGG:(pgg).                    PGP/MIME with Gnus.
+
 @detailmenu
  --- The Detailed Node Listing ---
 
@@ -499,7 +509,7 @@ Summary Buffer
 * Choosing Articles::           Reading articles.
 * Paging the Article::          Scrolling the current article.
 * Reply Followup and Post::     Posting articles.
-* Delayed Articles::            
+* Delayed Articles::            Send articles at a later time.
 * Marking Articles::            Marking articles as read, expirable, etc.
 * Limiting::                    You can limit the summary buffer.
 * Threading::                   How threads are made.
@@ -708,8 +718,10 @@ Browsing the Web
 @sc{imap}
 
 * Splitting in IMAP::           Splitting mail with nnimap.
+* Expiring in IMAP::            Expiring mail with nnimap.
 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
+* A note on namespaces::        How to (not) use IMAP namespace in Gnus.
 
 Other Sources
 
@@ -844,9 +856,12 @@ Picons
 
 Thwarting Email Spam
 
+* The problem of spam::         Some background, and some solutions
 * 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)::  
 
 Appendices
 
@@ -1728,7 +1743,7 @@ lines of a @code{format} specification, which is pretty much the same as
 a @code{printf} specifications, for those of you who use (feh!) C.
 @xref{Formatting Variables}.
 
-@samp{%M%S%5y: %(%g%)\n} is the value that produced those lines above.
+@samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
 
 There should always be a colon on the line; the cursor always moves to
 the colon after performing an operation.  @xref{Positioning
@@ -1765,6 +1780,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.)
@@ -1806,6 +1824,9 @@ Newsgroup description.
 @item s
 Select method.
 
+@item B
+If the summary buffer for the group is open or not.
+
 @item n
 Select from where.
 
@@ -2743,7 +2764,7 @@ be inserted literally as a @code{gcc} header.  This parameter takes
 precedence over any default @code{Gcc} rules as described later
 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
-a @code{nntp} server doesn't accept artciles.
+a @code{nntp} server doesn't accept articles.
 
 @item auto-expire
 @cindex auto-expire
@@ -2766,11 +2787,12 @@ See also @code{gnus-total-expirable-newsgroups}.
 @item expiry-wait
 @cindex expiry-wait
 @vindex nnmail-expiry-wait-function
-If the group parameter has an element that looks like @code{(expiry-wait
-. 10)}, this value will override any @code{nnmail-expiry-wait} and
-@code{nnmail-expiry-wait-function} when expiring expirable messages.
-The value can either be a number of days (not necessarily an integer) or
-the symbols @code{never} or @code{immediate}.
+If the group parameter has an element that looks like
+@code{(expiry-wait . 10)}, this value will override any
+@code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
+(@pxref{Expiring Mail}) when expiring expirable messages.  The value
+can either be a number of days (not necessarily an integer) or the
+symbols @code{never} or @code{immediate}.
 
 @item score-file
 @cindex score file group parameter
@@ -2861,7 +2883,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
@@ -2874,6 +2896,7 @@ like this in the group parameters:
 @example
 (posting-style
   (name "Funky Name")
+  ("X-My-Header" "Funky Value")
   (signature "Funky Signature"))
 @end example
 
@@ -3194,6 +3217,12 @@ Sort the group buffer by group rank
 Sort the group buffer alphabetically by back end name
 (@code{gnus-group-sort-groups-by-method}).
 
+@item G S n
+@kindex G S n (Group)
+@findex gnus-group-sort-groups-by-real-name
+Sort the group buffer alphabetically by real (unprefixed) group name
+(@code{gnus-group-sort-groups-by-real-name}).
+
 @end table
 
 All the commands below obey the process/prefix convention
@@ -3241,6 +3270,12 @@ Sort the groups by group rank
 Sort the groups alphabetically by back end name
 (@code{gnus-group-sort-selected-groups-by-method}).
 
+@item G P n
+@kindex G P n (Group)
+@findex gnus-group-sort-selected-groups-by-real-name
+Sort the groups alphabetically by real (unprefixed) group name
+(@code{gnus-group-sort-selected-groups-by-real-name}).
+
 @item G P s
 @kindex G P s (Group)
 @findex gnus-group-sort-selected-groups
@@ -3345,6 +3380,11 @@ subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
 @findex gnus-browse-exit
 Exit browse mode (@code{gnus-browse-exit}).
 
+@item d
+@kindex d (Browse)
+@findex gnus-browse-describe-group
+Describe the current group (@code{gnus-browse-describe-group}).
+
 @item ?
 @kindex ? (Browse)
 @findex gnus-browse-describe-briefly
@@ -4087,10 +4127,12 @@ through @code{gnus-group-faq-directory} and try to open them one by one.
 @vindex gnus-group-charter-alist
 @cindex charter
 Try to open the charter for the current group in a web browser
-(@code{gnus-group-fetch-charter}).  Gnus will use
-@code{gnus-group-charter-alist} to find the location of the charter.
-If no location is known, Gnus will fetch the control messages for the
-group, which in some cases includes the charter.
+(@code{gnus-group-fetch-charter}).  Query for a group if given a
+prefix argument.
+
+Gnus will use @code{gnus-group-charter-alist} to find the location of
+the charter.  If no location is known, Gnus will fetch the control
+messages for the group, which in some cases includes the charter.
 
 @item H C
 @kindex H C (Group)
@@ -4098,7 +4140,8 @@ group, which in some cases includes the charter.
 @vindex gnus-group-fetch-control-use-browse-url
 @cindex control message
 Fetch the control messages for the group from the archive at
-@code{ftp.isc.org} (@code{gnus-group-fetch-control}).
+@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}.
@@ -4312,7 +4355,7 @@ You can have as many summary buffers open as you wish.
 * Choosing Articles::           Reading articles.
 * Paging the Article::          Scrolling the current article.
 * Reply Followup and Post::     Posting articles.
-* Delayed Articles::            
+* Delayed Articles::            Send articles at a later time.
 * Marking Articles::            Marking articles as read, expirable, etc.
 * Limiting::                    You can limit the summary buffer.
 * Threading::                   How threads are made.
@@ -4753,13 +4796,13 @@ no more unread articles after the current one, Gnus will offer to go to
 the next group.  If this variable is @code{t} and the next group is
 empty, Gnus will exit summary mode and return to the group buffer.  If
 this variable is neither @code{t} nor @code{nil}, Gnus will select the
-next group, no matter whether it has any unread articles or not.  As a
-special case, if this variable is @code{quietly}, Gnus will select the
-next group without asking for confirmation.  If this variable is
-@code{almost-quietly}, the same will happen only if you are located on
-the last article in the group.  Finally, if this variable is
-@code{slightly-quietly}, the @kbd{Z n} command will go to the next group
-without confirmation.  Also @pxref{Group Levels}.
+next group with unread articles.  As a special case, if this variable
+is @code{quietly}, Gnus will select the next group without asking for
+confirmation.  If this variable is @code{almost-quietly}, the same
+will happen only if you are located on the last article in the group.
+Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
+command will go to the next group without confirmation.  Also
+@pxref{Group Levels}.
 
 @item gnus-auto-select-same
 @vindex gnus-auto-select-same
@@ -4923,7 +4966,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
@@ -5456,17 +5501,15 @@ execute the @code{gnus-delay-send-queue} function.
 @table @code
 @item gnus-delay-initialize
 @findex gnus-delay-initialize
-By default, this function installs the @kbd{C-c C-j} key binding in
-Message mode and @code{gnus-delay-send-queue} in
-@code{gnus-get-new-news-hook}.  But it accepts two optional arguments,
-@code{no-keymap} and @code{no-check}.  If @code{no-keymap} is non-nil,
-the @kbd{C-c C-j} binding is not intalled.  If @code{no-check} is
-non-nil, @code{gnus-get-new-news-hook} is not changed.
-
-For example, @code{(gnus-delay-initialize nil t)} means to change the
-keymap but not to change @code{gnus-get-new-news-hook}.  Presumably, you
-want to use the demon for sending due delayed articles.  Just don't
-forget to set that up :-)
+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,
+@code{gnus-get-new-news-hook} is not changed.  The optional first
+argument is ignored.
+
+For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
+Presumably, you want to use the demon for sending due delayed articles.
+Just don't forget to set that up :-)
 @end table
 
 
@@ -5655,15 +5698,34 @@ religiously) are marked with an @samp{S} in the second column
 
 @item
 @vindex gnus-recent-mark
-Articles that according to the back end haven't been seen by the user
+Articles that according to the server haven't been shown to the user
 before are marked with a @samp{N} in the second column
-(@code{gnus-recent-mark}).  Note that not all back ends support this
-mark, in which case it simply never appears.
+(@code{gnus-recent-mark}).  Note that not all servers support this
+mark, in which case it simply never appears. Compare with
+@code{gnus-unseen-mark}.
 
 @item
 @vindex gnus-unseen-mark
-Articles that haven't been seen by the user before are marked with a
-@samp{.} in the second column (@code{gnus-unseen-mark}).
+Articles that haven't been seen before in Gnus by the user are marked
+with a @samp{.} in the second column (@code{gnus-unseen-mark}).
+Compare with @code{gnus-recent-mark}.
+
+@item
+@vindex gnus-undownloaded-mark
+When using the Gnus agent @pxref{Agent Basics}, some articles might not
+have been downloaded.  Such articles cannot be viewed while you are
+offline (unplugged).  These articles get the @samp{@@} mark in the
+first column.  (The variable @code{gnus-undownloaded-mark} controls
+which character to use.)
+
+@item
+@vindex gnus-downloadable-mark
+The Gnus agent @pxref{Agent Basics} downloads some articles
+automatically, but it is also possible to explicitly mark articles for
+download, even if they would not be downloaded automatically.  Such
+explicitly-marked articles get the @samp{%} mark in the first column.
+(The variable @code{gnus-downloadable-mark} controls which character to
+use.)
 
 @item
 @vindex gnus-not-empty-thread-mark
@@ -5883,6 +5945,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
@@ -6074,6 +6143,12 @@ Pop the previous limit off the stack and restore it
 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
 the stack.
 
+@item / .
+@kindex / . (Summary)
+@findex gnus-summary-limit-to-unseen
+Limit the summary buffer to the unseen articles
+(@code{gnus-summary-limit-to-unseen}).
+
 @item / v
 @kindex / v (Summary)
 @findex gnus-summary-limit-to-score
@@ -6257,12 +6332,15 @@ square brackets (@samp{[]}).  This is the default method.
 
 @item dummy
 @vindex gnus-summary-dummy-line-format
+@vindex gnus-summary-make-false-root-always
 Gnus will create a dummy summary line that will pretend to be the
 parent.  This dummy line does not correspond to any real article, so
 selecting it will just select the first real article after the dummy
 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.
 
 @item empty
 Gnus won't actually make any article the parent, but simply leave the
@@ -6472,7 +6550,7 @@ If non-@code{nil}, all threads will be hidden when the summary buffer is
 generated.
 
 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
-Avaliable predicates are @code{gnus-article-unread-p} and
+Available predicates are @code{gnus-article-unread-p} and
 @code{gnus-article-unseen-p}).
 
 Here's an example:
@@ -7122,6 +7200,8 @@ Save the current article in a VM folder
 @findex gnus-summary-pipe-output
 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
 the current article to a process (@code{gnus-summary-pipe-output}).
+If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
+complete headers in the piped output.
 
 @item O P
 @kindex O P (Summary)
@@ -8012,6 +8092,8 @@ Hide @sc{pem} (privacy enhanced messages) cruft
 @item W W B
 @kindex W W B (Summary)
 @findex gnus-article-strip-banner
+@vindex gnus-article-banner-alist
+@vindex gnus-article-address-banner-alist
 @cindex banner
 @cindex OneList
 @cindex stripping advertisements
@@ -8028,6 +8110,30 @@ signature should be removed, or other symbol, meaning that the
 corresponding regular expression in @code{gnus-article-banner-alist} is
 used.
 
+Regardless of a group, you can hide things like advertisements only when
+the sender of an article has a certain mail address specified in
+@code{gnus-article-address-banner-alist}.
+
+@table @code
+
+@item gnus-article-address-banner-alist
+@vindex gnus-article-address-banner-alist
+Alist of mail addresses and banners.  Each element has the form
+@code{(ADDRESS . BANNER)}, where ADDRESS is a regexp matching a mail
+address in the From header, BANNER is one of a symbol @code{signature},
+an item in @code{gnus-article-banner-alist}, a regexp and @code{nil}.
+If ADDRESS matches author's mail address, it will remove things like
+advertisements.  For example, if a sender has the mail address
+@samp{hail@@yoo-hoo.co.jp} and there is a banner something like
+@samp{Do You Yoo-hoo!?} in all articles he sends, you can use the
+following element to remove them:
+
+@lisp
+("@@yoo-hoo\\.co\\.jp\\'" . "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
+@end lisp
+
+@end table
+
 @item W W c
 @kindex W W c (Summary)
 @findex gnus-article-hide-citation
@@ -8147,6 +8253,12 @@ positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
 is rumored to have employed this form of, uh, somewhat weak encryption.
 
+@item W m
+@kindex W m (Summary)
+@findex gnus-summary-morse-message
+@c @icon{gnus-summary-morse-message}
+Morse decode the article buffer (@code{gnus-summary-morse-message}).
+
 @item W t
 @item t
 @kindex W t (Summary)
@@ -8186,11 +8298,34 @@ apostrophe or quotation mark, then try this wash.
 
 @item W k
 @kindex W k (Summary)
+@kindex W Y f (Summary)
 @findex gnus-article-outlook-deuglify-article
 @cindex Outlook Express
-Deuglify broken Outlook (Express) articles and redisplay
+Deuglify broken Outlook (Express) articles.
 (@code{gnus-article-outlook-deuglify-article}).
 
+@item W Y u
+@kindex W Y u (Summary)
+@findex gnus-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-outlook-repair-attribution
+Repair a broken attribution line
+(@code{gnus-outlook-repair-attribution}).
+
+@item W Y c
+@kindex W Y c (Summary)
+@findex gnus-outlook-rearrange-citation
+Repair broken citations by rearranging the text.
+(@code{gnus-outlook-rearrange-citation}).
+
 @item W w
 @kindex W w (Summary)
 @findex gnus-article-fill-cited-article
@@ -8267,10 +8402,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
@@ -8415,10 +8550,11 @@ be nice if Gnus could just fetch whatever it is that people talk about
 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
 button on these references.
 
+@vindex gnus-button-man-handler
 Gnus adds @dfn{buttons} to certain standard references by default:
-Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
-two variables, one that handles article bodies and one that handles
-article heads:
+Well-formed URLs, mail addresses, Message-IDs, Info links and man pages.
+This is controlled by two variables, one that handles article bodies and
+one that handles article heads:
 
 @table @code
 
@@ -8433,10 +8569,11 @@ This is an alist where each entry has this form:
 @table @var
 
 @item regexp
-All text that match this regular expression will be considered an
-external reference.  Here's a typical regexp that matches embedded URLs:
-@samp{<URL:\\([^\n\r>]*\\)>}. This can also be a variable containing a
-regexp, useful variables to use include @code{gnus-button-url-regexp}.
+All text that match this regular expression (case insensitive) will be
+considered an external reference.  Here's a typical regexp that matches
+embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
+variable containing a regexp, useful variables to use include
+@code{gnus-button-url-regexp}.
 
 @item button-par
 Gnus has to know which parts of the matches is to be highlighted.  This
@@ -8587,7 +8724,7 @@ preferred format automatically.
 @cindex x-face
 @cindex smileys
 
-These commands add various frivolous display gimmics to the article
+These commands add various frivolous display gimmicks to the article
 buffer in Emacs versions that support them.
 
 @code{X-Face} headers are small black-and-white images supplied by the
@@ -8609,6 +8746,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
@@ -8827,13 +8970,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 overriden by
+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
@@ -8841,10 +9000,17 @@ 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
-@code{gnus-unbuttonized-mime-types} to the default value.
+@code{gnus-unbuttonized-mime-types} at the default value.
+
+@item gnus-inhibit-mime-unbuttonizing
+@vindex gnus-inhibit-mime-unbuttonizing
+If this is non-nil, then all @sc{mime} parts get buttons.  The default
+value is @code{nil}.
 
 @item gnus-article-mime-part-function
 @vindex gnus-article-mime-part-function
@@ -8905,7 +9071,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
 
@@ -9164,7 +9330,7 @@ then ask Google if that fails:
 @lisp
 (setq gnus-refer-article-method
       '(current
-        (nnweb "refer" (nnweb-type google))))
+        (nnweb "google" (nnweb-type google))))
 @end lisp
 
 Most of the mail back ends support fetching by @code{Message-ID}, but
@@ -9551,7 +9717,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)
@@ -9764,6 +9930,12 @@ Regenerate the current summary buffer (@code{gnus-summary-prepare}).
 Pull all cached articles (for the current group) into the summary buffer
 (@code{gnus-summary-insert-cached-articles}).
 
+@item Y d
+@kindex Y d (Summary)
+@findex gnus-summary-insert-dormant-articles
+Pull all dormant articles (for the current group) into the summary buffer
+(@code{gnus-summary-insert-dormant-articles}).
+
 @end table
 
 
@@ -10527,6 +10699,7 @@ possible but those listed are probably sufficient for most people.
 @item gnus-treat-strip-pgp (t, last, integer)
 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
 @item gnus-treat-unsplit-urls (t, integer)
+@item gnus-treat-wash-html (t, integer)
 
 @xref{Article Washing}.
 
@@ -10813,7 +10986,8 @@ Variables for customizing outgoing mail:
 @item gnus-uu-digest-headers
 @vindex gnus-uu-digest-headers
 List of regexps to match headers included in digested messages.  The
-headers will be included in the sequence they are matched.
+headers will be included in the sequence they are matched.  If
+@code{nil} include all headers.
 
 @item gnus-add-to-list
 @vindex gnus-add-to-list
@@ -10822,10 +10996,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
 
 
@@ -10887,7 +11071,7 @@ To the thing similar to this, there is @code{message-smtpmail-send-it}.
 It is useful if your ISP requires the POP-before-SMTP authentication.
 See the documentation for the function @code{mail-source-touch-pop}.
 
-Other possible choises for @code{message-send-mail-function} includes
+Other possible choices for @code{message-send-mail-function} includes
 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
 and @code{feedmail-send-it}.
 
@@ -11144,11 +11328,14 @@ The first element in each style is called the @code{match}.  If it's a
 string, then Gnus will try to regexp match it against the group name.
 If it is the form @code{(header MATCH REGEXP)}, then Gnus will look in
 the original article for a header whose name is MATCH and compare that
-REGEXP.  MATCH and REGEXP are strings. If it's a function symbol, that
-function will be called with no arguments.  If it's a variable symbol,
-then the variable will be referenced.  If it's a list, then that list
-will be @code{eval}ed.  In any case, if this returns a non-@code{nil}
-value, then the style is said to @dfn{match}.
+REGEXP.  MATCH and REGEXP are strings.  (There original article is the
+one you are replying or following up to.  If you are not composing a
+reply or a followup, then there is nothing to match against.)  If the
+@code{match} is a function symbol, that function will be called with no
+arguments.  If it's a variable symbol, then the variable will be
+referenced.  If it's a list, then that list will be @code{eval}ed.  In
+any case, if this returns a non-@code{nil} value, then the style is said
+to @dfn{match}.
 
 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
 attribute consists of a @code{(@var{name} @var{value})} pair.  The
@@ -12432,7 +12619,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 "")))
@@ -12551,6 +12738,15 @@ can be turned off completely by binding
 @code{nnmail-mail-splitting-decodes} to nil, which is useful if you
 want to match articles based on the raw header data.
 
+@vindex nnmail-resplit-incoming
+By default, splitting is performed on all incoming messages.  If
+you specify a @code{directory} entry for the variable
+@code{mail-sources} @pxref{Mail Source Specifiers}, however, then
+splitting does @emph{not} happen by default.  You can set the variable
+@code{nnmail-resplit-incoming} to a non-nil value to make splitting
+happen even in this case.  (This variable has no effect on other kinds
+of entries.)
+
 Gnus gives you all the opportunity you could possibly want for shooting
 yourself in the foot.  Let's say you create a group that will contain
 all the mail you get from your boss.  And then you accidentally
@@ -12653,18 +12849,21 @@ Alter this script to fit find the @samp{movemail} you want to use.
 
 
 @item directory
-Get mail from several files in a directory.  This is typically used
-when you have procmail split the incoming mail into several files.
-That is, mail from the file @file{foo.bar.spool} will be put in the
-group @code{foo.bar}.  (You can change the suffix to be used instead
+@vindex nnmail-scan-directory-mail-source-once
+Get mail from several files in a directory.  This is typically used when
+you have procmail split the incoming mail into several files.  That is,
+there is a one-to-one correspondence between files in that directory and
+groups, so that mail from the file @file{foo.bar.spool} will be put in
+the group @code{foo.bar}.  (You can change the suffix to be used instead
 of @code{.spool}.)  Setting
-@code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus
-to scan the mail source only once.  This is particularly useful if you
-want to scan mail groups at a specified level.
+@code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus to
+scan the mail source only once.  This is particularly useful if you want
+to scan mail groups at a specified level.
 
+@vindex nnmail-resplit-incoming
 There is also the variable @code{nnmail-resplit-incoming}, if you set
 that to a non-nil value, then the normal splitting process is applied
-to all the files from the directory.
+to all the files from the directory, @ref{Splitting Mail}.
 
 Keywords:
 
@@ -12907,7 +13106,7 @@ which normally is the mailbox which receive incoming mail.
 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
 UNDELETED}, is probably the best choice for most people, but if you
 sometimes peek in your mailbox with a @sc{imap} client and mark some
-articles as read (or; SEEN) you might want to set this to @samp{nil}.
+articles as read (or; SEEN) you might want to set this to @samp{1:*}.
 Then all articles in the mailbox is fetched, no matter what.  For a
 complete list of predicates, see RFC 2060 section 6.4.4.
 
@@ -13481,7 +13680,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)
@@ -13567,26 +13766,51 @@ Gnus will not delete your old, read mail.  Unless you ask it to, of
 course.
 
 To make Gnus get rid of your unwanted mail, you have to mark the
-articles as @dfn{expirable}.  This does not mean that the articles will
-disappear right away, however.  In general, a mail article will be
+articles as @dfn{expirable}.  (With the default keybindings, this means
+that you have to type @kbd{E}.)  This does not mean that the articles
+will disappear right away, however.  In general, a mail article will be
 deleted from your system if, 1) it is marked as expirable, AND 2) it is
 more than one week old.  If you do not mark an article as expirable, it
 will remain on your system until hell freezes over.  This bears
 repeating one more time, with some spurious capitalizations: IF you do
 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
 
+You do not have to mark articles as expirable by hand.  Gnus provides
+two features, called `auto-expire' and `total-expire', that can help you
+with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
+for you when you select an article.  And `total-expire' means that Gnus
+considers all articles as expirable that are read.  So, in addition to
+the articles marked @samp{E}, also the articles marked @samp{r},
+@samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
+expirable.
+
+When should either auto-expire or total-expire be used?  Most people
+who are subscribed to mailing lists split each list into its own group
+and then turn on auto-expire or total-expire for those groups.
+(@xref{Splitting Mail}, for more information on splitting each list
+into its own group.)
+
+Which one is better, auto-expire or total-expire?  It's not easy to
+answer.  Generally speaking, auto-expire is probably faster.  Another
+advantage of auto-expire is that you get more marks to work with: for
+the articles that are supposed to stick around, you can still choose
+between tick and dormant and read marks.  But with total-expire, you
+only have dormant and ticked to choose from.  The advantage of
+total-expire is that it works well with adaptive scoring @pxref{Adaptive
+Scoring}.  Auto-expire works with normal scoring but not with adaptive
+scoring.
+
 @vindex gnus-auto-expirable-newsgroups
-You do not have to mark articles as expirable by hand.  Groups that
-match the regular expression @code{gnus-auto-expirable-newsgroups} will
-have all articles that you read marked as expirable automatically.  All
-articles marked as expirable have an @samp{E} in the first
-column in the summary buffer.
+Groups that match the regular expression
+@code{gnus-auto-expirable-newsgroups} will have all articles that you
+read marked as expirable automatically.  All articles marked as
+expirable have an @samp{E} in the first column in the summary buffer.
 
 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
@@ -13741,7 +13965,7 @@ laugh.
 
 Gnus provides a plethora of functions for washing articles while
 displaying them, but it might be nicer to do the filtering before
-storing the mail to disc.  For that purpose, we have three hooks and
+storing the mail to disk.  For that purpose, we have three hooks and
 various functions that can be put in these hooks.
 
 @table @code
@@ -14307,7 +14531,7 @@ headers/status bits stuff.  RMAIL itself still exists as well, of
 course, and is still maintained by Stallman.
 
 Both of the above forms leave your mail in a single file on your
-filesystem, and they must parse that entire file each time you take a
+file system, and they must parse that entire file each time you take a
 look at your mail.
 
 @item nnml
@@ -14328,10 +14552,10 @@ extremely fast on access because of what amounts to the indexing support
 provided by the active file and overviews.
 
 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
-resource which defines available places in the filesystem to put new
+resource which defines available places in the file system to put new
 files.  Sysadmins take a dim view of heavy inode occupation within
-tight, shared filesystems.  But if you live on a personal machine where
-the filesystem is your own and space is not at a premium, @code{nnml}
+tight, shared file systems.  But if you live on a personal machine where
+the file system is your own and space is not at a premium, @code{nnml}
 wins big.
 
 It is also problematic using this back end if you are living in a
@@ -14375,7 +14599,7 @@ per article, so it uses about twice as many inodes as @code{nnml}.  (Use
 @code{df -i} to see how plentiful your inode supply is.)  If this slows
 you down or takes up very much space, consider switching to ReiserFS
 (@uref{http://www.namesys.com/}) or another non-block-structured
-filesystem.
+file system.
 
 Since maildirs don't require locking for delivery, the maildirs you use
 as groups can also be the maildirs your mail is directly delivered to.
@@ -14405,21 +14629,21 @@ it's not as easy to work with them from outside Gnus as with
 @code{nnmaildir}.
 
 For configuring expiry and other things, @code{nnmaildir} uses group
-parameters slightly different from those of other mail backends.
+parameters slightly different from those of other mail back ends.
 
 @code{nnmaildir} uses a significant amount of memory to speed things up.
 (It keeps in memory some of the things that @code{nnml} stores in files
 and that @code{nnmh} repeatedly parses out of message files.)  If this
 is a problem for you, you can set the @code{nov-cache-size} group
-parameter to somthing small (0 would probably not work, but 1 probably
+parameter to something small (0 would probably not work, but 1 probably
 would) to make it use less memory.
 
 Startup and shutdown are likely to be slower with @code{nnmaildir} than
-with other backends.  Everything in between is likely to be faster,
-depending in part on your filesystem.
+with other back ends.  Everything in between is likely to be faster,
+depending in part on your file system.
 
 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
-to write an @code{nnmaildir}-derived backend.
+to write an @code{nnmaildir}-derived back end.
 
 @end table
 
@@ -14495,7 +14719,7 @@ to shut down Gnus, so archiving may be invoked by @code{cron} or
 similar.  You restore the data by restoring the directory tree, and
 adding a server definition pointing to that directory in Gnus. The
 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
-might interfer with overwriting data, so you may want to shut down Gnus
+might interfere with overwriting data, so you may want to shut down Gnus
 before you restore the data.
 
 It is also possible to archive individual @code{nnml},
@@ -14641,7 +14865,7 @@ default is @code{t}.  To be able to display threads, @code{nnslashdot}
 has to retrieve absolutely all comments in a group upon entry.  If a
 threaded display is not required, @code{nnslashdot} will only retrieve
 the comments that are actually wanted by the user.  Threading is nicer,
-but much, much slower than untreaded.
+but much, much slower than unthreaded.
 
 @item nnslashdot-login-name
 @vindex nnslashdot-login-name
@@ -14801,7 +15025,9 @@ summary buffer.
                      (assq (gnus-summary-article-number)
                            gnus-newsgroup-data))))))
     (if url
-        (browse-url (cdr url))
+        (progn
+          (browse-url (cdr url))
+          (gnus-summary-mark-as-read-forward 1))
       (gnus-summary-scroll-up arg))))
 
 (eval-after-load "gnus"
@@ -14988,7 +15214,7 @@ program.
 @vindex imap-ssl-program
 For SSL connections, the OpenSSL program is available from
 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
-and nnimap support it too - altough the most recent versions of
+and nnimap support it too - although the most recent versions of
 SSLeay, 0.9.x, are known to have serious bugs making it
 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
 work. The variable @code{imap-ssl-program} contain parameters to pass
@@ -15030,7 +15256,7 @@ external library @code{digest-md5.el}.
 @item
 @dfn{login:} Plain-text username/password via LOGIN.
 @item
-@dfn{anonymous:} Login as `anonymous', supplying your emailadress as password.
+@dfn{anonymous:} Login as `anonymous', supplying your email address as password.
 @end itemize
 
 @item nnimap-expunge-on-close
@@ -15118,8 +15344,10 @@ variable @code{nntp-authinfo-file} for exact syntax; also see
 
 @menu
 * Splitting in IMAP::           Splitting mail with nnimap.
+* Expiring in IMAP::            Expiring mail with nnimap.
 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
+* A note on namespaces::        How to (not) use IMAP namespace in Gnus.
 @end menu
 
 
@@ -15198,6 +15426,9 @@ instance:
 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
 @end lisp
 
+The first element can also be the symbol @code{junk} to indicate that
+matching messages should simply be deleted.  Use with care.
+
 The second element can also be a function.  In that case, it will be
 called with the first element of the rule as the argument, in a buffer
 containing the headers of the article.  It should return a non-nil value
@@ -15279,6 +15510,43 @@ Nnmail equivalent: @code{nnmail-split-fancy}.
 
 @end table
 
+@node Expiring in IMAP
+@subsection Expiring in IMAP
+@cindex expiring imap mail
+
+Even though @sc{nnimap} is not a proper @sc{nnmail} derived back end,
+it supports most features in regular expiring (@pxref{Expiring Mail}).
+Unlike splitting in IMAP (@pxref{Splitting in IMAP}) it do not clone
+the @sc{nnmail} variables (i.e., creating @var{nnimap-expiry-wait})
+but reuse the @sc{nnmail} variables.  What follows below are the
+variables used by the @sc{nnimap} expiry process.
+
+A note on how the expire mark is stored on the @sc{imap} server is
+appropriate here as well.  The expire mark is translated into a
+@sc{imap} client specific mark, @code{gnus-expire}, and stored on the
+message.  This means that likely only Gnus will understand and treat
+the @code{gnus-expire} mark properly, although other clients may allow
+you to view client specific flags on the message.  It also means that
+your server must support permanent storage of client specific flags on
+messages.  Most do, fortunately.
+
+@table @code
+
+@item nnmail-expiry-wait
+@item nnmail-expiry-wait-function
+
+These variables are fully supported.  The expire value can be a
+number, the symbol @var{immediate} or @var{never}.
+
+@item nnmail-expiry-target
+
+This variable is supported, and internally implemented by calling the
+@sc{nnmail} functions that handle this.  It contains an optimization
+that if the destination is a IMAP group on the same server, the
+article is copied instead of appended (that is, uploaded again).
+
+@end table
+
 @node Editing IMAP ACLs
 @subsection Editing IMAP ACLs
 @cindex editing imap acls
@@ -15326,7 +15594,46 @@ manually.  This is exactly what @kbd{G x} does.
 Currently there is no way of showing deleted articles, you can just
 delete them.
 
+@node A note on namespaces
+@subsection A note on namespaces
+@cindex IMAP namespace
+@cindex namespaces
 
+The IMAP protocol has a concept called namespaces, described by the
+following text in the RFC:
+
+@example
+5.1.2.  Mailbox Namespace Naming Convention
+
+   By convention, the first hierarchical element of any mailbox name
+   which begins with "#" identifies the "namespace" of the remainder of
+   the name.  This makes it possible to disambiguate between different
+   types of mailbox stores, each of which have their own namespaces.
+
+      For example, implementations which offer access to USENET
+      newsgroups MAY use the "#news" namespace to partition the USENET
+      newsgroup namespace from that of other mailboxes.  Thus, the
+      comp.mail.misc newsgroup would have an mailbox name of
+      "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
+      to a different object (e.g. a user's private mailbox).
+@end example
+
+While there is nothing in this text that warrants concern for the IMAP
+implementation in Gnus, some servers use namespace prefixes in a way
+that does not work with how Gnus uses mailbox names.
+
+Specifically, University of Washington's IMAP server uses mailbox
+names like @code{#driver.mbx/read-mail} which are valid only in the
+@sc{create} and @sc{append} commands.  After the mailbox is created
+(or a messages is appended to a mailbox), it must be accessed without
+the namespace prefix, i.e @code{read-mail}.  Since Gnus do not make it
+possible for the user to guarantee that user entered mailbox names
+will only be used with the CREATE and APPEND commands, you should
+simply not use the namespace prefixed mailbox names in Gnus.
+
+See the UoW @sc{imapd} documentation for the @code{#driver.*/} prefix
+for more information on how to use the prefixes.  They are a power
+tool and should be used only if you are sure what the effects are.
 
 @node Other Sources
 @section Other Sources
@@ -16299,7 +16606,7 @@ back end, it would probably be nonsensical to have it covered by the
 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
 @kbd{J a} on the server (or servers) that you wish to have covered by the
 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
-added servers you do not wish to have covered by the Agent.  By default, 
+added servers you do not wish to have covered by the Agent.  By default,
 all @code{nntp} and @code{nnimap} groups in @code{gnus-select-method} and
 @code{gnus-secondary-select-methods} are agentized.
 
@@ -16721,13 +17028,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
 
 
 
@@ -17002,6 +17302,16 @@ offline servers into online status when you re-connect.  If it has any
 other value, all offline servers will be automatically switched into
 online status.
 
+@item gnus-server-unopen-status
+@vindex gnus-server-unopen-status
+Perhaps not a Agent variable, but closely related to the Agent, this
+variable says what will happen if Gnus cannot open a server.  If the
+Agent is enabled, the default, @code{nil}, makes Gnus ask the user
+whether to deny the server or whether to unplug the agent.  If the
+Agent is disabled, Gnus always simply deny the server.  Other choices
+for this variable include @code{denied} and @code{offline} the latter
+is only valid if the Agent is used.
+
 @end table
 
 
@@ -17058,9 +17368,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
 
 
@@ -17074,7 +17387,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?
 
@@ -18042,7 +18357,7 @@ will be ignored.  If you wish to add more words to be ignored, use the
 Some may feel that short words shouldn't count when doing adaptive
 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
 an integer.  Words shorter than this number will be ignored.  This
-variable defaults til @code{nil}.
+variable defaults to @code{nil}.
 
 @vindex gnus-adaptive-word-syntax-table
 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
@@ -18954,6 +19269,8 @@ four days, Gnus will decay the scores four times, for instance.
 @include emacs-mime.texi
 @chapter Sieve
 @include sieve.texi
+@chapter PGG
+@include pgg.texi
 @end iflatex
 @end iftex
 
@@ -19303,14 +19620,16 @@ and so on.  Create as many faces as you wish.  The same goes for the
 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
 
-Text inside the @samp{%<} and @samp{%>} specifiers will get the special
-@code{balloon-help} property set to @code{gnus-balloon-face-0}.  If you
-say @samp{%1<}, you'll get @code{gnus-balloon-face-1} and so on.  The
-@code{gnus-balloon-face-*} variables should be either strings or symbols
-naming functions that return a string.  Under @code{balloon-help-mode},
-when the mouse passes over text with this property set, a balloon window
-will appear and display the string.  Please refer to the doc string of
-@code{balloon-help-mode} for more information on this.
+Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
+special @code{balloon-help} property set to @code{gnus-balloon-face-0}.
+If you say @samp{%1<<}, you'll get @code{gnus-balloon-face-1} and so on.
+The @code{gnus-balloon-face-*} variables should be either strings or
+symbols naming functions that return a string.  When the mouse passes
+over text with this property set, a balloon window will appear and
+display the string.  Please refer to @ref{(emacs)Help Echo} (in GNU
+Emacs) or the doc string of @code{balloon-help-mode} (in XEmacs) for
+more information on this.  (For technical reasons, the guillemets have
+been approximated as @samp{<<} and @samp{>>} in this paragraph.)
 
 Here's an alternative recipe for the group buffer:
 
@@ -19352,8 +19671,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.
 
 
@@ -19386,13 +19705,13 @@ characters---most notable East Asian countries.
 
 The problem is that when formatting, Gnus assumes that if a string is 10
 characters wide, it'll be 10 Latin characters wide on the screen.  In
-these coutries, that's not true.
+these countries, that's not true.
 
 @vindex gnus-use-correct-string-widths
 To help fix this, you can set @code{gnus-use-correct-string-widths} to
 @code{t}.  This makes buffer generation slower, but the results will be
-prettieer.  The default value is @code{t}.
-
+prettier.  The default value under XEmacs is @code{t} but @code{nil}
+for Emacs.
 
 
 @node Window Layout
@@ -19964,7 +20283,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
@@ -19981,7 +20300,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
@@ -20650,12 +20969,12 @@ 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.
 
-@code{gnus-x-face-from-file} takes a file as the parameter, and then
+@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
-like the folllowing in your @file{.gnus.el} file:
+like the following in your @file{.gnus.el} file:
 
 @lisp
 (setq message-required-news-headers
@@ -20786,14 +21105,85 @@ mail group, only to find two pyramid schemes, seven advertisements
 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
 and one mail asking me to repent and find some god.
 
-This is annoying.
+This is annoying.  Here's what you can do about it.
 
 @menu
+* The problem of spam::         Some background, and some solutions
 * 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)::  
 @end menu
 
+@node The problem of spam
+@subsection The problem of spam
+@cindex email spam
+@cindex spam filtering approaches
+@cindex filtering approaches, spam
+@cindex UCE
+@cindex unsolicited commercial email
+
+First, some background on spam.
+
+If you have access to e-mail, you are familiar with spam (technically
+termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
+because e-mail delivery is very cheap compared to paper mail, so only
+a very small percentage of people need to respond to an UCE to make it
+worthwhile to the advertiser.  Ironically, one of the most common
+spams is the one offering a database of e-mail addresses for further
+spamming.  Senders of spam are usually called @emph{spammers}, but terms like
+@emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
+
+Spam comes from a wide variety of sources.  It is simply impossible to
+dispose of all spam without discarding useful messages.  A good
+example is the TMDA system, which requires senders
+unknown to you to confirm themselves as legitimate senders before
+their e-mail can reach you.  Without getting into the technical side
+of TMDA, a downside is clearly that e-mail from legitimate sources may
+be discarded if those sources can't or won't confirm themselves
+through the TMDA system.  Another problem with TMDA is that it
+requires its users to have a basic understanding of e-mail delivery
+and processing.
+
+The simplest approach to filtering spam is filtering.  If you get 200
+spam messages per day from @email{random-address@@vmadmin.com}, you
+block @samp{vmadmin.com}.  If you get 200 messages about
+@samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
+message.  This, unfortunately, is a great way to discard legitimate
+e-mail.  For instance, the very informative and useful RISKS digest
+has been blocked by overzealous mail filters because it
+@strong{contained} words that were common in spam messages.
+Nevertheless, in isolated cases, with great care, direct filtering of
+mail can be useful.
+
+Another approach to filtering e-mail is the distributed spam
+processing, for instance DCC implements such a system.  In essence,
+@code{N} systems around the world agree that a machine @samp{X} in
+China, Ghana, or California is sending out spam e-mail, and these
+@code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
+a database.  The criteria for spam detection vary - it may be the
+number of messages sent, the content of the messages, and so on.  When
+a user of the distributed processing system wants to find out if a
+message is spam, he consults one of those @code{N} systems.
+
+Distributed spam processing works very well against spammers that send
+a large number of messages at once, but it requires the user to set up
+fairly complicated checks.  There are commercial and free distributed
+spam processing systems.  Distributed spam processing has its risks as
+well.  For instance legitimate e-mail senders have been accused of
+sending spam, and their web sites have been shut down for some time
+because of the incident.
+
+The statistical approach to spam filtering is also popular.  It is
+based on a statistical analysis of previous spam messages.  Usually
+the analysis is a simple word frequency count, with perhaps pairs of
+words or 3-word combinations thrown into the mix.  Statistical
+analysis of spam works very well in most of the cases, but it can
+classify legitimate e-mail as spam in some cases.  It takes time to
+run the analysis, the full message must be analyzed, and the user has
+to store the database of spam analyses.
+
 @node Anti-Spam Basics
 @subsection Anti-Spam Basics
 @cindex email spam
@@ -20952,7 +21342,7 @@ spam.  And here is the nifty function:
 A novel technique to fight spam is to require senders to do something
 costly for each message they send.  This has the obvious drawback that
 you cannot rely on that everyone in the world uses this technique,
-since it is not part of the internet standards, but it may be useful
+since it is not part of the Internet standards, but it may be useful
 in smaller communities.
 
 While the tools in the previous section work well in practice, they
@@ -21017,6 +21407,783 @@ 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
+@cindex spam filtering
+@cindex spam.el
+
+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 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:
+
+@table @kbd
+
+@item M-d
+@itemx M s x
+@itemx S x
+@kindex M-d
+@kindex S x
+@kindex M s x
+@findex gnus-summary-mark-as-spam
+@code{gnus-summary-mark-as-spam}.
+
+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.  This is done automatically
+for unread articles in @emph{spam} groups.
+
+@item M s t
+@itemx S t
+@kindex M s t
+@kindex S t
+@findex spam-bogofilter-score
+@code{spam-bogofilter-score}.
+
+You must have bogofilter processing enabled for that command to work
+properly.
+
+@xref{Bogofilter}.
+
+@end table
+
+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} 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 the @code{gnus-ham-process-destinations} variable.  The
+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 the
+@code{gnus-spam-process-destinations} variable.  The 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
+@code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
+
+@example
+(: spam-split)
+@end example
+
+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}.  By default that group name is @samp{spam},
+but you can customize it.
+
+@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} and their corresponding spam and ham processors:
+
+@menu
+* Blacklists and Whitelists::   
+* BBDB Whitelists::             
+* Blackholes::                  
+* Bogofilter::                  
+* ifile spam filtering::        
+* spam-stat spam filtering::    
+* Extending spam.el::           
+@end menu
+
+@node Blacklists and Whitelists
+@subsubsection Blacklists and Whitelists
+@cindex spam filtering
+@cindex whitelists, spam filtering
+@cindex blacklists, spam filtering
+@cindex spam.el
+
+@defvar spam-use-blacklist
+Set this variable to 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 variable to 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.  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 or permissive.  Also see @ref{BBDB
+Whitelists}.  Whitelist entries use the Emacs regular expression
+syntax.
+
+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
+@subsubsection BBDB Whitelists
+@cindex spam filtering
+@cindex BBDB whitelists, spam filtering
+@cindex BBDB, spam filtering
+@cindex spam.el
+
+@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
+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
+
+@defvar spam-use-blackholes
+
+This option is disabled by default.  You can let Gnus consult the
+blackhole-type distributed spam processing systems (DCC, for instance)
+when you set this option.  The variable @code{spam-blackhole-servers}
+holds the list of blackhole servers Gnus will consult.  The current
+list is fairly comprehensive, but make sure to let us know if it
+contains outdated servers.
+
+The blackhole check uses the @code{dig.el} package, but you can tell
+@code{spam.el} to use @code{dns.el} instead for better performance if
+you set @code{spam-use-dig} to nil.  It is not recommended at this
+time to set @code{spam-use-dig} to nil despite the possible
+performance improvements, because some users may be unable to use it,
+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 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
+
+@defvar spam-use-bogofilter
+
+Set this variable if you want @code{spam-split} 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}.
+
+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.
+
+If the @code{bogofilter} executable is not in your path, Bogofilter
+processing will be turned off.
+
+@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, and ham-marked articles
+will be added to the bogofilter ham database.  @strong{Note that the
+Bogofilter spam processor is the only spam processor to also do ham
+processing.}
+@end defvar
+
+@node ifile spam filtering
+@subsubsection ifile spam filtering
+@cindex spam filtering
+@cindex ifile, spam filtering
+@cindex spam.el
+
+@defvar spam-use-ifile
+
+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
+
+@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.el
+@cindex spam.el
+
+@xref{Filtering Spam Using Statistics (spam-stat.el)}.
+
+@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 spam.el
+@subsubsection Extending spam.el
+@cindex spam filtering
+@cindex spam.el, extending
+@cindex extending spam.el
+
+Say you want to add a new back end called blackbox.  For filtering
+incoming mail, provide the following:
+
+@enumerate
+
+@item
+code
+
+@example
+(defvar spam-use-blackbox nil
+  "True if blackbox should be used.")
+@end example
+
+Add
+@example
+    (spam-use-blackbox  . spam-check-blackbox)
+@end example
+to @code{spam-list-of-checks}.
+
+@item
+functionality
+
+Write the @code{spam-check-blackbox} function.  It should return
+@samp{nil} or @code{spam-split-group}.  See the existing
+@code{spam-check-*} functions for examples of what you can do.
+@end enumerate
+
+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 (spam-stat.el)
+@subsection Filtering Spam Using Statistics (spam-stat.el)
+@cindex Paul Graham
+@cindex Graham, Paul
+@cindex naive Bayesian spam filtering
+@cindex Bayesian spam filtering, naive
+@cindex spam filtering, naive Bayesian
+
+Paul Graham has written an excellent essay about spam filtering using
+statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
+Spam}.  In it he describes the inherent deficiency of rule-based
+filtering as used by SpamAssassin, for example: Somebody has to write
+the rules, and everybody else has to install these rules.  You are
+always late.  It would be much better, he argues, to filter mail based
+on whether it somehow resembles spam or non-spam.  One way to measure
+this is word distribution.  He then goes on to describe a solution
+that checks whether a new mail resembles any of your other spam mails
+or not.
+
+The basic idea is this:  Create a two collections of your mail, one
+with spam, one with non-spam.  Count how often each word appears in
+either collection, weight this by the total number of mails in the
+collections, and store this information in a dictionary.  For every
+word in a new mail, determine its probability to belong to a spam or a
+non-spam mail.  Use the 15 most conspicuous words, compute the total
+probability of the mail being spam.  If this probability is higher
+than a certain threshold, the mail is considered to be spam.
+
+Gnus supports this kind of filtering.  But it needs some setting up.
+First, you need two collections of your mail, one with spam, one with
+non-spam.  Then you need to create a dictionary using these two
+collections, and save it.  And last but not least, you need to use
+this dictionary in your fancy mail splitting rules.
+
+@menu
+* Creating a spam-stat dictionary::  
+* Splitting mail using spam-stat::  
+* Low-level interface to the spam-stat dictionary::  
+@end menu
+
+@node Creating a spam-stat dictionary
+@subsubsection Creating a spam-stat dictionary
+
+Before you can begin to filter spam based on statistics, you must
+create these statistics based on two mail collections, one with spam,
+one with non-spam.  These statistics are then stored in a dictionary
+for later use.  In order for these statistics to be meaningful, you
+need several hundred emails in both collections.
+
+Gnus currently supports only the nnml back end for automated dictionary
+creation.  The nnml back end stores all mails in a directory, one file
+per mail.  Use the following:
+
+@defun spam-stat-process-spam-directory
+Create spam statistics for every file in this directory.  Every file
+is treated as one spam mail.
+@end defun
+
+@defun spam-stat-process-non-spam-directory
+Create non-spam statistics for every file in this directory.  Every
+file is treated as one non-spam mail.
+@end defun
+
+Usually you would call @code{spam-stat-process-spam-directory} on a
+directory such as @file{~/Mail/mail/spam} (this usually corresponds
+the the group @samp{nnml:mail.spam}), and you would call
+@code{spam-stat-process-non-spam-directory} on a directory such as
+@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.
+
+@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
+(instead, you will recreate it once a month, for example), then you
+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.
+
+@defun spam-stat-reduce-size
+Reduce the size of the dictionary.  Use this only if you do not want
+to update the dictionary incrementally.
+@end defun
+
+@defun spam-stat-save
+Save the dictionary.
+@end defun
+
+@defvar spam-stat-file
+The filename used to store the dictionary.  This defaults to
+@file{~/.spam-stat.el}.
+@end defvar
+
+@node Splitting mail using spam-stat
+@subsubsection Splitting mail using spam-stat
+
+In order to use @code{spam-stat} to split your mail, you need to add the
+following to your @file{~/.gnus} file:
+
+@example
+(require 'spam-stat)
+(spam-stat-load)
+@end example
+
+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}.  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
+      `(| (: spam-stat-split-fancy)
+         "mail.misc"))
+@end example
+
+@defvar spam-stat-split-fancy-spam-group
+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.  Only mails not matching the regular
+expression are considered potential spam.
+
+@example
+(setq nnmail-split-fancy
+      `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
+         (: spam-stat-split-fancy)
+         "mail.misc"))
+@end example
+
+If you want to filter for spam first, then you must be careful when
+creating the dictionary.  Note that @code{spam-stat-split-fancy} must
+consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
+non-spam, therefore both should be in your collection of non-spam
+mails, when creating the dictionary!
+
+@example
+(setq nnmail-split-fancy
+      `(| (: spam-stat-split-fancy)
+          ("Subject" "\\bspam-stat\\b" "mail.emacs")
+         "mail.misc"))
+@end example
+
+You can combine this with traditional filtering.  Here, we move all
+HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
+@code{spam-stat-split-fancy} will never see them, the mails in
+@samp{mail.spam.filtered} should be neither in your collection of spam mails,
+nor in your collection of non-spam mails, when creating the
+dictionary!
+
+@example
+(setq nnmail-split-fancy
+      `(| ("Content-Type" "text/html" "mail.spam.filtered")
+         (: spam-stat-split-fancy)
+          ("Subject" "\\bspam-stat\\b" "mail.emacs")
+         "mail.misc"))
+@end example
+
+
+@node Low-level interface to the spam-stat dictionary
+@subsubsection Low-level interface to the spam-stat 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.
+@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.
+@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.
+@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.
+@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}.
+@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}.
+@end defun
+
+@defun spam-stat-score-word
+Return the spam score for a word.
+@end defun
+
+@defun spam-stat-score-buffer
+Return the spam score for a buffer.
+@end defun
+
+@defun spam-stat-split-fancy
+Use this function for fancy mail splitting.  Add the rule @samp{(:
+spam-stat-split-fancy)} to @code{nnmail-split-fancy}
+@end defun
+
+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
+
+Typical test will involve calls to the following functions:
+
+@example
+Reset: (setq spam-stat (make-hash-table :test 'equal))
+Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
+Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
+Save table: (spam-stat-save)
+File size: (nth 7 (file-attributes spam-stat-file))
+Number of words: (hash-table-count spam-stat)
+Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
+Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
+Reduce table size: (spam-stat-reduce-size)
+Save table: (spam-stat-save)
+File size: (nth 7 (file-attributes spam-stat-file))
+Number of words: (hash-table-count spam-stat)
+Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
+Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
+@end example
+
+Here is how you would create your dictionary:
+
+@example
+Reset: (setq spam-stat (make-hash-table :test 'equal))
+Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
+Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
+Repeat for any other non-spam group you need...
+Reduce table size: (spam-stat-reduce-size)
+Save table: (spam-stat-save)
+@end example
+
 @node Various Various
 @section Various Various
 @cindex mode lines
@@ -21179,7 +22346,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}.
+@samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
+@samp{misc-games} package is required for Morse decoding.
 
 
 @node History
@@ -21430,7 +22598,7 @@ format.  Gnus supports both encoding (signing and encryption) and
 decoding (verification and decryption).
 
 @item PGP/MIME - RFC 2015/3156
-RFC 2015 (superceded by 3156 which references RFC 2440 instead of RFC
+RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
 1991) describes the @sc{mime}-wrapping around the RF 1991/2440 format.
 Gnus supports both encoding and decoding.
 
@@ -21913,7 +23081,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
@@ -22681,9 +23849,31 @@ are reading.
 
 @item back end
 @cindex back end
-Gnus gets fed articles from a number of back ends, both news and mail
-back ends.  Gnus does not handle the underlying media, so to speak---this
-is all done by the back ends.
+Gnus considers mail and news to be mostly the same, really.  The only
+difference is how to access the actual articles.  News articles are
+commonly fetched via the protocol NNTP, whereas mail messages could be
+read from a file on the local disk.  The internal architecture of Gnus
+thus comprises a `front end' and a number of `back ends'.  Internally,
+when you enter a group (by hitting @key{RET}, say), you thereby invoke
+a function in the front end in Gnus.  The front end then `talks' to a
+back end and says things like ``Give me the list of articles in the foo
+group'' or ``Show me article number 4711''.
+
+So a back end mainly defines either a protocol (the @code{nntp} back end
+accesses news via NNTP, the @code{nnimap} back end accesses mail via
+IMAP) or a file format and directory layout (the @code{nnspool} back end
+accesses news via the common `spool directory' format, the @code{nnml}
+back end access mail via a file format and directory layout that's
+quite similar).
+
+Gnus does not handle the underlying media, so to speak---this is all
+done by the back ends.  A back end is a collection of functions to
+access the articles.
+
+However, sometimes the term `back end' is also used where `server'
+would have been more appropriate.  And then there is the term `select
+method' which can mean either.  The Gnus terminology can be quite
+confusing.
 
 @item native
 @cindex native
@@ -23041,6 +24231,44 @@ the bug report.
 If you would like to contribute a patch to fix bugs or make
 improvements, please produce the patch using @samp{diff -u}.
 
+@cindex edebug
+If you want to debug your problem further before reporting, possibly
+in order to solve the problem yourself and send a patch, you can use
+edebug.  Debugging lisp code is documented in the Elisp manual
+(@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
+Lisp Reference Manual}).  To get you started with edebug, consider if
+you discover some weird behaviour when pressing @kbd{c}, the first
+step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
+the documentation buffer that leads you to the function definition,
+then press @kbd{M-x edebug-defun RET} with point inside that function,
+return to Gnus and press @kbd{c} to invoke the code.  You will be
+placed in the lisp buffer and can single step using @kbd{SPC} and
+evaluate expressions using @kbd{M-:} or inspect variables using
+@kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
+@kbd{c} or @kbd{g}.
+
+@cindex elp
+@cindex profile
+@cindex slow
+Sometimes, a problem do not directly generate a elisp error but
+manifests itself by causing Gnus to be very slow.  In these cases, you
+can use @kbd{M-x toggle-debug-on-quit} and press C-j when things are
+slow, and then try to analyze the backtrace (repeating the procedure
+helps isolating the real problem areas).  A fancier approach is to use
+the elisp profiler, ELP.  The profiler is (or should be) fully
+documented elsewhere, but to get you started there are a few steps
+that need to be followed.  First, instrument the part of Gnus you are
+interested in for profiling, e.g. @kbd{M-x elp-instrument-package RET
+gnus} or @kbd{M-x elp-instrument-packagre RET message}.  Then perform
+the operation that is slow and press @kbd{M-x elp-results}.  You will
+then see which operations that takes time, and can debug them further.
+If the entire operation takes much longer than the time spent in the
+slowest function in the profiler output, you probably profiled the
+wrong part of Gnus.  To reset profiling statistics, use @kbd{M-x
+elp-reset-all}.  @kbd{M-x elp-restore-all} is supposed to remove
+profiling, but given the complexities and dynamic code generation in
+Gnus, it might not always work perfectly.
+
 If you just need help, you are better off asking on
 @samp{gnu.emacs.gnus}.  I'm not very helpful.
 
@@ -23270,6 +24498,10 @@ the `no-reuse' restriction, holes cannot be avoided altogether.  It's
 also useful for the article numbers to start at 1 to avoid running out
 of numbers as long as possible.
 
+Note that by convention, backends are named @code{nnsomething}, but
+Gnus also comes with some @code{nnnotbackends}, such as
+@file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
+
 In the examples and definitions I will refer to the imaginary back end
 @code{nnchoke}.
 
@@ -23536,7 +24768,7 @@ A Gnus group info (@pxref{Group Info}) is handed to the back end for
 alterations.  This comes in handy if the back end really carries all the
 information (as is the case with virtual and imap groups).  This
 function should destructively alter the info to suit its needs, and
-should return the (altered) group info.
+should return a non-nil value.
 
 There should be no result data from this function.
 
@@ -23717,6 +24949,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.