\input texinfo                  @c -*-texinfo-*-
@comment %**start of header (This is for running Texinfo on a region.)
@setfilename ../info/gnus
@settitle GNUS 3.14 Manual
@iftex
@finalout
@end iftex
@setchapternewpage odd
@c      @smallbook
@comment %**end of header (This is for running Texinfo on a region.)

@tex
\overfullrule=0pt
%\global\baselineskip 30pt      % For printing in double spaces
@end tex

@ifinfo
This file documents GNUS, the GNU Emacs newsreader.

Copyright (C) 1989 Fujitsu Laboratories LTD.
Copyright (C) 1990 Masanobu UMEDA.

Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries copying permission notice
identical to this one except for the removal of this paragraph (this
paragraph not being relevant to the printed manual).

@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
sections entitled ``Distribution'' and ``GNUS General Public License''
are included exactly as in the original, and provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that the sections entitled ``Distribution'' and ``GNUS General
Public License'' may be included in a translation approved by the author
instead of in the original English.
@end ifinfo

@titlepage
@sp 6
@center @titlefont{GNUS Manual}
@sp 4
@center Fourth Edition, GNUS Version 3.14
@sp 1
@center March 1990
@sp 5
@center Masanobu UMEDA
@page

@vskip 0pt plus 1filll
Copyright @copyright{} 1989 Fujitsu Laboratories LTD.@*
Copyright @copyright{} 1990 Masanobu UMEDA.

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
sections entitled ``Distribution'' and ``GNUS General Public License''
are included exactly as in the original, and provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that the sections entitled ``Distribution'' and ``GNUS General
Public License'' may be included in a translation approved by the author
instead of in the original English.
@end titlepage
@page

@ifinfo
@node Top, Introduction,, (DIR)

The GNUS Newsreader
*******************

  GNUS is a network newsreader for GNU Emacs.  This Info file describes
how to read and write USENET articles using GNUS and how to customize GNUS.

@end ifinfo
@menu
* Distribution::        How to get the latest GNUS distribution.
* License::             Permission to redistribute GNUS on certain terms.
* Acknowledgments::     I would like to thank many people who have helped me.

* Introduction::        An introduction to GNUS.
* Installation::        How to install GNUS.
* Starting up::         How to get started with GNUS.
* Buffers of GNUS::     Buffers used by GNUS.
* Newsgroup Commands::  Browsing through newsgroups.
* Subject Commands::    Browsing through headers and messages.
* Article Commands::    Commands for an article.
* KILL File::           How to use KILL files.

* Customization::       How to customize GNUS.
* Problems::            How to solve problems with GNUS.
* Reporting Bugs::      Mailing lists and USENET newsgroups for GNUS lovers.
                        How to report bugs.

* Key Index::           An item for each standard GNUS key sequence.
* Command Index::       An item for each command name.
* Variable Index::      An item for each documented variable.
* Program Index::       An item for each program.
* Concept Index::       An item for each concept.
@end menu

@node Distribution, License, Top, Top
@unnumbered Distribution

GNUS is @dfn{free}; this means that everyone is free to use it and free
to redistribute it on a free basis.  GNUS is not in the public domain;
it is copyrighted and there are restrictions on its distribution, but
these restrictions are designed to permit everything that a good
cooperating citizen would want to do.  What is not allowed is to try to
prevent others from further sharing any version of GNUS that they might
get from you.  The precise conditions appears following this section.

The easiest way to get a copy of GNUS is from someone else who has it.
You need not ask for permission to do so, or tell any one else; just
copy it.

If you have access to the Internet, you can get the latest version of
GNUS from tut.cis.ohio-state.edu [128.146.8.60] using anonymous ftp.
You can also get it from osu-cis using anonymous uucp.

You may also receive GNUS when you buy a computer.  Computer
manufacturers are free to distribute copies on the same terms that apply
to everyone else.  These terms require them to give you the full
sources, including whatever changes they may have made, and to permit
you to redistribute the GNUS received from them under the usual terms of
the General Public License.  In other words, the program must be free
for you when you get it, not just free for the manufacturer.

If you cannot get a copy in any of those ways, you can order one from
the author using electronic mail.  For further information, write to:

@display
umerin@@mse.kyutech.ac.jp
@end display

If you cannot reach the author using these addresses, try the following
mailing list:

@cindex info-gnus-english
@display
info-gnus-english@@tut.cis.ohio-state.edu
@end display

@noindent
The list is intended to exchange useful information about GNUS, such as
bug reports, useful hooks, and extensions.  Feel free to ask about the
nearest machine that has GNUS installed.  Subscription requests for this
list should be sent to:

@display
info-gnus-english-request@@tut.cis.ohio-state.edu
@end display

@noindent
@xref{Reporting Bugs}, for more information on the mailing list.@refill

@node License, Acknowledgments, Distribution, Top
@unnumbered GNUS General Public License
@center (Clarified 13 Jan 1989)

  The license agreements of most software companies keep you at the
mercy of those companies.  By contrast, our general public license is
intended to give everyone the right to share GNUS.  To make sure that
you get the rights we want you to have, we need to make restrictions
that forbid anyone to deny you these rights or to ask you to surrender
the rights.  Hence this license agreement.

  Specifically, we want to make sure that you have the right to give
away copies of GNUS, that you receive source code or else can get it if
you want it, that you can change GNUS or use pieces of it in new free
programs, and that you know you can do these things.

  To make sure that everyone has such rights, we have to forbid you to
deprive anyone else of these rights.  For example, if you distribute
copies of GNUS, you must give the recipients all the rights that you
have.  You must make sure that they, too, receive or can get the source
code.  And you must tell them their rights.

  Also, for our own protection, we must make certain that everyone finds
out that there is no warranty for GNUS.  If GNUS is modified by someone
else and passed on, we want its recipients to know that what they have
is not what we distributed, so that any problems introduced by others
will not reflect on our reputation.

  Therefore I (Masanobu Umeda)@: use the following terms, which are
written for GNU Emacs by Richard Stallman and the Free Software
Foundation, Inc.  They say what you must do to be allowed to distribute
or change GNU Emacs.  You can know your right to distribute or change
GNUS by replacing any occurrences of GNU Emacs with GNUS.  Please apply
the same policies to GNUS as GNU Emacs.@refill

@unnumberedsec Copying Policies

@enumerate
@item
You may copy and distribute verbatim copies of GNU Emacs source code as
you receive it, in any medium, provided that you conspicuously and
appropriately publish on each file a valid copyright notice ``Copyright
@copyright{} 1988 Free Software Foundation, Inc.'' (or with whatever
year is appropriate); keep intact the notices on all files that refer to
this License Agreement and to the absence of any warranty; and give any
other recipients of the GNU Emacs program a copy of this License
Agreement along with the program.  You may charge a distribution fee for
the physical act of transferring a copy.

@item
You may modify your copy or copies of GNU Emacs source code or
any portion of it, and copy and distribute such modifications under
the terms of Paragraph 1 above, provided that you also do the following:

@itemize @bullet
@item
cause the modified files to carry prominent notices stating
who last changed such files and the date of any change; and

@item
cause the whole of any work that you distribute or publish, that
in whole or in part contains or is a derivative of GNU Emacs or any
part thereof, to be licensed at no charge to all third parties on
terms identical to those contained in this License Agreement
(except that you may choose to grant more extensive warranty
protection to some or all third parties, at your option).

@item
if the modified program serves as a text editor, cause it, when
started running in the simplest and usual way, to print an
announcement including a valid copyright notice ``Copyright
@copyright{} 1988 Free Software Foundation, Inc.'' (or with the
year that is appropriate), saying that there is no warranty (or
else, saying that you provide a warranty) and that users may
redistribute the program under these conditions, and telling the
user how to view a copy of this License Agreement.

@item
You may charge a distribution fee for the physical act of
transferring a copy, and you may at your option offer warranty
protection in exchange for a fee.
@end itemize

Mere aggregation of another unrelated program with this program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other program under the scope of these terms.

@item
You may copy and distribute GNU Emacs (or a portion or derivative of it,
under Paragraph 2) in object code or executable form under the terms
of Paragraphs 1 and 2 above provided that you also do one of the
following:

@itemize @bullet
@item
accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,

@item
accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal
shipping charge) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,

@item
accompany it with the information you received as to where the
corresponding source code may be obtained.  (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
@end itemize

For an executable file, complete source code means all the source code
for all modules it contains; but, as a special exception, it need not
include source code for modules which are standard libraries that
accompany the operating system on which the executable file runs.

@item
You may not copy, sublicense, distribute or transfer GNU Emacs except
as expressly provided under this License Agreement.  Any attempt
otherwise to copy, sublicense, distribute or transfer GNU Emacs is
void and your rights to use GNU Emacs under this License agreement
shall be automatically terminated.  However, parties who have received
computer software programs from you with this License Agreement will
not have their licenses terminated so long as such parties remain in
full compliance.

@item
If you wish to incorporate parts of GNU Emacs into other free programs
whose distribution conditions are different, write to the Free Software
Foundation.  We have not yet worked out a simple rule that can be stated
here, but we will often permit this.  We will be guided by the two goals of
preserving the free status of all derivatives of our free software and of
promoting the sharing and reuse of software.
@end enumerate

Your comments and suggestions about our licensing policies and our
software are welcome!  Please contact the Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139.

@iftex
@vfil
@eject
@end iftex
@unnumberedsec NO WARRANTY

  BECAUSE GNUS IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY NO
WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING, FUJITSU LABORATORIES LTD., MASANOBU UMEDA
AND/OR OTHER PARTIES PROVIDE GNUS ``AS IS'' WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU.  SHOULD THE GNUS PROGRAM PROVE DEFECTIVE, YOU
ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL FUJITSU LABORATORIES
LTD., MASANOBU UMEDA, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND
REDISTRIBUTE GNUS AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE
PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY MASANOBU UMEDA) THE
PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.

@node Acknowledgments, Introduction, License, Top
@unnumbered Acknowledgments

  The author would like to thank all those who have helped design and
develop GNUS, and who tested non stable code at their own risk.

  Haruo Yokota, Hiroyuki Yoshida, and Kohji Akiyama contributed many
valuable suggestions in the early stages of the development of GNUS.
Nobuyuki Hiraoka, Tsuneo Nakata, and Mark Feldman patiently tested non
stable code and contributed valuable comments.  Mark Feldman also helped
with proofreading.  Mike Khaw, Kouich Kumon, and Mitsuhiro Kishimoto
helped contribute the name GNUS.  Itaru Ichikawa helped implement the
caesar rotations for Japanese characters.  Yasunari Itoh, Akio Shibata,
and Ken-ichi Sakaeda made this software available on SX/A Emacs and some
old versions of GNU Emacs.  Leonard H.  Tower Jr., Bob Sutterfield, and
Karl Kleinpaste helped create mailing lists for GNUS users.  Bob
Sutterfield has also been managing the info-gnus-english mailing list.
Jordan K.  Hubbard helped with proofreading of this Texinfo manual.

  The author would also like to thank many other GNUS users who have
sent comments, suggestions, and bug fixes.  Thanks also go to Richard
Stallman and the Free Software Foundation for their good work.

@node Introduction, Installation, Top, Top
@unnumbered Introduction

  GNUS is a program for reading and writing USENET news using GNU Emacs.
This manual documents the use and simple customization of GNUS.

@pindex rn
  Unlike other conventional newsreaders such as rn which was (:-) the
most popular newsreader in the world, GNUS runs inside the GNU Emacs
editor as a subsystem.  This means that there is no need to invoke an
editor when composing articles or mail.  The reading and writing of
articles can be done in the same Emacs environment you usually work in.

@pindex rrn
@cindex NNTP
@cindex RFC977
  Like rrn, a remote version of rn, GNUS can use computer networks for
retrieving articles.  This means that there is no need to have a local
copy of the news spool, to mount a remote file system over the network,
or to run Emacs on a remote machine.  Its great advantage is to balance
loads and exploit resources of the entire computer system in a
distributed environment.  The protocol used by GNUS is @dfn{NNTP}, the
Network News Transfer Protocol, defined by RFC977.@refill

  Unlike rrn, GNUS can talk to many NNTP servers easily.  The only thing
you have to do is to create startup files for each NNTP server.

  Like other libraries of GNU Emacs, GNUS is completely written in Emacs
lisp.  This means that GNUS is highly extensible and customizable just
like GNU Emacs.  It is possible to change the behavior of GNUS and
extend its functions by using variables and hooks.

  GNUS is pronounced @strong{``NUZ''}.  Never call it
@strong{``ghu-NUZ''} nor @strong{``ghu-NAS''}.@refill

  This manual is currently in progress and thus is incomplete.  Your
suggestions, bug fixes, and contributions are welcome.

@node Installation, Starting up, Introduction, Top
@chapter Installing GNUS
@cindex install GNUS
@cindex how to install GNUS

  Installation of GNUS and some initialization of your computing
environment are described in this chapter.  Please read the following
sections carefully before getting started with GNUS.

@menu
* Files of GNUS::       How many files of GNUS are there?
* Compilation::         How to byte-compile lisp sources.
* Autoloading::         How to define autoload entries.
* Environment::         How to define your environment.
* Texinfo Manual::      How to install an Info file and print the manual.
@end menu

@node Files of GNUS, Compilation, Installation, Installation
@section Files of GNUS
@cindex GNUS files
@cindex files of GNUS

  Unpacking the shar files will produce the following files.  They are
the Emacs lisp sources, a C source, a Texinfo manual of GNUS, and a
Makefile.

@table @file
@pindex gnus.el
@item gnus.el
Main part of GNUS newsreader.

@pindex gnuspost.el
@item gnuspost.el
Post news commands.

@pindex gnusmail.el
@item gnusmail.el
Mail reply commands.

@pindex gnusmisc.el
@item gnusmisc.el
Miscellaneous commands.

@pindex nntp.el
@item nntp.el
NNTP package.

@pindex nnspool.el
@item nnspool.el
A package accessing local news spool like NNTP.

@pindex mhspool.el
@item mhspool.el
A package accessing private directory like NNTP.

@pindex timezone.el
@cindex time zone
@item timezone.el
A general time zone handling package useful not only for GNUS.

@pindex tcp.el
@findex open-network-stream
@item tcp.el
Patches to some versions of GNU Emacs which do not have the function
@code{open-network-stream}.@refill

@pindex tcp.c
@item tcp.c
C program for external TCP/IP implementation.  This is used with
@file{tcp.el}.@refill

@pindex gnus.texinfo
@item gnus.texinfo
Texinfo manual of GNUS.

@pindex Makefile
@pindex make
@item Makefile
Makefile to byte-compile the lisp files using the @file{make} command.
@end table

@node Compilation, Autoloading, Files of GNUS, Installation
@section Byte-Compilation
@cindex byte-compilation
@cindex compilation of lisp files

@pindex make
@vindex load-path
  Move the lisp files, the C file, and @file{Makefile} to the
appropriate directory in the search path defined by the variable
@code{load-path}.  Before actually byte-compiling the lisp files, make
sure there are no byte-compiled files of older versions of GNUS in that
directory.  Remove or rename such files as the byte-compiler may be
confused by old macro definitions.  If you can use the @file{make}
command, you don't have to take care of the dependencies.@refill

@vindex exec-path
@pindex tcp.c
  The C file @file{tcp.c} should be compiled with a C compiler and
installed in a directory in the search path defined by the variable
@code{exec-path}, if this is required.@refill

  If you can use the @file{make} command, just type @code{make} in a
Unix shell.  All the lisp files will be byte-compiled.  Otherwise,
byte-compile lisp files in the following order according to your
computing environment by yourself:@refill

@enumerate
@item
@pindex nntp.el
@pindex gnus.el
@pindex gnuspost.el
@pindex gnusmail.el
@pindex gnusmisc.el
Byte-compile @file{nntp.el}, @file{gnus.el}, @file{gnuspost.el},
@file{gnusmail.el}, and @file{gnusmisc.el} in this order.@refill

@item
@pindex timezone.el
Byte-compile @file{timezone.el} if you didn't have it.@refill

@item
@pindex nnspool.el
Byte-compile @file{nnspool.el} if you want to use the local news spool
of your machine instead of NNTP (@pxref{Local News Spool}).@refill

@item
@pindex mhspool.el
Byte-compile @file{mhspool.el} if you want to read articles or mail in
your private directory using GNUS (@pxref{Private Directory}).@refill

@item
@cindex TCP/IP
@pindex tcp.el
@pindex tcp.c
Compile and install @file{tcp.el} and @file{tcp.c} if TCP/IP is not
supported by Emacs but is supported by your operating system.@refill
@end enumerate

@findex open-network-stream
  @file{tcp.el} defines the function @code{open-network-stream}, and
@file{tcp.c} is an emulation program for the stream used by the
function.  If you modified @file{tcp.c} for your system, please send the
author the diffs.  Some of them will be included in the future releases
of GNUS.@refill

@node Autoloading, Environment, Compilation, Installation
@section Autoloading
@cindex autoload

  It is useful to define autoload entries in @file{.emacs},
@file{site-init.el} or @file{default.el} as follows:@refill

@example
(autoload 'gnus "gnus" "Read network news." t)
(autoload 'gnus-post-news "gnuspost" "Post a new news." t)
@end example

@node Environment, Texinfo Manual, Autoloading, Installation
@section Environment

  The NNTP server and its service name, your domain and organization,
and other important definitions of your computing environment are
described in this section.  Since these definitions depend heavily on
your environment, you'd better be familiar with the operating system you
are using. Knowledge of the USENET software is also important.

@menu
* Server:  NNTP Server.         How to define NNTP server.
* Service: NNTP Service.        How to define NNTP service.
* Domain::                      How to define your domain and organization.
* GENERICFROM::                 How to use GENERICFROM feature.
* GENERICPATH::                 How to use GENERICPATH feature.
* Startup File::                About the startup files of GNUS.
@end menu

@node NNTP Server, NNTP Service, Environment, Environment
@subsection NNTP Server
@cindex NNTP server

@vindex gnus-nntp-server
  The variable @code{gnus-nntp-server} specifies the default NNTP
server.  To define the server @samp{flab}, put the following code in
@file{.emacs}, @file{site-init.el} or @file{default.el}:@refill

@example
(setq gnus-nntp-server "flab")
@end example

@vindex NNTPSERVER
  The variable @code{gnus-nntp-server} is initialized from the
@code{NNTPSERVER} environment variable.  To define the server using the
@code{NNTPSERVER} environment variable, put the following code in
@file{.login}:@refill

@example
setenv NNTPSERVER "flab"
@end example

@cindex private directory
@pindex MH
  If an NNTP server is preceded by a colon such as @samp{:Mail}, the
user's private directory @file{~/Mail} is used as the news spool.  This
makes it possible to read mail stored in MH folders or articles saved by
GNUS.  @xref{Private Directory}, for more information.@refill

  GNUS will ask you for the NNTP server at start up time unless it is
defined.  Even if the default server is defined, it is possible to
choose another server by invoking GNUS with a prefix argument like
@kbd{C-u M-x gnus} (@pxref{Getting Started}).@refill

@node NNTP Service, Domain, NNTP Server, Environment
@subsection NNTP Service
@cindex NNTP service

@vindex gnus-nntp-service
  The default service name of NNTP is @code{"nntp"}.  You may, however,
have to define the service name as the number @code{119} as
follows:@refill

@example
(setq gnus-nntp-service 119)
@end example

@cindex local news spool
  If you'd like to use a local news spool of your machine directly
instead of NNTP, set the variable to @code{nil} as follows:@refill

@example
(setq gnus-nntp-service nil)
@end example

@findex system-name
@noindent
In this case, the NNTP server must be a local host name returned by the
function @code{system-name} (@pxref{Local News Spool}).@refill

@node Domain, GENERICFROM, NNTP Service, Environment
@subsection Domain and Organization
@cindex domain
@cindex organization

  @dfn{Domain} and @dfn{organization} must be defined before you post
your first article, because they are included in all articles you post
and will be used for identifying who you are.@refill

@findex system-name
  @dfn{Domain} is the domain part of your mail address excluding the
local host name.  For example, if your mail address is
@samp{umerin@@photon.stars.flab.Fujitsu.CO.JP} and the local host name
is @samp{photon}, your domain is @samp{stars.flab.Fujitsu.CO.JP}.  If
the function @code{system-name} of your Emacs returns the full Internet
name, you do not have to define the domain.@refill

@cindex /usr/lib/news/organization
  @dfn{Organization} is the organization you belong to.  It must be
defined unless it is defined in the file
@file{/usr/lib/news/organization}.@refill

@vindex gnus-local-domain
@vindex gnus-local-organization
  To define the domain @samp{stars.flab.Fujitsu.CO.JP} and the
organization @samp{Fujitsu Laboratories Ltd., Kawasaki, Japan.} using
lisp variables, put the following code in @file{.emacs},
@file{site-init.el} or @file{default.el}.  If you are a system
administrator and are installing GNUS for other users,
@file{site-init.el} is the best place to define this because the domain
and organization are common to all users of the system.@refill

@example
(setq gnus-local-domain "stars.flab.Fujitsu.CO.JP")
(setq gnus-local-organization
      "Fujitsu Laboratories Ltd., Kawasaki, Japan.")
@end example

@vindex DOMAINNAME
@vindex ORGANIZATION
  The @code{DOMAINNAME} and @code{ORGANIZATION} environment variables
are used instead, if defined.  To define these variables, put the
following code in @file{.login}.@refill

@example
setenv DOMAINNAME   "stars.flab.Fujitsu.CO.JP"
setenv ORGANIZATION "Fujitsu Laboratories Ltd., Kawasaki, Japan."
@end example

@cindex .organization
@cindex /usr/lib/news/organization
  If the value of the @code{ORGANIZATION} environment variable or the
variable @code{gnus-local-organization} begins with a slash, it is taken
as the name of a file whose contents are read for the value.  If neither
of these is defined, and a file
@file{~/.organization-@var{distribution}} or @file{~/.organization}
exists, the contents of that file are used.  If neither of them does not
exist, and the file @file{/usr/lib/news/organization} exists, its
contents are used.@refill

@node GENERICFROM, GENERICPATH, Domain, Environment
@subsection GENERICFROM
@cindex GENERICFROM
@cindex From field

@vindex gnus-use-generic-from
@pindex Bnews
  If the variable @code{gnus-use-generic-from} is non-@code{nil}, the
local host name of your machine will not appear in the @samp{From:}
field of article headers you post.  This is called the @dfn{GENERICFROM}
feature in the Bnews system.  This may be useful if there are many
workstations connected to each other in a local area network, and
aliases service or automatic forwarding of mail is supported between the
workstations.@refill

  To use the GENERICFROM, put the following code in @file{.emacs},
@file{site-init.el} or @file{default.el}.  If you are a system
administrator and are installing GNUS for other users,
@file{site-init.el} is the best place to define it because the
definition is common to all users of the system having the same domain
and organization (@pxref{Domain,, Domain and Organization}).@refill

@example
(setq gnus-use-generic-from t)
@end example

@vindex gnus-local-domain
@vindex DOMAINNAME
  As a special case of the GENERICFROM feature, if the variable
@code{gnus-use-generic-from} is a string, it is used as your domain
instead of the definition of the environment variable @code{DOMAINNAME}
or the variable @code{gnus-local-domain} (@pxref{Domain,, Domain and
Organization}).@refill

@node GENERICPATH, Startup File, GENERICFROM, Environment
@subsection GENERICPATH
@cindex GENERICPATH
@cindex Path field

@vindex gnus-use-generic-path
@pindex Bnews
  If the variable @code{gnus-use-generic-path} is @code{nil}, the NNTP
server name followed by the user login name is used in the @samp{Path:}
field of article headers you post.  If it is a string, the string
followed by the user login name is used instead.  Otherwise, if it is
non-@code{nil}, only the user login name is used.  This is called the
@dfn{GENERICPATH} feature in the Bnews system.@refill

  For example, to define the generic path @samp{flab}, put the following
codes in @file{.emacs}, @file{site-init.el} or @file{default.el}.  If
you are a system administrator and are installing GNUS for other users,
@file{site-init.el} is the best place to define it because the
definition is common to all users of the system having the same domain
and organization (@pxref{Domain,, Domain and Organization}).@refill

@example
(setq gnus-use-generic-path "flab")
@end example

@noindent
In this case, the @samp{Path:} field will be generated as
@samp{Path:@: flab!@var{user}}.@refill

@node Startup File,, GENERICPATH, Environment
@subsection Startup File
@cindex startup file
@cindex .newsrc

@vindex gnus-startup-file
@cindex server specific startup file
@pindex Bnews
  @dfn{Startup file} is a file recording information on articles you
have already read.  GNUS uses @file{.newsrc} for the startup file as in
the Bnews system.  If you think you will talk to exactly one NNTP
server, you can use it without any problems.  Otherwise, if you want to
talk to several NNTP servers, you'd better use server specific startup
files since startup files are not portable between servers.  The server
specific startup file for an NNTP server on a machine @var{server} is a
file named @file{.newsrc-@var{server}}.  For example,
@file{.newsrc-photon} is for an NNTP server on a machine named
@samp{photon}.  The primary name of the startup file, @file{.newsrc}, is
specified by the variable @code{gnus-startup-file}
(@pxref{Variables}).@refill

@cindex add newsgroups
@cindex new newsgroups
@cindex subscribe newsgroups
@cindex unsubscribe newsgroups
@vindex gnus-subscribe-newsgroup-method
  GNUS automatically adds newly created newsgroups to a startup file
when getting started.  To prevent adding the newsgroups under some
newsgroup hierarchies, you can use the options line in the startup file
or the variable @code{gnus-subscribe-newsgroup-method} provided for
subscription method customization.  @xref{Variables}, for more
information on the variable customization.@refill

@cindex options -n in startup file
@cindex kill newsgroups
@kindex U (Group Mode)
@findex gnus-Group-unsubscribe-group
@kindex C-k (Group Mode)
@findex gnus-Group-kill-group
@kindex C-w (Group Mode)
@findex gnus-Group-kill-region
@pindex Bnews
  Option @code{-n} of the options line in the startup file is recognized
properly the same as for the Bnews system.  For example, if the options
line is @samp{options -n !talk talk.rumors}, newsgroups under the
@samp{talk} hierarchy except for @samp{talk.rumors} are ignored while
checking new newsgroups.  These ignored newsgroups can be added manually
using the command @kbd{U} (@code{gnus-Group-unsubscribe-group}) in the
Newsgroup buffer.  Use the commands @kbd{C-k} and @kbd{C-w}
(@code{gnus-Group-kill-group} and @code{gnus-Group-kill-region}) to kill
newsgroups from the startup file per a newsgroup basis.
@xref{Maintenance}, for more information.@refill

@kindex R (Group Mode)
@findex gnus-Group-restart
@cindex quick startup file
@cindex .newsrc.el
  Once a startup file is updated by GNUS, the @dfn{quick startup file}
of which the file name is generated by appending @file{.el} to that of
the raw startup file is also created.  The quick startup file can be
read by Emacs faster than the raw startup file since all information in
the file is in lisp form.  If there is a quick startup file and it is
newer than the raw startup file, the quick startup file is loaded
instead of the raw startup file.  If the raw startup file is newer, it
is normally read after loading the quick startup file.  You should not
remove the quick startup file because it contains additional
information.  Instead, make the raw startup file newer than that by
touching it or force GNUS to read it by using the command @kbd{R}
(@code{gnus-Group-restart}) in the Newsgroup buffer if you want to
reflect the changes of the raw startup file to GNUS.@refill

@node Texinfo Manual,, Environment, Installation
@section Texinfo Manual
@pindex gnus.texinfo
@cindex Texinfo
@cindex Info
@cindex @TeX{}

  @file{gnus.texinfo} is a manual of GNUS written in Texinfo format.
This file can be printed using @TeX{}, and also can be read using Info
Mode of Emacs.@refill

@vindex Info-directory
@vindex gnus-Info-directory
@cindex create Info file
@cindex install Info file
  @inforef{Creating an Info File, Creating an Info File, texinfo}, to
create an on-line Info file from the Texinfo manual.  If you are not
allowed to create the Info file in the standard Info directory specified
by the variable @code{Info-directory}, create it in your private
directory and set the variable @code{gnus-Info-directory} to the
directory.@refill

@kindex C-c C-i
@findex gnus-Info-find-node
@cindex read Info file
@cindex Info
  If this Info file is installed, you can read the documentation of GNUS
according to the current major mode of GNUS.  The command
@code{gnus-Info-find-node} for reading appropriate Info nodes of the
Info file is assigned to @kbd{C-c C-i} in all major modes of
GNUS.@refill

@cindex print Texinfo manual
  @inforef{Printing Hardcopy, Printing Hardcopy, texinfo}, to print a
hardcopy of the manual.@refill

@node Starting up, Buffers of GNUS, Installation, Top
@chapter Starting up GNUS

@ifinfo
  This chapter describes how to get started GNUS, how to use a local
news spool directly, and how to read private directory.
@end ifinfo

@menu
* Getting Started::     How to get started GNUS.
* Local News Spool::    How to use a local news spool.
* Private Directory::   How to read a private directory.
@end menu

@node Getting Started, Local News Spool, Starting up, Starting up
@section Getting Started GNUS
@cindex invoke GNUS
@cindex run GNUS

@kindex M-x gnus
@findex gnus
  Type @kbd{M-x gnus} at the top level of GNU Emacs to invoke GNUS.
Unless a default NNTP server is defined, you will be asked for the name
of the server.  The NNTP server can be changed at startup time by giving
a prefix argument to the command even if a default server is defined.
@xref{NNTP Server}, to define the default server.@refill

@table @kbd
@item M-x gnus
@kindex M-x gnus
Run GNUS using the default NNTP server.

@item C-u M-x gnus
@kindex C-u M-x gnus
Run GNUS without using the default NNTP server.
@end table

@node Local News Spool, Private Directory, Getting Started, Starting up
@section Using Local News Spool
@cindex local news spool

@vindex gnus-nntp-service
@findex system-name
  If the NNTP server is the local host name (exactly the same as the
value returned by the function @code{system-name}), and the variable
@code{gnus-nntp-service} is nil, GNUS looks up the local news spool of
your machine directly instead of NNTP (@pxref{NNTP Service}).@refill

  It may be a good idea not to use NNTP if you wish to reduce network
traffic (even if an NNTP server is running on the local machine) though
commands for retrieving articles by Message-IDs may take longer or not
work at all.  @xref{Referencing Articles}, to refer to articles by the
Message-IDs, and @pxref{Spool Variables}, for more information on the
restrictions.@refill

@node Private Directory,, Local News Spool, Starting up
@section Reading a Private Directory
@cindex private directory
@cindex MH folder

@cindex active file
@pindex MH
  If an NNTP server is preceded by a colon such as @samp{:Mail}, the
user's private directory @file{~/Mail} is used as the news spool.  This
makes it possible to read mail stored in MH folders or articles saved by
GNUS.  An active file for the directory is generated from files of which
the file name consists of only numeric characters, and other files
containing non-numeric characters in their file name are ignored.@refill

  A server specific startup file for each directory must be created
before starting GNUS.  For example, a startup file for the directory
@file{~/Mail} is a file named @file{.newsrc-:Mail}.  @xref{Startup
File}, for more information on the server specific startup file.@refill

@node Buffers of GNUS, Newsgroup Commands, Starting up, Top
@chapter Buffers of GNUS
@cindex GNUS buffers
@cindex buffers of GNUS
@cindex GNUS windows
@cindex windows of GNUS
@cindex GNUS major modes
@cindex major modes of GNUS

@vindex gnus-window-configuration
@cindex window configuration
@cindex configure windows
  Basically GNUS uses three buffers in Emacs: Newsgroup buffer, Subject
buffer, and Article buffer.  Each of them is associated with a specific
major mode of Emacs.  The configuration of the windows displaying these
buffers are customizable by using the variable
@code{gnus-window-configuration}.  @xref{Variables}, for more
information on customizing the window configuration.

@menu
* Newsgroup Buffer:: a buffer for listing newsgroups.
* Subject Buffer::   a buffer for listing subjects and other important headers.
* Article Buffer::   a buffer for displaying messages of articles.
@end menu

@node Newsgroup Buffer, Subject Buffer, Buffers of GNUS, Buffers of GNUS
@section Newsgroup Buffer
@cindex Newsgroup buffer
@cindex Group Mode

  @dfn{Newsgroup buffer} is for listing newsgroups.  The major mode of
this buffer is @dfn{Group Mode}.  The buffer is created and popped up
when GNUS starts.  Newsgroups which are subscribed to and contain unread
articles are usually listed in the buffer.  If there is no such
newsgroup, the buffer will be empty and a message @samp{No news is good
news.} will be displayed in the echo area of Emacs.@refill

  The contents of a Newsgroup buffer looks something like the following:

@example
@var{SM  NUMBER}: @var{NEWSGROUP}
@end example

@table @var
@item S
A character indicating whether the newsgroup is subscribed to.  @samp{U}
means the newsgroup is unsubscribed.  @samp{ } means it is subscribed
to.@refill

@item M
A character indicating whether there are unread articles in the
newsgroup.  @samp{*} means there are no newly arrived articles in the
newsgroup.  @samp{ } means there are newly arrived articles.@refill

@item NUMBER
The number of unread articles in the newsgroup.

@item NEWSGROUP
The name of the newsgroup.
@end table

@node Subject Buffer, Article Buffer, Newsgroup Buffer, Buffers of GNUS
@section Subject Buffer
@cindex Subject buffer
@cindex Subject Mode

  @dfn{Subject buffer} is for listing subjects and other important
headers of articles.  The major mode of the buffer is @dfn{Subject
Mode}.  The buffer is created for each newsgroup when the newsgroup is
selected in the Newsgroup buffer.@refill

  The contents of a Subject buffer looks something like the following:

@example
@var{S NUMBER}:@var{C}[@var{LINES}:@var{AUTHOR}] @var{SUBJECT}
@end example

@table @var
@item S
A character indicating whether an article is newly arrived.  @samp{ }
means the article is newly arrived.  @samp{D} means it was read and
marked so.  @samp{-} means it was read once but marked as unread
again.@refill

@item NUMBER
The number assigned to the article.

@item C
A character indicating which article is currently selected.  @samp{+} is
placed on the current article.@refill

@item LINES
The number of lines of the article body.

@item AUTHOR
Mail address of the author of the article.

@item SUBJECT
Subject of the article.
@end table

@vindex gnus-optional-headers
  Strings between @samp{[} and @samp{]} are optional, and can be
customized using the variable @code{gnus-optional-headers}.
@xref{Variables}, and @pxref{Hooks}, for more information on
customization.@refill

@node Article Buffer,, Subject Buffer, Buffers of GNUS
@section Article Buffer
@cindex Article buffer
@cindex Article Mode

  @dfn{Article buffer} is for displaying articles.  The major mode of
the buffer is @dfn{Article Mode}.  Very few commands are available in
this buffer because most operations on the buffer can be done in the
Subject buffer.@refill

@node Newsgroup Commands, Subject Commands, Buffers of GNUS, Top
@chapter Newsgroup Commands

  The Newsgroup buffer is intended to show newsgroups which are
subscribed to and contain unread articles.  Unsubscribed newsgroups or
newsgroups containing no unread articles are not usually displayed in
the buffer.

  Commands for browsing through newsgroups, selecting newsgroups to
read, and maintaining newsgroups are described in this chapter.

@menu
* Browsing Newsgroups::         Browsing through newsgroups.
* Selecting a Newsgroup::       Selecting a newsgroup to read articles.
* Maintenance::                 Maintaining newsgroups.
* Exiting GNUS::                How to exit GNUS.
* Other Newsgroup Commands::    Other miscellaneous commands.
@end menu

@node Browsing Newsgroups, Selecting a Newsgroup, Newsgroup Commands, Newsgroup Commands
@section Walking Around Newsgroups

  First of all, you have to move the point to a newsgroup to read
articles in it.

@table @kbd
@item n
@kindex n (Group Mode)
@findex gnus-Group-next-unread-group
Move point to the next newsgroup containing unread articles
(@code{gnus-Group-next-unread-group}).@refill

@item p
@itemx DEL
@kindex p (Group Mode)
@kindex DEL (Group Mode)
@findex gnus-Group-prev-unread-group
Move point to the previous newsgroup containing unread articles
(@code{gnus-Group-prev-unread-group}).@refill

@item N
@itemx C-n
@kindex N (Group Mode)
@kindex C-n (Group Mode)
@findex gnus-Group-next-group
Move point to the next newsgroup (@code{gnus-Group-next-group}).

@item P
@itemx C-p
@kindex P (Group Mode)
@kindex C-p (Group Mode)
@findex gnus-Group-prev-group
Move point to the previous newsgroup (@code{gnus-Group-prev-group}).

@item j @var{newsgroup} RET
@kindex j (Group Mode)
@findex gnus-Group-jump-to-group
Move point to the specified @var{newsgroup}
(@code{gnus-Group-jump-to-group}).@refill

@item /
@kindex / (Group Mode)
Do an incremental search forward (@code{isearch-forward}).

@item <
@kindex < (Group Mode)
Move point to the beginning of the buffer (@code{beginning-of-buffer}).

@item >
@kindex > (Group Mode)
Move point to the end of the buffer (@code{end-of-buffer}).

@item r
@kindex r (Group Mode)
@findex gnus-Group-restrict-groups
@cindex restrict newsgroups
Restrict visible newsgroups to the current region specified by the point
and the mark (@code{gnus-Group-restrict-groups}).@refill
@end table

@kindex j (Group Mode)
@findex gnus-Group-jump-to-group
  The command @kbd{j} (@code{gnus-Group-jump-to-group}) reads a
newsgroup name interactively, and moves the point to it.  If there is no
such newsgroup in the buffer, a line for the newsgroup is inserted at
the beginning of the buffer.@refill

@kindex r (Group Mode)
@kindex C-x w
@findex gnus-Group-restrict-groups
@findex widen
@cindex restrict newsgroups
  The command @kbd{r} (@code{gnus-Group-restrict-groups}) restricts
visible newsgroups to the current region specified by the point and the
mark.  This is useful if you want to concentrate on a restricted set of
newsgroups in a region.  Type @kbd{C-x w} (@code{widen}) to remove the
restriction.@refill

@node Selecting a Newsgroup, Maintenance, Browsing Newsgroups, Newsgroup Commands
@section Selecting a Newsgroup
@cindex select newsgroup
@cindex read newsgroup

@kindex SPC (Group Mode)
@findex gnus-Group-read-group
@kindex = (Group Mode)
@findex gnus-Group-select-group
  If you successfully move the point to a desired newsgroup, you can
select the newsgroup to read articles by typing @kbd{SPC}
(@code{gnus-Group-read-group}) or @kbd{=}
(@code{gnus-Group-select-group}) on that line.@refill

@table @kbd
@item SPC
@kindex SPC (Group Mode)
@findex gnus-Group-read-group
Select the newsgroup, and then select the first unread article
automatically (@code{gnus-Group-read-group}).@refill

@item =
@kindex = (Group Mode)
@findex gnus-Group-select-group
Select the newsgroup (@code{gnus-Group-select-group}). No article is
selected automatically.@refill
@end table

@kindex SPC (Group Mode)
@findex gnus-Group-read-group
@vindex gnus-auto-select-first
@vindex gnus-Select-group-hook
  To prevent automatic selection of the first unread article even when
the newsgroup is selected by the command @kbd{SPC}
(@code{gnus-Group-read-group}), set the variable
@code{gnus-auto-select-first} to @code{nil}.  If you want to change the
value of the variable according to the selected newsgroups, set the
variable in the hook @code{gnus-Select-group-hook}.@refill

@kindex SPC (Group Mode)
@findex gnus-Group-read-group
@kindex = (Group Mode)
@findex gnus-Group-select-group
@cindex select all articles
@cindex read all articles
  If unread articles are contained in a selected newsgroup, they become
ready to be read.  Otherwise, all articles in the newsgroup become ready
to be read.  All articles in a newsgroup can be selected unconditionally
by giving a prefix argument to the commands @kbd{SPC} and @kbd{=}
(@code{gnus-Group-read-group} and
@code{gnus-Group-select-group}).@refill

@vindex gnus-large-newsgroup
@cindex large newsgroup
  If the number of articles being selected is larger than the variable
@code{gnus-large-newsgroup}, the number of articles actually selected is
asked for.  If the given value @var{n} is positive, the last @var{n}
articles will be selected.  If @var{n} is negative, the first @var{n}
articles will be selected.  An empty string means to select all
articles.@refill

  @xref{Variables}, and @pxref{Hooks}, for more information on
customization.@refill

@node Maintenance, Exiting GNUS, Selecting a Newsgroup, Newsgroup Commands
@section Maintaining Newsgroups

  Subscription of newsgroups, deletion of bogus newsgroups, and other
related operations are described in this section.

@table @kbd
@item c
@kindex c (Group Mode)
@findex gnus-Group-catch-up
Mark all articles as read in the newsgroup, preserving articles marked
as unread (@code{gnus-Group-catch-up}).@refill

@item C
@kindex C (Group Mode)
@findex gnus-Group-catch-up-all
Mark all articles as read in the newsgroup
(@code{gnus-Group-catch-up-all}).@refill

@item l
@kindex l (Group Mode)
@findex gnus-Group-list-groups
Redisplay newsgroups which are subscribed to and containing unread
articles (@code{gnus-Group-list-groups}).@refill

@item L
@kindex L (Group Mode)
@findex gnus-Group-list-all-groups 
Display all newsgroups unconditionally
(@code{gnus-Group-list-all-groups}).@refill

@item u
@kindex u (Group Mode)
@findex gnus-Group-unsubscribe-current-group
@cindex subscribe newsgroups
@cindex unsubscribe newsgroups
Unsubscribe from (or subscribe to) the newsgroup
(@code{gnus-Group-unsubscribe-current-group}).@refill

@item U @var{newsgroup} RET
@kindex U (Group Mode)
@findex gnus-Group-unsubscribe-group
@cindex subscribe newsgroups
@cindex unsubscribe newsgroups
Unsubscribe from (or subscribe to) the specified @var{newsgroup}
(@code{gnus-Group-unsubscribe-group}).  If it is not contained in the
startup file, it is added to the file.@refill

@item C-k
@kindex C-k (Group Mode)
@findex gnus-Group-kill-group
@cindex kill newsgroups
Kill newsgroups from the startup file (@code{gnus-Group-kill-group}).
Numeric argument to the command specifies the number of newsgroups to be
killed.@refill

@item C-w
@kindex C-w (Group Mode)
@findex gnus-Group-kill-region
@cindex kill newsgroups
Kill newsgroups in current region (excluding current line) from the
startup file (@code{gnus-Group-kill-region}).

@item C-y
@kindex C-y (Group Mode)
@findex gnus-Group-yank-group
@cindex yank newsgroups
Yank the last newsgroup killed with the command @kbd{C-k} before the
current line (@code{gnus-Group-yank-group}).@refill

@item C-c C-y
@kindex C-c C-y (Group Mode)
@findex gnus-Browse-killed-groups
Pop up a buffer for browsing the killed newsgroups
(@code{gnus-Browse-killed-groups}).@refill

@item b
@kindex b (Group Mode)
@findex gnus-Group-check-bogus-groups
Check bogus newsgroups (@code{gnus-Group-check-bogus-groups}).  Bogus
means non-active.@refill

@item g
@kindex g (Group Mode)
@findex gnus-Group-get-new-news
@cindex active file
Get newly arrived articles (@code{gnus-Group-get-new-news}).  In fact,
GNUS reads the active file from the NNTP server again.@refill

@item R
@kindex R (Group Mode)
@findex gnus-Group-restart
@cindex startup file
@cindex .newsrc
Force to read the raw startup file and get newly arrived articles
(@code{gnus-Group-restart}).
@end table

@kindex c (Group Mode)
@findex gnus-Group-catch-up
@kindex C (Group Mode)
@findex gnus-Group-catch-up-all
@kindex c (Subject Mode)
@findex gnus-Subject-catch-up-and-exit
@cindex catch up
@cindex cross-references
@cindex Xref field
  The commands @kbd{c} and @kbd{C} (@code{gnus-Group-catch-up} and
@code{gnus-Group-catch-up-all}) mark all articles as read in a
newsgroup.  These commands do not take account of the cross-reference
information in the @samp{Xref:} field, while the command @kbd{c}
(@code{gnus-Subject-catch-up-and-exit}) in Subject Mode does.@refill

@kindex L (Group Mode)
@findex gnus-Group-list-all-groups
  Only subscribed newsgroups containing unread articles are usually
displayed in the Newsgroup buffer.  Type @kbd{L}
(@code{gnus-Group-list-all-groups}) to show all newsgroups which are
currently active.@refill

@kindex U (Group Mode)
@findex gnus-Group-unsubscribe-group
@cindex options -n in startup file
@cindex add newsgroups
@cindex new newsgroups
  The command @kbd{U} (@code{gnus-Group-unsubscribe-group}) reads a
newsgroup name interactively, and toggles its subscription flag if it is
already in the startup file.  Otherwise, if it is not contained in the
startup file, it is added to the file.  Thus, you can add newly created
newsgroups manually which are not added automatically because of the
options line in the startup file.  @xref{Startup File}, for more
information on the startup file and options line.@refill

@kindex C-k (Group Mode)
@findex gnus-Group-kill-group
@kindex C-w (Group Mode)
@findex gnus-Group-kill-region
@kindex C-y (Group Mode)
@findex gnus-Group-yank-group
@kindex C-c C-y (Group Mode)
@findex gnus-Browse-killed-groups
@kindex y (Browse-Killed Mode)
@kindex C-y (Browse-Killed Mode)
@findex gnus-Browse-killed-yank
@cindex kill newsgroups
@cindex yank newsgroups
@cindex order of newsgroups
@cindex change the order of newsgroups
@cindex startup file
@cindex .newsrc
  The commands @kbd{C-k} and @kbd{C-w} (@code{gnus-Group-kill-group} and
@code{gnus-Group-kill-region}) kill newsgroups from both the Newsgroup
buffer and the raw startup file.  The killed newsgroups are stored in an
invisible kill ring and they can be yanked back later.  The command
@kbd{C-y} (@code{gnus-Group-yank-group}) yank the last newsgroup killed.
The command @kbd{C-c C-y} (@code{gnus-Browse-killed-groups}) pops up the
@dfn{Browse-Killed buffer} for browsing all the killed newsgroups.  In
this buffer, the killed newsgroups can be yanked in any order using the
commands @kbd{y} and @kbd{C-y} (@code{gnus-Browse-killed-yank}).  Thus,
you can change the order of newsgroups in the Newsgroup buffer without
editing the raw startup file directly.  Since the information on the
killed newsgroups will be stored in the quick startup file, they can be
restored any time unless you lose the file.@refill

@kindex b (Group Mode)
@findex gnus-Group-check-bogus-groups
@cindex bogus newsgroups
@cindex delete newsgroups
  A @dfn{bogus newsgroup} is one not in the list of active newsgroups in
the active file.  Bogus newsgroups which are deleted or renamed must be
deleted from the startup file (@pxref{Startup File}) explicitly by the
command @kbd{b} (@code{gnus-Group-check-bogus-groups}).@refill

@kindex R (Group Mode)
@findex gnus-Group-restart
@cindex startup file
@cindex .newsrc
  The command @kbd{R} (@code{gnus-Group-restart}) is useful to restart
GNUS using the raw startup file instead of the quick startup file.
Generally speaking, if you want changes to the raw startup file to be
noticed by GNUS, it must be newer than the quick startup file.
@xref{Startup File}, for more information on the startup file.@refill

@kindex g (Group Mode)
@findex gnus-Group-get-new-news
@cindex active file
  GNUS reads the active file at start up time to know about currently
active articles.  This information is not updated unless you force GNUS
to do so with the command @kbd{g} (@code{gnus-Group-get-new-news}) or
the command @kbd{R} (@code{gnus-Group-restart}).@refill

@node Exiting GNUS, Other Newsgroup Commands, Maintenance, Newsgroup Commands
@section Exiting GNUS

@table @kbd
@item s
@itemx x
@kindex s (Group Mode)
@kindex x (Group Mode)
@findex gnus-Group-force-update
@cindex update startup file
@cindex save startup file
Update the startup file @file{.newsrc} (@code{gnus-Group-force-update}).

@item z
@kindex z (Group Mode)
@findex gnus-Group-suspend
Suspend the current GNUS session to make it possible to resume it later
(@code{gnus-Group-suspend}).@refill

@item q
@kindex q (Group Mode)
@findex gnus-Group-exit
Update the startup file @file{.newsrc}, and then exit GNUS
(@code{gnus-Group-exit}).@refill

@item Q
@kindex Q (Group Mode)
@findex gnus-Group-quit
Exit GNUS without updating the startup file @file{.newsrc}
(@code{gnus-Group-quit}).@refill
@end table

@kindex z (Group Mode)
@findex gnus-Group-suspend
@kindex g (Group Mode)
@findex gnus-Group-get-new-news
  If a GNUS session is suspended by the command @kbd{z}
(@code{gnus-Group-suspend}), it is possible to resume it later without
any time-consuming initializations.  Switch to the Newsgroup buffer and
type @kbd{g} (@code{gnus-Group-get-new-news}) to get newly arrived
articles if you want to resume the suspended GNUS session.  It is a good
idea to update the startup file (@pxref{Startup File}) before suspending
GNUS.@refill

@kindex q (Group Mode)
@findex gnus-Group-exit
@kindex Q (Group Mode)
@findex gnus-Group-quit
  If you want to forget what you read this GNUS session, exit GNUS by
the command @kbd{Q} (@code{gnus-Group-quit}).  Otherwise, exit by the
command @kbd{q} (@code{gnus-Group-exit}) to update the startup
file.@refill

@vindex gnus-Exit-gnus-hook
@vindex gnus-Suspend-gnus-hook
  The hook @code{gnus-Exit-gnus-hook} is called when exiting GNUS, and
the hook @code{gnus-Suspend-gnus-hook} is called when suspending GNUS.
If you want to clear out Emacs buffers which were created by GNUS and
remain afterwards, use these hooks.@refill

@node Other Newsgroup Commands,, Exiting GNUS, Newsgroup Commands
@section Miscellaneous Commands

  Other miscellaneous commands are described here.

@table @kbd
@item a
@kindex a (Group Mode)
@findex gnus-Group-post-news
Compose a new article (@code{gnus-Group-post-news}).  @xref{Followup and
Reply}, for more information.@refill

@item M-k
@kindex M-k (Group Mode)
@findex gnus-Group-edit-local-kill
@cindex edit local KILL file
Edit a local KILL file (@code{gnus-Group-edit-local-kill}).  @xref{KILL
File}, for more information.@refill

@item M-K
@kindex M-K (Group Mode)
@findex gnus-Group-edit-global-kill
@cindex edit global KILL file
Edit a global KILL file (@code{gnus-Group-edit-global-kill}).
@xref{KILL File}, for more information.@refill

@item V
@kindex V (Group Mode)
@findex gnus-version
@cindex version number of GNUS
@cindex GNUS version number
Print version number of this GNUS (@code{gnus-version}).

@item ?
@kindex ? (Group Mode)
@findex gnus-Group-describe-briefly
@cindex brief help message
@cindex help briefly
Describe Group Mode commands briefly
(@code{gnus-Group-describe-briefly}).@refill

@item C-c C-i
@kindex C-c C-i (Group Mode)
@findex gnus-Info-find-node
@cindex read Info file
@cindex Info
Read Info on Group Mode (@code{gnus-Info-find-node}).
@xref{Texinfo Manual}, to prepare an Info file of GNUS.@refill
@end table

@node Subject Commands, Article Commands, Newsgroup Commands, Top
@chapter Subject Commands

  The Subject buffer is intended to show interesting headers of articles
in a newsgroup and to help you know what kind of discussions are being
held there.  Messages of articles are displayed in the Article buffer
which is usually popped up automatically when necessary.  Scrolling of
the messages and most other commands on articles can be done in the
Subject buffer.

@menu
* Reading Articles::            How to read articles.
* Searching Articles::          Searching for articles.
* Referencing Articles::        Referencing parent articles.
* Saving Articles::             Saving articles in your favorite format.
* Sorting Headers::             Sorting subjects and other headers.
* Followup and Reply::          Followup and reply commands.
* Exiting Newsgroup::           How to exit the current newsgroup.
* Other Subject Commands::      Other miscellaneous commands.
@end menu

@node Reading Articles, Searching Articles, Subject Commands, Subject Commands
@section Reading Articles

@ifinfo
  Commands for browsing headers and reading messages are described here.
@end ifinfo

@menu
* Browsing Headers::            Browsing through headers.
* Moving Among Articles::       Selecting articles.
* Scrolling::                   Browsing through a message.
* Marking Articles::            Marking articles as (un)read.

* Thread-based Reading::        Reading articles based on conversation threads.
* Digest Articles::             How to read digest articles.
@end menu

@node Browsing Headers, Moving Among Articles, Reading Articles, Reading Articles
@subsection Walking Around Headers

@table @kbd
@item C-n
@kindex C-n (Subject Mode)
@findex gnus-Subject-next-subject
Move point to the next header (@code{gnus-Subject-next-subject}).

@item C-p
@kindex C-p (Subject Mode)
@findex gnus-Subject-prev-subject
Move point to the previous header (@code{gnus-Subject-prev-subject}).

@item M-n
@kindex M-n (Subject Mode)
@findex gnus-Subject-next-unread-subject
Move point to the next header, skipping marked articles
(@code{gnus-Subject-next-unread-subject}).@refill

@item M-p
@kindex M-p (Subject Mode)
@findex gnus-Subject-prev-unread-subject
Move point to the previous header, skipping marked articles
(@code{gnus-Subject-prev-unread-subject}).@refill

@item j @var{number} RET
@kindex j (Subject Mode)
@findex gnus-Subject-goto-subject
Move point to the header specified by the article @var{number}
(@code{gnus-Subject-goto-subject}).@refill

@item /
@kindex / (Subject Mode)
Do an incremental search on headers (@code{isearch-forward}).
@end table

@kindex SPC (Subject Mode)
@findex gnus-Subject-next-page
@kindex g (Subject Mode)
@findex gnus-Subject-show-article
  These commands are for moving the point on headers.  Type @kbd{SPC}
(@code{gnus-Subject-next-page}) or @kbd{g}
(@code{gnus-Subject-show-article}) to read an article on the line
(@pxref{Scrolling}).@refill

@table @kbd
@item =
@kindex = (Subject Mode)
@findex gnus-Subject-expand-window
Expand the Subject Mode window to show the headers full window
(@code{gnus-Subject-expand-window}).@refill

@item C-t
@kindex C-t (Subject Mode)
@findex gnus-Subject-toggle-truncation
Toggle truncation of the Subject buffer
(@code{gnus-Subject-toggle-truncation}).@refill
@end table

@kindex = (Subject Mode)
@findex gnus-Subject-expand-window
@kindex C-x 1
@findex delete-other-windows
  The command @kbd{=} (@code{gnus-Subject-expand-window}) expands the
Subject Mode window by deleting the Article Mode window.  It is very
useful for displaying the Subject buffer full window when browsing
through many headers.  The command behaves different from the command
@kbd{C-x 1} (@code{delete-other-windows}) if windows more than two are
displayed.@refill

@kindex C-t (Subject Mode)
@findex gnus-Subject-toggle-truncation
@cindex truncation of lines
  Long lines in the Subject buffer are truncated and the continuation
lines are not displayed normally.  The command @kbd{C-t}
(@code{gnus-Subject-toggle-truncation}) toggles the truncation of the
lines in the buffer.@refill

@node Moving Among Articles, Scrolling, Browsing Headers, Reading Articles
@subsection Moving Among Articles

  The commands described here are for moving the point on headers, and
then automatically selecting articles.

@table @kbd
@item n
@kindex n (Subject Mode)
@findex gnus-Subject-next-unread-article
Read the next article, skipping marked articles
(@code{gnus-Subject-next-unread-article}).@refill

@item p
@kindex p (Subject Mode)
@findex gnus-Subject-prev-unread-article
Read the previous article, skipping marked articles
(@code{gnus-Subject-prev-unread-article}).@refill

@item N
@kindex N (Subject Mode)
@findex gnus-Subject-next-article
Read the next article (@code{gnus-Subject-next-article}).

@item P
@kindex P (Subject Mode)
@findex gnus-Subject-prev-article
Read the previous article (@code{gnus-Subject-prev-article}).

@item M-C-n
@kindex M-C-n (Subject Mode)
@findex gnus-Subject-next-same-subject
Read the next article with the same subject as the current article
(@code{gnus-Subject-next-same-subject}).@refill

@item M-C-p
@kindex M-C-p (Subject Mode)
@findex gnus-Subject-prev-same-subject
Read the previous article with the same subject as the current article
(@code{gnus-Subject-prev-same-subject}).@refill

@item M-x gnus-Subject-next-unread-same-subject
@findex gnus-Subject-next-unread-same-subject
Read the next article with the same subject as the current article,
skipping marked articles.@refill

@item M-x gnus-Subject-prev-unread-same-subject
@findex gnus-Subject-prev-unread-same-subject
Read the previous article with the same subject as the current article,
skipping marked articles.@refill

@item .
@kindex . (Subject Mode)
@findex gnus-Subject-first-unread-article
Read the first unread article
(@code{gnus-Subject-first-unread-article}).@refill

@item l
@kindex l (Subject Mode)
@findex gnus-Subject-goto-last-article
Read the article selected last (@code{gnus-Subject-goto-last-article}).

@item J @var{number} RET
@kindex J (Subject Mode)
@findex gnus-Subject-goto-article
Read the article specified by the article @var{number}
(@code{gnus-Subject-goto-article}).@refill
@end table

@kindex n (Subject Mode)
@findex gnus-Subject-next-unread-article
@kindex p (Subject Mode)
@findex gnus-Subject-prev-unread-article
@vindex gnus-auto-select-same
@pindex rn
  If the variable @code{gnus-auto-select-same} is non-@code{nil}, the
commands @kbd{n} and @kbd{p} (@code{gnus-Subject-next-unread-article}
and @code{gnus-Subject-prev-unread-article}) move the point to unread
articles with the same subject as the current article like the commands
@kbd{M-x gnus-Subject-next-unread-same-subject} and @kbd{M-x
gnus-Subject-prev-unread-same-subject}, respectively.  If you are used
to running @samp{rn -S}, set the variable to non-@code{nil}.@refill

@kindex N (Subject Mode)
@findex gnus-Subject-next-article
@kindex P (Subject Mode)
@findex gnus-Subject-prev-article
@vindex gnus-auto-extend-newsgroup
  If the variable @code{gnus-auto-extend-newsgroup} is non-@code{nil},
the commands @kbd{N} and @kbd{P} (@code{gnus-Subject-next-article} and
@code{gnus-Subject-prev-article}) extend visible articles to forward and
backward if possible.@refill

@vindex gnus-auto-select-next
  The variable @code{gnus-auto-select-next} defines the behavior of GNUS
when there is no unread article in the current newsgroup and a command
selecting the next unread article is executed.  If the variable is
non-@code{nil}, the next newsgroup containing unread articles is
selected automatically.@refill

  @xref{Variables}, for more information on customization.@refill

@node Scrolling, Marking Articles, Moving Among Articles, Reading Articles
@subsection Scrolling Within an Article

@kindex SPC (Subject Mode)
@findex gnus-Subject-next-page
  Type @kbd{SPC} (@code{gnus-Subject-next-page}) to scroll to the next
page of the current article.  If no article is selected yet, an article
near the point is selected and its first page is displayed in the
Article buffer.  The next unread article is selected automatically if
@kbd{SPC} is typed at the end of the message.@refill

@table @kbd
@item SPC
@kindex SPC (Subject Mode)
@findex gnus-Subject-next-page
Scroll to the next page of the current article
(@code{gnus-Subject-next-page}).  Select it first if no article is
selected yet.  Select the next unread article automatically at the end of
the message.@refill

@item DEL
@kindex DEL (Subject Mode)
@findex gnus-Subject-prev-page
Scroll to the previous page of the current article
(@code{gnus-Subject-prev-page}).@refill

@item RET
@kindex RET (Subject Mode)
@findex gnus-Subject-scroll-up
Scroll up or down one line of the current article
(@code{gnus-Subject-scroll-up}).@refill

@item <
@kindex < (Subject Mode)
@findex gnus-Subject-beginning-of-article
Move point to the beginning of the current article
(@code{gnus-Subject-beginning-of-article}).@refill

@item >
@kindex > (Subject Mode)
@findex gnus-Subject-end-of-article
Move point to the end of the current article
(@code{gnus-Subject-end-of-article}).@refill

@item w
@kindex w (Subject Mode)
@findex gnus-Subject-stop-page-breaking
@cindex page break
@cindex break into pages
Stop page breaking (@code{gnus-Subject-stop-page-breaking}).@refill

@item v
@kindex v (Subject Mode)
@findex gnus-Subject-show-all-headers
Show all headers of the current article
(@code{gnus-Subject-show-all-headers}).@refill

@item t
@kindex t (Subject Mode)
@findex gnus-Subject-toggle-header
Show all headers of the current article if pruned header currently
shown, or vice versa (@code{gnus-Subject-toggle-header}).@refill

@item C-c C-r
@kindex C-c C-r (Subject Mode)
@findex gnus-Subject-caesar-message
@cindex rot 13/47
@cindex caesar messages
@cindex encrypted articles
Caesar rotate letters by 13 places and Japanese characters by 47 places
(@code{gnus-Subject-caesar-message}).@refill

@item g
@kindex g (Subject Mode)
@findex gnus-Subject-show-article
Force to read the current article again
(@code{gnus-Subject-show-article}).
@end table

@vindex gnus-window-configuration
@cindex window configuration
@cindex configure windows
  If the Article buffer is not visible, it is popped up under the
Subject buffer when necessary.  The height of the Subject buffer and
that of the Article buffer can be customized by using the variable
@code{gnus-window-configuration}.@refill

@cindex rot 13/47
@cindex caesar messages
@cindex encrypted articles
@kindex C-c C-r (Subject Mode)
@findex gnus-Subject-caesar-message
  The command @kbd{C-c C-r} (@code{gnus-Subject-caesar-message}) rotates
all letters in the message body of the current article by 13 places.
Japanese characters are rotated by 47 places.  Running the command twice
on the same article results the original message.@refill

@vindex gnus-break-pages
@vindex gnus-page-delimiter
@cindex page break
@cindex break into pages
  If the variable @code{gnus-break-pages} is non-@code{nil}, the message
is broken into pages at page delimiters specified by the variable
@code{gnus-page-delimiter}.  The command @kbd{w}
(@code{gnus-Subject-stop-page-breaking}) temporary suspends page
breaks.@refill

@kindex t (Subject Mode)
@findex gnus-Subject-toggle-header
@vindex gnus-ignored-headers
  The variable @code{gnus-ignored-headers} specifies header fields which
should be ignored.  The command @kbd{v}
(@code{gnus-Subject-show-all-headers}) shows all headers of the current
article, while the command @kbd{t} (@code{gnus-Subject-toggle-header})
toggles the headers.@refill

  @xref{Variables}, and @pxref{Hooks}, for more information on
customization.@refill

@node Marking Articles, Thread-based Reading, Scrolling, Reading Articles
@subsection Marking Articles
@cindex article marks
@cindex mark articles

  GNUS uses three kinds of marks to indicate article status.

@itemize @bullet
@item
White space @samp{ } for newly arrived articles.
@item
Dash @samp{-} for articles marked as unread.
@item
Any other characters for articles marked as read.
@end itemize

  The status is displayed at the beginning of each line of the Subject
buffer.  Commands for marking or removing these marks are as follows:

@table @kbd
@item d
@kindex d (Subject Mode)
@findex gnus-Subject-mark-as-read-forward
Mark article as read, and then move to the next subject
(@code{gnus-Subject-mark-as-read-forward}).@refill

@item D
@kindex D (Subject Mode)
@findex gnus-Subject-mark-as-read-backward
Mark article as read, and then move to the previous subject
(@code{gnus-Subject-mark-as-read-backward}).@refill

@item u
@kindex u (Subject Mode)
@findex gnus-Subject-mark-as-unread-forward
Mark article as unread, and then move to the next subject
(@code{gnus-Subject-mark-as-unread-forward}).@refill

@item U
@kindex U (Subject Mode)
@findex gnus-Subject-mark-as-unread-backward
Mark article as unread, and then move to the previous subject
(@code{gnus-Subject-mark-as-unread-backward}).@refill

@item M-u
@kindex M-u (Subject Mode)
@findex gnus-Subject-clear-mark-forward
Clear marks, and then move to the next subject
(@code{gnus-Subject-clear-mark-forward}).@refill

@item M-U
@kindex M-U (Subject Mode)
@findex gnus-Subject-clear-mark-backward
Clear marks, and then move to the previous subject
(@code{gnus-Subject-clear-mark-backward}).@refill

@item k
@kindex k (Subject Mode)
@findex gnus-Subject-kill-same-subject-and-select
Mark articles with the same subject as the current article as read, and
then select the next unread article
(@code{gnus-Subject-kill-same-subject-and-select}).@refill

@item C-k
@kindex C-k (Subject Mode)
@findex gnus-Subject-kill-same-subject
Mark articles with the same subject as the current article as read
(@code{gnus-Subject-kill-same-subject}).@refill

@item c
@itemx M-x gnus-Subject-catch-up-and-exit
@kindex c (Subject Mode)
@findex gnus-Subject-catch-up-and-exit
@cindex catch up
Mark all articles, which are not marked as unread, as read, and then
exit the current newsgroup.@refill

@item M-x gnus-Subject-catch-up-all-and-exit
@findex gnus-Subject-catch-up-all-and-exit
@cindex catch up
Mark all articles as read, and then exit the current newsgroup.@refill

@item M-x gnus-Subject-catch-up
@findex gnus-Subject-catch-up
@cindex catch up
Mark all articles as read, preserving articles marked as unread.

@item M-x gnus-Subject-catch-up-all
@findex gnus-Subject-catch-up-all
@cindex catch up
Mark all articles as read.
@end table

@kindex x (Subject Mode)
@findex gnus-Subject-delete-marked-as-read
@kindex X (Subject Mode)
@findex gnus-Subject-delete-marked-with
@cindex large newsgroup
  It is helpful to delete headers marked as read while reading a large
newsgroup.  The command @kbd{x}
(@code{gnus-Subject-delete-marked-as-read}) deletes headers marked as
read.  The command @kbd{X} (@code{gnus-Subject-delete-marked-with})
deletes headers which have a specific mark.@refill

@table @kbd
@item x
@kindex x (Subject Mode)
@findex gnus-Subject-delete-marked-as-read
Delete headers marked as read
(@code{gnus-Subject-delete-marked-as-read}).@refill

@item X @var{mark} RET
@kindex X (Subject Mode)
@findex gnus-Subject-delete-marked-with
Delete headers marked with @var{mark}
(@code{gnus-Subject-delete-marked-with}).@refill
@end table

@node Thread-based Reading, Digest Articles, Marking Articles, Reading Articles
@subsection Reading Based on Conversation Threads
@cindex threads
@cindex conversation threads
@cindex refernece trees

  Conversations on the usenet news usually contain several threads under
a single subject.  This makes it difficult to know which article follows
which without reading references directly.  It would be useful if we
could read articles based on conversation threads.

@kindex M-C-t (Subject Mode)
@findex gnus-Subject-toggle-threads
  GNUS enables you this thread-based reading.  The reader can follow
threads of conversation, mark threads as read, and go up and down thread
trees.  The command @kbd{M-C-t} (@code{gnus-Subject-toggle-threads})
toggles showing conversation threads in Subject Mode.  If it is turned
on, Subject buffer is displayed in a tree structured form according to
what each article was a reply to.@refill

@table @kbd
@item M-C-t
@kindex M-C-t (Subject Mode)
@findex gnus-Subject-toggle-threads
Toggle thread-based reading
(@code{gnus-Subject-toggle-threads}).@refill

@item M-C-s 
@kindex M-C-s (Subject Mode)
@findex gnus-Subject-show-thread
Show thread subtrees (@code{gnus-Subject-show-thread}).@refill

@item M-x gnus-Subject-show-all-threads
@findex gnus-Subject-show-all-threads
Show all thread subtrees.@refill

@item M-C-h
@kindex M-C-h (Subject Mode)
@findex gnus-Subject-hide-thread
Hide thread subtrees (@code{gnus-Subject-hide-thread}).@refill

@item M-x gnus-Subject-hide-all-threads
@findex gnus-Subject-hide-all-threads
Hide all thread subtrees.@refill

@item M-C-f
@kindex M-C-f (Subject Mode)
@findex gnus-Subject-next-thread
Go to the same level next thread
(@code{gnus-Subject-next-thread}).@refill

@item M-C-b
@kindex M-C-b (Subject Mode)
@findex gnus-Subject-prev-thread
Go to the same level previous thread
(@code{gnus-Subject-prev-thread}).@refill

@item M-C-d
@kindex M-C-d (Subject Mode)
@findex gnus-Subject-down-thread
Go down to the lower level thread
(@code{gnus-Subject-down-thread}).@refill

@item M-C-u
@kindex M-C-u (Subject Mode)
@findex gnus-Subject-up-thread
Go up to the upper level thread
(@code{gnus-Subject-up-thread}).@refill

@item M-C-k
@kindex M-C-k (Subject Mode)
@findex gnus-Subject-kill-thread
Mark articles under current thread as read
(@code{gnus-Subject-kill-thread}).@refill
@end table

@kindex M-C-h (Subject Mode)
@findex gnus-Subject-hide-thread
@kindex M-C-s (Subject Mode)
@findex gnus-Subject-show-thread
  Thread subtrees can be hidden by using the command @kbd{M-C-h}
(@code{gnus-Subject-hide-thread}), and the hidden subtrees can be shown
by using the command @kbd{M-C-s}
(@code{gnus-Subject-show-thread}).@refill

@vindex gnus-thread-hide-killed
@kindex M-C-k (Subject Mode)
@findex gnus-Subject-kill-thread
  If the variable @code{gnus-thread-hide-killed} is non-@code{nil},
thread subtrees killed by the command @kbd{M-C-k}
(@code{gnus-Subject-kill-thread}) are hidden automatically.@refill

@vindex gnus-thread-hide-subtree
  If you want to hide thread subtrees initially, set the variable
@code{gnus-thread-hide-subtree} to non-@code{nil}.@refill

@vindex gnus-show-threads
  If you want to enable thread-based reading automatically, set the
variable @code{gnus-show-threads} to non-@code{nil}.@refill

  @xref{Variables}, for more information on customization.@refill

@node Digest Articles,, Thread-based Reading, Reading Articles
@subsection Reading Digest Articles
@cindex digest articles

  @dfn{Digest article} is a message containing many messages in
@dfn{digest} format.  Since a digest article contains many messages in
one article, it is a little bit difficult to read it on a per message
basis.  The following commands make it easier to read each message in a
digest.@refill

@table @kbd
@item C-c C-n
@kindex C-c C-n (Subject Mode)
@findex gnus-Subject-next-digest
Scroll to the next digest message of the current article
(@code{gnus-Subject-next-digest}).@refill

@item C-c C-p
@kindex C-c C-p (Subject Mode)
@findex gnus-Subject-prev-digest
Scroll to the previous digest message of the current article
(@code{gnus-Subject-prev-digest}).@refill

@item C-d
@kindex C-d (Subject Mode)
@findex gnus-Subject-rmail-digest
@cindex Rmail
Read the current digest article using Rmail
(@code{gnus-Subject-rmail-digest}).@refill
@end table

@kindex C-c C-n (Subject Mode)
@findex gnus-Subject-next-digest
@kindex C-c C-p (Subject Mode)
@findex gnus-Subject-prev-digest
@vindex gnus-digest-separator
@cindex digest separator
  The commands @kbd{C-c C-n} and @kbd{C-c C-p}
(@code{gnus-Subject-next-digest} and @code{gnus-Subject-prev-digest})
scroll a digest article to the next and previous digested message,
respectively.  The variable @code{gnus-digest-separator} specifies a
regexp which separates digested messages.@refill

@kindex C-d (Subject Mode)
@findex gnus-Subject-rmail-digest
@vindex gnus-Select-article-hook
@cindex Rmail
  The command @kbd{C-d} (@code{gnus-Subject-rmail-digest}) runs Rmail on
a digest article and makes it possible to read messages not in digest
form using Rmail Mode.  @inforef{Rmail, Rmail, emacs}, for more
information on Rmail Mode.  Use the hook @code{gnus-Select-article-hook}
to run Rmail on digest articles automatically.@refill

@vindex gnus-Select-digest-hook
@cindex incomplete digest articles
  Digest articles in some newsgroups of USENET cannot be read using
Rmail.  In this case, a message @samp{Article is not a digest} is
displayed in the echo area of Emacs.  This means that these articles are
not written in the proper digest format.  It is, however, possible to
read these incomplete digest articles by modifying the message headers
or bodies appropriately using the hook @code{gnus-Select-digest-hook}.
@xref{Hooks}, to modify incomplete digest articles.@refill

@vindex gnus-digest-show-summary
@cindex digest summary
@cindex summary of digest
  If the variable @code{gnus-digest-show-summary} is non-@code{nil}, a
summary of the digest article is also displayed automatically when Rmail
is invoked.@refill

@node Searching Articles, Referencing Articles, Reading Articles, Subject Commands
@section Searching Articles
@cindex search for articles

@table @kbd
@item s
@kindex s (Subject Mode)
@findex gnus-Subject-isearch-article
Do incremental search on the current article
(@code{gnus-Subject-isearch-article}).@refill

@item M-s @var{regexp} RET
@kindex M-s (Subject Mode)
@findex gnus-Subject-search-article-forward
Search for articles containing a match for @var{regexp} forward
(@code{gnus-Subject-search-article-forward}).  If @var{regexp} is empty,
the last regexp used is used again.@refill

@item M-S @var{regexp} RET
@kindex M-S (Subject Mode)
@findex gnus-Subject-search-article-backward
Search for articles containing a match for @var{regexp} backward
(@code{gnus-Subject-search-article-backward}).  If @var{regexp} is empty,
the last regexp used is used again.@refill

@item & @var{field} RET @var{regexp} RET @var{command} RET
@kindex & (Subject Mode)
@findex gnus-Subject-execute-command
Execute @var{command} on articles containing a match for @var{regexp} in
@var{field} of the headers (@code{gnus-Subject-execute-command}).  If
@var{field} is empty, the entire article is searched for.@refill
@end table

@kindex s (Subject Mode)
@findex gnus-Subject-isearch-article
@kindex M-s (Subject Mode)
@findex gnus-Subject-search-article-forward
@kindex M-S (Subject Mode)
@findex gnus-Subject-search-article-backward
  The command @kbd{s} (@code{gnus-Subject-isearch-article}) does an
incremental search on the current article.  The commands @kbd{M-s} and
@kbd{M-S} (@code{gnus-Subject-search-article-forward} and
@code{gnus-Subject-search-article-backward}) search for articles
containing a match for regexp.  The search starts from the current point
of the current article.@refill

@kindex & (Subject Mode)
@findex gnus-Subject-execute-command
  The command @kbd{&} (@code{gnus-Subject-execute-command})
interactively reads the field name of article headers, regexp, and a
valid command key sequence.  It then searches for articles having a
field that contains a match for the regexp, and then executes the
command specified by the key sequence on them.@refill

@node Referencing Articles, Saving Articles, Searching Articles, Subject Commands
@section Referencing Articles
@cindex refer to articles

@table @kbd
@item ^
@kindex ^ (Subject Mode)
@findex gnus-Subject-refer-parent-article
Refer to parent of the current article
(@code{gnus-Subject-refer-parent-article}).  With a prefix argument, go
back to the child.@refill

@item M-r @var{Message-ID} RET
@kindex M-r (Subject Mode)
@findex gnus-Subject-refer-article
Refer to the article by using the @var{Message-ID}
(@code{gnus-Subject-refer-article}).  With an empty @var{Message-ID}, go
back to the origin.@refill
@end table

@kindex ^ (Subject Mode)
@findex gnus-Subject-refer-parent-article
  The command @kbd{^} (@code{gnus-Subject-refer-parent-article}) refers
to parent article of the current article.  The child article is remembered in
internal history, and it is possible to return to the child by giving a
prefix argument to the command.@refill

@kindex ^ (Subject Mode)
@findex gnus-Subject-refer-parent-article
@kindex M-r (Subject Mode)
@findex gnus-Subject-refer-article
  The commands @kbd{^} and @kbd{M-r}
(@code{gnus-Subject-refer-parent-article} and
@code{gnus-Subject-refer-article}) share the same internal history.  You
can thus go back to a child using the command @kbd{M-r} with an empty
Message-ID.@refill

@kindex g (Subject Mode)
@findex gnus-Subject-show-article
  Type @kbd{g} (@code{gnus-Subject-show-article}) to go back to the
origin from the visited articles directly.@refill

  @xref{Article Commands}, to refer to articles by using Message-IDs
included in the messages.@refill

@node Saving Articles, Sorting Headers, Referencing Articles, Subject Commands
@section Saving Articles
@cindex save articles

@kindex o (Subject Mode)
@findex gnus-Subject-save-article
@findex gnus-Subject-save-in-rmail
@vindex gnus-default-article-saver
@cindex Rmail file
@cindex Unix mailbox
@cindex MH folder
@pindex MH
  GNUS provides four different formats for saving articles: Rmail
format, Unix mailbox format, MH folder, and article format.  If you set
the variable @code{gnus-default-article-saver} to your favorite article
saver, you can save an article using the command @kbd{o}
(@code{gnus-Subject-save-article}) in your favorite format.  The default
saver is the function @code{gnus-Subject-save-in-rmail}.@refill

@table @kbd
@item o
@kindex o (Subject Mode)
@findex gnus-Subject-save-article
Save the current article using the default saver specified by the
variable @code{gnus-default-article-saver}
(@code{gnus-Subject-save-article}).@refill

@item C-o
@itemx M-x gnus-Subject-save-in-mail
@kindex C-o (Subject Mode)
@findex gnus-Subject-save-in-mail
Save the current article in Unix mailbox format.

@item M-x gnus-Subject-save-in-rmail
@findex gnus-Subject-save-in-rmail
Save the current article in Rmail format.

@item M-x gnus-Subject-save-in-folder
@findex gnus-Subject-save-in-folder
Save the current article in an MH folder.

@item M-x gnus-Subject-save-in-file
@findex gnus-Subject-save-in-file
Save the current article in article format.

@item | @var{command} RET
@kindex | (Subject Mode)
@findex gnus-Subject-pipe-output
Send contents of the current article to the @var{command} subprocess
(@code{gnus-Subject-pipe-output}).@refill
@end table

@vindex gnus-save-all-headers
  If the variable @code{gnus-save-all-headers} is non-@code{nil}, all
headers of an article are saved.@refill

@vindex gnus-article-save-directory
@vindex SAVEDIR
@findex gnus-Subject-save-in-mail
@findex gnus-Subject-save-in-rmail
@findex gnus-Subject-save-in-file
  The variable @code{gnus-article-save-directory} specifies a directory
in which articles are saved to by the functions
@code{gnus-Subject-save-in-mail}, @code{gnus-Subject-save-in-rmail}, and
@code{gnus-Subject-save-in-file}.  It is initialized from the
@code{SAVEDIR} environment variable.  The default directory is
@samp{~/News}.@refill

@vindex gnus-mail-save-name
@vindex gnus-rmail-save-name
@vindex gnus-folder-save-name
@vindex gnus-file-save-name
  The variables @code{gnus-mail-save-name}, @code{gnus-rmail-save-name},
@code{gnus-folder-save-name}, and @code{gnus-file-save-name} specify
functions generating default file name to which articles are saved using
@code{gnus-Subject-save-in-mail}, @code{gnus-Subject-save-in-rmail},
@code{gnus-Subject-save-in-folder}, and
@code{gnus-Subject-save-in-file}, respectively.  The function is called
with @var{newsgroup}, @var{headers}, and optional
@var{last-name}.@refill

  @xref{Variables}, for more information on customization.@refill

@node Sorting Headers, Followup and Reply, Saving Articles, Subject Commands
@section Sorting Headers
@cindex sort headers

  The headers listed in the Subject buffer can be sorted by number,
subject, date, or author of articles.  Sorting is stable, so it is
possible to combine them to sort the headers with multiple keys.  To
sort in reverse order, give a prefix argument to the commands.

@table @kbd
@item C-c C-s n
@itemx C-c C-s C-n
@kindex C-c C-s n (Subject Mode)
@kindex C-c C-s C-n (Subject Mode)
@findex gnus-Subject-sort-by-number
Sort the headers by number (@code{gnus-Subject-sort-by-number}).@refill

@item C-c C-s s
@itemx C-c C-s C-s
@kindex C-c C-s s (Subject Mode)
@kindex C-c C-s C-s (Subject Mode)
@findex gnus-Subject-sort-by-subject
Sort the headers by subject
(@code{gnus-Subject-sort-by-subject}).@refill

@item C-c C-s d
@itemx C-c C-s C-d
@kindex C-c C-s d (Subject Mode)
@kindex C-c C-s C-d (Subject Mode)
@findex gnus-Subject-sort-by-date
Sort the headers by date (@code{gnus-Subject-sort-by-date}).

@item C-c C-s a
@itemx C-c C-s C-a
@kindex C-c C-s a (Subject Mode)
@kindex C-c C-s C-a (Subject Mode)
@findex gnus-Subject-sort-by-author
Sort the headers by author (@code{gnus-Subject-sort-by-author}).
@end table

@vindex gnus-Select-group-hook
  It is also possible to sort the headers automatically when a newsgroup
is selected using the hook @code{gnus-Select-group-hook}
(@pxref{Hooks}).@refill

@node Followup and Reply, Exiting Newsgroup, Sorting Headers, Subject Commands
@section Followup and Reply
@cindex followup to article
@cindex reply to article
@cindex cancel article
@cindex post article
@cindex mail

@table @kbd
@item f
@kindex f (Subject Mode)
@findex gnus-Subject-post-reply
Followup to the current article (@code{gnus-Subject-post-reply}).

@item F
@kindex F (Subject Mode)
@findex gnus-Subject-post-reply-with-original
Followup to the current article with the original article
(@code{gnus-Subject-post-reply-with-original}).@refill

@item a
@kindex a (Subject Mode)
@findex gnus-Subject-post-news
Compose a new article (@code{gnus-Subject-post-news}).
@end table

@kindex a (Subject Mode)
@findex gnus-Subject-post-news
@kindex f (Subject Mode)
@findex gnus-Subject-post-reply
@kindex F (Subject Mode)
@findex gnus-Subject-post-reply-with-original
@vindex gnus-interactive-post
@kindex C-c C-y (News Mode)
@findex news-reply-yank-original
  Type @kbd{a} (@code{gnus-Subject-post-news}) to post a new article.
If the variable @code{gnus-interactive-post} is non-@code{nil}, the
newsgroup, subject, and distribution are asked for interactively.  The
command @kbd{f} (@code{gnus-Subject-post-reply}) fills these values in
automatically from those of the original article.  Type @kbd{C-c C-y}
(@code{news-reply-yank-original}) to include the original article.  The
command @kbd{F} (@code{gnus-Subject-post-reply-with-original}) yanks the
original article automatically.  If you want to followup to several
articles in a single article and want to include them in it, type
@kbd{F} for each of them.  You will be asked if a text being edited
should be erased.  You should answer @samp{n} to the question.@refill

@vindex gnus-novice-user
  If the variable @code{gnus-novice-user} is non-@code{nil}, your
confirmations will be required for composing a new article.@refill

@cindex News Mode
@kindex C-h m
@findex describe-mode
  The major mode for composing a new article is @dfn{News Mode} which is
borrowed from @file{rnewspost.el}.  Type @kbd{C-h m}
(@code{describe-mode}) to get more help on News Mode.@refill

@table @kbd
@item C
@kindex C (Subject Mode)
@cindex cancel article
@findex gnus-Subject-cancel-article
Cancel the current article you posted
(@code{gnus-Subject-cancel-article}).@refill
@end table

@kindex C (Subject Mode)
@cindex cancel article
@findex gnus-Subject-cancel-article
  Suppose you post an article and then later realize that you made a
horrible mistake.  You really do not want anyone to see your article.
You want the article to be removed from any machines that it may have
reached.  The command @kbd{C} (@code{gnus-Subject-cancel-article}) is
intended to do this.  First select the offending article as current,
then type @kbd{C}.@refill

@table @kbd
@item r
@kindex r (Subject Mode)
@findex gnus-Subject-mail-reply
Reply to the author of the current article (@code{gnus-Subject-mail-reply}).

@item R
@kindex R (Subject Mode)
@findex gnus-Subject-mail-reply-with-original
Reply to the author of the current article with the original article
(@code{gnus-Subject-mail-reply-with-original}).@refill

@item C-c C-f
@kindex C-c C-f (Subject Mode)
@findex gnus-Subject-mail-forward
Forward the current message to another user.
(@code{gnus-Subject-mail-forward}).@refill

@item m
@kindex m (Subject Mode)
@findex gnus-Subject-mail-other-window
Compose a mail message in other window (@code{gnus-Subject-mail-other-window}).
@end table

@kindex r (Subject Mode)
@findex gnus-Subject-mail-reply
@kindex C-c C-y (Mail Mode)
@kindex C-c C-y (mh-e letter Mode)
@kindex R (Subject Mode)
@findex gnus-Subject-mail-reply-with-original
  Use the command @kbd{r} (@code{gnus-Subject-mail-reply}) to reply to
the author of the article.  Type @kbd{C-c C-y} to include the original
article.  The command @kbd{R}
(@code{gnus-Subject-mail-reply-with-original}) yanks the original
article automatically.@refill

@cindex Mail Mode
@cindex mh-e letter Mode
@cindex mh-e
@cindex MH
@pindex mh-e
@vindex gnus-mail-reply-method
@vindex gnus-mail-forward-method
@vindex gnus-mail-other-window-method
@findex gnus-mail-reply-using-mhe
@findex gnus-mail-other-window-using-mhe
  When composing a mail message, the message composer (or mailer) is
selected by the values of the variables @code{gnus-mail-reply-method},
@code{gnus-mail-forward-method}, and
@code{gnus-mail-other-window-method}.  These are defaulted to use Mail
Mode.  If you want to use mh-e letter Mode instead of it, set the
variable @code{gnus-mail-reply-method} to
@code{gnus-mail-reply-using-mhe}, variable
@code{gnus-mail-forward-method} to @code{gnus-mail-forward-using-mhe},
and the variable @code{gnus-mail-other-window-method} to
@code{gnus-mail-other-window-using-mhe}.  It is possible to use other
mailers by customizing these variables.  @inforef{Mail Mode, Mail Mode,
emacs}, for more information on Mail Mode.@refill

@node Exiting Newsgroup, Other Subject Commands, Followup and Reply, Subject Commands
@section Exiting the Current Newsgroup

@table @kbd
@item q
@kindex q (Subject Mode)
@findex gnus-Subject-exit
Exit the current newsgroup, and return to Group Mode
(@code{gnus-Subject-exit}).@refill

@item Q
@kindex Q (Subject Mode)
@findex gnus-Subject-quit
Exit the current newsgroup without recording unread articles information
(@code{gnus-Subject-quit}).@refill

@item c
@itemx M-x gnus-Subject-catch-up-and-exit
@kindex c (Subject Mode)
@findex gnus-Subject-catch-up-and-exit
@cindex catch up
Mark all articles, which are not marked as unread, as read, then exit
the current newsgroup.@refill

@item M-x gnus-Subject-catch-up-all-and-exit
@kindex c (Subject Mode)
@findex gnus-Subject-catch-up-all-and-exit
@cindex catch up
Mark all articles as read, then exit the current newsgroup.@refill

@item G
@kindex G (Subject Mode)
@findex gnus-Subject-reselect-current-group
Record unread articles information, then reselect the current newsgroup
(@code{gnus-Subject-reselect-current-group}).@refill

@item M-x gnus-Subject-next-group
@findex gnus-Subject-next-group
Record unread articles information, then select the next newsgroup
containing unread articles.@refill

@item M-x gnus-Subject-prev-group
@findex gnus-Subject-prev-group
Record unread articles information, then select the previous newsgroup
containing unread articles.@refill
@end table

@kindex G (Subject Mode)
@findex gnus-Subject-reselect-current-group
  The command @kbd{G} (@code{gnus-Subject-reselect-current-group})
selects the current newsgroup again after temporary exiting the
newsgroup.  If no articles remain unread, all articles in the newsgroup
will be selected.  A prefix argument to the command means to select all
articles in the newsgroup.@refill

@node Other Subject Commands,, Exiting Newsgroup, Subject Commands
@section Miscellaneous Commands

  Other miscellaneous commands are described here.

@table @kbd
@item M-k
@kindex M-k (Subject Mode)
@findex gnus-Subject-edit-local-kill
@cindex edit local KILL file
Edit a local KILL file applied to the current newsgroup
(@code{gnus-Subject-edit-local-kill}).  @xref{KILL File}, for more
information.@refill

@item M-K
@kindex M-K (Subject Mode)
@findex gnus-Subject-edit-global-kill
@cindex edit global KILL file
Edit a global KILL file applied to all newsgroups
(@code{gnus-Subject-edit-local-kill}).  @xref{KILL File}, for more
information.@refill

@item V
@kindex V (Subject Mode)
@findex gnus-version
@cindex version number of GNUS
@cindex GNUS version number
Print the version number of this GNUS (@code{gnus-version}).

@item ?
@kindex ? (Subject Mode)
@findex gnus-Subject-describe-briefly
@cindex brief help message
@cindex help briefly
Describe Subject Mode commands briefly
(@code{gnus-Subject-describe-briefly}).@refill

@item C-c C-i
@kindex C-c C-i (Subject Mode)
@findex gnus-Info-find-node
@cindex read Info file
@cindex Info
Read Info on Subject Mode (@code{gnus-Info-find-node}).
@xref{Texinfo Manual}, to prepare an Info file of GNUS.@refill
@end table

@node Article Commands, KILL File, Subject Commands, Top
@chapter Article Commands

  In the Article buffer the following commands are available:

@table @kbd
@item SPC
@kindex SPC (Article Mode)
@findex gnus-Article-next-page
Scroll text of the current window (@code{gnus-Article-next-page}).

@item DEL
@kindex DEL (Article Mode)
@findex gnus-Article-prev-page
Scroll text of the current window (@code{gnus-Article-prev-page}).

@item r
@kindex r (Article Mode)
@findex gnus-Article-refer-article
Refer to article specified by the Message-ID close to the point
(@code{gnus-Article-refer-article}).@refill

@item o
@kindex o (Article Mode)
@findex gnus-Article-pop-article
Return to the previous article from the referenced article
(@code{gnus-Article-pop-article}).@refill

@item h
@itemx s
@kindex h (Article Mode)
@kindex s (Article Mode)
@findex gnus-Article-show-subjects
Reconfigure Emacs windows to show the Subject buffer above the Article
buffer and move the point to the Subject buffer
(@code{gnus-Article-show-subjects}).@refill

@item ?
@kindex ? (Article Mode)
@findex gnus-Article-describe-briefly
@cindex brief help message
@cindex help briefly
Describe Article Mode commands briefly
(@code{gnus-Article-describe-briefly}).@refill

@item C-c C-i
@kindex C-c C-i (Article Mode)
@findex gnus-Info-find-node
@cindex read Info file
@cindex Info
Read Info on Article Mode (@code{gnus-Info-find-node}).
@xref{Texinfo Manual}, to prepare an Info file of GNUS.@refill
@end table

@kindex r (Article Mode)
@findex gnus-Article-refer-article
@kindex o (Article Mode)
@findex gnus-Article-pop-article
  The command @kbd{r} (@code{gnus-Article-refer-article}) searches for
the Message-ID around the point, and refers to the article specified by
it if found.  Use the command @kbd{o} (@code{gnus-Article-pop-article})
to return to the previous article.  @xref{Referencing Articles}, for
referencing parent articles easily.@refill

@node KILL File, Customization, Article Commands, Top
@chapter KILL File
@cindex KILL file

@ifinfo
  The purpose of a KILL file and its usage are described here.
@end ifinfo

@menu
* What KILL Files Do::          An introduction to a KILL file.
* Making a KILL File::          How to make a KILL file.
* Editing KILL Files::          How to edit KILL files.
* Example of a KILL File::      An example of a KILL file.

* Background Kills::            Background kill processing.
* Advanced Kills::              Advanced kill processing.
@end menu

@node What KILL Files Do, Making a KILL File, KILL File, KILL File
@section What KILL Files Do

  A @dfn{KILL} file contains lisp expressions to be applied to a
selected newsgroup.  The purpose is to mark articles as read on the
basis of some set of regexps.@refill

@cindex global KILL file
@cindex local KILL file
  There are two kinds of KILL files, global and local.  A global KILL
file is applied to every newsgroup, and a local KILL file to a specified
newsgroup.  Since a global KILL file is applied to every newsgroup, for
better performance use a local one.@refill

@node Making a KILL File, Editing KILL Files, What KILL Files Do, KILL File
@section Making a KILL File

  A KILL file can contain any kind of Emacs lisp expressions expected to
be evaluated in the Subject buffer.  Writing lisp programs for this
purpose is not easy because the internal working of GNUS must be
well-known.  For this reason, GNUS provides a general function which does
this easily for non-lisp programmers.@refill

@example
(gnus-kill @var{field} @var{regexp} &optional @var{command} @var{all})
@end example

@findex gnus-kill
@findex gnus-Subject-mark-as-read
@noindent
The @code{gnus-kill} function executes commands available in Subject
Mode by their key sequences.  @code{gnus-kill} must be called with
@var{field}, @var{regexp}, and optional @var{command} and @var{all}.
@var{Field} is a string representing the header field or an empty
string.  If @var{field} is an empty string, the entire article body is
searched for.  @var{Regexp} is a string which is compared with
@var{field} value.  @var{Command} is a string representing a valid key
sequence in Subject Mode or a lisp expression.  @var{Command} is default
to @code{(gnus-Subject-mark-as-read nil "X")}.  Make sure that
@var{command} is executed in the Subject buffer.  If the second optional
argument @var{all} is non-@code{nil}, the @var{command} is applied to
articles which are already marked as read or unread.  Articles which are
marked are skipped over by default.@refill

  For example, if you want to mark articles of which subjects contain
the string @samp{AI} as read, a possible KILL file may look like:@refill

@example
(gnus-kill "Subject" "AI")
@end example

  If you want to mark articles with @samp{D} instead of @samp{X}, you
can use the following expression:@refill

@example
(gnus-kill "Subject" "AI" "d")
@end example

@findex gnus-Subject-mark-as-read-forward
@noindent
In this example it is assumed that the command
@code{gnus-Subject-mark-as-read-forward} is assigned to @kbd{d} in
Subject Mode.@refill

  It is possible to delete unnecessary headers which are marked with
@samp{X} in a KILL file by using the function @code{gnus-expunge} as
follows:@refill

@findex gnus-expunge
@example
(gnus-expunge "X")
@end example

  If the Subject buffer is empty after applying KILL files, GNUS will
exit the selected newsgroup normally.  If headers which are marked with
@samp{D} are deleted in a KILL file, it is impossible to read articles
which are marked as read in the previous GNUS sessions.  Marks other
than @samp{D} should be used for articles which should really be
deleted.@refill

@vindex case-fold-search
@cindex case of text
  All sorts of searches in Subject Mode normally ignore the case of the
text they are searching through.  If you do not want to ignore the case,
set the variable @code{case-fold-search} to @code{nil}.@refill

@node Editing KILL Files, Example of a KILL File, Making a KILL File, KILL File
@section Editing KILL Files
@cindex edit local KILL file
@cindex edit global KILL file

@kindex M-K (Group Mode)
@findex gnus-Group-edit-global-kill
@kindex M-K (Subject Mode)
@findex gnus-Subject-edit-global-kill
@vindex gnus-article-save-directory
@vindex gnus-kill-file-name
  The command @kbd{M-K} in Subject Mode and Group Mode
(@code{gnus-Subject-edit-global-kill} and
@code{gnus-Group-edit-global-kill}) pops up an Emacs buffer for editing
a global KILL file.  A global KILL file is created in the directory
specified by the variable @code{gnus-article-save-directory} (default to
@file{~/News}), and its file name is specified by the variable
@code{gnus-kill-file-name} (default to @file{KILL}).@refill

@kindex M-k (Subject Mode)
@findex gnus-Subject-edit-local-kill
@kindex M-k (Group Mode)
@findex gnus-Group-edit-local-kill
@vindex gnus-article-save-directory
@vindex gnus-use-long-file-name
  The command @kbd{M-k} in Subject Mode and Group Mode
(@code{gnus-Subject-edit-local-kill} and
@code{gnus-Group-edit-local-kill}) pops up an Emacs buffer for editing a
local KILL file.  A local KILL file for a newsgroup @var{news.group} is
created as @file{@var{news.group}.KILL} in the directory specified by
the variable @code{gnus-article-save-directory} if the variable
@code{gnus-use-long-file-name} is non-@code{nil}.  Otherwise, if the
variable @code{gnus-use-long-file-name} is @code{nil}, the file is
created as @file{@var{news}/@var{group}/KILL} under the same
directory.@refill

@cindex KILL-File Mode
@cindex Emacs-Lisp Mode
  The major mode of these buffers is @dfn{KILL-File Mode}.  This mode is
specialized for editing Emacs lisp programs the same as Emacs-Lisp Mode.
In addition to Emacs-Lisp Mode, the following commands are
available:@refill

@table @kbd
@item C-c C-k C-s
@kindex C-c C-k C-s (KILL-File Mode)
@findex gnus-Kill-file-kill-by-subject
Insert a template of a kill command on subject
(@code{gnus-Kill-file-kill-by-subject}).@refill

@item C-c C-k C-a
@kindex C-c C-k C-a (KILL-File Mode)
@findex gnus-Kill-file-kill-by-author
Insert a template of a kill command on author
(@code{gnus-Kill-file-kill-by-author}).@refill

@item C-c C-a
@kindex C-c C-a (KILL-File Mode)
@findex gnus-Kill-file-apply-buffer
Apply current buffer being edited to selected newsgroup
(@code{gnus-Kill-file-apply-buffer}).@refill

@item C-c C-e
@kindex C-c C-e (KILL-File Mode)
@findex gnus-Kill-file-apply-last-sexp
Apply sexp before point in current buffer to selected newsgroup
(@code{gnus-Kill-file-apply-last-sexp}).@refill

@item C-c C-c
@kindex C-c C-c (KILL-File Mode)
@findex gnus-Kill-file-exit
Save the KILL file and then return to the previous buffer
(@code{gnus-Kill-file-exit}).@refill

@item C-c C-i
@kindex C-c C-i (KILL-File Mode)
@findex gnus-Info-find-node
@cindex read Info file
@cindex Info
Read Info on KILL file (@code{gnus-Info-find-node}).
@xref{Texinfo Manual}, to prepare an Info file of GNUS.@refill
@end table

@kindex C-c C-k C-s (KILL-File Mode)
@kindex C-c C-k C-a (KILL-File Mode)
@findex gnus-Kill-file-kill-by-subject
@findex gnus-Kill-file-kill-by-author
  If KILL-File Mode is invoked from Subject Mode by the command
@code{gnus-Subject-edit-local-kill} or
@code{gnus-Subject-edit-global-kill}, the commands @kbd{C-c C-k C-s} and
@kbd{C-c C-k C-a} (@code{gnus-Kill-file-kill-by-subject} and
@code{gnus-Kill-file-kill-by-author}) insert a kill command on the
subject and author of an article where the point is on, respectively.
Otherwise, a template of a kill command is inserted.@refill

@kindex C-c C-a (KILL-File Mode)
@kindex C-c C-e (KILL-File Mode)
@findex gnus-Kill-file-apply-buffer
@findex gnus-Kill-file-apply-last-sexp
  The commands @kbd{C-c C-a} and @kbd{C-c C-e}
(@code{gnus-Kill-file-apply-buffer} and
@code{gnus-Kill-file-apply-last-sexp}) can be used to test kill commands
being edited in current buffer.  The kill commands are applied to
current newsgroup.@refill

@node Example of a KILL File, Background Kills, Editing KILL Files, KILL File
@section Example of a KILL File
@cindex KILL file examples
@cindex example of a KILL file

  The following is an example of a local KILL file for newsgroup
@samp{control}.  This is currently being used by the author.@refill

@vindex gnus-nntp-server
@findex gnus-kill
@findex gnus-expunge
@example
;; Apply to the newsgroup `control' if the NNTP server is flab.
(if (string-equal gnus-nntp-server "flab")
    (progn
      (gnus-kill "Subject" "ihave flab\\|sendme")
      (gnus-kill "Subject" "cancel\\|newgroup\\|rmgroup" "d")
      (gnus-expunge "X")))
@end example

@node Background Kills, Advanced Kills, Example of a KILL File, KILL File
@section Background Kill Processing
@cindex batch kill processing

  Kill processing may take long time.  If it becomes terribly
frustrating, try background kill processing using the following shell
command:

@findex gnus-batch-kill
@example
emacs -batch -l gnus -f gnus-batch-kill @var{NEWSGROUPS}
@end example

@noindent
where @var{NEWSGROUPS} argument is newsgroup names separated by either
white spaces or a comma.  @samp{!} preceding a newsgroup name means
negation, and @samp{all} matches anything else.  These interpretations
are the same as the options line of the startup file (@pxref{Startup
File}).@refill

@node Advanced Kills,, Background Kills, KILL File
@section Advanced Kill Processing

@findex gnus-apply-kill-file
@vindex gnus-Apply-kill-hook
  Internally, applying kills means to run the hook
@code{gnus-Apply-kill-hook}.  It is called after the Subject buffer is
prepared for a selected newsgroup.  The default hook is the function
@code{gnus-apply-kill-file} which loads a global KILL file and a local
KILL file in this order.  A different style of the kill processing can
be implemented by customizing this hook.@refill

  For example, if you think a global KILL file is unnecessary, you can
use the following hook which applies only a local KILL file.  This
change can save the time for checking the existence of a global KILL
file.@refill

@vindex gnus-Apply-kill-hook
@vindex gnus-newsgroup-name (Internal)
@findex gnus-newsgroup-kill-file
@example
(setq gnus-Apply-kill-hook
      (function
       (lambda ()
         ;; Apply a local KILL file.
         (load (gnus-newsgroup-kill-file gnus-newsgroup-name) t nil t))))
@end example

  On the contrary, the following example enables only a global KILL
file.@refill

@vindex gnus-Apply-kill-hook
@findex gnus-newsgroup-kill-file
@example
(setq gnus-Apply-kill-hook
      (function
       (lambda ()
         ;; Apply a global KILL file.
         (load (gnus-newsgroup-kill-file nil) t nil t))))
@end example

  Here is an advanced example that drastically reduces the time for
applying KILL files.  This hook does the kill processing directly
without loading the KILL files.@refill

@vindex gnus-nntp-server
@vindex gnus-newsgroup-name (Internal)
@findex gnus-kill
@findex gnus-expunge
@example
(setq gnus-Apply-kill-hook
      (function
       (lambda ()
         ;; Apply to the newsgroup `control'
         ;; if the NNTP server is flab.
         (and (string-equal gnus-nntp-server "flab")
              (string-equal gnus-newsgroup-name "control")
              (progn
                (gnus-kill "Subject" "ihave flab\\|sendme")
                (gnus-kill "Subject" "cancel\\|newgroup\\|rmgroup" "d")
                (gnus-expunge "X"))))))
@end example

@node Customization, Problems, KILL File, Top
@appendix Customizing GNUS

  Appendix A describes the variables and hooks for simple customization
and the variables for localization.

@menu
* Variables::           Variables for customizing GNUS.

* NNTP Variables::      Variables for localizing NNTP environment.
* Spool Variables::     Variables for localizing news spool environment.
* Directory Variables:: Variables for localizing private directory environment.

* Hooks::               Function hooks for customizing GNUS.
@end menu

@node Variables, NNTP Variables, Customization, Customization
@appendixsec Common Variables

@table @code
@vindex gnus-nntp-server
@vindex NNTPSERVER
@cindex NNTP server
@item gnus-nntp-server

@cindex private directory
Specifies the name of the host running the NNTP server.  The variable is
initialized from the @code{NNTPSERVER} environment variable.  If the
server name is preceded by a colon such as @samp{:Mail}, the user's
private directory @file{~/Mail} is used as a news spool.  @xref{NNTP
Server}, and @pxref{Private Directory}, for more information.@refill

@vindex gnus-nntp-service
@cindex NNTP service
@item gnus-nntp-service

Specifies a service name of NNTP, usually a string @code{"nntp"}.  In a
few instances, it must be the number @code{119}.  To use a local news
spool of your machine rather than NNTP, set the variable to @code{nil}.
@xref{NNTP Service}, and @pxref{Local News Spool}, for more
information.@refill

@vindex gnus-local-domain
@vindex DOMAINNAME
@findex system-name
@cindex domain
@item gnus-local-domain

Specifies the domain which is the domain part of your mail address
excluding the local host name of your machine.  The environment variable
@code{DOMAINNAME} is used instead if defined.  If the function
@code{system-name} returns the full Internet name, there is no need to
define the domain.  @xref{Domain,, Domain and Organization}, for more
information.@refill

@vindex gnus-local-organization
@vindex ORGANIZATION
@cindex organization
@item gnus-local-organization

Specifies the organization you belong to.  The environment variable
@code{ORGANIZATION} is used instead if defined.  If the value begins
with a slash, it is taken as the name of a file whose contents are read
for the value.  @xref{Domain,, Domain and Organization}, for more
information.@refill

@cindex time zone
@cindex Date field
@cindex RFC822
@pindex inews
@pindex timezone.el
@pindex Bnews
@pindex Cnews
@vindex gnus-local-timezone
@vindex gnus-news-system
@item gnus-local-timezone

Specifies the local time zone you belong to.  The value can be either a
time zone name such as @samp{"JST"} or a difference in hour from GMT
such as @samp{+0900}.  If the variable is non-@code{nil}, a general time
zone handling package @file{timezone.el} is used to generate a valid
date for @samp{Date:} field in terms of RFC822.  Otherwise, if it is
nil, GNUS generate a date ignoring the local time zone.  If you are
using Bnews, it is okay since @file{inews} will rewrite the invalid
date.  However, if you are using Cnews, you must set the variable to the
correct time zone or set the variable @code{gnus-news-system} to
@samp{Cnews} since @file{inews} of Cnews does not rewrite the wrong
@samp{Date:} field.@refill

@vindex gnus-use-generic-from
@vindex gnus-local-domain
@vindex DOMAINNAME
@cindex GENERICFROM
@cindex From field
@item gnus-use-generic-from

Non-@code{nil} means the local host name of your machine will not appear
in the @samp{From:} field of article headers.  If the variable is a
string, it is used as your domain instead of the definition by the
variable @code{gnus-local-domain} or the environment variable
@code{DOMAINNAME}.  @xref{GENERICFROM}, for more information.@refill

@vindex gnus-use-generic-path
@cindex GENERICPATH
@cindex Path field
@item gnus-use-generic-path

Non-@code{nil} means the NNTP server name will not appear in the
@samp{Path:} field of article headers.  If the variable is a string, it
is used in the @samp{Path:} field as the NNTP server name instead of the
definition by the variable @code{gnus-nntp-server}.  @xref{GENERICPATH},
for more information.@refill

@pindex Bnews
@pindex Cnews
@vindex gnus-news-system
@item gnus-news-system

Specifies news software system name of the news server, such as Bnews
and Cnews.  It is intended to hide implementation dependent differences
between news systems.  Current version understands @samp{Bnews} and
@samp{Cnews}.@refill

@vindex gnus-startup-file
@cindex startup file
@cindex .newsrc
@pindex Bnews
@item gnus-startup-file

Specifies a startup file of the Bnews system, usually @file{.newsrc}.
If there is a file named @file{.newsrc-@var{server}}, it is used instead
when talking to @var{server}.  @xref{Startup File}, for more
information.@refill

@vindex gnus-signature-file
@cindex .signature
@cindex signature
@pindex Bnews
@item gnus-signature-file

Specifies a signature file of the Bnews system, usually
@file{.signature}.  If there is a file named
@file{.signature-@var{distribution}}, it is used instead when posting an
article in @var{distribution}.  Set the variable to @code{nil} to
prevent appending the signature file automatically.@refill

@vindex gnus-use-cross-reference
@cindex cross-references
@cindex Xref field
@item gnus-use-cross-reference

Specifies what to do with cross references (@samp{Xref:} field).  If it
is @code{nil}, cross references are ignored.  If it is @code{t},
articles in subscribed newsgroups are only marked as read.  Otherwise,
if it is not @code{nil} nor @code{t}, articles in all newsgroups are
marked as read.@refill

@vindex gnus-use-followup-to
@cindex followup to article
@cindex reply to article
@cindex mail
@cindex Followup-To field
@item gnus-use-followup-to

Specifies what to do with @samp{Followup-To:} field.  If it is
@code{nil}, its value is ignored.  If it is non-@code{nil}, its value is
used as followup newsgroups.  Especially, if it is @code{t} and you are
going to followup to an article in which @code{poster} is specified,
your confirmation is required.@refill

@vindex gnus-use-full-window
@cindex full window
@cindex entire screen
@cindex window configuration
@item gnus-use-full-window

Non-@code{nil} means to take up the entire screen of Emacs.  If the
variable is @code{nil}, the windows used by GNUS will be restricted to
the bounds of the original window.  This is very useful if you want to
read articles while you do other work in other windows.@refill

@vindex gnus-window-configuration
@cindex window configuration
@cindex configure windows
@cindex slow terminal
@item gnus-window-configuration

Specifies the configuration of the Group Mode window, the Subject Mode
window, and the Article Mode window.  The window configuration can be
specified for each action of GNUS (e.g. selecting a newsgroup or
selecting an article).  This is quite useful if you are using a slow
terminal since the update of Emacs windows can be minimized by
displaying these three windows same time.@refill

The variable must be a list of @samp{(@var{action} (@var{g} @var{s}
@var{a}))}, where @var{action} is an action being performed, and
@var{g}, @var{s}, and @var{a} are the relative heights of the Group Mode
window, the Subject Mode window, and the Article Mode window,
respectively.  @var{Action} is @samp{SelectNewsgroup},
@samp{ExitNewsgroup}, @samp{SelectArticle}, or
@samp{ExpandSubject}.@refill

The following example is the default window configuration:

@example
(setq gnus-window-configuration
      '((SelectNewsgroup (0 1 0))
        (ExitNewsgroup   (1 0 0))
        (SelectArticle   (0 3 10))
        (ExpandSubject   (0 1 0))))
@end example

The following is an example of yet another two windows mode.  Article
buffer is always displayed on a screen.  This is useful on a slow
terminal.

@example
(setq gnus-window-configuration
      '((SelectNewsgroup (0 1 0))
        (ExitNewsgroup   (1 0 3))
        (SelectArticle   (0 1 3))
        (ExpandSubject   (0 1 0))))
@end example

The following is an example of three windows mode.  Three buffers are
always displayed on a screen.  This is also useful on a slow terminal.

@example
(setq gnus-window-configuration
      '((SelectNewsgroup (1 4 0))
        (ExitNewsgroup   (1 1 3))
        (SelectArticle   (1 1 3))
        (ExpandSubject   (1 4 0))))
@end example

@vindex gnus-large-newsgroup
@cindex large newsgroup
@item gnus-large-newsgroup

Specifies the number of the articles which indicates a large newsgroup.
If the number of articles in a newsgroup is greater than this value, the
number of articles to be selected is asked for.  If the given value
@var{n} is positive, the last @var{n} articles are selected.  If @var{n}
is negative, the first @var{n} articles are selected.  An empty string
means to select all articles.@refill

@vindex gnus-author-copy
@vindex AUTHORCOPY
@cindex post article
@item gnus-author-copy

@cindex FCC field
Specifies a file name saving a copy of an article posted using
@samp{FCC:} field.  The variable is initialized from the
@code{AUTHORCOPY} environment variable.  The specified file name is
inserted in @samp{FCC:} field, so you have a chance to change the file
name or disable saving a copy by editing this field.@refill

@vindex gnus-author-copy-saver
@findex rmail-output
@cindex Unix mailbox
@cindex MH folder
@pindex MH
If the first character of the value is not @code{`|'}, the article is
saved to the specified file using the function specified by the variable
@code{gnus-author-copy-saver}.  The default function @code{rmail-output}
saves in Unix mailbox format.  Instead, if the first character is
@code{`|'}, the contents of the article is send to a program specified
by the rest of the value.  For example, articles can be saved in an MH
folder by the following:@refill

@pindex rcvstore
@example
(setq gnus-author-copy 
      "|/usr/local/lib/mh/rcvstore +Article")
@end example

@vindex gnus-author-copy-saver
@item gnus-author-copy-saver

@cindex Unix mailbox
@findex rmail-output
Specifies a function to save an author copy to.  The function is called
with a file name to save a copy to.  The default function
@code{rmail-output} saves in Unix mailbox format.@refill

@vindex gnus-use-long-file-name
@item gnus-use-long-file-name

Non-@code{nil} means that a newsgroup name is used as a default file
name to save articles to.  If it is @code{nil}, the directory form of a
newsgroup name is used instead.  It is set to nil by default if the
variable @code{system-type} is either @samp{usg-unix-v} or
@samp{xenix}.@refill

@vindex gnus-mail-save-name
@vindex gnus-rmail-save-name
@vindex gnus-folder-save-name
@vindex gnus-file-save-name
@cindex save articles
@item gnus-mail-save-name
@itemx gnus-rmail-save-name
@itemx gnus-folder-save-name
@itemx gnus-file-save-name

@findex nntp-header-@var{field}
@findex gnus-header-@var{field}
Specifies a function generating a file name to save articles to.  The
function is called with @var{newsgroup}, @var{headers}, and optional
@var{last-name}.  @var{Newsgroup} is a string representing the current
newsgroup name.  @var{Headers} is a vector containing headers of the
current article.  Macros and functions accessing contents of the
@var{headers} are defined as @code{nntp-header-@var{field}} and
@code{gnus-header-@var{field}}, respectively.  The following functions
are provided as file name generators by default:@refill

@vindex gnus-use-long-file-name
@table @code
@item gnus-numeric-save-name
@findex gnus-numeric-save-name
Return a file name like @samp{@var{news.group/number}} or
@samp{@var{news/group/number}} according to the variable
@code{gnus-use-long-file-name}.@refill

@item gnus-Numeric-save-name
@findex gnus-Numeric-save-name
Return a file name like @samp{@var{News.group/number}} or
@samp{@var{news/group/number}} according to the variable
@code{gnus-use-long-file-name}.@refill

@item gnus-plain-save-name
@findex gnus-plain-save-name
Return a file name like @samp{@var{news.group}} or
@samp{@var{news/group}/news} according to the variable
@code{gnus-use-long-file-name}.@refill

@item gnus-Plain-save-name
@findex gnus-Plain-save-name
Return a file name like @samp{@var{News.group}} or
@samp{@var{news/group}/news} according to the variable
@code{gnus-use-long-file-name}.@refill

@item gnus-folder-save-name
@findex gnus-folder-save-name
Return a folder name like @samp{+@var{news.group}} or
@samp{+@var{news/group}} according to the variable
@code{gnus-use-long-file-name}.@refill

@item gnus-Folder-save-name
@findex gnus-Folder-save-name
Return a folder name like @samp{+@var{News.group}} or
@samp{+@var{news/group}} according to the variable
@code{gnus-use-long-file-name}.@refill
@end table

@vindex gnus-default-article-saver
@cindex save articles
@item gnus-default-article-saver

@findex gnus-Subject-save-article
Specifies a function to save articles in your favorite format using the
command @code{gnus-Subject-save-article}.  The function must be
interactively funcallable.  In other words, it must be an Emacs command.
The functions currently provided are as follows:@refill

@table @code
@item gnus-Subject-save-in-mail
@findex gnus-Subject-save-in-mail
@cindex Unix mailbox
Save articles in Unix mailbox format.

@item gnus-Subject-save-in-rmail
@findex gnus-Subject-save-in-rmail
@cindex Rmail file
Save articles in Rmail format.

@item gnus-Subject-save-in-folder
@findex gnus-Subject-save-in-folder
@cindex MH folder
@pindex MH
Save articles in an MH folder.

@item gnus-Subject-save-in-file
@findex gnus-Subject-save-in-file
Save articles in article format.
@end table

@vindex gnus-article-save-directory
@vindex SAVEDIR
@findex gnus-Subject-save-in-mail
@findex gnus-Subject-save-in-rmail
@findex gnus-Subject-save-in-file
@cindex save articles
@item gnus-article-save-directory

Specifies a directory name to save articles in using the commands
@code{gnus-Subject-save-in-mail}, @code{gnus-Subject-save-in-rmail}, and
@code{gnus-Subject-save-in-file}.  The variable is initialized from the
@code{SAVEDIR} environment variable.  Its default value is
@file{~/News}.@refill

@vindex gnus-kill-file-name
@cindex KILL file
@item gnus-kill-file-name

Specifies a file name of KILL file (@pxref{KILL File}).  Its default
value is @file{KILL}.@refill

@vindex gnus-default-distribution
@cindex distribution
@item gnus-default-distribution

Specifies a distribution inserted automatically when no distribution is
specified.

@vindex gnus-novice-user
@item gnus-novice-user

Non-@code{nil} means you are a novice to USENET.  If it is
non-@code{nil}, verbose messages may be displayed or your confirmations
may be required.@refill

@vindex gnus-interactive-post
@item gnus-interactive-post

Non-@code{nil} means that newsgroup, subject, and distribution are asked
for interactively when composing a new article.@refill

@vindex gnus-user-login-name
@vindex USER
@vindex LOGNAME
@cindex login name
@item gnus-user-login-name

Specifies your login name.  The login name is got from the @code{USER}
and @code{LOGNAME} environment variables and the function
@code{user-login-name}, if undefined.@refill

@vindex gnus-user-full-name
@vindex NAME
@cindex user full name
@cindex full name of user
@item gnus-user-full-name

Specifies your full name.  The full name is got from the @code{NAME}
environment variable and the function @code{user-full-name}, if
undefined.@refill

@vindex gnus-show-all-headers
@item gnus-show-all-headers

Non-@code{nil} means all headers of an article are shown.

@vindex gnus-save-all-headers
@cindex save articles
@item gnus-save-all-headers

Non-@code{nil} means all headers of an article are saved in a file.

@vindex gnus-show-threads
@cindex threads
@cindex conversation threads
@cindex Subject Mode
@item gnus-show-threads

Non-@code{nil} means conversation threads are displayed in a tree
structured form according to references in Subject Mode.@refill

@vindex gnus-thread-hide-subject
@cindex threads
@cindex conversation threads
@item gnus-thread-hide-subject

Non-@code{nil} means subjects of lower level threads are hidden if the
thread-based reading is turned on.@refill

@vindex gnus-thread-hide-subtree
@cindex threads
@cindex conversation threads
@item gnus-thread-hide-subtree

@findex gnus-Subject-show-thread
@vindex gnus-Select-article-hook
Non-@code{nil} means thread subtrees are hidden initially.  If thread
subtrees are hidden, you have to run the command
@code{gnus-Subject-show-thread} by hand or by using
@code{gnus-Select-article-hook} to show them.@refill

@vindex gnus-thread-hide-killed
@cindex threads
@cindex conversation threads
@item gnus-thread-hide-killed

Non-@code{nil} means killed thread subtrees are hidden
automatically.@refill

@vindex gnus-thread-ignore-subject
@cindex threads
@cindex conversation threads
@item gnus-thread-ignore-subject

Non-@code{nil} means subject differences are ignored but only references
are taken into account in constructing threads trees.  If it is
non-@code{nil} and thread subtrees are hidden, some commands work with
subjects may not work properly.@refill

@vindex gnus-thread-indent-level
@cindex threads
@cindex conversation threads
@cindex indentation
@item gnus-thread-indent-level

Specifies indentation level of thread subtrees.

@vindex gnus-auto-extend-newsgroup
@item gnus-auto-extend-newsgroup

@kindex N (Subject Mode)
@findex gnus-Subject-next-article
@kindex P (Subject Mode)
@findex gnus-Subject-prev-article
Non-@code{nil} means visible articles are automatically extended to
forward and backward if possible when the commands @kbd{N} and @kbd{P}
(@code{gnus-Subject-next-article} and @code{gnus-Subject-prev-article})
are executed in Subject Mode.@refill

@vindex gnus-auto-select-first
@item gnus-auto-select-first

Non-@code{nil} means the first unread article is selected automatically
when a newsgroup is selected.  If you'd like to prevent automatic
selection of the first unread article in some newsgroups, set the
variable to @code{nil} in the hook @code{gnus-Select-group-hook} or
@code{gnus-Apply-kill-hook} (@pxref{Hooks}).@refill

@vindex gnus-auto-select-next
@item gnus-auto-select-next

Non-@code{nil} means the next newsgroup is selected automatically at the
end of the newsgroup.  If the value is @code{t} and the next newsgroup is
empty (no unread articles), GNUS will exit Subject Mode and go back to
Group Mode.  If the value is neither @code{nil} nor @code{t}, GNUS won't
exit Subject Mode but will select the following unread newsgroup.  If
the value is @samp{quietly}, the next unread newsgroup will be selected
without any confirmations.@refill

@vindex gnus-auto-select-same
@item gnus-auto-select-same

@pindex rn
Non-@code{nil} means an article with the same subject as the current
article is selected automatically like @samp{rn -S}.@refill

@vindex gnus-auto-center-subject
@item gnus-auto-center-subject

Non-@code{nil} means that the cursor is always kept centered in the
Subject Mode window.@refill

@vindex gnus-break-pages
@vindex gnus-page-delimiter
@cindex page break
@cindex break into pages
@item gnus-break-pages

Non-@code{nil} means an article is broken into pages at page delimiters.
The page delimiter is specified by the variable
@code{gnus-page-delimiter}.  This may not work with some versions of GNU
Emacs earlier than version 18.50.@refill

@vindex gnus-page-delimiter
@cindex page break
@cindex break into pages
@item gnus-page-delimiter

Specifies regexp describing line-beginnings that separate pages of
articles.  Its default value is @code{"^\^L"}.@refill

@vindex gnus-digest-show-summary
@cindex Rmail
@cindex digest summary
@cindex summary of digest
@item gnus-digest-show-summary

@findex gnus-Subject-rmail-digest
Non-@code{nil} means that a summary of digest messages is shown when
reading a digest article using the command
@code{gnus-Subject-rmail-digest}.@refill

@vindex gnus-digest-separator
@cindex digest separator
@item gnus-digest-separator

@findex gnus-Subject-next-digest
@findex gnus-Subject-prev-digest
@findex gnus-Subject-rmail-digest
Specifies a regexp which separates messages in a digest article.
Changes to this variable only affect the commands
@code{gnus-Subject-next-digest} and @code{gnus-Subject-prev-digest}, but
not the command @code{gnus-Subject-rmail-digest}.@refill

@vindex gnus-optional-headers
@item gnus-optional-headers

@findex nntp-header-@var{field}
@findex gnus-header-@var{field}
Specifies a function which generates an optional string displayed in the
Subject buffer.  The function is called with an article @var{headers},
and must return a string excluding @samp{[} and @samp{]}.  @var{Headers}
is a vector containing headers of the current article.  Macros and
functions accessing contents of the @var{headers} are defined as
@code{nntp-header-@var{field}} and @code{gnus-header-@var{field}},
respectively.@refill

GNUS provides two functions:

@table @code
@findex gnus-optional-lines-and-from
@item gnus-optional-lines-and-from
Return a string like "@var{nnn}:@var{author}", where @var{nnn} is the
number of lines in an article and @var{author} is the name of the
author.@refill

@findex gnus-optional-lines
@item gnus-optional-lines
Return a string like "@var{nnn}", where @var{nnn} is the number of lines
in an article.@refill
@end table

@xref{Hooks}, to change optional headers according to selected
newsgroups.@refill

@vindex gnus-Info-directory
@cindex Info
@item gnus-Info-directory

@vindex Info-directory
Specifies a directory where the GNUS Info file is placed.  It is not
necessary to change this variable unless you install an Info file in a
directory different from the variable @code{Info-directory}.
@xref{Texinfo Manual}, for more information.@refill

@vindex gnus-mail-reply-method
@findex gnus-mail-reply-using-mail
@findex gnus-mail-reply-using-mhe
@cindex reply to article
@cindex mail
@cindex Mail Mode
@cindex mh-e letter Mode
@cindex mh-e
@cindex MH
@pindex mh-e
@item gnus-mail-reply-method

Specifies a function to begin composing reply mail messages.  The
function will be called with an optional argument which means yank
original article automatically if non-@code{nil}.  To use Mail Mode, set
the variable to @code{gnus-mail-reply-using-mail}.  To use mh-e letter
Mode, set the variable to @code{gnus-mail-reply-using-mhe}.@refill

@vindex gnus-mail-forward-method
@findex gnus-mail-forward-using-mail
@findex gnus-mail-forward-using-mhe
@cindex forward article
@cindex mail
@cindex Mail Mode
@cindex mh-e letter Mode
@cindex mh-e
@cindex MH
@pindex mh-e
@item gnus-mail-forward-method

Specifies a function to forward the current message to another user.  To
use Mail Mode, set the variable to @code{gnus-mail-forward-using-mail}.
To use mh-e letter Mode, set the variable to
@code{gnus-mail-forward-using-mhe}.@refill

@vindex gnus-mail-other-window-method
@findex gnus-mail-other-window-using-mail
@findex gnus-mail-other-window-using-mhe
@cindex mail
@cindex Mail Mode
@cindex mh-e letter Mode
@cindex mh-e
@cindex MH
@pindex mh-e
@item gnus-mail-other-window-method

Specifies a function to begin composing mail messages in other window.
To use Mail Mode, set the variable to
@code{gnus-mail-other-window-using-mail}.  To use mh-e letter Mode, set
the variable to @code{gnus-mail-other-window-using-mhe}.@refill

@cindex add newsgroups
@cindex new newsgroups
@cindex kill newsgroups
@cindex subscribe newsgroups
@cindex unsubscribe newsgroups
@vindex gnus-subscribe-newsgroup-method
@item gnus-subscribe-newsgroup-method

Specifies a function called with a newsgroup name when a new newsgroup
is found.  GNUS provides the following three functions:

@table @code
@findex gnus-subscribe-randomly
@item gnus-subscribe-randomly
Inserts a new newsgroup at the beginning of newsgroups.  Thus,
newsgroups are in random order.@refill

@findex gnus-subscribe-alphabetically
@item gnus-subscribe-alphabetically
Inserts a new newsgroup in strict alphabetic order.@refill

@findex gnus-subscribe-hierarchically
@item gnus-subscribe-hierarchically
Inserts a new newsgroup in hierarchical newsgroup order.@refill
@end table

The following two definitions illustrate how to write your favorite
subscribing method.  The following definition (is the definition of the
function gnus-subscribe-randomly) adds new newsgroup at the beginning of
newsgroups:

@findex gnus-subscribe-newsgroup
@vindex gnus-newsrc-assoc (Internal)
@example
(setq gnus-subscribe-newsgroup-method
      (function
       (lambda (newsgroup)
         (gnus-subscribe-newsgroup newsgroup
                                   (car (car gnus-newsrc-assoc))))))
@end example

Instead, if you want to add new newsgroup at the end of newsgroups, use
the following:

@findex gnus-subscribe-newsgroup
@example
(setq gnus-subscribe-newsgroup-method
      (function
       (lambda (newsgroup)
         (gnus-subscribe-newsgroup newsgroup nil))))
@end example

@kindex U (Group Mode)
@findex gnus-Group-unsubscribe-group
If you want to prevent adding new newsgroups automatically and want to
subscribe them later using the command @kbd{U}
(@code{gnus-Group-unsubscribe-group}) in the Newsgroup buffer, use the
following:@refill

@example
(setq gnus-subscribe-newsgroup-method
      (function (lambda (newsgroup) nil))) ;Do nothing.
@end example

The following final example must be the most useful for you who want not
to add new newsgroups automatically.  This definition subscribes a new
newsgroup first, and then kills it.  The killed newsgroups can be added
to the subscription list interactively using Browse-Killed Mode
(@pxref{Maintenance}).@refill

@findex gnus-subscribe-newsgroup
@findex gnus-kill-newsgroup
@example
(setq gnus-subscribe-newsgroup-method
      (function
       (lambda (newsgroup)
         (gnus-subscribe-newsgroup newsgroup)
         (gnus-kill-newsgroup newsgroup))))
@end example

@end table

@node NNTP Variables, Spool Variables, Variables, Customization
@appendixsec NNTP Specific Variables
@cindex NNTP

@table @code
@vindex nntp-large-newsgroup
@cindex large newsgroup
@item nntp-large-newsgroup

Specifies the number of articles which indicates a large newsgroup.  If
the number of articles is greater than the value, verbose messages will
be shown to indicate the current status.@refill

@vindex nntp-buggy-select
@cindex select error
@item nntp-buggy-select

Non-@code{nil} means the select routine of your operating system is
buggy.  GNUS may hang up while waiting for NNTP server responses.  The
problem may be solved by setting the variable to @code{t}.  @xref{NNTP
Problems}, for more information.@refill

@vindex nntp-maximum-request
@cindex large newsgroup
@item nntp-maximum-request

Specifies the maximum number of requests to be sent to the NNTP server
at one time.  GNUS may hang up while retrieving headers of a large
newsgroup because sending many requests to the NNTP server without
reading replies to them causes deadlock.  In this case, set the variable
to a lower number.  @xref{NNTP Problems}, for more information.@refill

@vindex nntp-debug-read
@cindex NNTP debugging
@cindex debug NNTP communication
@cindex slow terminal
@item nntp-debug-read

Non-@code{nil} means show the communication status about reading the
NNTP server output.  Set the variable to @code{nil} if you are annoyed
about verbose messages while reading news from slow terminal.@refill

@vindex tcp-program-name
@item tcp-program-name

@pindex tcp.c
Specifies a program which establishes communications between Emacs and
the NNTP server.  Its default value is @file{tcp} which is distributed as
@file{tcp.c} with other files of GNUS (@pxref{Files of GNUS}).  If your
Emacs has the function @code{open-network-stream}, there is no need to
define this variable.

@end table

@node Spool Variables, Directory Variables, NNTP Variables, Customization
@appendixsec Local News Spool Specific Variables
@cindex local news spool

@table @code
@vindex nnspool-inews-program
@item nnspool-inews-program

@vindex news-inews-program
@pindex inews
Specifies a program to post news.  This is default to the variable
@code{news-inews-program} which is default to @file{inews}.

@vindex nnspool-inews-switches
@item nnspool-inews-switches

@findex nnspool-request-post
@pindex inews
Specifies switches for the function @code{nnspool-request-post} to pass
to the command @file{inews} for posting news.  Its default value is
@code{("-h")}.@refill

@vindex nnspool-spool-directory
@item nnspool-spool-directory

@vindex news-path
Specifies a directory of a local news spool.  This is default to the
variable @code{news-path} which is default to @file{/usr/spool/news}.

@vindex nnspool-active-file
@item nnspool-active-file

@cindex active file
@cindex /usr/lib/news/active
@pindex Bnews
Specifies an active file of the Bnews system for a local news spool.
Its default value is @file{/usr/lib/news/active}.@refill

@vindex nnspool-history-file
@item nnspool-history-file

@cindex history file
@cindex /usr/lib/news/history
@pindex Bnews
Specifies a history file of the Bnews system for a local news spool.
Its default value is @file{/usr/lib/news/history}.  Some machines may
not have this file.  In this case, commands to refer to articles by
Message-IDs will not work at all (@pxref{Referencing Articles}).@refill

@end table

@node Directory Variables, Hooks, Spool Variables, Customization
@appendixsec Private Directory Specific Variables
@cindex private directory

@table @code
@vindex mhspool-list-directory-switches
@item mhspool-list-directory-switches

@findex mhspool-request-list
@pindex ls
Specifies switches for the function @code{mhspool-request-list} to pass
to the command @file{ls} for getting file listings in a private
directory.  There should be one entry for each line.  Its default value
is @code{("-R")}.  Some machines may require the @code{("-R1")}
switch.@refill

@end table

@node Hooks,, Directory Variables, Customization
@appendixsec Function Hooks

@table @code
@vindex gnus-Group-mode-hook
@item gnus-Group-mode-hook

Called with no arguments after initializing Group Mode if its value is
non-@code{nil}.  This hook is intended to customize Group Mode only
once.  It is possible to define or change the NNTP server as you like in
this hook since the hook is called before GNUS is connected to an NNTP
server.@refill

@vindex gnus-Subject-mode-hook
@item gnus-Subject-mode-hook

@vindex case-fold-search
@cindex case of text
Called with no arguments after initializing Subject Mode if its value is
non-@code{nil}.  This hook is intended to customize Subject Mode only
once.  All sorts of searches in Subject Mode normally ignore the case of
the text they are searching through.  If you do not want to ignore the
case, set the variable @code{case-fold-search} to @code{nil} in this
hook.@refill

@findex gnus-Subject-next-group
@findex gnus-Subject-prev-group
The following example shows how to assign the functions
@code{gnus-Subject-next-group} and @code{gnus-Subject-prev-group} to
keys in Subject Mode.@refill

@example
(setq gnus-Subject-mode-hook
      (function
       (lambda ()
         (local-set-key "\C-cn" 'gnus-Subject-next-group)
         (local-set-key "\C-cp" 'gnus-Subject-prev-group))))
@end example

@vindex gnus-Article-mode-hook
@item gnus-Article-mode-hook

Called with no arguments after initializing Article Mode if its value is
non-@code{nil}.  This hook is intended to customize Article Mode only
once.@refill

@cindex current time
@cindex display current time
@vindex global-mode-string
Displaying the current time in the mode line of buffers is disabled in
the Article buffer and the Subject buffer to show information on the
current newsgroup and the current article.  If you want to display the
current time in the mode line of the Article buffer, make the variable
@code{global-mode-string} no longer have a separate value in the buffer
as follows:@refill

@example
(setq gnus-Article-mode-hook
      (function
       (lambda ()
         (kill-local-variable 'global-mode-string))))
@end example

@vindex gnus-Kill-file-mode-hook
@item gnus-Kill-file-mode-hook

Called with no arguments after initializing KILL-File Mode if its
value is non-@code{nil}.

@vindex gnus-Browse-killed-mode-hook
@item gnus-Browse-killed-mode-hook

Called with no arguments after initializing Browse-Killed Mode if its
value is non-@code{nil}.

@vindex gnus-Open-server-hook
@item gnus-Open-server-hook

Called with no arguments just before opening a connection to NNTP server
if its value is non-@code{nil}.@refill

@vindex gnus-Startup-hook
@item gnus-Startup-hook

Called with no arguments after an NNTP server is successfully connected
to if its value is non-@code{nil}.  It is possible to change the behavior
of GNUS according to the server.@refill

@vindex gnus-Group-prepare-hook
@item gnus-Group-prepare-hook

Called with no arguments after a list of newsgroups is prepared in the
Newsgroup buffer.  This hook is intended to modify the buffer.

@vindex gnus-Subject-prepare-hook
@item gnus-Subject-prepare-hook

Called with no arguments after list of subjects is prepared in the
Subject buffer.  This hook is intended to modify the buffer.

@vindex gnus-Article-prepare-hook
@item gnus-Article-prepare-hook

Called with no arguments after an article is prepared in the Article
buffer.  This hook is intended to modify the buffer.  For example, kanji
code conversion or un-ROT13-ing can be done in this hook.

@vindex gnus-Select-group-hook
@item gnus-Select-group-hook

Called with no arguments when a newsgroup is selected.  This hook is
intended to change the behavior of GNUS according to the selected
newsgroup.

@cindex sort headers
The following is an example of sorting the headers listed in the Subject
buffer by date and then by subject.  Preceding @samp{Re:} of subjects is
ignored while comparing subjects.@refill

@findex gnus-sort-headers
@findex gnus-date-lessp
@findex gnus-string-lessp
@findex gnus-header-date
@findex gnus-header-subject
@findex gnus-simplify-subject
@example
(setq gnus-Select-group-hook
      (function
       (lambda ()
         ;; First of all, sort by date.
         (gnus-sort-headers
          (function
           (lambda (a b)
             (gnus-date-lessp (gnus-header-date a)
                              (gnus-header-date b)))))
         ;; Then sort by subject ignoring `Re:'.
         (gnus-sort-headers
          (function
           (lambda (a b)
             (gnus-string-lessp 
              (gnus-simplify-subject
               (gnus-header-subject a) 're-only)
              (gnus-simplify-subject
               (gnus-header-subject b) 're-only)
              )))))))
@end example

@cindex simplify subjects
The following is an example of simplifying subjects like the
@code{gnus-Subject-next-same-subject} command does:@refill

@findex nntp-set-header-subject
@findex gnus-simplify-subject
@findex gnus-header-subject
@vindex gnus-newsgroup-headers (Internal)
@example
(setq gnus-Select-group-hook
      (function
       (lambda ()
         (mapcar (function
                  (lambda (header)
                    (nntp-set-header-subject
                     header
                     (gnus-simplify-subject
                      (gnus-header-subject header) 're-only))))
                 gnus-newsgroup-headers))))
@end example

In some newsgroups, author names are meaningless.  It is possible to
prevent listing author names in the Subject buffer as follows:

@vindex gnus-optional-headers
@vindex gnus-newsgroup-name (Internal)
@findex gnus-optional-lines
@findex gnus-optional-lines-and-from
@example
(setq gnus-Select-group-hook
      (function
       (lambda ()
         (cond ((string-equal "comp.sources.unix"
                              gnus-newsgroup-name)
                (setq gnus-optional-headers
                      (function gnus-optional-lines)))
               (t
                (setq gnus-optional-headers
                      (function
                       gnus-optional-lines-and-from)))))))
@end example

@vindex gnus-Select-article-hook
@item gnus-Select-article-hook

Called with no arguments when an article is selected if its value is
non-@code{nil}.@refill

@cindex threads
@cindex conversation threads
@findex gnus-Subject-show-thread
The default hook definition shows conversation thread subtrees of the
selected article automatically as follows:

@example
(setq gnus-Select-article-hook
      (function
       (lambda ()
         (gnus-Subject-show-thread))))
@end example

@cindex Rmail
@cindex digest articles
It is possible to run Rmail on a digest article automatically as
follows:

@vindex gnus-newsgroup-name (Internal)
@vindex gnus-current-headers (Internal)
@findex gnus-header-subject
@findex gnus-Subject-rmail-digest
@example
(setq gnus-Select-article-hook
      (function
       (lambda ()
         (gnus-Subject-show-thread)
         (cond ((string-equal "comp.sys.sun"
                              gnus-newsgroup-name)
                (gnus-Subject-rmail-digest))
               ((and (string-equal "comp.text"
                                   gnus-newsgroup-name)
                     (string-match "^TeXhax Digest"
                                   (gnus-header-subject
                                    gnus-current-headers)))
                (gnus-Subject-rmail-digest)
                )))))
@end example

@vindex gnus-Select-digest-hook
@cindex Rmail
@cindex digest articles
@item gnus-Select-digest-hook

Called with no arguments when reading digest messages using Rmail if its
value is non-@code{nil}.  This hook is intended to modify an article so
that Rmail can work with it.  @xref{Digest Articles}, for more
information on digest articles.@refill

@cindex incomplete digest articles
The following example is the default hook definition to modify
incomplete digest articles:

@findex mail-position-on-field
@findex gnus-fetch-field
@example
(setq gnus-Select-digest-hook
      (function
       (lambda ()
         ;; Reply-To: is required by
         ;; `undigestify-rmail-message'.
         (or (mail-position-on-field "Reply-to" t)
             (progn
               (mail-position-on-field "Reply-to")
               (insert (gnus-fetch-field "From")))))))
@end example

@vindex gnus-Rmail-digest-hook
@cindex Rmail
@cindex digest articles
@item gnus-Rmail-digest-hook

Called with no arguments when reading digest messages using Rmail if its
value is non-@code{nil}.  This hook is intended to customize Rmail Mode
for reading digest articles.@refill

@vindex gnus-Apply-kill-hook
@cindex KILL file
@item gnus-Apply-kill-hook

Called with no arguments when a newsgroup is selected and the Subject
buffer is prepared if its value is non-@code{nil}.  This hook is intended
to apply KILL files to the selected newsgroup.  It is set to the
function @code{gnus-apply-kill-file} by default.@refill

Since a general KILL file is too heavy to use only for a few newsgroups,
a lighter hook function is recommended.  For example, if you'd like to
apply kills to articles which contain the string @samp{rmgroup} in
subject in newsgroup @samp{control}, you can use the following
hook:@refill

@findex gnus-kill
@vindex gnus-newsgroup-name (Internal)
@example
(setq gnus-Apply-kill-hook
      (function
       (lambda ()
         (cond ((string-match "control" gnus-newsgroup-name)
                (gnus-kill "Subject" "rmgroup")
                (gnus-expunge "X"))))))
@end example

@xref{KILL File}, for more information on KILL files.@refill

@vindex gnus-Mark-article-hook
@cindex article marks
@cindex mark articles
@item gnus-Mark-article-hook

Called with no arguments when an article is selected for the first time
if its value is non-@code{nil}.  The hook is intended to mark an article
as read (or unread) automatically when it is selected.@refill

The following example is the default definition of the hook:

@vindex gnus-current-article (Internal)
@vindex gnus-newsgroup-marked (Internal)
@vindex gnus-current-article (Internal)
@findex gnus-Subject-mark-as-read
@findex gnus-Subject-set-current-mark
@example
(setq gnus-Mark-article-hook
      (function
       (lambda ()
         ;; Mark the selected article as read.
         (or (memq gnus-current-article gnus-newsgroup-marked)
             (gnus-Subject-mark-as-read gnus-current-article))
         ;; Put "+" on the current subject.
         (gnus-Subject-set-current-mark "+"))))
@end example

It is possible to mark as unread (@samp{-}) instead when an article is
selected as follows:@refill

@vindex gnus-current-article (Internal)
@findex gnus-Subject-mark-as-unread
@findex gnus-Subject-set-current-mark
@example
(setq gnus-Mark-article-hook
      (function
       (lambda ()
         ;; Mark the selected article as unread.
         (gnus-Subject-mark-as-unread gnus-current-article)
         ;; Put "+" on the current subject.
         (gnus-Subject-set-current-mark "+"))))
@end example

@vindex gnus-Inews-article-hook
@cindex post article
@item gnus-Inews-article-hook

@pindex inews
Called with no arguments before posting an article if its value is
non-@code{nil}.  This hook is called just before sending an article to
the NNTP server or calling the @file{inews} program, while the hook
@code{news-inews-hook} is called before preparing article headers.  This
hook is intended to run special encoding programs such as kanji code
conversion on the article.@refill

@vindex gnus-Exit-group-hook
@item gnus-Exit-group-hook

@vindex gnus-newsgroup-headers (Internal)
@cindex cross-references
@cindex disable cross-references
@cindex Xref field
Called with no arguments when exiting the current newsgroup if its value
is non-@code{nil}.  If your machine is so slow that exiting from Subject
Mode takes a long time, you can inhibit marking articles as read by
using cross-reference information in the @samp{Xref:} field by setting
the variable @code{gnus-newsgroup-headers} to @code{nil} in this
hook.@refill

@vindex gnus-Exit-gnus-hook
@item gnus-Exit-gnus-hook

Called with no arguments when exiting GNUS if its value is
non-@code{nil}.  If you want to clear out Emacs buffers which were
created by GNUS and remain afterwards, you can use this hook.@refill

The following example shows how to kill a buffer which was used for
posting news.@refill

@example
(setq gnus-Exit-gnus-hook
      (function
       (lambda ()
         ;; Kill a buffer used for posting news.
         (and (get-buffer "*post-news*")
              (kill-buffer "*post-news*")))))
@end example

@vindex gnus-Suspend-gnus-hook
@item gnus-Suspend-gnus-hook

Called with no arguments when suspending GNUS if its value is
non-@code{nil}.  The purpose is the same as the hook
@code{gnus-Exit-gnus-hook}.@refill

@vindex gnus-Save-newsrc-hook
@cindex startup file
@cindex .newsrc
@item gnus-Save-newsrc-hook

Called with no arguments before saving the startup file @file{.newsrc}
if its value is non-@code{nil}.  This hook is intended to change the way
of backing up the startup file.@refill

@vindex nntp-server-hook
@vindex nntp-server-name
@cindex NNTP server
@item nntp-server-hook

Called with no arguments when the connection between Emacs and the NNTP
server is established if its value is non-@code{nil}.  This hook is
intended to change the kanji code of a buffer associated with the
stream.  Use the variable @code{nntp-server-name} to refer to the name
of the NNTP server in this hook.  @xref{Kanji Handling}, for more
information.@refill

@end table

@node Problems, Reporting Bugs, Customization, Top
@appendix Troubleshooting

  Some common problems and their solutions are described.  If you have
any other problems which are not described here and cannot solve them by
yourself, @pxref{Reporting Bugs}.@refill

@menu
* NNTP Problems::       Problems with NNTP.
* Kanji Handling::      Problems with kanji handling.
* Preloading::          Problems with preloading GNUS.
@end menu

@node NNTP Problems, Kanji Handling, Problems, Problems
@appendixsec NNTP Problems
@cindex NNTP
@cindex hang up
@cindex deadlock
@appendixsubsec Infinite Loop Caused by Buggy Select Routine
@cindex select error

@vindex nntp-buggy-select
@cindex select error
  Emacs may hang up while waiting for NNTP server responses.  This may
be caused by a buggy select routine of your operating system.  If so,
the problem may be solved by using source codes of @file{nntp.el}
instead of byte-compiled codes.  If you still have problems with it, set
the variable @code{nntp-buggy-select} to @code{t}.@refill

@appendixsubsec Deadlock Caused by Packet Overflow
@cindex packet overflow

@vindex nntp-maximum-request
@cindex large newsgroup
  Emacs may hang up while retrieving headers of a large newsgroup.  The
reason is that too many requests have been sent to the NNTP server
without reading replies to them.  This causes a deadlock of Emacs and
the server.  In this case, the number of requests sent to the server at
one time must be reduced.  Set the variable @code{nntp-maximum-request}
to a lower value than the default.  The optimal value depends on your
computing environment.@refill

@node Kanji Handling, Preloading, NNTP Problems, Problems
@appendixsec Kanji Handling
@cindex kanji handling
@cindex Japanese

@ifinfo
  Kanji handling scheme is different in each implementation of Japanese
GNU Emacs.  Moreover, in some case the scheme may be different in each
version of the same implementations.  Make sure which implementation and
version you are using.
@end ifinfo

@menu
* NEmacs2::             Kanji handling in NEmacs 2.1.
* NEmacs3::             Kanji handling in NEmacs 3.0.
* SX/A Emacs::          Kanji handling in SX/A Emacs.
@end menu

@node NEmacs2, NEmacs3, Kanji Handling, Kanji Handling
@appendixsubsec Kanji Handling In NEmacs 2.1
@cindex NEmacs 2.1

@vindex nntp-server-hook
  If the kanji code of articles stored in the NNTP server is different
from your private file kanji code, the correct kanji code of the buffer
associated with the NNTP stream must be specified using the hook
@code{nntp-server-hook} as follows:@refill

@cindex EUC
@example
(setq nntp-server-hook
      (function
       (lambda ()
         ;; Server's Kanji code is EUC (NEmacs hack).
         (make-local-variable 'kanji-fileio-code)
         (setq kanji-fileio-code 0))))
@end example

@cindex local news spool
@noindent
If you use a local news spool in stead of NNTP, the following additional
hook is required to post an article in the correct kanji code in any
case:

@example
(setq gnus-Inews-article-hook
      (function
       (lambda ()
         (save-excursion
           (set-buffer nntp-server-buffer)
           (make-local-variable 'kanji-fileio-code)
           (setq kanji-fileio-code 0)   ;EUC
           ))))
@end example

@vindex nntp-server-name
  The variable @code{nntp-server-name} is a buffer local variable
holding a host name running an NNTP server.  Use this variable to change
the kanji code according to the server.  The following example shows how
to change the kanji code using this variable.@refill

@cindex EUC
@cindex JIS
@cindex SJIS
@example
(setq nntp-server-hook
      (function
       (lambda ()
         (make-local-variable 'kanji-fileio-code)
         (cond ((string-equal nntp-server-name "foo")
                (setq kanji-fileio-code 0)) ;EUC
               ((string-equal nntp-server-name "bar")
                (setq kanji-fileio-code 1)) ;Shift-JIS
               (t
                (setq kanji-fileio-code 2)) ;JIS
               ))))
@end example

@node NEmacs3, SX/A Emacs, NEmacs2, Kanji Handling
@appendixsubsec Kanji Handling In NEmacs 3.0
@cindex NEmacs 3.0

  The author has less experiences with NEmacs 3.0.  So, the following
description may be wrong.  If you find any mistakes, please let the
author know (@pxref{Reporting Bugs}).@refill

@findex define-service-kanji-code
  In NEmacs 3.0, the kanji code of articles stored in the NNTP server
must be specified according to both the service name (or number) and the
host name running the server.  For this, the function
@code{define-service-kanji-code} is provided.@refill

  The following example specifies the kanji code of the host @samp{flab}
as JIS using this function:@refill

@example
(define-service-kanji-code "nntp" "flab" 2)      ;2 stands for JIS.
@end example

@node SX/A Emacs,, NEmacs3, Kanji Handling
@appendixsubsec Kanji Handling In SX/A Emacs
@cindex SX/A Emacs

@vindex gnus-Article-prepare-hook
@vindex gnus-Inews-article-hook
  If the kanji code of articles stored in the NNTP server is not EUC, it
must be converted to EUC in an Emacs buffer after being read into the
buffer.  The kanji code of articles being posted must be also converted
to the server specific kanji code in an Emacs buffer before actually
being sent to the server.  The following examples show how to do these
using hooks:@refill

@cindex EUC
@cindex JIS
@example
(setq gnus-Article-prepare-hook
      (function
       (lambda ()
         (call-process-region (point-min) (point-max)
                              "nkf" t t nil "-e" ;-e stands for EUC.
                              ))))
(setq gnus-Inews-article-hook
      (function
       (lambda ()
         (call-process-region (point-min) (point-max)
                              "nkf" t t nil "-j" ;-j stands for JIS.
                              ))))
@end example

@pindex nkf
@noindent
In this example, @file{nkf} (Network Kanji Filter) is used as a kanji
code converter, and the kanji code of the NNTP server is JIS.@refill

@node Preloading,, Kanji Handling, Problems
@appendixsec Preloading GNUS
@cindex preload GNUS

@pindex gnus.el
@vindex gnus-nntp-server
@vindex gnus-author-copy
@vindex gnus-article-save-directory
  Basically, GNUS is not designed to be preloaded.  For instance, if you
preload @file{gnus.el}, some user variables which are initialized from
environment variables may be improperly initialized according to your
environment definitions.  The variables @code{gnus-nntp-server},
@code{gnus-author-copy}, and @code{gnus-article-save-directory} are such
variables.@refill

  To prevent GNUS from being initialized from your definitions, you
should @code{unsetenv} related environment variables before preloading
GNUS, or set the variables to @code{nil} after loading GNUS.@refill

@node Reporting Bugs, Key Index, Problems, Top
@appendix Reporting Bugs
@appendixsec Mailing Lists and USENET Newsgroup
@cindex mailing list
@cindex info-gnus
@cindex info-gnus-english
@cindex gnu.emacs.gnus

  There are two mailing lists and one USENET newsgroup for discussing
GNUS related topics.  These are intended for exchanging useful
information about GNUS, such as bug reports, useful hooks, and
extensions of GNUS.  If you have any questions or problems, feel free to
ask about them.  Suggestions are also welcome.@refill

@table @code
@item gnu.emacs.gnus

This is a USENET newsgroup under the gnu.all hierarchy which is
concerned with the GNU Project of the Free Software Foundation.@refill

@item info-gnus-english@@tut.cis.ohio-state.edu

This is an Internet mailing list which is gated bi-directionally with
the gnu.emacs.gnus newsgroup.  English is the official language of the
list.  Please send subscription requests to:@refill

@display
info-gnus-english-request@@tut.cis.ohio-state.edu
@end display

@item info-gnus@@flab.Fujitsu.CO.JP

This is a JUNET mailing list.  Messages of info-gnus-english and
gnu.emacs.gnus are forwarded to this list.  English and Japanese are the
official languages of the list.  Please send subscription requests
to:@refill

@display
info-gnus-request@@flab.Fujitsu.CO.JP
@end display
@end table

  The major difference between info-gnus-english/gnu.emacs.gnus and
info-gnus is the official language.  There is no need to subscribe to
info-gnus if you cannot read messages written in Japanese since most
discussions and important announcements will be sent to
info-gnus-english.@refill

@appendixsec How to Report a Bug
@cindex report a bug
@cindex bug report

  If you find a bug, it is important to report it and to report it in a
way which is useful.  If it is a bug of a lisp program, what is the most
useful is an exact backtrace information of the lisp program with the
version number of GNUS that you are using.@refill

  To make the backtrace information, you must set the Emacs variable
@code{debug-on-error} to @code{t} before the error happens.  A backtrace
obtained from a byte-compiled lisp program is not usually
understandable.  To make a human readable backtrace, load the source
program which is not byte-compiled yet and then produce the
error.@refill

  @inforef{Bugs, Reporting Bugs, emacs}, for more information.

@node Key Index, Command Index, Reporting Bugs, Top
@unnumbered Key (Character) Index
@printindex ky

@node Command Index, Variable Index, Key Index, Top
@unnumbered Command and Function Index
@printindex fn

@node Variable Index, Program Index, Command Index, Top
@unnumbered Variable Index
@printindex vr

@node Program Index, Concept Index, Variable Index, Top
@unnumbered Program Index
@printindex pg

@node Concept Index,, Program Index, Top
@unnumbered Concept Index
@printindex cp

@summarycontents
@contents
@bye


@c Local Variables:
@c outline-regexp: "@chap\\|@\\(sub\\)*section\\|@appendix \\|@appendix\\(sub\\)*sec\\|\^L"
@c End:
