*** empty log message ***
[gnus] / texi / gnus.texi
1 \input texinfo                  @c -*-texinfo-*-
2
3 @setfilename gnus
4 @settitle Quassia Gnus 0.110 Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @iftex
9 @finalout
10 @end iftex
11 @setchapternewpage odd
12
13 @iftex
14 @iflatex
15 \documentclass[twoside,a4paper,openright,11pt]{book}
16 \usepackage[latin1]{inputenc}
17 \usepackage{pagestyle}
18 \usepackage{epsfig}
19 \usepackage{bembo}
20 \usepackage{pixidx}
21
22 \makeindex
23 \begin{document}
24
25 \newcommand{\gnuschaptername}{}
26 \newcommand{\gnussectionname}{}
27
28 \newcommand{\gnusbackslash}{/}
29
30 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
31 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
32
33 \newcommand{\gnuskindex}[1]{\index{#1}}
34 \newcommand{\gnusindex}[1]{\index{#1}}
35
36 \newcommand{\gnustt}[1]{{\fontfamily{pfu}\fontsize{10pt}{10}\selectfont #1}}
37 \newcommand{\gnuscode}[1]{\gnustt{#1}}
38 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\fontfamily{pfu}\fontsize{10pt}{10}\selectfont #1}''}
39 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
40 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
41 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
42 \newcommand{\gnusdfn}[1]{\textit{#1}}
43 \newcommand{\gnusi}[1]{\textit{#1}}
44 \newcommand{\gnusstrong}[1]{\textbf{#1}}
45 \newcommand{\gnusemph}[1]{\textit{#1}}
46 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
47 \newcommand{\gnussc}[1]{\textsc{#1}}
48 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
49 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
50
51 \newcommand{\gnusbullet}{{${\bullet}$}}
52 \newcommand{\gnusdollar}{\$}
53 \newcommand{\gnusampersand}{\&}
54 \newcommand{\gnuspercent}{\%}
55 \newcommand{\gnushash}{\#}
56 \newcommand{\gnushat}{\symbol{"5E}}
57 \newcommand{\gnusunderline}{\symbol{"5F}}
58 \newcommand{\gnusnot}{$\neg$}
59 \newcommand{\gnustilde}{\symbol{"7E}}
60 \newcommand{\gnusless}{{$<$}}
61 \newcommand{\gnusgreater}{{$>$}}
62
63 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head.eps,height=1cm}}}
64 \newcommand{\gnusinteresting}{
65 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
66 }
67
68 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
69
70 \newcommand{\gnuspagechapter}[1]{
71 {\mbox{}}
72 }
73
74 \newdimen{\gnusdimen}
75 \gnusdimen 0pt
76
77 \newcommand{\gnuschapter}[2]{
78 \gnuscleardoublepage
79 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
80 \chapter{#2}
81 \renewcommand{\gnussectionname}{}
82 \renewcommand{\gnuschaptername}{#2}
83 \thispagestyle{empty}
84 \hspace*{-2cm}
85 \begin{picture}(500,500)(0,0)
86 \put(480,350){\makebox(0,0)[tr]{#1}}
87 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
88 \end{picture}
89 \clearpage
90 }
91
92 \newcommand{\gnusfigure}[3]{
93 \begin{figure}
94 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
95 #3
96 \end{picture}
97 \caption{#1}
98 \end{figure}
99 }
100
101 \newcommand{\gnusicon}[1]{
102 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=tmp/#1-up.ps,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=tmp/#1-up.ps,height=1cm}}}
103 }
104
105 \newcommand{\gnuspicon}[1]{
106 \margindex{\epsfig{figure=#1,width=2cm}}
107 }
108
109 \newcommand{\gnusxface}[2]{
110 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
111 }
112
113 \newcommand{\gnussmiley}[2]{
114 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
115 }
116
117 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
118
119 \newcommand{\gnussection}[1]{
120 \renewcommand{\gnussectionname}{#1}
121 \section{#1}
122 }
123
124 \newenvironment{codelist}%
125 {\begin{list}{}{
126 }
127 }{\end{list}}
128
129 \newenvironment{kbdlist}%
130 {\begin{list}{}{
131 \labelwidth=0cm
132 }
133 }{\end{list}}
134
135 \newenvironment{dfnlist}%
136 {\begin{list}{}{
137 }
138 }{\end{list}}
139
140 \newenvironment{stronglist}%
141 {\begin{list}{}{
142 }
143 }{\end{list}}
144
145 \newenvironment{samplist}%
146 {\begin{list}{}{
147 }
148 }{\end{list}}
149
150 \newenvironment{varlist}%
151 {\begin{list}{}{
152 }
153 }{\end{list}}
154
155 \newenvironment{emphlist}%
156 {\begin{list}{}{
157 }
158 }{\end{list}}
159
160 \newlength\gnusheadtextwidth
161 \setlength{\gnusheadtextwidth}{\headtextwidth}
162 \addtolength{\gnusheadtextwidth}{1cm}
163
164 \newpagestyle{gnuspreamble}%
165 {
166 {
167 \ifodd\count0
168 {
169 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
170 }
171 \else
172 {
173 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
174 }
175 }
176 \fi
177 }
178 }
179 {
180 \ifodd\count0
181 \mbox{} \hfill 
182 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
183 \else
184 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
185 \hfill \mbox{}
186 \fi
187 }
188
189 \newpagestyle{gnusindex}%
190 {
191 {
192 \ifodd\count0
193 {
194 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
195 }
196 \else
197 {
198 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
199 }
200 \fi
201 }
202 }
203 {
204 \ifodd\count0
205 \mbox{} \hfill 
206 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
207 \else
208 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
209 \hfill \mbox{}
210 \fi
211 }
212
213 \newpagestyle{gnus}%
214 {
215 {
216 \ifodd\count0
217 {
218 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
219 }
220 \else
221 {
222 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
223 }
224 \fi
225 }
226 }
227 {
228 \ifodd\count0
229 \mbox{} \hfill 
230 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
231 \else
232 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
233 \hfill \mbox{}
234 \fi
235 }
236
237 \pagenumbering{roman}
238 \pagestyle{gnuspreamble}
239
240 @end iflatex
241 @end iftex
242
243 @iftex
244 @iflatex
245 \begin{titlepage}
246 {
247
248 %\addtolength{\oddsidemargin}{-5cm}
249 %\addtolength{\evensidemargin}{-5cm}
250 \parindent=0cm
251 \addtolength{\textheight}{2cm}
252
253 \gnustitle{\gnustitlename}\\
254 \rule{15cm}{1mm}\\
255 \vfill
256 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo.eps,height=15cm}
257 \vfill
258 \rule{15cm}{1mm}\\
259 \gnusauthor{by Lars Magne Ingebrigtsen}
260 \newpage
261 }
262
263 \mbox{}
264 \vfill
265
266 \thispagestyle{empty}
267
268 Copyright \copyright{} 1995,96,97 Free Software Foundation, Inc. 
269
270 Permission is granted to make and distribute verbatim copies of
271 this manual provided the copyright notice and this permission notice
272 are preserved on all copies.
273
274 Permission is granted to copy and distribute modified versions of this
275 manual under the conditions for verbatim copying, provided that the
276 entire resulting derived work is distributed under the terms of a
277 permission notice identical to this one.
278
279 Permission is granted to copy and distribute translations of this manual
280 into another language, under the above conditions for modified versions.
281
282 \newpage
283 \end{titlepage}
284 @end iflatex
285 @end iftex
286
287 @ifinfo
288
289 This file documents Gnus, the GNU Emacs newsreader.
290
291 Copyright (C) 1995,96 Free Software Foundation, Inc.
292
293 Permission is granted to make and distribute verbatim copies of
294 this manual provided the copyright notice and this permission notice
295 are preserved on all copies.
296
297 @ignore
298 Permission is granted to process this file through Tex and print the
299 results, provided the printed document carries copying permission
300 notice identical to this one except for the removal of this paragraph
301 (this paragraph not being relevant to the printed manual).
302
303 @end ignore
304 Permission is granted to copy and distribute modified versions of this
305 manual under the conditions for verbatim copying, provided also that the
306 entire resulting derived work is distributed under the terms of a
307 permission notice identical to this one.
308
309 Permission is granted to copy and distribute translations of this manual
310 into another language, under the above conditions for modified versions.
311 @end ifinfo
312
313 @tex
314
315 @titlepage
316 @title Quassia Gnus 0.110 Manual
317
318 @author by Lars Magne Ingebrigtsen
319 @page
320
321 @vskip 0pt plus 1filll
322 Copyright @copyright{} 1995,96,97 Free Software Foundation, Inc. 
323
324 Permission is granted to make and distribute verbatim copies of
325 this manual provided the copyright notice and this permission notice
326 are preserved on all copies.
327
328 Permission is granted to copy and distribute modified versions of this
329 manual under the conditions for verbatim copying, provided that the
330 entire resulting derived work is distributed under the terms of a
331 permission notice identical to this one.
332
333 Permission is granted to copy and distribute translations of this manual
334 into another language, under the above conditions for modified versions.
335
336 @end titlepage
337 @page
338
339 @end tex
340
341
342 @node Top
343 @top The Gnus Newsreader
344
345 @ifinfo
346
347 You can read news (and mail) from within Emacs by using Gnus.  The news
348 can be gotten by any nefarious means you can think of---@sc{nntp}, local
349 spool or your mbox file.  All at the same time, if you want to push your
350 luck.
351
352 This manual corresponds to Quassia Gnus 0.110.
353
354 @end ifinfo
355
356 @iftex
357
358 @iflatex
359 \tableofcontents
360 \gnuscleardoublepage
361 @end iflatex
362
363 Gnus is the advanced, self-documenting, customizable, extensible
364 unreal-time newsreader for GNU Emacs.  
365
366 Oops.  That sounds oddly familiar, so let's start over again to avoid
367 being accused of plagiarism:
368
369 Gnus is a message-reading laboratory.  It will let you look at just
370 about anything as if it were a newsgroup.  You can read mail with it,
371 you can browse directories with it, you can @code{ftp} with it---you can
372 even read news with it!
373
374 Gnus tries to empower people who read news the same way Emacs empowers
375 people who edit text.  Gnus sets no limits to what the user should be
376 allowed to do.  Users are encouraged to extend Gnus to make it behave
377 like they want it to behave.  A program should not control people;
378 people should be empowered to do what they want by using (or abusing)
379 the program.
380
381 @end iftex
382
383
384 @menu
385 * Starting Up::           Finding news can be a pain.
386 * The Group Buffer::      Selecting, subscribing and killing groups.
387 * The Summary Buffer::    Reading, saving and posting articles.
388 * The Article Buffer::    Displaying and handling articles.
389 * Composing Messages::    Information on sending mail and news.
390 * Select Methods::        Gnus reads all messages from various select methods.
391 * Scoring::               Assigning values to articles.
392 * Various::               General purpose settings.
393 * The End::               Farewell and goodbye.
394 * Appendices::            Terminology, Emacs intro, FAQ, History, Internals.
395 * Index::                 Variable, function and concept index.
396 * Key Index::             Key Index.
397 @end menu
398
399 @node Starting Up
400 @chapter Starting Gnus
401 @cindex starting up
402
403 @kindex M-x gnus
404 @findex gnus
405 If your system administrator has set things up properly, starting Gnus
406 and reading news is extremely easy---you just type @kbd{M-x gnus} in
407 your Emacs. 
408
409 @findex gnus-other-frame
410 @kindex M-x gnus-other-frame
411 If you want to start Gnus in a different frame, you can use the command
412 @kbd{M-x gnus-other-frame} instead.
413
414 If things do not go smoothly at startup, you have to twiddle some
415 variables in your @file{~/.gnus} file.  This file is similar to
416 @file{~/.emacs}, but is read when gnus starts.
417
418 @menu
419 * Finding the News::    Choosing a method for getting news.
420 * The First Time::      What does Gnus do the first time you start it?
421 * The Server is Down::  How can I read my mail then?
422 * Slave Gnusae::        You can have more than one Gnus active at a time.
423 * Fetching a Group::    Starting Gnus just to read a group.
424 * New Groups::          What is Gnus supposed to do with new groups?
425 * Startup Files::       Those pesky startup files---@file{.newsrc}.
426 * Auto Save::           Recovering from a crash.
427 * The Active File::     Reading the active file over a slow line Takes Time.
428 * Changing Servers::    You may want to move from one server to another.
429 * Startup Variables::   Other variables you might change.
430 @end menu
431
432
433 @node Finding the News
434 @section Finding the News
435 @cindex finding news
436
437 @vindex gnus-select-method
438 @c @head
439 The @code{gnus-select-method} variable says where Gnus should look for
440 news.  This variable should be a list where the first element says
441 @dfn{how} and the second element says @dfn{where}.  This method is your
442 native method.  All groups not fetched with this method are
443 foreign groups.
444
445 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
446 you want to get your daily dosage of news from, you'd say:
447
448 @lisp
449 (setq gnus-select-method '(nntp "news.somewhere.edu"))
450 @end lisp
451
452 If you want to read directly from the local spool, say:
453
454 @lisp
455 (setq gnus-select-method '(nnspool ""))
456 @end lisp
457
458 If you can use a local spool, you probably should, as it will almost
459 certainly be much faster.
460
461 @vindex gnus-nntpserver-file
462 @cindex NNTPSERVER
463 @cindex @sc{nntp} server
464 If this variable is not set, Gnus will take a look at the
465 @code{NNTPSERVER} environment variable.  If that variable isn't set,
466 Gnus will see whether @code{gnus-nntpserver-file}
467 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
468 that fails as well, Gnus will try to use the machine running Emacs as an @sc{nntp} server.  That's a long shot, though.
469
470 @vindex gnus-nntp-server
471 If @code{gnus-nntp-server} is set, this variable will override
472 @code{gnus-select-method}.  You should therefore set
473 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
474
475 @vindex gnus-secondary-servers
476 You can also make Gnus prompt you interactively for the name of an
477 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
478 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
479 in the @code{gnus-secondary-servers} list (if any).  You can also just
480 type in the name of any server you feel like visiting.
481
482 @findex gnus-group-browse-foreign-server
483 @kindex B (Group)
484 However, if you use one @sc{nntp} server regularly and are just
485 interested in a couple of groups from a different server, you would be
486 better served by using the @kbd{B} command in the group buffer.  It will
487 let you have a look at what groups are available, and you can subscribe
488 to any of the groups you want to.  This also makes @file{.newsrc}
489 maintenance much tidier.  @xref{Foreign Groups}.
490
491 @vindex gnus-secondary-select-methods
492 @c @head
493 A slightly different approach to foreign groups is to set the
494 @code{gnus-secondary-select-methods} variable.  The select methods
495 listed in this variable are in many ways just as native as the
496 @code{gnus-select-method} server.  They will also be queried for active
497 files during startup (if that's required), and new newsgroups that
498 appear on these servers will be subscribed (or not) just as native
499 groups are.
500
501 For instance, if you use the @code{nnmbox} backend to read your mail, you
502 would typically set this variable to
503
504 @lisp
505 (setq gnus-secondary-select-methods '((nnmbox "")))
506 @end lisp
507
508
509 @node The First Time
510 @section The First Time
511 @cindex first time usage
512
513 If no startup files exist, Gnus will try to determine what groups should
514 be subscribed by default.
515
516 @vindex gnus-default-subscribed-newsgroups
517 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
518 will subscribe you to just those groups in that list, leaving the rest
519 killed.  Your system administrator should have set this variable to
520 something useful.
521
522 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
523 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
524 here as @dfn{whatever Lars thinks you should read}.)
525
526 You'll also be subscribed to the Gnus documentation group, which should
527 help you with most common problems.  
528
529 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
530 use the normal functions for handling new groups, and not do anything
531 special.
532
533
534 @node The Server is Down
535 @section The Server is Down
536 @cindex server errors
537
538 If the default server is down, Gnus will understandably have some
539 problems starting.  However, if you have some mail groups in addition to
540 the news groups, you may want to start Gnus anyway.
541
542 Gnus, being the trusting sort of program, will ask whether to proceed
543 without a native select method if that server can't be contacted.  This
544 will happen whether the server doesn't actually exist (i.e., you have
545 given the wrong address) or the server has just momentarily taken ill
546 for some reason or other.  If you decide to continue and have no foreign
547 groups, you'll find it difficult to actually do anything in the group
548 buffer.  But, hey, that's your problem.  Blllrph!
549
550 @findex gnus-no-server
551 @kindex M-x gnus-no-server
552 @c @head
553 If you know that the server is definitely down, or you just want to read
554 your mail without bothering with the server at all, you can use the
555 @code{gnus-no-server} command to start Gnus.  That might come in handy
556 if you're in a hurry as well.  This command will not attempt to contact
557 your primary server---instead, it will just activate all groups on level
558 1 and 2.  (You should preferably keep no native groups on those two
559 levels.)
560
561
562 @node Slave Gnusae
563 @section Slave Gnusae
564 @cindex slave
565
566 You might want to run more than one Emacs with more than one Gnus at the
567 same time.  If you are using different @file{.newsrc} files (e.g., if you
568 are using the two different Gnusae to read from two different servers),
569 that is no problem whatsoever.  You just do it.
570
571 The problem appears when you want to run two Gnusae that use the same
572 @code{.newsrc} file.
573
574 To work around that problem some, we here at the Think-Tank at the Gnus
575 Towers have come up with a new concept: @dfn{Masters} and
576 @dfn{slaves}.  (We have applied for a patent on this concept, and have
577 taken out a copyright on those words.  If you wish to use those words in
578 conjunction with each other, you have to send $1 per usage instance to
579 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
580 Applications}) will be much more expensive, of course.)
581
582 Anyways, you start one Gnus up the normal way with @kbd{M-x gnus} (or
583 however you do it).  Each subsequent slave Gnusae should be started with
584 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
585 files, but instead save @dfn{slave files} that contain information only
586 on what groups have been read in the slave session.  When a master Gnus
587 starts, it will read (and delete) these slave files, incorporating all
588 information from them.  (The slave files will be read in the sequence
589 they were created, so the latest changes will have precedence.)
590
591 Information from the slave files has, of course, precedence over the
592 information in the normal (i.e., master) @code{.newsrc} file.
593
594
595 @node Fetching a Group
596 @section Fetching a Group
597 @cindex fetching a group
598
599 @findex gnus-fetch-group
600 It is sometimes convenient to be able to just say ``I want to read this
601 group and I don't care whether Gnus has been started or not''.  This is
602 perhaps more useful for people who write code than for users, but the
603 command @code{gnus-fetch-group} provides this functionality in any case.
604 It takes the group name as a parameter.
605
606
607 @node New Groups
608 @section New Groups
609 @cindex new groups
610 @cindex subscription
611
612 @vindex gnus-check-new-newsgroups
613 If you are satisfied that you really never want to see any new groups,
614 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
615 also save you some time at startup.  Even if this variable is
616 @code{nil}, you can always subscribe to the new groups just by pressing
617 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
618 is @code{ask-server} by default.  If you set this variable to
619 @code{always}, then Gnus will query the backends for new groups even
620 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
621
622 @menu
623 * Checking New Groups::      Determining what groups are new.
624 * Subscription Methods::     What Gnus should do with new groups.
625 * Filtering New Groups::     Making Gnus ignore certain new groups.
626 @end menu
627
628
629 @node Checking New Groups
630 @subsection Checking New Groups
631
632 Gnus normally determines whether a group is new or not by comparing the
633 list of groups from the active file(s) with the lists of subscribed and
634 dead groups.  This isn't a particularly fast method.  If
635 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
636 server for new groups since the last time.  This is both faster and
637 cheaper.  This also means that you can get rid of the list of killed
638 groups altogether, so you may set @code{gnus-save-killed-list} to
639 @code{nil}, which will save time both at startup, at exit, and all over.
640 Saves disk space, too.  Why isn't this the default, then?
641 Unfortunately, not all servers support this command. 
642
643 I bet I know what you're thinking now: How do I find out whether my
644 server supports @code{ask-server}?  No?  Good, because I don't have a
645 fail-safe answer.  I would suggest just setting this variable to
646 @code{ask-server} and see whether any new groups appear within the next
647 few days.  If any do, then it works.  If none do, then it doesn't
648 work.  I could write a function to make Gnus guess whether the server
649 supports @code{ask-server}, but it would just be a guess.  So I won't.
650 You could @code{telnet} to the server and say @code{HELP} and see
651 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
652 it does, then it might work.  (But there are servers that lists
653 @samp{NEWGROUPS} without supporting the function properly.)
654
655 This variable can also be a list of select methods.  If so, Gnus will
656 issue an @code{ask-server} command to each of the select methods, and
657 subscribe them (or not) using the normal methods.  This might be handy
658 if you are monitoring a few servers for new groups.  A side effect is
659 that startup will take much longer, so you can meditate while waiting.
660 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
661
662
663 @node Subscription Methods
664 @subsection Subscription Methods
665
666 @vindex gnus-subscribe-newsgroup-method
667 What Gnus does when it encounters a new group is determined by the
668 @code{gnus-subscribe-newsgroup-method} variable.
669
670 This variable should contain a function.  This function will be called
671 with the name of the new group as the only parameter.
672
673 Some handy pre-fab functions are:
674
675 @table @code
676
677 @item gnus-subscribe-zombies
678 @vindex gnus-subscribe-zombies
679 Make all new groups zombies.  This is the default.  You can browse the
680 zombies later (with @kbd{A z}) and either kill them all off properly
681 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
682
683 @item gnus-subscribe-randomly
684 @vindex gnus-subscribe-randomly
685 Subscribe all new groups in arbitrary order.  This really means that all
686 new groups will be added at ``the top'' of the grop buffer.
687
688 @item gnus-subscribe-alphabetically
689 @vindex gnus-subscribe-alphabetically
690 Subscribe all new groups in alphabetical order.
691
692 @item gnus-subscribe-hierarchically
693 @vindex gnus-subscribe-hierarchically
694 Subscribe all new groups hierarchically.  The difference between this
695 function and @code{gnus-subscribe-alphabetically} is slight.
696 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
697 alphabetical fashion, while this function will enter groups into it's
698 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
699 @samp{comp} hierarchy, this function will not mess that configuration
700 up.  Or something like that.
701
702 @item gnus-subscribe-interactively
703 @vindex gnus-subscribe-interactively
704 Subscribe new groups interactively.  This means that Gnus will ask
705 you about @strong{all} new groups.  The groups you choose to subscribe
706 to will be subscribed hierarchically.
707
708 @item gnus-subscribe-killed
709 @vindex gnus-subscribe-killed
710 Kill all new groups.
711
712 @end table
713
714 @vindex gnus-subscribe-hierarchical-interactive
715 A closely related variable is
716 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
717 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
718 hierarchical fashion whether to subscribe to new groups or not.  Gnus
719 will ask you for each sub-hierarchy whether you want to descend the
720 hierarchy or not.  
721
722 One common mistake is to set the variable a few paragraphs above
723 (@code{gnus-subscribe-newsgroup-method}) to
724 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
725 will not work.  This is ga-ga.  So don't do it.
726
727
728 @node Filtering New Groups
729 @subsection Filtering New Groups
730
731 A nice and portable way to control which new newsgroups should be
732 subscribed (or ignored) is to put an @dfn{options} line at the start of
733 the @file{.newsrc} file.  Here's an example:
734
735 @example
736 options -n !alt.all !rec.all sci.all
737 @end example
738
739 @vindex gnus-subscribe-options-newsgroup-method
740 This line obviously belongs to a serious-minded intellectual scientific
741 person (or she may just be plain old boring), because it says that all
742 groups that have names beginning with @samp{alt} and @samp{rec} should
743 be ignored, and all groups with names beginning with @samp{sci} should
744 be subscribed.  Gnus will not use the normal subscription method for
745 subscribing these groups.
746 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
747 variable defaults to @code{gnus-subscribe-alphabetically}.
748
749 @vindex gnus-options-not-subscribe
750 @vindex gnus-options-subscribe
751 If you don't want to mess with your @file{.newsrc} file, you can just
752 set the two variables @code{gnus-options-subscribe} and
753 @code{gnus-options-not-subscribe}.  These two variables do exactly the
754 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
755 and if the new group matches the former, it will be unconditionally
756 subscribed, and if it matches the latter, it will be ignored.
757
758 @vindex gnus-auto-subscribed-groups
759 Yet another variable that meddles here is
760 @code{gnus-auto-subscribed-groups}.  It works exactly like
761 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
762 thought it would be nice to have two of these.  This variable is more
763 meant for setting some ground rules, while the other variable is used
764 more for user fiddling.  By default this variable makes all new groups
765 that come from mail backends (@code{nnml}, @code{nnbabyl},
766 @code{nnfolder}, @code{nnmbox}, and @code{nnmh}) subscribed.  If you
767 don't like that, just set this variable to @code{nil}.
768
769 New groups that match this regexp are subscribed using
770 @code{gnus-subscribe-options-newsgroup-method}.
771
772
773 @node Changing Servers
774 @section Changing Servers
775 @cindex changing servers
776
777 Sometimes it is necessary to move from one @sc{nntp} server to another.
778 This happens very rarely, but perhaps you change jobs, or one server is
779 very flaky and you want to use another.  
780
781 Changing the server is pretty easy, right?  You just change
782 @code{gnus-select-method} to point to the new server?  
783
784 @emph{Wrong!}
785
786 Article numbers are not (in any way) kept synchronized between different
787 @sc{nntp} servers, and the only way Gnus keeps track of what articles
788 you have read is by keeping track of article numbers.  So when you
789 change @code{gnus-select-method}, your @file{.newsrc} file becomes
790 worthless.  
791
792 Gnus provides a few functions to attempt to translate a @file{.newsrc}
793 file from one server to another.  They all have one thing in
794 common---they take a looong time to run.  You don't want to use these
795 functions more than absolutely necessary.
796
797 @kindex M-x gnus-change-server
798 @findex gnus-change-server
799 If you have access to both servers, Gnus can request the headers for all
800 the articles you have read and compare @code{Message-ID}s and map the
801 article numbers of the read articles and article marks.  The @kbd{M-x
802 gnus-change-server} command will do this for all your native groups.  It
803 will prompt for the method you want to move to.
804
805 @kindex M-x gnus-group-move-group-to-server
806 @findex gnus-group-move-group-to-server
807 You can also move individual groups with the @kbd{M-x
808 gnus-group-move-group-to-server} command.  This is useful if you want to
809 move a (foreign) group from one server to another.
810
811 @kindex M-x gnus-group-clear-data-on-native-groups
812 @findex gnus-group-clear-data-on-native-groups
813 If you don't have access to both the old and new server, all your marks
814 and read ranges have become worthless.  You can use the @kbd{M-x
815 gnus-group-clear-data-on-native-groups} command to clear out all data
816 that you have on your native groups.  Use with caution.
817
818
819 @node Startup Files
820 @section Startup Files
821 @cindex startup files
822 @cindex .newsrc
823 @cindex .newsrc.el
824 @cindex .newsrc.eld
825
826 Now, you all know about the @file{.newsrc} file.  All subscription
827 information is traditionally stored in this file.
828
829 Things got a bit more complicated with @sc{gnus}.  In addition to
830 keeping the @file{.newsrc} file updated, it also used a file called
831 @file{.newsrc.el} for storing all the information that didn't fit into
832 the @file{.newsrc} file.  (Actually, it also duplicated everything in
833 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
834 files was the most recently saved, which enabled people to swap between
835 @sc{gnus} and other newsreaders.
836
837 That was kinda silly, so Gnus went one better: In addition to the
838 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
839 @file{.newsrc.eld}.  It will read whichever of these files that are most
840 recent, but it will never write a @file{.newsrc.el} file.  You should
841 never delete the @file{.newsrc.eld} file---it contains much information
842 not stored in the @file{.newsrc} file.
843
844 @vindex gnus-save-newsrc-file
845 You can turn off writing the @file{.newsrc} file by setting
846 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
847 the file and save some space, as well as making exit from Gnus faster.
848 However, this will make it impossible to use other newsreaders than
849 Gnus.  But hey, who would want to, right?
850
851 @vindex gnus-save-killed-list
852 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
853 will not save the list of killed groups to the startup file.  This will
854 save both time (when starting and quitting) and space (on disk).  It
855 will also mean that Gnus has no record of what groups are new or old,
856 so the automatic new groups subscription methods become meaningless.
857 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
858 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
859 Groups}).  This variable can also be a regular expression.  If that's
860 the case, remove all groups that do not match this regexp before
861 saving.  This can be useful in certain obscure situations that involve
862 several servers where not all servers support @code{ask-server}.
863
864 @vindex gnus-startup-file
865 The @code{gnus-startup-file} variable says where the startup files are.
866 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
867 file being whatever that one is, with a @samp{.eld} appended.
868
869 @vindex gnus-save-newsrc-hook
870 @vindex gnus-save-quick-newsrc-hook
871 @vindex gnus-save-standard-newsrc-hook
872 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
873 files, while @code{gnus-save-quick-newsrc-hook} is called just before
874 saving the @file{.newsrc.eld} file, and
875 @code{gnus-save-standard-newsrc-hook} is called just before saving the
876 @file{.newsrc} file.  The latter two are commonly used to turn version
877 control on or off.  Version control is on by default when saving the
878 startup files.  If you want to turn backup creation off, say something like: 
879
880 @lisp
881 (defun turn-off-backup ()
882   (set (make-local-variable 'backup-inhibited) t))
883
884 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
885 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
886 @end lisp
887
888 @vindex gnus-init-file
889 When Gnus starts, it will read the @code{gnus-site-init-file}
890 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
891 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
892 and can be used to avoid cluttering your @file{~/.emacs} and
893 @file{site-init} files with Gnus stuff.  Gnus will also check for files
894 with the same names as these, but with @file{.elc} and @file{.el}
895 suffixes.  In other words, if you have set @code{gnus-init-file} to
896 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
897 and finally @file{~/.gnus} (in this order).
898
899
900
901 @node Auto Save
902 @section Auto Save
903 @cindex dribble file
904 @cindex auto-save
905
906 Whenever you do something that changes the Gnus data (reading articles,
907 catching up, killing/subscribing groups), the change is added to a
908 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
909 Emacs way.  If your Emacs should crash before you have saved the
910 @file{.newsrc} files, all changes you have made can be recovered from
911 this file.
912
913 If Gnus detects this file at startup, it will ask the user whether to
914 read it.  The auto save file is deleted whenever the real startup file is
915 saved.
916
917 @vindex gnus-use-dribble-file
918 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
919 maintain a dribble buffer.  The default is @code{t}.
920
921 @vindex gnus-dribble-directory
922 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
923 this variable is @code{nil}, which it is by default, Gnus will dribble
924 into the directory where the @file{.newsrc} file is located.  (This is
925 normally the user's home directory.)  The dribble file will get the same
926 file permissions as the @code{.newsrc} file.
927
928
929 @node The Active File
930 @section The Active File
931 @cindex active file
932 @cindex ignored groups
933
934 When Gnus starts, or indeed whenever it tries to determine whether new
935 articles have arrived, it reads the active file.  This is a very large
936 file that lists all the active groups and articles on the server.
937
938 @vindex gnus-ignored-newsgroups
939 Before examining the active file, Gnus deletes all lines that match the
940 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
941 any groups with bogus names, but you can use this variable to make Gnus
942 ignore hierarchies you aren't ever interested in.  However, this is not
943 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
944 Groups} for an overview of other variables that can be used instead.
945
946 @c This variable is
947 @c @code{nil} by default, and will slow down active file handling somewhat
948 @c if you set it to anything else.
949
950 @vindex gnus-read-active-file
951 @c @head
952 The active file can be rather Huge, so if you have a slow network, you
953 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
954 reading the active file.  This variable is @code{some} by default.
955
956 Gnus will try to make do by getting information just on the groups that
957 you actually subscribe to.
958
959 Note that if you subscribe to lots and lots of groups, setting this
960 variable to @code{nil} will probably make Gnus slower, not faster.  At
961 present, having this variable @code{nil} will slow Gnus down
962 considerably, unless you read news over a 2400 baud modem.  
963
964 This variable can also have the value @code{some}.  Gnus will then
965 attempt to read active info only on the subscribed groups.  On some
966 servers this is quite fast (on sparkling, brand new INN servers that
967 support the @code{LIST ACTIVE group} command), on others this isn't fast
968 at all.  In any case, @code{some} should be faster than @code{nil}, and
969 is certainly faster than @code{t} over slow lines.
970
971 If this variable is @code{nil}, Gnus will ask for group info in total
972 lock-step, which isn't very fast.  If it is @code{some} and you use an
973 @sc{nntp} server, Gnus will pump out commands as fast as it can, and
974 read all the replies in one swoop.  This will normally result in better
975 performance, but if the server does not support the aforementioned
976 @code{LIST ACTIVE group} command, this isn't very nice to the server.
977
978 In any case, if you use @code{some} or @code{nil}, you should definitely
979 kill all groups that you aren't interested in to speed things up.
980
981 Note that this variable also affects active file retrieval from
982 secondary select methods.
983
984
985 @node Startup Variables
986 @section Startup Variables
987
988 @table @code
989
990 @item gnus-load-hook
991 @vindex gnus-load-hook
992 A hook run while Gnus is being loaded.  Note that this hook will
993 normally be run just once in each Emacs session, no matter how many
994 times you start Gnus.
995
996 @item gnus-before-startup-hook
997 @vindex gnus-before-startup-hook
998 A hook run after starting up Gnus successfully.
999
1000 @item gnus-startup-hook
1001 @vindex gnus-startup-hook
1002 A hook run as the very last thing after starting up Gnus
1003
1004 @item gnus-started-hook
1005 @vindex gnus-started-hook
1006 A hook that is run as the very last thing after starting up Gnus
1007 successfully.
1008
1009 @item gnus-started-hook
1010 @vindex gnus-started-hook
1011 A hook that is run after reading the @file{.newsrc} file(s), but before
1012 generating the group buffer.
1013
1014 @item gnus-check-bogus-newsgroups
1015 @vindex gnus-check-bogus-newsgroups
1016 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1017 startup.  A @dfn{bogus group} is a group that you have in your
1018 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1019 bogus groups can take quite a while, so to save time and resources it's
1020 best to leave this option off, and do the checking for bogus groups once
1021 in a while from the group buffer instead (@pxref{Group Maintenance}).
1022
1023 @item gnus-inhibit-startup-message
1024 @vindex gnus-inhibit-startup-message
1025 If non-@code{nil}, the startup message won't be displayed.  That way,
1026 your boss might not notice as easily that you are reading news instead
1027 of doing your job.  Note that this variable is used before
1028 @file{.gnus.el} is loaded, so it should be set in @code{.emacs} instead.
1029
1030 @item gnus-no-groups-message
1031 @vindex gnus-no-groups-message
1032 Message displayed by Gnus when no groups are available.
1033
1034 @item gnus-play-startup-jingle
1035 @vindex gnus-play-startup-jingle
1036 If non-@code{nil}, play the Gnus jingle at startup.
1037
1038 @item gnus-startup-jingle
1039 @vindex gnus-startup-jingle
1040 Jingle to be played if the above variable is non-@code{nil}.  The
1041 default is @samp{Tuxedomoon.Jingle4.au}.
1042
1043 @end table
1044
1045
1046 @node The Group Buffer
1047 @chapter The Group Buffer
1048 @cindex group buffer
1049
1050 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1051 is the first buffer shown when Gnus starts, and will never be killed as
1052 long as Gnus is active.
1053
1054 @iftex
1055 @iflatex
1056 \gnusfigure{The Group Buffer}{320}{
1057 \put(75,50){\epsfig{figure=tmp/group.ps,height=9cm}}
1058 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1059 \put(120,38){\vector(1,2){10}}
1060 \put(40,60){\makebox(0,0)[r]{Mode line}}
1061 \put(40,58){\vector(1,0){30}}
1062 \put(200,28){\makebox(0,0)[t]{Native select method}}
1063 \put(200,26){\vector(-1,2){15}}
1064 }
1065 @end iflatex
1066 @end iftex
1067
1068 @menu
1069 * Group Buffer Format::    Information listed and how you can change it.
1070 * Group Maneuvering::      Commands for moving in the group buffer.
1071 * Selecting a Group::      Actually reading news.
1072 * Group Data::             Changing the info for a group.
1073 * Subscription Commands::  Unsubscribing, killing, subscribing.
1074 * Group Levels::           Levels? What are those, then?
1075 * Group Score::            A mechanism for finding out what groups you like.
1076 * Marking Groups::         You can mark groups for later processing.
1077 * Foreign Groups::         Creating and editing groups.
1078 * Group Parameters::       Each group may have different parameters set.
1079 * Listing Groups::         Gnus can list various subsets of the groups.
1080 * Sorting Groups::         Re-arrange the group order.
1081 * Group Maintenance::      Maintaining a tidy @file{.newsrc} file.
1082 * Browse Foreign Server::  You can browse a server.  See what it has to offer.
1083 * Exiting Gnus::           Stop reading news and get some work done.
1084 * Group Topics::           A folding group mode divided into topics.
1085 * Misc Group Stuff::       Other stuff that you can to do.
1086 @end menu
1087
1088
1089 @node Group Buffer Format
1090 @section Group Buffer Format
1091
1092 @menu 
1093 * Group Line Specification::       Deciding how the group buffer is to look.
1094 * Group Modeline Specification::   The group buffer modeline.
1095 * Group Highlighting::             Having nice colors in the group buffer.
1096 @end menu
1097
1098
1099 @node Group Line Specification
1100 @subsection Group Line Specification
1101 @cindex group buffer format
1102
1103 The default format of the group buffer is nice and dull, but you can
1104 make it as exciting and ugly as you feel like.
1105
1106 Here's a couple of example group lines:
1107
1108 @example
1109      25: news.announce.newusers
1110  *    0: alt.fan.andrea-dworkin
1111 @end example
1112
1113 Quite simple, huh?
1114
1115 You can see that there are 25 unread articles in
1116 @samp{news.announce.newusers}.  There are no unread articles, but some
1117 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1118 asterisk at the beginning of the line?).
1119
1120 @vindex gnus-group-line-format
1121 You can change that format to whatever you want by fiddling with the
1122 @code{gnus-group-line-format} variable.  This variable works along the
1123 lines of a @code{format} specification, which is pretty much the same as
1124 a @code{printf} specifications, for those of you who use (feh!) C.
1125 @xref{Formatting Variables}. 
1126
1127 @samp{%M%S%5y: %(%g%)\n} is the value that produced those lines above.
1128
1129 There should always be a colon on the line; the cursor always moves to
1130 the colon after performing an operation.  Nothing else is required---not
1131 even the group name.  All displayed text is just window dressing, and is
1132 never examined by Gnus.  Gnus stores all real information it needs using
1133 text properties.
1134
1135 (Note that if you make a really strange, wonderful, spreadsheet-like
1136 layout, everybody will believe you are hard at work with the accounting
1137 instead of wasting time reading news.)
1138
1139 Here's a list of all available format characters:
1140
1141 @table @samp
1142
1143 @item M    
1144 An asterisk if the group only has marked articles.
1145
1146 @item S
1147 Whether the group is subscribed.
1148
1149 @item L    
1150 Level of subscribedness.
1151
1152 @item N
1153 Number of unread articles.
1154
1155 @item I
1156 Number of dormant articles.
1157
1158 @item T
1159 Number of ticked articles.
1160
1161 @item R
1162 Number of read articles.
1163
1164 @item t
1165 Estimated total number of articles.  (This is really @var{max-number}
1166 minus @var{min-number} plus 1.)
1167
1168 @item y
1169 Number of unread, unticked, non-dormant articles.
1170
1171 @item i
1172 Number of ticked and dormant articles.
1173
1174 @item g
1175 Full group name.
1176
1177 @item G
1178 Group name.
1179
1180 @item D
1181 Newsgroup description.
1182
1183 @item o
1184 @samp{m} if moderated.
1185
1186 @item O
1187 @samp{(m)} if moderated.
1188
1189 @item s
1190 Select method.
1191
1192 @item n
1193 Select from where.
1194
1195 @item z
1196 A string that looks like @samp{<%s:%n>} if a foreign select method is
1197 used.
1198
1199 @item P
1200 Indentation based on the level of the topic (@pxref{Group Topics}). 
1201
1202 @item c
1203 @vindex gnus-group-uncollapsed-levels
1204 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1205 variable says how many levels to leave at the end of the group name.
1206 The default is 1---this will mean that group names like
1207 @samp{gnu.emacs.gnus} will be shortened to @samp{g.emacs.gnus}.
1208
1209 @item m
1210 @vindex gnus-new-mail-mark
1211 @cindex %
1212 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1213 the group lately.
1214
1215 @item d
1216 A string that says when you last read the group (@pxref{Group
1217 Timestamp}). 
1218
1219 @item u
1220 User defined specifier.  The next character in the format string should
1221 be a letter.  Gnus will call the function
1222 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1223 following @samp{%u}.  The function will be passed a single dummy
1224 parameter as argument.  The function should return a string, which will
1225 be inserted into the buffer just like information from any other
1226 specifier.
1227 @end table
1228
1229 @cindex *
1230 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1231 if no info is available---for instance, if it is a non-activated foreign
1232 group, or a bogus native group.
1233
1234
1235 @node Group Modeline Specification
1236 @subsection Group Modeline Specification
1237 @cindex group modeline
1238
1239 @vindex gnus-group-mode-line-format
1240 The mode line can be changed by setting
1241 @code{gnus-group-mode-line-format} (@pxref{Formatting Variables}).  It
1242 doesn't understand that many format specifiers:
1243
1244 @table @samp
1245 @item S
1246 The native news server.
1247 @item M
1248 The native select method.
1249 @end table
1250
1251
1252 @node Group Highlighting
1253 @subsection Group Highlighting
1254 @cindex highlighting
1255 @cindex group highlighting
1256
1257 @vindex gnus-group-highlight
1258 Highlighting in the group buffer is controlled by the
1259 @code{gnus-group-highlight} variable.  This is an alist with elements
1260 that look like @var{(form . face)}.  If @var{form} evaluates to
1261 something non-@code{nil}, the @var{face} will be used on the line.
1262
1263 Here's an example value for this variable that might look nice if the
1264 background is dark:
1265
1266 @lisp
1267 (face-spec-set 'my-group-face-1 '((t (:foreground "Red" :bold t))))
1268 (face-spec-set 'my-group-face-2 '((t (:foreground "SeaGreen" :bold t))))
1269 (face-spec-set 'my-group-face-3 '((t (:foreground "SpringGreen" :bold t))))
1270 (face-spec-set 'my-group-face-4 '((t (:foreground "SteelBlue" :bold t))))
1271 (face-spec-set 'my-group-face-5 '((t (:foreground "SkyBlue" :bold t))))
1272
1273 (setq gnus-group-highlight
1274       '(((> unread 200) . my-group-face-1)
1275         ((and (< level 3) (zerop unread)) . my-group-face-2)
1276         ((< level 3) . my-group-face-3)
1277         ((zerop unread) . my-group-face-4)
1278 (setq gnus-group-highlight
1279       `(((> unread 200) . 
1280          ,(custom-face-lookup "Red" nil nil t nil nil))
1281         ((and (< level 3) (zerop unread)) . 
1282          ,(custom-face-lookup "SeaGreen" nil nil t nil nil))
1283         ((< level 3) . 
1284          ,(custom-face-lookup "SpringGreen" nil nil t nil nil))
1285         ((zerop unread) . 
1286          ,(custom-face-lookup "SteelBlue" nil nil t nil nil))
1287         (t . 
1288          ,(custom-face-lookup "SkyBlue" nil nil t nil nil))))
1289         (t . my-group-face-5)))
1290 @end lisp
1291
1292 Variables that are dynamically bound when the forms are evaluated
1293 include:
1294
1295 @table @code
1296 @item group
1297 The group name.
1298 @item unread
1299 The number of unread articles in the group.
1300 @item method
1301 The select method.
1302 @item mailp
1303 Whether the group is a mail group.
1304 @item level
1305 The level of the group.
1306 @item score
1307 The score of the group.
1308 @item ticked 
1309 The number of ticked articles in the group.
1310 @item total
1311 The total number of articles in the group.  Or rather, MAX-NUMBER minus
1312 MIN-NUMBER plus one.
1313 @item topic
1314 When using the topic minor mode, this variable is bound to the current
1315 topic being inserted.
1316 @end table
1317
1318 When the forms are @code{eval}ed, point is at the beginning of the line
1319 of the group in question, so you can use many of the normal Gnus
1320 functions for snarfing info on the group.
1321
1322 @vindex gnus-group-update-hook
1323 @findex gnus-group-highlight-line
1324 @code{gnus-group-update-hook} is called when a group line is changed.
1325 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1326 calls @code{gnus-group-highlight-line} by default.
1327
1328
1329 @node Group Maneuvering
1330 @section Group Maneuvering
1331 @cindex group movement
1332
1333 All movement commands understand the numeric prefix and will behave as
1334 expected, hopefully. 
1335
1336 @table @kbd
1337
1338 @item n
1339 @kindex n (Group)
1340 @findex gnus-group-next-unread-group
1341 Go to the next group that has unread articles
1342 (@code{gnus-group-next-unread-group}).
1343
1344 @item p
1345 @itemx DEL
1346 @kindex DEL (Group)
1347 @kindex p (Group)
1348 @findex gnus-group-prev-unread-group
1349 Go to the previous group that has unread articles
1350 (@code{gnus-group-prev-unread-group}).
1351
1352 @item N
1353 @kindex N (Group)
1354 @findex gnus-group-next-group
1355 Go to the next group (@code{gnus-group-next-group}).
1356
1357 @item P
1358 @kindex P (Group)
1359 @findex gnus-group-prev-group
1360 Go to the previous group (@code{gnus-group-prev-group}).
1361
1362 @item M-p
1363 @kindex M-p (Group)
1364 @findex gnus-group-next-unread-group-same-level
1365 Go to the next unread group on the same (or lower) level
1366 (@code{gnus-group-next-unread-group-same-level}). 
1367
1368 @item M-n
1369 @kindex M-n (Group)
1370 @findex gnus-group-prev-unread-group-same-level
1371 Go to the previous unread group on the same (or lower) level
1372 (@code{gnus-group-prev-unread-group-same-level}). 
1373 @end table
1374
1375 Three commands for jumping to groups:
1376
1377 @table @kbd
1378
1379 @item j
1380 @kindex j (Group)
1381 @findex gnus-group-jump-to-group
1382 Jump to a group (and make it visible if it isn't already)
1383 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
1384 like living groups.
1385
1386 @item ,
1387 @kindex , (Group)
1388 @findex gnus-group-best-unread-group
1389 Jump to the unread group with the lowest level
1390 (@code{gnus-group-best-unread-group}). 
1391
1392 @item .
1393 @kindex . (Group)
1394 @findex gnus-group-first-unread-group
1395 Jump to the first group with unread articles
1396 (@code{gnus-group-first-unread-group}).  
1397 @end table
1398
1399 @vindex gnus-group-goto-unread
1400 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
1401 commands will move to the next group, not the next unread group.  Even
1402 the commands that say they move to the next unread group.  The default
1403 is @code{t}.
1404
1405
1406 @node Selecting a Group
1407 @section Selecting a Group
1408 @cindex group selection
1409
1410 @table @kbd
1411
1412 @item SPACE
1413 @kindex SPACE (Group)
1414 @findex gnus-group-read-group
1415 Select the current group, switch to the summary buffer and display the
1416 first unread article (@code{gnus-group-read-group}).  If there are no
1417 unread articles in the group, or if you give a non-numerical prefix to
1418 this command, Gnus will offer to fetch all the old articles in this
1419 group from the server.  If you give a numerical prefix @var{N}, @var{N}
1420 determines the number of articles Gnus will fetch.  If @var{N} is
1421 positive, Gnus fetches the @var{N} newest articles, if @var{N} is
1422 negative, Gnus fetches the @var{abs(N)} oldest articles.
1423
1424 @item RET
1425 @kindex RET (Group)
1426 @findex gnus-group-select-group
1427 Select the current group and switch to the summary buffer
1428 (@code{gnus-group-select-group}).  Takes the same arguments as
1429 @code{gnus-group-read-group}---the only difference is that this command
1430 does not display the first unread article automatically upon group
1431 entry. 
1432
1433 @item M-RET
1434 @kindex M-RET (Group)
1435 @findex gnus-group-quick-select-group
1436 This does the same as the command above, but tries to do it with the
1437 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
1438 scoring/killing will be performed, there will be no highlights and no
1439 expunging.  This might be useful if you're in a real hurry and have to
1440 enter some humongous group.  If you give a 0 prefix to this command
1441 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
1442 which is useful if you want to toggle threading before generating the
1443 summary buffer (@pxref{Summary Generation Commands}).
1444
1445 @item M-SPACE
1446 @kindex M-SPACE (Group)
1447 @findex gnus-group-visible-select-group
1448 This is yet one more command that does the same as the @kbd{RET}
1449 command, but this one does it without expunging and hiding dormants
1450 (@code{gnus-group-visible-select-group}).
1451
1452 @item M-C-RET
1453 @kindex M-C-RET (Group)
1454 @findex gnus-group-select-group-ephemerally
1455 Finally, this command selects the current group ephemerally without
1456 doing any processing of its contents
1457 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
1458 turned off.  Everything you do in the group after selecting it in this
1459 manner will have no permanent effects.
1460
1461 @end table
1462
1463 @vindex gnus-large-newsgroup
1464 The @code{gnus-large-newsgroup} variable says what Gnus should consider
1465 to be a big group.  This is 200 by default.  If the group has more
1466 (unread and/or ticked) articles than this, Gnus will query the user
1467 before entering the group.  The user can then specify how many articles
1468 should be fetched from the server.  If the user specifies a negative
1469 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
1470 is positive, the @code{n} articles that have arrived most recently will
1471 be fetched.
1472
1473 @vindex gnus-select-group-hook
1474 @vindex gnus-auto-select-first
1475 @code{gnus-auto-select-first} control whether any articles are selected
1476 automatically when entering a group with the @kbd{SPACE} command.
1477
1478 @table @code
1479
1480 @item nil
1481 Don't select any articles when entering the group.  Just display the
1482 full summary buffer.
1483
1484 @item t
1485 Select the first unread article when entering the group.  
1486
1487 @item best
1488 Select the most high-scored article in the group when entering the
1489 group. 
1490 @end table
1491         
1492 If you want to prevent automatic selection in some group (say, in a
1493 binary group with Huge articles) you can set this variable to @code{nil}
1494 in @code{gnus-select-group-hook}, which is called when a group is
1495 selected.
1496
1497
1498 @node Subscription Commands
1499 @section Subscription Commands
1500 @cindex subscription
1501
1502 @table @kbd
1503
1504 @item S t
1505 @itemx u
1506 @kindex S t (Group)
1507 @kindex u (Group)
1508 @findex gnus-group-unsubscribe-current-group
1509 @c @icon{gnus-group-unsubscribe}
1510 Toggle subscription to the current group
1511 (@code{gnus-group-unsubscribe-current-group}).  
1512
1513 @item S s
1514 @itemx U
1515 @kindex S s (Group)
1516 @kindex U (Group)
1517 @findex gnus-group-unsubscribe-group
1518 Prompt for a group to subscribe, and then subscribe it.  If it was
1519 subscribed already, unsubscribe it instead
1520 (@code{gnus-group-unsubscribe-group}).
1521
1522 @item S k
1523 @itemx C-k
1524 @kindex S k (Group)
1525 @kindex C-k (Group)
1526 @findex gnus-group-kill-group
1527 @c @icon{gnus-group-kill-group}
1528 Kill the current group (@code{gnus-group-kill-group}).
1529
1530 @item S y
1531 @itemx C-y
1532 @kindex S y (Group)
1533 @kindex C-y (Group)
1534 @findex gnus-group-yank-group
1535 Yank the last killed group (@code{gnus-group-yank-group}).
1536
1537 @item C-x C-t
1538 @kindex C-x C-t (Group)
1539 @findex gnus-group-transpose-groups
1540 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
1541 really a subscription command, but you can use it instead of a
1542 kill-and-yank sequence sometimes.
1543
1544 @item S w
1545 @itemx C-w
1546 @kindex S w (Group)
1547 @kindex C-w (Group)
1548 @findex gnus-group-kill-region
1549 Kill all groups in the region (@code{gnus-group-kill-region}). 
1550
1551 @item S z
1552 @kindex S z (Group)
1553 @findex gnus-group-kill-all-zombies
1554 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
1555
1556 @item S C-k
1557 @kindex S C-k (Group)
1558 @findex gnus-group-kill-level
1559 Kill all groups on a certain level (@code{gnus-group-kill-level}).
1560 These groups can't be yanked back after killing, so this command should
1561 be used with some caution.  The only time where this command comes in
1562 really handy is when you have a @file{.newsrc} with lots of unsubscribed
1563 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
1564 kill off all unsubscribed groups that do not have message numbers in the
1565 @file{.newsrc} file.  
1566
1567 @end table
1568
1569 Also @pxref{Group Levels}.
1570
1571
1572 @node Group Data
1573 @section Group Data
1574
1575 @table @kbd
1576
1577 @item c
1578 @kindex c (Group)
1579 @findex gnus-group-catchup-current
1580 @vindex gnus-group-catchup-group-hook
1581 @c @icon{gnus-group-catchup-current}
1582 Mark all unticked articles in this group as read
1583 (@code{gnus-group-catchup-current}).
1584 @code{gnus-group-catchup-group-hook} is called when catching up a group from
1585 the group buffer.
1586
1587 @item C
1588 @kindex C (Group)
1589 @findex gnus-group-catchup-current-all
1590 Mark all articles in this group, even the ticked ones, as read
1591 (@code{gnus-group-catchup-current-all}).   
1592
1593 @item M-c
1594 @kindex M-c (Group)
1595 @findex gnus-group-clear-data
1596 Clear the data from the current group---nix out marks and the list of
1597 read articles (@code{gnus-group-clear-data}).
1598
1599 @item M-x gnus-group-clear-data-on-native-groups
1600 @kindex M-x gnus-group-clear-data-on-native-groups
1601 @findex gnus-group-clear-data-on-native-groups
1602 If you have switched from one @sc{nntp} server to another, all your marks
1603 and read ranges have become worthless.  You can use this command to
1604 clear out all data that you have on your native groups.  Use with
1605 caution. 
1606
1607 @end table
1608
1609
1610 @node Group Levels
1611 @section Group Levels
1612 @cindex group level
1613 @cindex level
1614
1615 All groups have a level of @dfn{subscribedness}.  For instance, if a
1616 group is on level 2, it is more subscribed than a group on level 5.  You
1617 can ask Gnus to just list groups on a given level or lower
1618 (@pxref{Listing Groups}), or to just check for new articles in groups on
1619 a given level or lower (@pxref{Scanning New Messages}).
1620
1621 Remember:  The higher the level of the group, the less important it is. 
1622
1623 @table @kbd
1624
1625 @item S l
1626 @kindex S l (Group)
1627 @findex gnus-group-set-current-level
1628 Set the level of the current group.  If a numeric prefix is given, the
1629 next @var{n} groups will have their levels set.  The user will be
1630 prompted for a level.
1631 @end table
1632
1633 @vindex gnus-level-killed
1634 @vindex gnus-level-zombie
1635 @vindex gnus-level-unsubscribed
1636 @vindex gnus-level-subscribed
1637 Gnus considers groups from levels 1 to
1638 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
1639 @code{gnus-level-subscribed} (exclusive) and
1640 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
1641 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
1642 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
1643 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
1644 same, but zombie and killed groups have no information on what articles
1645 you have read, etc, stored.  This distinction between dead and living
1646 groups isn't done because it is nice or clever, it is done purely for
1647 reasons of efficiency.
1648
1649 It is recommended that you keep all your mail groups (if any) on quite
1650 low levels (e.g. 1 or 2).
1651
1652 If you want to play with the level variables, you should show some care.
1653 Set them once, and don't touch them ever again.  Better yet, don't touch
1654 them at all unless you know exactly what you're doing.
1655
1656 @vindex gnus-level-default-unsubscribed
1657 @vindex gnus-level-default-subscribed
1658 Two closely related variables are @code{gnus-level-default-subscribed}
1659 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
1660 which are the levels that new groups will be put on if they are
1661 (un)subscribed.  These two variables should, of course, be inside the
1662 relevant valid ranges.
1663
1664 @vindex gnus-keep-same-level
1665 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
1666 will only move to groups of the same level (or lower).  In
1667 particular, going from the last article in one group to the next group
1668 will go to the next group of the same level (or lower).  This might be
1669 handy if you want to read the most important groups before you read the
1670 rest.
1671
1672 @vindex gnus-group-default-list-level
1673 All groups with a level less than or equal to
1674 @code{gnus-group-default-list-level} will be listed in the group buffer
1675 by default.
1676
1677 @vindex gnus-group-list-inactive-groups
1678 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
1679 groups will be listed along with the unread groups.  This variable is
1680 @code{t} by default.  If it is @code{nil}, inactive groups won't be
1681 listed. 
1682
1683 @vindex gnus-group-use-permanent-levels
1684 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
1685 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
1686 use this level as the ``work'' level.
1687
1688 @vindex gnus-activate-level
1689 Gnus will normally just activate (i. e., query the server about) groups
1690 on level @code{gnus-activate-level} or less.  If you don't want to
1691 activate unsubscribed groups, for instance, you might set this variable
1692 to 5.  The default is 6.
1693
1694
1695 @node Group Score
1696 @section Group Score
1697 @cindex group score
1698
1699 You would normally keep important groups on high levels, but that scheme
1700 is somewhat restrictive.  Don't you wish you could have Gnus sort the
1701 group buffer according to how often you read groups, perhaps?  Within
1702 reason?  
1703
1704 This is what @dfn{group score} is for.  You can assign a score to each
1705 group.  You can then sort the group buffer based on this score.
1706 Alternatively, you can sort on score and then level.  (Taken together,
1707 the level and the score is called the @dfn{rank} of the group.  A group
1708 that is on level 4 and has a score of 1 has a higher rank than a group
1709 on level 5 that has a score of 300.  (The level is the most significant
1710 part and the score is the least significant part.))
1711
1712 @findex gnus-summary-bubble-group
1713 If you want groups you read often to get higher scores than groups you
1714 read seldom you can add the @code{gnus-summary-bubble-group} function to
1715 the @code{gnus-summary-exit-hook} hook.  This will result (after
1716 sorting) in a bubbling sort of action.  If you want to see that in
1717 action after each summary exit, you can add
1718 @code{gnus-group-sort-groups-by-rank} or
1719 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
1720 slow things down somewhat.
1721
1722
1723 @node Marking Groups
1724 @section Marking Groups
1725 @cindex marking groups
1726
1727 If you want to perform some command on several groups, and they appear
1728 subsequently in the group buffer, you would normally just give a
1729 numerical prefix to the command.  Most group commands will then do your
1730 bidding on those groups.
1731
1732 However, if the groups are not in sequential order, you can still
1733 perform a command on several groups.  You simply mark the groups first
1734 with the process mark and then execute the command.
1735
1736 @table @kbd
1737
1738 @item #
1739 @kindex # (Group)
1740 @itemx M m
1741 @kindex M m (Group)
1742 @findex gnus-group-mark-group
1743 Set the mark on the current group (@code{gnus-group-mark-group}). 
1744
1745 @item M-#
1746 @kindex M-# (Group)
1747 @itemx M u
1748 @kindex M u (Group)
1749 @findex gnus-group-unmark-group
1750 Remove the mark from the current group
1751 (@code{gnus-group-unmark-group}). 
1752
1753 @item M U
1754 @kindex M U (Group)
1755 @findex gnus-group-unmark-all-groups
1756 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}). 
1757
1758 @item M w
1759 @kindex M w (Group)
1760 @findex gnus-group-mark-region
1761 Mark all groups between point and mark (@code{gnus-group-mark-region}). 
1762
1763 @item M b
1764 @kindex M b (Group)
1765 @findex gnus-group-mark-buffer
1766 Mark all groups in the buffer (@code{gnus-group-mark-buffer}). 
1767
1768 @item M r
1769 @kindex M r (Group)
1770 @findex gnus-group-mark-regexp
1771 Mark all groups that match some regular expression
1772 (@code{gnus-group-mark-regexp}).  
1773 @end table
1774
1775 Also @pxref{Process/Prefix}.
1776
1777 @findex gnus-group-universal-argument
1778 If you want to execute some command on all groups that have been marked
1779 with the process mark, you can use the @kbd{M-&}
1780 (@code{gnus-group-universal-argument}) command.  It will prompt you for
1781 the command to be executed.
1782
1783
1784 @node Foreign Groups
1785 @section Foreign Groups
1786 @cindex foreign groups
1787
1788 Below are some group mode commands for making and editing general foreign
1789 groups, as well as commands to ease the creation of a few
1790 special-purpose groups.  All these commands insert the newly created
1791 groups under point---@code{gnus-subscribe-newsgroup-method} is not
1792 consulted.
1793
1794 @table @kbd
1795
1796 @item G m
1797 @kindex G m (Group)
1798 @findex gnus-group-make-group
1799 @cindex making groups
1800 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
1801 for a name, a method and possibly an @dfn{address}.  For an easier way
1802 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
1803
1804 @item G r
1805 @kindex G r (Group)
1806 @findex gnus-group-rename-group
1807 @cindex renaming groups
1808 Rename the current group to something else
1809 (@code{gnus-group-rename-group}).  This is valid only on some
1810 groups---mail groups mostly.  This command might very well be quite slow
1811 on some backends.
1812
1813 @item G c
1814 @kindex G c (Group)
1815 @cindex customizing
1816 @findex gnus-group-customize
1817 Customize the group parameters (@code{gnus-group-customize}).
1818
1819 @item G e
1820 @kindex G e (Group)
1821 @findex gnus-group-edit-group-method
1822 @cindex renaming groups
1823 Enter a buffer where you can edit the select method of the current
1824 group (@code{gnus-group-edit-group-method}).
1825
1826 @item G p
1827 @kindex G p (Group)
1828 @findex gnus-group-edit-group-parameters
1829 Enter a buffer where you can edit the group parameters
1830 (@code{gnus-group-edit-group-parameters}). 
1831
1832 @item G E
1833 @kindex G E (Group)
1834 @findex gnus-group-edit-group
1835 Enter a buffer where you can edit the group info
1836 (@code{gnus-group-edit-group}).
1837
1838 @item G d
1839 @kindex G d (Group)
1840 @findex gnus-group-make-directory-group
1841 @cindex nndir
1842 Make a directory group (@pxref{Directory Groups}).  You will be prompted
1843 for a directory name (@code{gnus-group-make-directory-group}).
1844
1845 @item G h 
1846 @kindex G h (Group)
1847 @cindex help group
1848 @findex gnus-group-make-help-group
1849 Make the Gnus help group (@code{gnus-group-make-help-group}).
1850
1851 @item G a
1852 @kindex G a (Group)
1853 @cindex (ding) archive
1854 @cindex archive group
1855 @findex gnus-group-make-archive-group
1856 @vindex gnus-group-archive-directory
1857 @vindex gnus-group-recent-archive-directory
1858 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
1859 default a group pointing to the most recent articles will be created
1860 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
1861 group will be created from @code{gnus-group-archive-directory}.
1862
1863 @item G k
1864 @kindex G k (Group)
1865 @findex gnus-group-make-kiboze-group
1866 @cindex nnkiboze
1867 Make a kiboze group.  You will be prompted for a name, for a regexp to
1868 match groups to be ``included'' in the kiboze group, and a series of
1869 strings to match on headers (@code{gnus-group-make-kiboze-group}).
1870 @xref{Kibozed Groups}.
1871
1872 @item G D
1873 @kindex G D (Group)
1874 @findex gnus-group-enter-directory
1875 @cindex nneething
1876 Read an arbitrary directory as if it were a newsgroup with the
1877 @code{nneething} backend (@code{gnus-group-enter-directory}).
1878 @xref{Anything Groups}. 
1879
1880 @item G f
1881 @kindex G f (Group)
1882 @findex gnus-group-make-doc-group
1883 @cindex ClariNet Briefs
1884 @cindex nndoc
1885 Make a group based on some file or other
1886 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
1887 command, you will be prompted for a file name and a file type.
1888 Currently supported types are @code{babyl}, @code{mbox}, @code{digest},
1889 @code{mmdf}, @code{news}, @code{rnews}, @code{clari-briefs},
1890 @code{rfc934}, @code{rfc822-forward}, and @code{forward}.  If you run
1891 this command without a prefix, Gnus will guess at the file type.
1892 @xref{Document Groups}.
1893
1894 @item G w
1895 @kindex G w (Group)
1896 @findex gnus-group-make-web-group
1897 @cindex DejaNews
1898 @cindex Alta Vista
1899 @cindex InReference
1900 @cindex nnweb
1901 Make an ephemeral group based on a web search
1902 (@code{gnus-group-make-web-group}).  If you give a prefix to this
1903 command, make a solid group instead.  You will be prompted for the
1904 search engine type and the search string.  Valid search engine types
1905 include @code{dejanews}, @code{altavista} and @code{reference}.
1906 @xref{Web Searches}.
1907
1908 @item G DEL
1909 @kindex G DEL (Group)
1910 @findex gnus-group-delete-group
1911 This function will delete the current group
1912 (@code{gnus-group-delete-group}).  If given a prefix, this function will
1913 actually delete all the articles in the group, and forcibly remove the
1914 group itself from the face of the Earth.  Use a prefix only if you are
1915 absolutely sure of what you are doing.  This command can't be used on
1916 read-only groups (like @code{nntp} group), though.
1917
1918 @item G V
1919 @kindex G V (Group)
1920 @findex gnus-group-make-empty-virtual
1921 Make a new, fresh, empty @code{nnvirtual} group
1922 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
1923
1924 @item G v
1925 @kindex G v (Group)
1926 @findex gnus-group-add-to-virtual
1927 Add the current group to an @code{nnvirtual} group
1928 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
1929 @end table
1930
1931 @xref{Select Methods} for more information on the various select
1932 methods. 
1933
1934 @vindex gnus-activate-foreign-newsgroups
1935 If @code{gnus-activate-foreign-newsgroups} is a positive number,
1936 Gnus will check all foreign groups with this level or lower at startup.
1937 This might take quite a while, especially if you subscribe to lots of
1938 groups from different @sc{nntp} servers.
1939
1940
1941 @node Group Parameters
1942 @section Group Parameters
1943 @cindex group parameters
1944
1945 The group parameters store information local to a particular group:
1946
1947 @table @code
1948 @item to-address
1949 @cindex to-address
1950 If the group parameter list contains an element that looks like
1951 @code{(to-address .  "some@@where.com")}, that address will be used by
1952 the backend when doing followups and posts.  This is primarily useful in
1953 mail groups that represent closed mailing lists---mailing lists where
1954 it's expected that everybody that writes to the mailing list is
1955 subscribed to it.  Since using this parameter ensures that the mail only
1956 goes to the mailing list itself, it means that members won't receive two
1957 copies of your followups.
1958
1959 Using @code{to-address} will actually work whether the group is foreign
1960 or not.  Let's say there's a group on the server that is called
1961 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
1962 the articles from a mail-to-news gateway.  Posting directly to this
1963 group is therefore impossible---you have to send mail to the mailing
1964 list address instead. 
1965
1966 @item to-list
1967 @cindex to-list
1968 If the group parameter list has an element that looks like
1969 @code{(to-list . "some@@where.com")}, that address will be used when
1970 doing a @kbd{a} in that group.  It is totally ignored when doing a
1971 followup---except that if it is present in a news group, you'll get mail
1972 group semantics when doing @kbd{f}.
1973
1974 If you do an @kbd{a} command in a mail group and you don't have a
1975 @code{to-list} group parameter, one will be added automatically upon
1976 sending the message.
1977
1978 @item visible
1979 @cindex visible
1980 If the group parameter list has the element @code{(visible . t)},
1981 that group will always be visible in the Group buffer, regardless
1982 of whether it has any unread articles.
1983
1984 @item broken-reply-to
1985 @cindex broken-reply-to
1986 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
1987 headers in this group are to be ignored.  This can be useful if you're
1988 reading a mailing list group where the listserv has inserted
1989 @code{Reply-To} headers that point back to the listserv itself.  This is
1990 broken behavior.  So there!
1991
1992 @item to-group
1993 @cindex to-group
1994 Elements like @code{(to-group . "some.group.name")} means that all
1995 posts in that group will be sent to @code{some.group.name}.  
1996
1997 @item newsgroup
1998 @cindex newsgroup
1999 If this symbol is present in the group parameter list, Gnus will treat
2000 all responses as if they were responses to news articles.  This can be
2001 useful if you have a mail group that's really a mirror of a news group. 
2002
2003 @item gcc-self
2004 @cindex gcc-self
2005 If this symbol is present in the group parameter list and set to
2006 @code{t}, newly composed messages will be @code{Gcc}'d to the current
2007 group. If it is present and set to @code{none}, no @code{Gcc:} header
2008 will be generated, if it is present and a string, this string will be
2009 inserted literally as a @code{gcc} header (this symbol takes precedence
2010 over any default @code{Gcc} rules as described later).  @xref{Archived
2011 Messages}
2012
2013 @item auto-expire
2014 @cindex auto-expire
2015 If the group parameter has an element that looks like @code{(auto-expire
2016 . t)}, all articles read will be marked as expirable.  For an
2017 alternative approach, @pxref{Expiring Mail}.
2018
2019 @item total-expire
2020 @cindex total-expire
2021 If the group parameter has an element that looks like
2022 @code{(total-expire . t)}, all read articles will be put through the
2023 expiry process, even if they are not marked as expirable.  Use with
2024 caution.  Unread, ticked and dormant articles are not eligible for
2025 expiry.
2026
2027 @item expiry-wait
2028 @cindex expiry-wait
2029 @vindex nnmail-expiry-wait-function
2030 If the group parameter has an element that looks like @code{(expiry-wait
2031 . 10)}, this value will override any @code{nnmail-expiry-wait} and
2032 @code{nnmail-expiry-wait-function} when expiring expirable messages.
2033 The value can either be a number of days (not necessarily an integer) or
2034 the symbols @code{never} or @code{immediate}.
2035
2036 @item score-file
2037 @cindex score file group parameter
2038 Elements that look like @code{(score-file . "file")} will make
2039 @file{file} into the current adaptive score file for the group in
2040 question.  All adaptive score entries will be put into this file.
2041
2042 @item adapt-file
2043 @cindex adapt file group parameter
2044 Elements that look like @code{(adapt-file . "file")} will make
2045 @file{file} into the current adaptive file for the group in question.
2046 All adaptive score entries will be put into this file.
2047
2048 @item admin-address
2049 When unsubscribing from a mailing list you should never send the
2050 unsubscription notice to the mailing list itself.  Instead, you'd send
2051 messages to the administrative address.  This parameter allows you to
2052 put the admin address somewhere convenient.
2053
2054 @item display
2055 Elements that look like @code{(display . MODE)} say which articles to
2056 display on entering the group.  Valid values are:
2057
2058 @table @code
2059 @item all
2060 Display all articles, both read and unread.
2061
2062 @item default
2063 Display the default visible articles, which normally includes unread and
2064 ticked articles.
2065 @end table
2066
2067 @item comment
2068 Elements that look like @code{(comment . "This is a comment")}
2069 are arbitrary comments on the group.  They are currently ignored by
2070 Gnus, but provide a place for you to store information on particular
2071 groups. 
2072
2073 @item @var{(variable form)}
2074 You can use the group parameters to set variables local to the group you
2075 are entering.  If you want to turn threading off in @samp{news.answers},
2076 you could put @code{(gnus-show-threads nil)} in the group parameters of
2077 that group.  @code{gnus-show-threads} will be made into a local variable
2078 in the summary buffer you enter, and the form @code{nil} will be
2079 @code{eval}ed there.
2080
2081 This can also be used as a group-specific hook function, if you'd like.
2082 If you want to hear a beep when you enter a group, you could put
2083 something like @code{(dummy-variable (ding))} in the parameters of that
2084 group.  @code{dummy-variable} will be set to the result of the
2085 @code{(ding)} form, but who cares?
2086
2087 @end table
2088
2089 Use the @kbd{G p} command to edit group parameters of a group.
2090
2091 @pxref{Topic Parameters}.
2092
2093 Here's an example group parameter list:
2094
2095 @example
2096 ((to-address . "ding@@gnus.org")
2097  (auto-expiry . t))
2098 @end example
2099
2100
2101 @node Listing Groups
2102 @section Listing Groups
2103 @cindex group listing
2104
2105 These commands all list various slices of the groups available.
2106
2107 @table @kbd
2108
2109 @item l
2110 @itemx A s
2111 @kindex A s (Group)
2112 @kindex l (Group)
2113 @findex gnus-group-list-groups
2114 List all groups that have unread articles
2115 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
2116 command will list only groups of level ARG and lower.  By default, it
2117 only lists groups of level five (i. e.,
2118 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
2119 groups).
2120
2121 @item L
2122 @itemx A u
2123 @kindex A u (Group)
2124 @kindex L (Group)
2125 @findex gnus-group-list-all-groups
2126 List all groups, whether they have unread articles or not
2127 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
2128 this command will list only groups of level ARG and lower.  By default,
2129 it lists groups of level seven or lower (i.e., just subscribed and
2130 unsubscribed groups).
2131
2132 @item A l
2133 @kindex A l (Group)
2134 @findex gnus-group-list-level
2135 List all unread groups on a specific level
2136 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
2137 with no unread articles.
2138
2139 @item A k
2140 @kindex A k (Group)
2141 @findex gnus-group-list-killed
2142 List all killed groups (@code{gnus-group-list-killed}).  If given a
2143 prefix argument, really list all groups that are available, but aren't
2144 currently (un)subscribed.  This could entail reading the active file
2145 from the server.
2146
2147 @item A z
2148 @kindex A z (Group)
2149 @findex gnus-group-list-zombies
2150 List all zombie groups (@code{gnus-group-list-zombies}).
2151
2152 @item A m
2153 @kindex A m (Group)
2154 @findex gnus-group-list-matching
2155 List all unread, subscribed groups with names that match a regexp
2156 (@code{gnus-group-list-matching}). 
2157
2158 @item A M
2159 @kindex A M (Group)
2160 @findex gnus-group-list-all-matching
2161 List groups that match a regexp (@code{gnus-group-list-all-matching}).
2162
2163 @item A A
2164 @kindex A A (Group)
2165 @findex gnus-group-list-active
2166 List absolutely all groups in the active file(s) of the
2167 server(s) you are connected to (@code{gnus-group-list-active}).  This
2168 might very well take quite a while.  It might actually be a better idea
2169 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
2170 thing to match on.  Also note that this command may list groups that
2171 don't exist (yet)---these will be listed as if they were killed groups.
2172 Take the output with some grains of salt.
2173
2174 @item A a
2175 @kindex A a (Group)
2176 @findex gnus-group-apropos
2177 List all groups that have names that match a regexp
2178 (@code{gnus-group-apropos}).
2179
2180 @item A d
2181 @kindex A d (Group)
2182 @findex gnus-group-description-apropos
2183 List all groups that have names or descriptions that match a regexp
2184 (@code{gnus-group-description-apropos}).
2185
2186 @end table
2187
2188 @vindex gnus-permanently-visible-groups
2189 @cindex visible group parameter
2190 Groups that match the @code{gnus-permanently-visible-groups} regexp will
2191 always be shown, whether they have unread articles or not.  You can also
2192 add the @code{visible} element to the group parameters in question to
2193 get the same effect.
2194
2195 @vindex gnus-list-groups-with-ticked-articles
2196 Groups that have just ticked articles in it are normally listed in the
2197 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
2198 @code{nil}, these groups will be treated just like totally empty
2199 groups.  It is @code{t} by default.
2200
2201
2202 @node Sorting Groups
2203 @section Sorting Groups
2204 @cindex sorting groups
2205
2206 @kindex C-c C-s (Group)
2207 @findex gnus-group-sort-groups
2208 @vindex gnus-group-sort-function
2209 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
2210 group buffer according to the function(s) given by the
2211 @code{gnus-group-sort-function} variable.  Available sorting functions
2212 include: 
2213
2214 @table @code
2215
2216 @item gnus-group-sort-by-alphabet
2217 @findex gnus-group-sort-by-alphabet
2218 Sort the group names alphabetically.  This is the default.
2219
2220 @item gnus-group-sort-by-real-name
2221 @findex gnus-group-sort-by-real-name
2222 Sort the group alphabetically on the real (unprefixed) group names.
2223
2224 @item gnus-group-sort-by-level
2225 @findex gnus-group-sort-by-level
2226 Sort by group level.
2227
2228 @item gnus-group-sort-by-score
2229 @findex gnus-group-sort-by-score
2230 Sort by group score.
2231
2232 @item gnus-group-sort-by-rank
2233 @findex gnus-group-sort-by-rank
2234 Sort by group score and then the group level.  The level and the score
2235 are, when taken together, the group's @dfn{rank}. 
2236
2237 @item gnus-group-sort-by-unread
2238 @findex gnus-group-sort-by-unread
2239 Sort by number of unread articles.
2240
2241 @item gnus-group-sort-by-method
2242 @findex gnus-group-sort-by-method
2243 Sort alphabetically on the select method.
2244
2245
2246 @end table
2247
2248 @code{gnus-group-sort-function} can also be a list of sorting
2249 functions.  In that case, the most significant sort key function must be
2250 the last one.
2251
2252
2253 There are also a number of commands for sorting directly according to
2254 some sorting criteria:
2255
2256 @table @kbd
2257 @item G S a
2258 @kindex G S a (Group)
2259 @findex gnus-group-sort-groups-by-alphabet
2260 Sort the group buffer alphabetically by group name
2261 (@code{gnus-group-sort-groups-by-alphabet}). 
2262
2263 @item G S u
2264 @kindex G S u (Group)
2265 @findex gnus-group-sort-groups-by-unread
2266 Sort the group buffer by the number of unread articles
2267 (@code{gnus-group-sort-groups-by-unread}).
2268
2269 @item G S l
2270 @kindex G S l (Group)
2271 @findex gnus-group-sort-groups-by-level
2272 Sort the group buffer by group level
2273 (@code{gnus-group-sort-groups-by-level}). 
2274
2275 @item G S v
2276 @kindex G S v (Group)
2277 @findex gnus-group-sort-groups-by-score
2278 Sort the group buffer by group score
2279 (@code{gnus-group-sort-groups-by-score}). 
2280
2281 @item G S r
2282 @kindex G S r (Group)
2283 @findex gnus-group-sort-groups-by-rank
2284 Sort the group buffer by group rank
2285 (@code{gnus-group-sort-groups-by-rank}). 
2286
2287 @item G S m
2288 @kindex G S m (Group)
2289 @findex gnus-group-sort-groups-by-method
2290 Sort the group buffer alphabetically by backend name
2291 (@code{gnus-group-sort-groups-by-method}). 
2292
2293 @end table
2294
2295 When given a prefix, all these commands will sort in reverse order. 
2296
2297 You can also sort a subset of the groups:
2298
2299 @table @kbd
2300 @item G P a
2301 @kindex G P a (Group)
2302 @findex gnus-group-sort-selected-groups-by-alphabet
2303 Sort the process/prefixed groups in the group buffer alphabetically by
2304 group name (@code{gnus-group-sort-selected-groups-by-alphabet}).
2305
2306 @item G P u
2307 @kindex G P u (Group)
2308 @findex gnus-group-sort-selected-groups-by-unread
2309 Sort the process/prefixed groups in the group buffer by the number of
2310 unread articles (@code{gnus-group-sort-selected-groups-by-unread}).
2311
2312 @item G P l
2313 @kindex G P l (Group)
2314 @findex gnus-group-sort-selected-groups-by-level
2315 Sort the process/prefixed groups in the group buffer by group level
2316 (@code{gnus-group-sort-selected-groups-by-level}).
2317
2318 @item G P v
2319 @kindex G P v (Group)
2320 @findex gnus-group-sort-selected-groups-by-score
2321 Sort the process/prefixed groups in the group buffer by group score
2322 (@code{gnus-group-sort-selected-groups-by-score}).
2323
2324 @item G P r
2325 @kindex G P r (Group)
2326 @findex gnus-group-sort-selected-groups-by-rank
2327 Sort the process/prefixed groups in the group buffer by group rank
2328 (@code{gnus-group-sort-selected-groups-by-rank}).
2329
2330 @item G P m
2331 @kindex G P m (Group)
2332 @findex gnus-group-sort-selected-groups-by-method
2333 Sort the process/prefixed groups in the group buffer alphabetically by
2334 backend name (@code{gnus-group-sort-selected-groups-by-method}).
2335
2336 @end table
2337
2338
2339
2340 @node Group Maintenance
2341 @section Group Maintenance
2342 @cindex bogus groups
2343
2344 @table @kbd
2345 @item b
2346 @kindex b (Group)
2347 @findex gnus-group-check-bogus-groups
2348 Find bogus groups and delete them
2349 (@code{gnus-group-check-bogus-groups}).
2350
2351 @item F
2352 @kindex F (Group)
2353 @findex gnus-group-find-new-groups
2354 Find new groups and process them (@code{gnus-group-find-new-groups}).
2355 If given a prefix, use the @code{ask-server} method to query the server
2356 for new groups.
2357
2358 @item C-c C-x
2359 @kindex C-c C-x (Group)
2360 @findex gnus-group-expire-articles
2361 Run all expirable articles in the current group through the expiry
2362 process (if any) (@code{gnus-group-expire-articles}).
2363
2364 @item C-c M-C-x
2365 @kindex C-c M-C-x (Group)
2366 @findex gnus-group-expire-all-groups
2367 Run all articles in all groups through the expiry process
2368 (@code{gnus-group-expire-all-groups}).
2369
2370 @end table
2371
2372
2373 @node Browse Foreign Server
2374 @section Browse Foreign Server
2375 @cindex foreign servers
2376 @cindex browsing servers
2377
2378 @table @kbd
2379 @item B
2380 @kindex B (Group)
2381 @findex gnus-group-browse-foreign-server
2382 You will be queried for a select method and a server name.  Gnus will
2383 then attempt to contact this server and let you browse the groups there
2384 (@code{gnus-group-browse-foreign-server}).
2385 @end table
2386
2387 @findex gnus-browse-mode
2388 A new buffer with a list of available groups will appear.  This buffer
2389 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
2390 a lot) like a normal group buffer.
2391
2392 Here's a list of keystrokes available in the browse mode:
2393
2394 @table @kbd
2395 @item n
2396 @kindex n (Browse)
2397 @findex gnus-group-next-group
2398 Go to the next group (@code{gnus-group-next-group}).
2399
2400 @item p
2401 @kindex p (Browse)
2402 @findex gnus-group-prev-group
2403 Go to the previous group (@code{gnus-group-prev-group}).
2404
2405 @item SPACE
2406 @kindex SPACE (Browse)
2407 @findex gnus-browse-read-group
2408 Enter the current group and display the first article
2409 (@code{gnus-browse-read-group}). 
2410
2411 @item RET
2412 @kindex RET (Browse)
2413 @findex gnus-browse-select-group
2414 Enter the current group (@code{gnus-browse-select-group}). 
2415
2416 @item u
2417 @kindex u (Browse)
2418 @findex gnus-browse-unsubscribe-current-group
2419 Unsubscribe to the current group, or, as will be the case here,
2420 subscribe to it (@code{gnus-browse-unsubscribe-current-group}). 
2421
2422 @item l
2423 @itemx q
2424 @kindex q (Browse)
2425 @kindex l (Browse)
2426 @findex gnus-browse-exit
2427 Exit browse mode (@code{gnus-browse-exit}).
2428
2429 @item ?
2430 @kindex ? (Browse)
2431 @findex gnus-browse-describe-briefly
2432 Describe browse mode briefly (well, there's not much to describe, is
2433 there) (@code{gnus-browse-describe-briefly}).
2434 @end table
2435
2436
2437 @node Exiting Gnus
2438 @section Exiting Gnus
2439 @cindex exiting Gnus
2440
2441 Yes, Gnus is ex(c)iting.
2442
2443 @table @kbd
2444 @item z
2445 @kindex z (Group)
2446 @findex gnus-group-suspend
2447 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
2448 but it kills all buffers except the Group buffer.  I'm not sure why this
2449 is a gain, but then who am I to judge?
2450
2451 @item q
2452 @kindex q (Group)
2453 @findex gnus-group-exit
2454 @c @icon{gnus-group-exit}
2455 Quit Gnus (@code{gnus-group-exit}).
2456
2457 @item Q
2458 @kindex Q (Group)
2459 @findex gnus-group-quit
2460 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
2461 The dribble file will be saved, though (@pxref{Auto Save}).
2462 @end table
2463
2464 @vindex gnus-exit-gnus-hook
2465 @vindex gnus-suspend-gnus-hook
2466 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
2467 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
2468 @code{gnus-after-exiting-gnus-hook} is called as the final item when
2469 exiting Gnus.
2470
2471 @findex gnus-unload
2472 @cindex unloading
2473 If you wish to completely unload Gnus and all its adherents, you can use
2474 the @code{gnus-unload} command.  This command is also very handy when
2475 trying to customize meta-variables.
2476
2477 Note:
2478
2479 @quotation
2480 Miss Lisa Cannifax, while sitting in English class, felt her feet go
2481 numbly heavy and herself fall into a hazy trance as the boy sitting
2482 behind her drew repeated lines with his pencil across the back of her
2483 plastic chair.
2484 @end quotation
2485
2486
2487 @node Group Topics
2488 @section Group Topics
2489 @cindex topics
2490
2491 If you read lots and lots of groups, it might be convenient to group
2492 them hierarchically according to topics.  You put your Emacs groups over
2493 here, your sex groups over there, and the rest (what, two groups or so?)
2494 you put in some misc section that you never bother with anyway.  You can
2495 even group the Emacs sex groups as a sub-topic to either the Emacs
2496 groups or the sex groups---or both!  Go wild!
2497
2498 @iftex
2499 @iflatex
2500 \gnusfigure{Group Topics}{400}{
2501 \put(75,50){\epsfig{figure=tmp/group-topic.ps,height=9cm}}
2502 }
2503 @end iflatex
2504 @end iftex
2505
2506 Here's an example:
2507
2508 @example
2509 Gnus
2510   Emacs -- I wuw it!
2511      3: comp.emacs
2512      2: alt.religion.emacs
2513     Naughty Emacs
2514      452: alt.sex.emacs
2515        0: comp.talk.emacs.recovery
2516   Misc
2517      8: comp.binaries.fractals
2518     13: comp.sources.unix
2519 @end example
2520
2521 @findex gnus-topic-mode
2522 @kindex t (Group)
2523 To get this @emph{fab} functionality you simply turn on (ooh!) the
2524 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
2525 is a toggling command.)
2526
2527 Go ahead, just try it.  I'll still be here when you get back.  La de
2528 dum...  Nice tune, that...  la la la...  What, you're back? Yes, and now
2529 press @kbd{l}.  There.  All your groups are now listed under
2530 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
2531 bothered?
2532
2533 If you want this permanently enabled, you should add that minor mode to
2534 the hook for the group mode:
2535
2536 @lisp
2537 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
2538 @end lisp
2539
2540 @menu 
2541 * Topic Variables::    How to customize the topics the Lisp Way.
2542 * Topic Commands::     Interactive E-Z commands.
2543 * Topic Sorting::      Sorting each topic individually.
2544 * Topic Topology::     A map of the world.
2545 * Topic Parameters::   Parameters that apply to all groups in a topic.
2546 @end menu
2547
2548
2549 @node Topic Variables
2550 @subsection Topic Variables
2551 @cindex topic variables
2552
2553 Now, if you select a topic, it will fold/unfold that topic, which is
2554 really neat, I think.
2555
2556 @vindex gnus-topic-line-format
2557 The topic lines themselves are created according to the
2558 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
2559 Valid elements are:
2560
2561 @table @samp
2562 @item i
2563 Indentation.
2564 @item n
2565 Topic name.
2566 @item v
2567 Visibility.
2568 @item l
2569 Level.
2570 @item g
2571 Number of groups in the topic.
2572 @item a
2573 Number of unread articles in the topic.
2574 @item A 
2575 Number of unread articles in the topic and all its subtopics. 
2576 @end table
2577
2578 @vindex gnus-topic-indent-level
2579 Each sub-topic (and the groups in the sub-topics) will be indented with
2580 @code{gnus-topic-indent-level} times the topic level number of spaces.
2581 The default is 2.
2582
2583 @vindex gnus-topic-mode-hook
2584 @code{gnus-topic-mode-hook} is called in topic minor mode buffers. 
2585
2586 @vindex gnus-topic-display-empty-topics
2587 The @code{gnus-topic-display-empty-topics} says whether to display even
2588 topics that have no unread articles in them.  The default is @code{t}.
2589
2590
2591 @node Topic Commands
2592 @subsection Topic Commands
2593 @cindex topic commands
2594
2595 When the topic minor mode is turned on, a new @kbd{T} submap will be
2596 available.  In addition, a few of the standard keys change their
2597 definitions slightly.
2598
2599 @table @kbd
2600
2601 @item T n
2602 @kindex T n (Topic)
2603 @findex gnus-topic-create-topic
2604 Prompt for a new topic name and create it 
2605 (@code{gnus-topic-create-topic}). 
2606
2607 @item T m
2608 @kindex T m (Topic)
2609 @findex gnus-topic-move-group
2610 Move the current group to some other topic
2611 (@code{gnus-topic-move-group}).  This command uses the process/prefix
2612 convention (@pxref{Process/Prefix}).
2613
2614 @item T c
2615 @kindex T c (Topic)
2616 @findex gnus-topic-copy-group
2617 Copy the current group to some other topic
2618 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
2619 convention (@pxref{Process/Prefix}).
2620
2621 @item T D
2622 @kindex T D (Topic)
2623 @findex gnus-topic-remove-group
2624 Remove a group from the current topic (@code{gnus-topic-remove-group}).
2625 This command uses the process/prefix convention
2626 (@pxref{Process/Prefix}).
2627
2628 @item T M
2629 @kindex T M (Topic)
2630 @findex gnus-topic-move-matching
2631 Move all groups that match some regular expression to a topic
2632 (@code{gnus-topic-move-matching}). 
2633
2634 @item T C
2635 @kindex T C (Topic)
2636 @findex gnus-topic-copy-matching
2637 Copy all groups that match some regular expression to a topic
2638 (@code{gnus-topic-copy-matching}). 
2639
2640 @item T h
2641 @kindex T h (Topic)
2642 @findex gnus-topic-toggle-display-empty-topics
2643 Toggle hiding empty topics
2644 (@code{gnus-topic-toggle-display-empty-topics}). 
2645
2646 @item T #
2647 @kindex T # (Topic)
2648 @findex gnus-topic-mark-topic
2649 Mark all groups in the current topic with the process mark
2650 (@code{gnus-topic-mark-topic}). 
2651
2652 @item T M-#
2653 @kindex T M-# (Topic)
2654 @findex gnus-topic-unmark-topic
2655 Remove the process mark from all groups in the current topic
2656 (@code{gnus-topic-unmark-topic}). 
2657
2658 @item RET
2659 @kindex RET (Topic)
2660 @findex gnus-topic-select-group
2661 @itemx SPACE
2662 Either select a group or fold a topic (@code{gnus-topic-select-group}).
2663 When you perform this command on a group, you'll enter the group, as
2664 usual.  When done on a topic line, the topic will be folded (if it was
2665 visible) or unfolded (if it was folded already).  So it's basically a
2666 toggling command on topics.  In addition, if you give a numerical
2667 prefix, group on that level (and lower) will be displayed.
2668
2669 @item T TAB
2670 @kindex T TAB (Topic)
2671 @findex gnus-topic-indent
2672 ``Indent'' the current topic so that it becomes a sub-topic of the
2673 previous topic (@code{gnus-topic-indent}).  If given a prefix,
2674 ``un-indent'' the topic instead.
2675
2676 @item C-k
2677 @kindex C-k (Topic)
2678 @findex gnus-topic-kill-group
2679 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
2680 topic will be removed along with the topic.
2681
2682 @item C-y
2683 @kindex C-y (Topic)
2684 @findex gnus-topic-yank-group
2685 Yank the previously killed group or topic
2686 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
2687 before all groups. 
2688
2689 @item T r
2690 @kindex T r (Topic)
2691 @findex gnus-topic-rename
2692 Rename a topic (@code{gnus-topic-rename}). 
2693
2694 @item T DEL
2695 @kindex T DEL (Topic)
2696 @findex gnus-topic-delete
2697 Delete an empty topic (@code{gnus-topic-delete}). 
2698
2699 @item A T
2700 @kindex A T (Topic)
2701 @findex gnus-topic-list-active
2702 List all groups that Gnus knows about in a topics-ified way
2703 (@code{gnus-topic-list-active}).
2704
2705 @item G p
2706 @kindex G p (Topic)
2707 @findex gnus-topic-edit-parameters
2708 @cindex group parameters
2709 @cindex topic parameters
2710 @cindex parameters
2711 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
2712 @xref{Topic Parameters}.
2713
2714 @end table
2715
2716
2717 @node Topic Sorting
2718 @subsection Topic Sorting
2719 @cindex topic sorting
2720
2721 You can sort the groups in each topic individually with the following
2722 commands: 
2723
2724
2725 @table @kbd
2726 @item T S a
2727 @kindex T S a (Topic)
2728 @findex gnus-topic-sort-groups-by-alphabet
2729 Sort the current topic alphabetically by group name
2730 (@code{gnus-topic-sort-groups-by-alphabet}). 
2731
2732 @item T S u
2733 @kindex T S u (Topic)
2734 @findex gnus-topic-sort-groups-by-unread
2735 Sort the current topic by the number of unread articles
2736 (@code{gnus-topic-sort-groups-by-unread}).
2737
2738 @item T S l
2739 @kindex T S l (Topic)
2740 @findex gnus-topic-sort-groups-by-level
2741 Sort the current topic by group level
2742 (@code{gnus-topic-sort-groups-by-level}). 
2743
2744 @item T S v
2745 @kindex T S v (Topic)
2746 @findex gnus-topic-sort-groups-by-score
2747 Sort the current topic by group score
2748 (@code{gnus-topic-sort-groups-by-score}). 
2749
2750 @item T S r
2751 @kindex T S r (Topic)
2752 @findex gnus-topic-sort-groups-by-rank
2753 Sort the current topic by group rank
2754 (@code{gnus-topic-sort-groups-by-rank}). 
2755
2756 @item T S m
2757 @kindex T S m (Topic)
2758 @findex gnus-topic-sort-groups-by-method
2759 Sort the current topic alphabetically by backend name
2760 (@code{gnus-topic-sort-groups-by-method}). 
2761
2762 @end table
2763
2764 @xref{Sorting Groups} for more information about group sorting. 
2765
2766
2767 @node Topic Topology
2768 @subsection Topic Topology
2769 @cindex topic topology
2770 @cindex topology
2771
2772 So, let's have a look at an example group buffer:
2773
2774 @example
2775 Gnus
2776   Emacs -- I wuw it!
2777      3: comp.emacs
2778      2: alt.religion.emacs
2779     Naughty Emacs
2780      452: alt.sex.emacs
2781        0: comp.talk.emacs.recovery
2782   Misc
2783      8: comp.binaries.fractals
2784     13: comp.sources.unix
2785 @end example
2786
2787 So, here we have one top-level topic (@samp{Gnus}), two topics under
2788 that, and one sub-topic under one of the sub-topics.  (There is always
2789 just one (1) top-level topic).  This topology can be expressed as
2790 follows:
2791
2792 @lisp
2793 (("Gnus" visible)
2794  (("Emacs -- I wuw it!" visible) 
2795   (("Naughty Emacs" visible)))
2796  (("Misc" visible)))
2797 @end lisp
2798
2799 @vindex gnus-topic-topology
2800 This is in fact how the variable @code{gnus-topic-topology} would look
2801 for the display above.  That variable is saved in the @file{.newsrc.eld}
2802 file, and shouldn't be messed with manually---unless you really want
2803 to.  Since this variable is read from the @file{.newsrc.eld} file,
2804 setting it in any other startup files will have no effect.  
2805
2806 This topology shows what topics are sub-topics of what topics (right),
2807 and which topics are visible.  Two settings are currently
2808 allowed---@code{visible} and @code{invisible}.
2809
2810
2811 @node Topic Parameters
2812 @subsection Topic Parameters
2813 @cindex topic parameters
2814
2815 All groups in a topic will inherit group parameters from the parent (and
2816 ancestor) topic parameters.  All valid group parameters are valid topic
2817 parameters (@pxref{Group Parameters}).  
2818
2819 Group parameters (of course) override topic parameters, and topic
2820 parameters in sub-topics override topic parameters in super-topics.  You
2821 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
2822 verb, although you may feel free to disagree with me here.)
2823
2824 @example
2825 Gnus
2826   Emacs
2827      3: comp.emacs
2828      2: alt.religion.emacs
2829    452: alt.sex.emacs
2830     Relief
2831      452: alt.sex.emacs
2832        0: comp.talk.emacs.recovery
2833   Misc
2834      8: comp.binaries.fractals
2835     13: comp.sources.unix
2836    452: alt.sex.emacs
2837 @end example
2838
2839 The @samp{Emacs} topic has the topic parameter @code{(score-file
2840 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
2841 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
2842 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
2843 @samp{alt.religion.emacs} has the group parameter @code{(score-file
2844 . "religion.SCORE")}.
2845
2846 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
2847 will get the @file{relief.SCORE} home score file.  If you enter the same
2848 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
2849 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
2850 get the @file{religion.SCORE} home score file.
2851
2852 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
2853 there are some problems, especially with the @code{total-expiry}
2854 parameter.  Say you have a mail group in two topics; one with
2855 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
2856 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
2857 of these topics you mean to expire articles from, so anything may
2858 happen.  In fact, I hereby declare that it is @dfn{undefined} what
2859 happens.  You just have to be careful if you do stuff like that.
2860
2861
2862 @node Misc Group Stuff
2863 @section Misc Group Stuff
2864
2865 @menu
2866 * Scanning New Messages:: Asking Gnus to see whether new messages have arrived.
2867 * Group Information::     Information and help on groups and Gnus.
2868 * Group Timestamp::       Making Gnus keep track of when you last read a group.
2869 * File Commands::         Reading and writing the Gnus files.
2870 @end menu
2871
2872 @table @kbd
2873
2874 @item ^
2875 @kindex ^ (Group)
2876 @findex gnus-group-enter-server-mode
2877 Enter the server buffer (@code{gnus-group-enter-server-mode}).
2878 @xref{The Server Buffer}.
2879
2880 @item a
2881 @kindex a (Group)
2882 @findex gnus-group-post-news
2883 Post an article to a group (@code{gnus-group-post-news}).  If given a
2884 prefix, the current group name will be used as the default.
2885
2886 @item m
2887 @kindex m (Group)
2888 @findex gnus-group-mail
2889 Mail a message somewhere (@code{gnus-group-mail}).
2890
2891 @end table
2892
2893 Variables for the group buffer:
2894
2895 @table @code
2896
2897 @item gnus-group-mode-hook
2898 @vindex gnus-group-mode-hook
2899 is called after the group buffer has been
2900 created. 
2901
2902 @item gnus-group-prepare-hook
2903 @vindex gnus-group-prepare-hook
2904 is called after the group buffer is
2905 generated.  It may be used to modify the buffer in some strange,
2906 unnatural way.
2907
2908 @item gnus-permanently-visible-groups
2909 @vindex gnus-permanently-visible-groups
2910 Groups matching this regexp will always be listed in the group buffer,
2911 whether they are empty or not.
2912
2913 @end table
2914
2915
2916 @node Scanning New Messages
2917 @subsection Scanning New Messages
2918 @cindex new messages
2919 @cindex scanning new news
2920
2921 @table @kbd
2922
2923 @item g
2924 @kindex g (Group)
2925 @findex gnus-group-get-new-news
2926 @c @icon{gnus-group-get-new-news}
2927 Check the server(s) for new articles.  If the numerical prefix is used,
2928 this command will check only groups of level @var{arg} and lower
2929 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
2930 command will force a total re-reading of the active file(s) from the
2931 backend(s).
2932
2933 @item M-g
2934 @kindex M-g (Group)
2935 @findex gnus-group-get-new-news-this-group
2936 @vindex gnus-goto-next-group-when-activating
2937 @c @icon{gnus-group-get-new-news-this-group}
2938 Check whether new articles have arrived in the current group
2939 (@code{gnus-group-get-new-news-this-group}).
2940 @code{gnus-goto-next-group-when-activating} says whether this command is
2941 to move point to the next group or not.  It is @code{t} by default.
2942
2943 @findex gnus-activate-all-groups
2944 @cindex activating groups
2945 @item C-c M-g
2946 @kindex C-c M-g (Group)
2947 Activate absolutely all groups (@code{gnus-activate-all-groups}). 
2948
2949 @item R
2950 @kindex R (Group)
2951 @cindex restarting
2952 @findex gnus-group-restart
2953 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
2954 file(s), closes the connection to all servers, clears up all run-time
2955 Gnus variables, and then starts Gnus all over again.
2956
2957 @end table
2958
2959 @vindex gnus-get-new-news-hook
2960 @code{gnus-get-new-news-hook} is run just before checking for new news. 
2961
2962 @vindex gnus-after-getting-new-news-hook
2963 @code{gnus-after-getting-new-news-hook} is run after checking for new
2964 news.
2965
2966
2967 @node Group Information
2968 @subsection Group Information
2969 @cindex group information
2970 @cindex information on groups
2971
2972 @table @kbd
2973
2974
2975 @item H f
2976 @kindex H f (Group)
2977 @findex gnus-group-fetch-faq
2978 @vindex gnus-group-faq-directory
2979 @cindex FAQ
2980 @cindex ange-ftp
2981 Try to fetch the FAQ for the current group
2982 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
2983 @code{gnus-group-faq-directory}, which is usually a directory on a
2984 remote machine.  This variable can also be a list of directories.  In
2985 that case, giving a prefix to this command will allow you to choose
2986 between the various sites.  @code{ange-ftp} (or @code{efs}) will be used
2987 for fetching the file.
2988
2989 If fetching from the first site is unsuccessful, Gnus will attempt to go
2990 through @code{gnus-group-faq-directory} and try to open them one by one.
2991
2992 @item H d
2993 @itemx C-c C-d
2994 @c @icon{gnus-group-describe-group}
2995 @kindex H d (Group)
2996 @kindex C-c C-d (Group)
2997 @cindex describing groups
2998 @cindex group description
2999 @findex gnus-group-describe-group
3000 Describe the current group (@code{gnus-group-describe-group}).  If given
3001 a prefix, force Gnus to re-read the description from the server.
3002
3003 @item M-d
3004 @kindex M-d (Group)
3005 @findex gnus-group-describe-all-groups
3006 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
3007 prefix, force Gnus to re-read the description file from the server.
3008
3009 @item H v
3010 @itemx V
3011 @kindex V (Group)
3012 @kindex H v (Group)
3013 @cindex version
3014 @findex gnus-version
3015 Display current Gnus version numbers (@code{gnus-version}).
3016
3017 @item ?
3018 @kindex ? (Group)
3019 @findex gnus-group-describe-briefly
3020 Give a very short help message (@code{gnus-group-describe-briefly}).
3021
3022 @item C-c C-i
3023 @kindex C-c C-i (Group)
3024 @cindex info
3025 @cindex manual
3026 @findex gnus-info-find-node
3027 Go to the Gnus info node (@code{gnus-info-find-node}).
3028 @end table
3029
3030
3031 @node Group Timestamp
3032 @subsection Group Timestamp
3033 @cindex timestamps
3034 @cindex group timestamps
3035
3036 It can be convenient to let Gnus keep track of when you last read a
3037 group.  To set the ball rolling, you should add
3038 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
3039
3040 @lisp
3041 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
3042 @end lisp
3043
3044 After doing this, each time you enter a group, it'll be recorded.
3045
3046 This information can be displayed in various ways---the easiest is to
3047 use the @samp{%d} spec in the group line format:
3048
3049 @lisp
3050 (setq gnus-group-line-format 
3051       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
3052 @end lisp
3053
3054 This will result in lines looking like:
3055
3056 @example
3057 *        0: mail.ding                                19961002T012943
3058          0: custom                                   19961002T012713
3059 @end example
3060
3061 As you can see, the date is displayed in compact ISO 8601 format.  This
3062 may be a bit too much, so to just display the date, you could say
3063 something like:
3064
3065 @lisp
3066 (setq gnus-group-line-format 
3067       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
3068 @end lisp
3069
3070
3071 @node File Commands
3072 @subsection File Commands
3073 @cindex file commands
3074
3075 @table @kbd
3076
3077 @item r
3078 @kindex r (Group)
3079 @findex gnus-group-read-init-file
3080 @vindex gnus-init-file
3081 @cindex reading init file
3082 Re-read the init file (@code{gnus-init-file}, which defaults to
3083 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
3084
3085 @item s
3086 @kindex s (Group)
3087 @findex gnus-group-save-newsrc
3088 @cindex saving .newsrc
3089 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
3090 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
3091 file(s) whether Gnus thinks it is necessary or not.
3092
3093 @c @item Z
3094 @c @kindex Z (Group)
3095 @c @findex gnus-group-clear-dribble
3096 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
3097
3098 @end table
3099
3100
3101 @node The Summary Buffer
3102 @chapter The Summary Buffer
3103 @cindex summary buffer
3104
3105 A line for each article is displayed in the summary buffer.  You can
3106 move around, read articles, post articles and reply to articles.
3107
3108 The most common way to a summary buffer is to select a group from the
3109 group buffer (@pxref{Selecting a Group}).  
3110
3111 You can have as many summary buffers open as you wish.
3112
3113 @menu
3114 * Summary Buffer Format::       Deciding how the summary buffer is to look.
3115 * Summary Maneuvering::         Moving around the summary buffer.
3116 * Choosing Articles::           Reading articles.
3117 * Paging the Article::          Scrolling the current article.
3118 * Reply Followup and Post::     Posting articles.
3119 * Canceling and Superseding::   ``Whoops, I shouldn't have called him that.''
3120 * Marking Articles::            Marking articles as read, expirable, etc.
3121 * Limiting::                    You can limit the summary buffer.
3122 * Threading::                   How threads are made.
3123 * Sorting::                     How articles and threads are sorted.
3124 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
3125 * Article Caching::             You may store articles in a cache.
3126 * Persistent Articles::         Making articles expiry-resistant.
3127 * Article Backlog::             Having already read articles hang around.
3128 * Saving Articles::             Ways of customizing article saving.
3129 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
3130 * Article Treatment::           The article buffer can be mangled at will.
3131 * Article Commands::            Doing various things with the article buffer.
3132 * Summary Sorting::             Sorting the summary buffer in various ways.
3133 * Finding the Parent::          No child support? Get the parent.
3134 * Alternative Approaches::      Reading using non-default summaries.
3135 * Tree Display::                A more visual display of threads.
3136 * Mail Group Commands::         Some commands can only be used in mail groups.
3137 * Various Summary Stuff::       What didn't fit anywhere else.
3138 * Exiting the Summary Buffer::  Returning to the Group buffer.
3139 * Crosspost Handling::          How crossposted articles are dealt with.
3140 * Duplicate Suppression::       An alternative when crosspost handling fails.
3141 @end menu
3142
3143
3144 @node Summary Buffer Format
3145 @section Summary Buffer Format
3146 @cindex summary buffer format
3147
3148 @iftex
3149 @iflatex
3150 \gnusfigure{The Summary Buffer}{180}{
3151 \put(0,0){\epsfig{figure=tmp/summary.ps,width=7.5cm}}
3152 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=tmp/summary-article.ps,width=7.5cm}}}
3153 }
3154 @end iflatex
3155 @end iftex
3156
3157 @menu
3158 * Summary Buffer Lines::     You can specify how summary lines should look.
3159 * Summary Buffer Mode Line:: You can say how the mode line should look.
3160 * Summary Highlighting::     Making the summary buffer all pretty and nice.
3161 @end menu
3162
3163 @findex mail-extract-address-components
3164 @findex gnus-extract-address-components
3165 @vindex gnus-extract-address-components
3166 Gnus will use the value of the @code{gnus-extract-address-components}
3167 variable as a function for getting the name and address parts of a
3168 @code{From} header.  Two pre-defined functions exist:
3169 @code{gnus-extract-address-components}, which is the default, quite
3170 fast, and too simplistic solution; and
3171 @code{mail-extract-address-components}, which works very nicely, but is
3172 slower.  The default function will return the wrong answer in 5% of the
3173 cases.  If this is unacceptable to you, use the other function instead.
3174
3175 @vindex gnus-summary-same-subject
3176 @code{gnus-summary-same-subject} is a string indicating that the current
3177 article has the same subject as the previous.  This string will be used
3178 with those specs that require it.  The default is @code{""}.
3179
3180
3181 @node Summary Buffer Lines
3182 @subsection Summary Buffer Lines
3183
3184 @vindex gnus-summary-line-format
3185 You can change the format of the lines in the summary buffer by changing
3186 the @code{gnus-summary-line-format} variable.  It works along the same
3187 lines as a normal @code{format} string, with some extensions
3188 (@pxref{Formatting Variables}).
3189
3190 The default string is @samp{%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n}.
3191
3192 The following format specification characters are understood:
3193
3194 @table @samp
3195 @item N 
3196 Article number.
3197 @item S
3198 Subject string.
3199 @item s
3200 Subject if the article is the root of the thread or the previous article
3201 had a different subject, @code{gnus-summary-same-subject} otherwise.
3202 (@code{gnus-summary-same-subject} defaults to @code{""}.)
3203 @item F
3204 Full @code{From} header.
3205 @item n
3206 The name (from the @code{From} header).
3207 @item a
3208 The name (from the @code{From} header).  This differs from the @code{n}
3209 spec in that it uses the function designated by the
3210 @code{gnus-extract-address-components} variable, which is slower, but
3211 may be more thorough.
3212 @item A
3213 The address (from the @code{From} header).  This works the same way as
3214 the @code{a} spec.
3215 @item L
3216 Number of lines in the article.
3217 @item c
3218 Number of characters in the article.
3219 @item I
3220 Indentation based on thread level (@pxref{Customizing Threading}).
3221 @item T
3222 Nothing if the article is a root and lots of spaces if it isn't (it
3223 pushes everything after it off the screen).
3224 @item [
3225 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
3226 for adopted articles (@pxref{Customizing Threading}).
3227 @item ]
3228 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
3229 for adopted articles.
3230 @item >
3231 One space for each thread level.
3232 @item <
3233 Twenty minus thread level spaces.
3234 @item U
3235 Unread.
3236 @item R
3237 Replied.
3238 @item i
3239 Score as a number (@pxref{Scoring}).
3240 @item z
3241 @vindex gnus-summary-zcore-fuzz
3242 Zcore, @samp{+} if above the default level and @samp{-} if below the
3243 default level.  If the difference between
3244 @code{gnus-summary-default-level} and the score is less than
3245 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
3246 @item V
3247 Total thread score.
3248 @item x
3249 @code{Xref}.
3250 @item D
3251 @code{Date}.
3252 @item d
3253 The @code{Date} in @code{DD-MMM} format.
3254 @item o
3255 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
3256 @item M
3257 @code{Message-ID}.
3258 @item r
3259 @code{References}.
3260 @item t
3261 Number of articles in the current sub-thread.  Using this spec will slow
3262 down summary buffer generation somewhat.
3263 @item e
3264 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
3265 article has any children.
3266 @item P
3267 The line number.
3268 @item O
3269 Download mark.
3270 @item u
3271 User defined specifier.  The next character in the format string should
3272 be a letter.  Gnus will call the function
3273 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
3274 following @samp{%u}.  The function will be passed the current header as
3275 argument.  The function should return a string, which will be inserted
3276 into the summary just like information from any other summary specifier.
3277 @end table
3278
3279 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
3280 have to be handled with care.  For reasons of efficiency, Gnus will
3281 compute what column these characters will end up in, and ``hard-code''
3282 that.  This means that it is invalid to have these specs after a
3283 variable-length spec.  Well, you might not be arrested, but your summary
3284 buffer will look strange, which is bad enough.
3285
3286 The smart choice is to have these specs as far to the left as possible.
3287 (Isn't that the case with everything, though?  But I digress.)
3288
3289 This restriction may disappear in later versions of Gnus.
3290
3291
3292 @node Summary Buffer Mode Line
3293 @subsection Summary Buffer Mode Line
3294
3295 @vindex gnus-summary-mode-line-format
3296 You can also change the format of the summary mode bar.  Set
3297 @code{gnus-summary-mode-line-format} to whatever you like.  The default
3298 is @samp{Gnus: %%b [%A] %Z}.  
3299
3300 Here are the elements you can play with:
3301
3302 @table @samp
3303 @item G
3304 Group name.
3305 @item p
3306 Unprefixed group name.
3307 @item A
3308 Current article number.
3309 @item V
3310 Gnus version.
3311 @item U
3312 Number of unread articles in this group.
3313 @item e
3314 Number of unread articles in this group that aren't displayed in the
3315 summary buffer.
3316 @item Z
3317 A string with the number of unread and unselected articles represented
3318 either as @samp{<%U(+%e) more>} if there are both unread and unselected
3319 articles, and just as @samp{<%U more>} if there are just unread articles
3320 and no unselected ones.
3321 @item g
3322 Shortish group name.  For instance, @samp{rec.arts.anime} will be
3323 shortened to @samp{r.a.anime}. 
3324 @item S
3325 Subject of the current article.
3326 @item u
3327 User-defined spec (@pxref{User-Defined Specs}).
3328 @item s
3329 Name of the current score file (@pxref{Scoring}).
3330 @item d
3331 Number of dormant articles (@pxref{Unread Articles}).
3332 @item t
3333 Number of ticked articles (@pxref{Unread Articles}).
3334 @item r
3335 Number of articles that have been marked as read in this session. 
3336 @item E
3337 Number of articles expunged by the score files.
3338 @end table
3339
3340
3341 @node Summary Highlighting
3342 @subsection Summary Highlighting
3343
3344 @table @code
3345
3346 @item gnus-visual-mark-article-hook
3347 @vindex gnus-visual-mark-article-hook
3348 This hook is run after selecting an article.  It is meant to be used for
3349 highlighting the article in some way.  It is not run if
3350 @code{gnus-visual} is @code{nil}.
3351
3352 @item gnus-summary-update-hook
3353 @vindex gnus-summary-update-hook
3354 This hook is called when a summary line is changed.  It is not run if
3355 @code{gnus-visual} is @code{nil}.
3356
3357 @item gnus-summary-selected-face
3358 @vindex gnus-summary-selected-face
3359 This is the face (or @dfn{font} as some people call it) used to
3360 highlight the current article in the summary buffer.
3361
3362 @item gnus-summary-highlight
3363 @vindex gnus-summary-highlight
3364 Summary lines are highlighted according to this variable, which is a
3365 list where the elements are of the format @var{(FORM . FACE)}.  If you
3366 would, for instance, like ticked articles to be italic and high-scored
3367 articles to be bold, you could set this variable to something like
3368 @lisp
3369 (((eq mark gnus-ticked-mark) . italic)
3370  ((> score default) . bold))
3371 @end lisp
3372 As you may have guessed, if @var{FORM} returns a non-@code{nil} value,
3373 @var{FACE} will be applied to the line.
3374 @end table
3375
3376
3377 @node Summary Maneuvering
3378 @section Summary Maneuvering
3379 @cindex summary movement
3380
3381 All the straight movement commands understand the numeric prefix and
3382 behave pretty much as you'd expect. 
3383
3384 None of these commands select articles.
3385
3386 @table @kbd
3387 @item G M-n
3388 @itemx M-n
3389 @kindex M-n (Summary)
3390 @kindex G M-n (Summary)
3391 @findex gnus-summary-next-unread-subject
3392 Go to the next summary line of an unread article
3393 (@code{gnus-summary-next-unread-subject}). 
3394
3395 @item G M-p
3396 @itemx M-p
3397 @kindex M-p (Summary)
3398 @kindex G M-p (Summary)
3399 @findex gnus-summary-prev-unread-subject
3400 Go to the previous summary line of an unread article
3401 (@code{gnus-summary-prev-unread-subject}). 
3402
3403 @item G j
3404 @itemx j
3405 @kindex j (Summary)
3406 @kindex G j (Summary)
3407 @findex gnus-summary-goto-article
3408 Ask for an article number or @code{Message-ID}, and then go to that
3409 article (@code{gnus-summary-goto-article}).
3410
3411 @item G g
3412 @kindex G g (Summary)
3413 @findex gnus-summary-goto-subject
3414 Ask for an article number and then go to the summary line of that article
3415 without displaying the article (@code{gnus-summary-goto-subject}).
3416 @end table
3417
3418 If Gnus asks you to press a key to confirm going to the next group, you
3419 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
3420 buffer, searching for the next group to read without actually returning
3421 to the group buffer.
3422
3423 Variables related to summary movement:
3424
3425 @table @code
3426
3427 @vindex gnus-auto-select-next
3428 @item gnus-auto-select-next
3429 If you issue one of the movement commands (like @kbd{n}) and there are
3430 no more unread articles after the current one, Gnus will offer to go to
3431 the next group.  If this variable is @code{t} and the next group is
3432 empty, Gnus will exit summary mode and return to the group buffer.  If
3433 this variable is neither @code{t} nor @code{nil}, Gnus will select the
3434 next group, no matter whether it has any unread articles or not.  As a
3435 special case, if this variable is @code{quietly}, Gnus will select the
3436 next group without asking for confirmation.  If this variable is
3437 @code{almost-quietly}, the same will happen only if you are located on
3438 the last article in the group.  Finally, if this variable is
3439 @code{slightly-quietly}, the @kbd{Z n} command will go to the next group
3440 without confirmation.  Also @pxref{Group Levels}.
3441
3442 @item gnus-auto-select-same
3443 @vindex gnus-auto-select-same
3444 If non-@code{nil}, all the movement commands will try to go to the next
3445 article with the same subject as the current.  (@dfn{Same} here might
3446 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
3447 for details (@pxref{Customizing Threading}).)  This variable is not
3448 particularly useful if you use a threaded display.
3449
3450 @item gnus-summary-check-current
3451 @vindex gnus-summary-check-current
3452 If non-@code{nil}, all the ``unread'' movement commands will not proceed
3453 to the next (or previous) article if the current article is unread.
3454 Instead, they will choose the current article.
3455
3456 @item gnus-auto-center-summary
3457 @vindex gnus-auto-center-summary
3458 If non-@code{nil}, Gnus will keep the point in the summary buffer
3459 centered at all times.  This makes things quite tidy, but if you have a
3460 slow network connection, or simply do not like this un-Emacsism, you can
3461 set this variable to @code{nil} to get the normal Emacs scrolling
3462 action.  This will also inhibit horizontal re-centering of the summary
3463 buffer, which might make it more inconvenient to read extremely long
3464 threads.
3465
3466 @end table
3467
3468
3469 @node Choosing Articles
3470 @section Choosing Articles
3471 @cindex selecting articles
3472
3473 @menu
3474 * Choosing Commands::        Commands for choosing articles.
3475 * Choosing Variables::       Variables that influence these commands.
3476 @end menu
3477
3478
3479 @node Choosing Commands
3480 @subsection Choosing Commands
3481
3482 None of the following movement commands understand the numeric prefix,
3483 and they all select and display an article.
3484
3485 @table @kbd
3486 @item SPACE
3487 @kindex SPACE (Summary)
3488 @findex gnus-summary-next-page
3489 Select the current article, or, if that one's read already, the next
3490 unread article (@code{gnus-summary-next-page}).
3491
3492 @item G n
3493 @itemx n
3494 @kindex n (Summary)
3495 @kindex G n (Summary)
3496 @findex gnus-summary-next-unread-article
3497 @c @icon{gnus-summary-next-unread}
3498 Go to next unread article (@code{gnus-summary-next-unread-article}).
3499
3500 @item G p
3501 @itemx p
3502 @kindex p (Summary)
3503 @findex gnus-summary-prev-unread-article
3504 @c @icon{gnus-summary-prev-unread}
3505 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
3506
3507 @item G N
3508 @itemx N
3509 @kindex N (Summary)
3510 @kindex G N (Summary)
3511 @findex gnus-summary-next-article
3512 Go to the next article (@code{gnus-summary-next-article}).
3513
3514 @item G P
3515 @itemx P
3516 @kindex P (Summary)
3517 @kindex G P (Summary)
3518 @findex gnus-summary-prev-article
3519 Go to the previous article (@code{gnus-summary-prev-article}).
3520
3521 @item G C-n
3522 @kindex G C-n (Summary)
3523 @findex gnus-summary-next-same-subject
3524 Go to the next article with the same subject
3525 (@code{gnus-summary-next-same-subject}). 
3526
3527 @item G C-p
3528 @kindex G C-p (Summary)
3529 @findex gnus-summary-prev-same-subject
3530 Go to the previous article with the same subject
3531 (@code{gnus-summary-prev-same-subject}). 
3532
3533 @item G f
3534 @itemx .
3535 @kindex G f  (Summary)
3536 @kindex .  (Summary)
3537 @findex gnus-summary-first-unread-article
3538 Go to the first unread article
3539 (@code{gnus-summary-first-unread-article}).
3540
3541 @item G b
3542 @itemx ,
3543 @kindex G b (Summary)
3544 @kindex , (Summary)
3545 @findex gnus-summary-best-unread-article
3546 Go to the article with the highest score
3547 (@code{gnus-summary-best-unread-article}). 
3548
3549 @item G l
3550 @itemx l
3551 @kindex l (Summary)
3552 @kindex G l (Summary)
3553 @findex gnus-summary-goto-last-article
3554 Go to the previous article read (@code{gnus-summary-goto-last-article}).
3555
3556 @item G o
3557 @kindex G o (Summary)
3558 @findex gnus-summary-pop-article
3559 @cindex history
3560 @cindex article history
3561 Pop an article off the summary history and go to this article
3562 (@code{gnus-summary-pop-article}).  This command differs from the
3563 command above in that you can pop as many previous articles off the
3564 history as you like, while @kbd{l} toggles the two last read articles.
3565 For a somewhat related issue (if you use these commands a lot),
3566 @pxref{Article Backlog}.
3567 @end table
3568
3569
3570 @node Choosing Variables
3571 @subsection Choosing Variables
3572
3573 Some variables relevant for moving and selecting articles:
3574
3575 @table @code
3576 @item gnus-auto-extend-newsgroup
3577 @vindex gnus-auto-extend-newsgroup
3578 All the movement commands will try to go to the previous (or next)
3579 article, even if that article isn't displayed in the Summary buffer if
3580 this variable is non-@code{nil}.  Gnus will then fetch the article from
3581 the server and display it in the article buffer.
3582
3583 @item gnus-select-article-hook
3584 @vindex gnus-select-article-hook
3585 This hook is called whenever an article is selected.  By default it
3586 exposes any threads hidden under the selected article.
3587
3588 @item gnus-mark-article-hook
3589 @vindex gnus-mark-article-hook
3590 @findex gnus-summary-mark-unread-as-read
3591 @findex gnus-summary-mark-read-and-unread-as-read
3592 @findex gnus-unread-mark
3593 This hook is called whenever an article is selected.  It is intended to
3594 be used for marking articles as read.  The default value is
3595 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
3596 mark of almost any article you read to @code{gnus-unread-mark}.  The
3597 only articles not affected by this function are ticked, dormant, and
3598 expirable articles.  If you'd instead like to just have unread articles
3599 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
3600 instead.  It will leave marks like @code{gnus-low-score-mark},
3601 @code{gnus-del-mark} (and so on) alone.
3602
3603 @end table
3604
3605
3606 @node Paging the Article
3607 @section Scrolling the Article
3608 @cindex article scrolling
3609
3610 @table @kbd
3611
3612 @item SPACE
3613 @kindex SPACE (Summary)
3614 @findex gnus-summary-next-page
3615 Pressing @kbd{SPACE} will scroll the current article forward one page,
3616 or, if you have come to the end of the current article, will choose the
3617 next article (@code{gnus-summary-next-page}).
3618
3619 @item DEL
3620 @kindex DEL (Summary)
3621 @findex gnus-summary-prev-page
3622 Scroll the current article back one page (@code{gnus-summary-prev-page}). 
3623
3624 @item RET
3625 @kindex RET (Summary)
3626 @findex gnus-summary-scroll-up
3627 Scroll the current article one line forward
3628 (@code{gnus-summary-scroll-up}).
3629
3630 @item A g
3631 @itemx g
3632 @kindex A g (Summary)
3633 @kindex g (Summary)
3634 @findex gnus-summary-show-article
3635 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
3636 given a prefix, fetch the current article, but don't run any of the
3637 article treatment functions.  This will give you a ``raw'' article, just
3638 the way it came from the server.
3639
3640 @item A <
3641 @itemx <
3642 @kindex < (Summary)
3643 @kindex A < (Summary)
3644 @findex gnus-summary-beginning-of-article
3645 Scroll to the beginning of the article
3646 (@code{gnus-summary-beginning-of-article}).
3647
3648 @item A >
3649 @itemx >
3650 @kindex > (Summary)
3651 @kindex A > (Summary)
3652 @findex gnus-summary-end-of-article
3653 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
3654
3655 @item A s 
3656 @itemx s
3657 @kindex A s (Summary)
3658 @kindex s (Summary)
3659 @findex gnus-summary-isearch-article
3660 Perform an isearch in the article buffer
3661 (@code{gnus-summary-isearch-article}).
3662
3663 @item h
3664 @kindex h (Summary)
3665 @findex gnus-summary-select-article-buffer
3666 Select the article buffer (@code{gnus-summary-select-article-buffer}).
3667
3668 @end table
3669
3670
3671 @node Reply Followup and Post
3672 @section Reply, Followup and Post
3673
3674 @menu
3675 * Summary Mail Commands::            Sending mail.
3676 * Summary Post Commands::            Sending news.
3677 @end menu
3678
3679
3680 @node Summary Mail Commands
3681 @subsection Summary Mail Commands
3682 @cindex mail
3683 @cindex composing mail
3684
3685 Commands for composing a mail message:
3686
3687 @table @kbd
3688
3689 @item S r
3690 @itemx r
3691 @kindex S r (Summary)
3692 @kindex r (Summary)
3693 @findex gnus-summary-reply
3694 @c @icon{gnus-summary-mail-reply}
3695 @c @icon{gnus-summary-reply}
3696 Mail a reply to the author of the current article
3697 (@code{gnus-summary-reply}). 
3698
3699 @item S R
3700 @itemx R
3701 @kindex R (Summary)
3702 @kindex S R (Summary)
3703 @findex gnus-summary-reply-with-original
3704 @c @icon{gnus-summary-reply-with-original}
3705 Mail a reply to the author of the current article and include the
3706 original message (@code{gnus-summary-reply-with-original}).  This
3707 command uses the process/prefix convention.
3708
3709 @item S w
3710 @kindex S w (Summary)
3711 @findex gnus-summary-wide-reply
3712 Mail a wide reply to the author of the current article
3713 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
3714 goes out to all people listed in the @code{To}, @code{From} (or
3715 @code{Reply-to}) and @code{Cc} headers.
3716
3717 @item S W
3718 @kindex S W (Summary)
3719 @findex gnus-summary-wide-reply-with-original
3720 Mail a wide reply to the current article and include the original
3721 message (@code{gnus-summary-reply-with-original}).  This command uses
3722 the process/prefix convention.
3723
3724 @item S o m
3725 @kindex S o m (Summary)
3726 @findex gnus-summary-mail-forward
3727 @c @icon{gnus-summary-mail-forward}
3728 Forward the current article to some other person
3729 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
3730 headers of the forwarded article.
3731
3732 @item S m
3733 @itemx m
3734 @kindex m (Summary)
3735 @kindex S m (Summary)
3736 @findex gnus-summary-mail-other-window
3737 @c @icon{gnus-summary-mail-originate}
3738 Send a mail to some other person
3739 (@code{gnus-summary-mail-other-window}).
3740
3741 @item S D b
3742 @kindex S D b (Summary)
3743 @findex gnus-summary-resend-bounced-mail
3744 @cindex bouncing mail
3745 If you have sent a mail, but the mail was bounced back to you for some
3746 reason (wrong address, transient failure), you can use this command to
3747 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
3748 will be popped into a mail buffer where you can edit the headers before
3749 sending the mail off again.  If you give a prefix to this command, and
3750 the bounced mail is a reply to some other mail, Gnus will try to fetch
3751 that mail and display it for easy perusal of its headers.  This might
3752 very well fail, though.
3753
3754 @item S D r
3755 @kindex S D r (Summary)
3756 @findex gnus-summary-resend-message
3757 Not to be confused with the previous command,
3758 @code{gnus-summary-resend-message} will prompt you for an address to
3759 send the current message off to, and then send it to that place.  The
3760 headers of the message won't be altered---but lots of headers that say
3761 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
3762 means that you actually send a mail to someone that has a @code{To}
3763 header that (probably) points to yourself.  This will confuse people.
3764 So, natcherly you'll only do that if you're really eVIl.  
3765
3766 This command is mainly used if you have several accounts and want to
3767 ship a mail to a different account of yours.  (If you're both
3768 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
3769 to the @code{root} account, you may want to resend it to
3770 @code{postmaster}.  Ordnung muß sein!
3771
3772 This command understands the process/prefix convention
3773 (@pxref{Process/Prefix}). 
3774
3775 @item S O m
3776 @kindex S O m (Summary)
3777 @findex gnus-uu-digest-mail-forward
3778 Digest the current series (@pxref{Decoding Articles}) and forward the
3779 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
3780 uses the process/prefix convention (@pxref{Process/Prefix}).
3781
3782 @item S M-c
3783 @kindex S M-c (Summary)
3784 @findex gnus-summary-mail-crosspost-complaint
3785 @cindex crossposting
3786 @cindex excessive crossposting
3787 Send a complaint about excessive crossposting to the author of the
3788 current article (@code{gnus-summary-mail-crosspost-complaint}).  
3789
3790 @findex gnus-crosspost-complaint
3791 This command is provided as a way to fight back agains the current
3792 crossposting pandemic that's sweeping Usenet.  It will compose a reply
3793 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
3794 command understands the process/prefix convention
3795 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
3796
3797 @end table
3798
3799
3800 @node Summary Post Commands
3801 @subsection Summary Post Commands
3802 @cindex post
3803 @cindex composing news
3804
3805 Commands for posting a news article:
3806
3807 @table @kbd
3808 @item S p
3809 @itemx a
3810 @kindex a (Summary)
3811 @kindex S p (Summary)
3812 @findex gnus-summary-post-news
3813 @c @icon{gnus-summary-post-news}
3814 Post an article to the current group
3815 (@code{gnus-summary-post-news}).
3816
3817 @item S f
3818 @itemx f
3819 @kindex f (Summary)
3820 @kindex S f (Summary)
3821 @findex gnus-summary-followup
3822 @c @icon{gnus-summary-followup}
3823 Post a followup to the current article (@code{gnus-summary-followup}).
3824
3825 @item S F
3826 @itemx F
3827 @kindex S F (Summary)
3828 @kindex F (Summary)
3829 @c @icon{gnus-summary-followup-with-original}
3830 @findex gnus-summary-followup-with-original
3831 Post a followup to the current article and include the original message
3832 (@code{gnus-summary-followup-with-original}).   This command uses the
3833 process/prefix convention.
3834
3835 @item S n
3836 @kindex S n (Summary)
3837 @findex gnus-summary-followup-to-mail
3838 Post a followup to the current article via news, even if you got the
3839 message through mail (@code{gnus-summary-followup-to-mail}).
3840
3841 @item S n
3842 @kindex S n (Summary)
3843 @findex gnus-summary-followup-to-mail
3844 Post a followup to the current article via news, even if you got the
3845 message through mail and include the original message
3846 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
3847 the process/prefix convention.
3848
3849 @item S o p
3850 @kindex S o p (Summary)
3851 @findex gnus-summary-post-forward
3852 Forward the current article to a newsgroup
3853 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
3854 headers of the forwarded article.
3855
3856 @item S O p
3857 @kindex S O p (Summary)
3858 @findex gnus-uu-digest-post-forward
3859 @cindex digests
3860 @cindex making digests
3861 Digest the current series and forward the result to a newsgroup
3862 (@code{gnus-uu-digest-mail-forward}).  This command uses the
3863 process/prefix convention.
3864
3865 @item S u
3866 @kindex S u (Summary)
3867 @findex gnus-uu-post-news
3868 @c @icon{gnus-uu-post-news}
3869 Uuencode a file, split it into parts, and post it as a series
3870 (@code{gnus-uu-post-news}). (@pxref{Uuencoding and Posting}). 
3871 @end table
3872
3873
3874 @node Canceling and Superseding
3875 @section Canceling Articles
3876 @cindex canceling articles
3877 @cindex superseding articles
3878
3879 Have you ever written something, and then decided that you really,
3880 really, really wish you hadn't posted that?
3881
3882 Well, you can't cancel mail, but you can cancel posts.
3883
3884 @findex gnus-summary-cancel-article
3885 @kindex C (Summary)
3886 @c @icon{gnus-summary-cancel-article}
3887 Find the article you wish to cancel (you can only cancel your own
3888 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
3889 c} (@code{gnus-summary-cancel-article}).  Your article will be
3890 canceled---machines all over the world will be deleting your article.
3891 This command uses the process/prefix convention (@pxref{Process/Prefix}).
3892
3893 Be aware, however, that not all sites honor cancels, so your article may
3894 live on here and there, while most sites will delete the article in
3895 question.
3896
3897 Gnus will use the ``current'' select method when cancelling.  If you
3898 want to use the standard posting method, use the @samp{a} symbolic
3899 prefix (@pxref{Symbolic Prefixes}).
3900
3901 If you discover that you have made some mistakes and want to do some
3902 corrections, you can post a @dfn{superseding} article that will replace
3903 your original article.
3904
3905 @findex gnus-summary-supersede-article
3906 @kindex S (Summary)
3907 Go to the original article and press @kbd{S s}
3908 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
3909 where you can edit the article all you want before sending it off the
3910 usual way.
3911
3912 The same goes for superseding as for canceling, only more so: Some
3913 sites do not honor superseding.  On those sites, it will appear that you
3914 have posted almost the same article twice.
3915
3916 If you have just posted the article, and change your mind right away,
3917 there is a trick you can use to cancel/supersede the article without
3918 waiting for the article to appear on your site first.  You simply return
3919 to the post buffer (which is called @code{*sent ...*}).  There you will
3920 find the article you just posted, with all the headers intact.  Change
3921 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
3922 header by substituting one of those words for the word
3923 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
3924 you would do normally.  The previous article will be
3925 canceled/superseded.
3926
3927 Just remember, kids: There is no 'c' in 'supersede'.
3928
3929
3930 @node Marking Articles
3931 @section Marking Articles
3932 @cindex article marking
3933 @cindex article ticking
3934 @cindex marks
3935
3936 There are several marks you can set on an article. 
3937
3938 You have marks that decide the @dfn{readedness} (whoo, neato-keano
3939 neologism ohoy!) of the article.  Alphabetic marks generally mean
3940 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
3941
3942 In addition, you also have marks that do not affect readedness.
3943
3944 @menu
3945 * Unread Articles::      Marks for unread articles.
3946 * Read Articles::        Marks for read articles.
3947 * Other Marks::          Marks that do not affect readedness.
3948 @end menu
3949
3950 @ifinfo
3951 There's a plethora of commands for manipulating these marks:
3952 @end ifinfo
3953
3954 @menu
3955 * Setting Marks::           How to set and remove marks.
3956 * Setting Process Marks::   How to mark articles for later processing.
3957 @end menu
3958
3959
3960 @node Unread Articles
3961 @subsection Unread Articles
3962
3963 The following marks mark articles as (kinda) unread, in one form or
3964 other.
3965
3966 @table @samp
3967 @item !
3968 @vindex gnus-ticked-mark
3969 Marked as ticked (@code{gnus-ticked-mark}).
3970
3971 @dfn{Ticked articles} are articles that will remain visible always.  If
3972 you see an article that you find interesting, or you want to put off
3973 reading it, or replying to it, until sometime later, you'd typically
3974 tick it.  However, articles can be expired, so if you want to keep an
3975 article forever, you'll have to make it persistent (@pxref{Persistent
3976 Articles}).  
3977
3978 @item ?
3979 @vindex gnus-dormant-mark
3980 Marked as dormant (@code{gnus-dormant-mark}).  
3981
3982 @dfn{Dormant articles} will only appear in the summary buffer if there
3983 are followups to it.  If you want to see them even if they don't have
3984 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
3985
3986 @item SPACE
3987 @vindex gnus-unread-mark
3988 Markes as unread (@code{gnus-unread-mark}).
3989
3990 @dfn{Unread articles} are articles that haven't been read at all yet.
3991 @end table
3992
3993
3994 @node Read Articles
3995 @subsection Read Articles
3996 @cindex expirable mark
3997
3998 All the following marks mark articles as read.
3999
4000 @table @samp
4001
4002 @item r
4003 @vindex gnus-del-mark
4004 These are articles that the user has marked as read with the @kbd{d}
4005 command manually, more or less (@code{gnus-del-mark}).
4006
4007 @item R
4008 @vindex gnus-read-mark
4009 Articles that have actually been read (@code{gnus-read-mark}).
4010
4011 @item O
4012 @vindex gnus-ancient-mark
4013 Articles that were marked as read in previous sessions and are now
4014 @dfn{old} (@code{gnus-ancient-mark}).
4015
4016 @item K
4017 @vindex gnus-killed-mark
4018 Marked as killed (@code{gnus-killed-mark}).
4019
4020 @item X
4021 @vindex gnus-kill-file-mark
4022 Marked as killed by kill files (@code{gnus-kill-file-mark}).
4023
4024 @item Y
4025 @vindex gnus-low-score-mark
4026 Marked as read by having too low a score (@code{gnus-low-score-mark}).
4027
4028 @item C
4029 @vindex gnus-catchup-mark
4030 Marked as read by a catchup (@code{gnus-catchup-mark}).
4031
4032 @item G
4033 @vindex gnus-canceled-mark
4034 Canceled article (@code{gnus-canceled-mark})
4035
4036 @item F
4037 @vindex gnus-souped-mark
4038 @sc{SOUP}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
4039
4040 @item Q
4041 @vindex gnus-sparse-mark
4042 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
4043 Threading}.
4044
4045 @item M
4046 @vindex gnus-duplicate-mark
4047 Article marked as read by duplicate suppression
4048 (@code{gnus-duplicated-mark}).  @xref{Duplicate Suppression}.
4049
4050 @end table
4051
4052 All these marks just mean that the article is marked as read, really.
4053 They are interpreted differently when doing adaptive scoring, though.
4054
4055 One more special mark, though:
4056
4057 @table @samp
4058 @item E
4059 @vindex gnus-expirable-mark
4060 Marked as expirable (@code{gnus-expirable-mark}).
4061
4062 Marking articles as @dfn{expirable} (or have them marked as such
4063 automatically) doesn't make much sense in normal groups---a user doesn't
4064 control expiring of news articles, but in mail groups, for instance,
4065 articles marked as @dfn{expirable} can be deleted by Gnus at
4066 any time.
4067 @end table
4068
4069
4070 @node Other Marks
4071 @subsection Other Marks
4072 @cindex process mark
4073 @cindex bookmarks
4074
4075 There are some marks that have nothing to do with whether the article is
4076 read or not.
4077
4078 @itemize @bullet
4079
4080 @item 
4081 You can set a bookmark in the current article.  Say you are reading a
4082 long thesis on cats' urinary tracts, and have to go home for dinner
4083 before you've finished reading the thesis.  You can then set a bookmark
4084 in the article, and Gnus will jump to this bookmark the next time it
4085 encounters the article.  @xref{Setting Marks}
4086
4087 @item
4088 @vindex gnus-replied-mark
4089 All articles that you have replied to or made a followup to (i.e., have
4090 answered) will be marked with an @samp{A} in the second column
4091 (@code{gnus-replied-mark}).
4092
4093 @item 
4094 @vindex gnus-cached-mark
4095 Articles stored in the article cache will be marked with an @samp{*} in
4096 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}
4097
4098 @item 
4099 @vindex gnus-saved-mark
4100 Articles ``saved'' (in some manner or other; not necessarily
4101 religiously) are marked with an @samp{S} in the second column
4102 (@code{gnus-saved-mark}).
4103
4104 @item 
4105 @vindex gnus-not-empty-thread-mark
4106 @vindex gnus-empty-thread-mark
4107 If the @samp{%e} spec is used, the presence of threads or not will be
4108 marked with @code{gnus-not-empty-thread-mark} and
4109 @code{gnus-empty-thread-mark} in the third column, respectively.
4110
4111 @item 
4112 @vindex gnus-process-mark
4113 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
4114 variety of commands react to the presence of the process mark.  For
4115 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
4116 all articles that have been marked with the process mark.  Articles
4117 marked with the process mark have a @samp{#} in the second column.
4118
4119 @end itemize
4120
4121 You might have noticed that most of these ``non-readedness'' marks
4122 appear in the second column by default.  So if you have a cached, saved,
4123 replied article that you have process-marked, what will that look like?
4124
4125 Nothing much.  The precedence rules go as follows: process -> cache ->
4126 replied -> saved.  So if the article is in the cache and is replied,
4127 you'll only see the cache mark and not the replied mark.
4128
4129
4130 @node Setting Marks
4131 @subsection Setting Marks
4132 @cindex setting marks
4133
4134 All the marking commands understand the numeric prefix.
4135
4136 @table @kbd
4137 @item M c
4138 @itemx M-u
4139 @kindex M c (Summary)
4140 @kindex M-u (Summary)
4141 @findex gnus-summary-clear-mark-forward
4142 @cindex mark as unread
4143 Clear all readedness-marks from the current article
4144 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
4145 article as unread.
4146
4147 @item M t
4148 @itemx !
4149 @kindex ! (Summary)
4150 @kindex M t (Summary)
4151 @findex gnus-summary-tick-article-forward
4152 Tick the current article (@code{gnus-summary-tick-article-forward}).
4153 @xref{Article Caching} 
4154
4155 @item M ?
4156 @itemx ?
4157 @kindex ? (Summary)
4158 @kindex M ? (Summary)
4159 @findex gnus-summary-mark-as-dormant
4160 Mark the current article as dormant
4161 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching} 
4162
4163 @item M d
4164 @itemx d
4165 @kindex M d (Summary)
4166 @kindex d (Summary)
4167 @findex gnus-summary-mark-as-read-forward
4168 Mark the current article as read
4169 (@code{gnus-summary-mark-as-read-forward}).
4170
4171 @item D
4172 @kindex D (Summary)
4173 @findex gnus-summary-mark-as-read-backward
4174 Mark the current article as read and move point to the previous line
4175 (@code{gnus-summary-mark-as-read-backward}).
4176
4177 @item M k
4178 @itemx k
4179 @kindex k (Summary)
4180 @kindex M k (Summary)
4181 @findex gnus-summary-kill-same-subject-and-select
4182 Mark all articles that have the same subject as the current one as read,
4183 and then select the next unread article
4184 (@code{gnus-summary-kill-same-subject-and-select}).
4185
4186 @item M K
4187 @itemx C-k
4188 @kindex M K (Summary)
4189 @kindex C-k (Summary)
4190 @findex gnus-summary-kill-same-subject
4191 Mark all articles that have the same subject as the current one as read
4192 (@code{gnus-summary-kill-same-subject}).  
4193
4194 @item M C
4195 @kindex M C (Summary)
4196 @findex gnus-summary-catchup
4197 @c @icon{gnus-summary-catchup}
4198 Mark all unread articles as read (@code{gnus-summary-catchup}).
4199
4200 @item M C-c
4201 @kindex M C-c (Summary)
4202 @findex gnus-summary-catchup-all
4203 Mark all articles in the group as read---even the ticked and dormant
4204 articles (@code{gnus-summary-catchup-all}).
4205
4206 @item M H
4207 @kindex M H (Summary)
4208 @findex gnus-summary-catchup-to-here
4209 Catchup the current group to point
4210 (@code{gnus-summary-catchup-to-here}). 
4211
4212 @item C-w
4213 @kindex C-w (Summary)
4214 @findex gnus-summary-mark-region-as-read
4215 Mark all articles between point and mark as read
4216 (@code{gnus-summary-mark-region-as-read}). 
4217
4218 @item M V k
4219 @kindex M V k (Summary)
4220 @findex gnus-summary-kill-below
4221 Kill all articles with scores below the default score (or below the
4222 numeric prefix) (@code{gnus-summary-kill-below}).
4223
4224 @item M e
4225 @itemx E
4226 @kindex M e (Summary)
4227 @kindex E (Summary)
4228 @findex gnus-summary-mark-as-expirable
4229 Mark the current article as expirable
4230 (@code{gnus-summary-mark-as-expirable}).
4231
4232 @item M b
4233 @kindex M b (Summary)
4234 @findex gnus-summary-set-bookmark
4235 Set a bookmark in the current article
4236 (@code{gnus-summary-set-bookmark}).
4237
4238 @item M B
4239 @kindex M B (Summary)
4240 @findex gnus-summary-remove-bookmark
4241 Remove the bookmark from the current article
4242 (@code{gnus-summary-remove-bookmark}).
4243
4244 @item M V c
4245 @kindex M V c (Summary)
4246 @findex gnus-summary-clear-above
4247 Clear all marks from articles with scores over the default score (or
4248 over the numeric prefix) (@code{gnus-summary-clear-above}).
4249
4250 @item M V u
4251 @kindex M V u (Summary)
4252 @findex gnus-summary-tick-above
4253 Tick all articles with scores over the default score (or over the
4254 numeric prefix) (@code{gnus-summary-tick-above}).
4255
4256 @item M V m
4257 @kindex M V m (Summary)
4258 @findex gnus-summary-mark-above
4259 Prompt for a mark, and mark all articles with scores over the default
4260 score (or over the numeric prefix) with this mark
4261 (@code{gnus-summary-clear-above}).
4262 @end table
4263
4264 @vindex gnus-summary-goto-unread
4265 The @code{gnus-summary-goto-unread} variable controls what action should
4266 be taken after setting a mark.  If non-@code{nil}, point will move to
4267 the next/previous unread article.  If @code{nil}, point will just move
4268 one line up or down.  As a special case, if this variable is
4269 @code{never}, all the marking commands as well as other commands (like
4270 @kbd{SPACE}) will move to the next article, whether it is unread or not.
4271 The default is @code{t}.
4272
4273
4274 @node Setting Process Marks
4275 @subsection Setting Process Marks
4276 @cindex setting process marks
4277
4278 @table @kbd
4279
4280 @item M P p
4281 @itemx #
4282 @kindex # (Summary)
4283 @kindex M P p (Summary)
4284 @findex gnus-summary-mark-as-processable
4285 Mark the current article with the process mark
4286 (@code{gnus-summary-mark-as-processable}). 
4287 @findex gnus-summary-unmark-as-processable
4288
4289 @item M P u 
4290 @itemx M-#
4291 @kindex M P u (Summary)
4292 @kindex M-# (Summary)
4293 Remove the process mark, if any, from the current article
4294 (@code{gnus-summary-unmark-as-processable}).
4295
4296 @item M P U
4297 @kindex M P U (Summary)
4298 @findex gnus-summary-unmark-all-processable
4299 Remove the process mark from all articles
4300 (@code{gnus-summary-unmark-all-processable}). 
4301
4302 @item M P i
4303 @kindex M P i (Summary)
4304 @findex gnus-uu-invert-processable
4305 Invert the list of process marked articles
4306 (@code{gnus-uu-invert-processable}). 
4307
4308 @item M P R
4309 @kindex M P R (Summary)
4310 @findex gnus-uu-mark-by-regexp
4311 Mark articles by a regular expression (@code{gnus-uu-mark-by-regexp}). 
4312
4313 @item M P r
4314 @kindex M P r (Summary)
4315 @findex gnus-uu-mark-region
4316 Mark articles in region (@code{gnus-uu-mark-region}).
4317
4318 @item M P t
4319 @kindex M P t (Summary)
4320 @findex gnus-uu-mark-thread
4321 Mark all articles in the current (sub)thread
4322 (@code{gnus-uu-mark-thread}).
4323
4324 @item M P T
4325 @kindex M P T (Summary)
4326 @findex gnus-uu-unmark-thread
4327 Unmark all articles in the current (sub)thread
4328 (@code{gnus-uu-unmark-thread}).
4329
4330 @item M P v
4331 @kindex M P v (Summary)
4332 @findex gnus-uu-mark-over
4333 Mark all articles that have a score above the prefix argument
4334 (@code{gnus-uu-mark-over}).
4335
4336 @item M P s
4337 @kindex M P s (Summary)
4338 @findex gnus-uu-mark-series
4339 Mark all articles in the current series (@code{gnus-uu-mark-series}).
4340
4341 @item M P S
4342 @kindex M P S (Summary)
4343 @findex gnus-uu-mark-sparse
4344 Mark all series that have already had some articles marked
4345 (@code{gnus-uu-mark-sparse}).
4346
4347 @item M P a
4348 @kindex M P a (Summary)
4349 @findex gnus-uu-mark-all
4350 Mark all articles in series order (@code{gnus-uu-mark-series}).
4351
4352 @item M P b
4353 @kindex M P b (Summary)
4354 @findex gnus-uu-mark-buffer
4355 Mark all articles in the buffer in the order they appear
4356 (@code{gnus-uu-mark-buffer}). 
4357
4358 @item M P k
4359 @kindex M P k (Summary)
4360 @findex gnus-summary-kill-process-mark
4361 Push the current process mark set onto the stack and unmark all articles
4362 (@code{gnus-summary-kill-process-mark}).
4363
4364 @item M P y
4365 @kindex M P y (Summary)
4366 @findex gnus-summary-yank-process-mark
4367 Pop the previous process mark set from the stack and restore it
4368 (@code{gnus-summary-yank-process-mark}).
4369
4370 @item M P w
4371 @kindex M P w (Summary)
4372 @findex gnus-summary-save-process-mark
4373 Push the current process mark set onto the stack
4374 (@code{gnus-summary-save-process-mark}).
4375
4376 @end table
4377
4378
4379 @node Limiting
4380 @section Limiting
4381 @cindex limiting
4382
4383 It can be convenient to limit the summary buffer to just show some
4384 subset of the articles currently in the group.  The effect most limit
4385 commands have is to remove a few (or many) articles from the summary
4386 buffer. 
4387
4388 All limiting commands work on subsets of the articles already fetched
4389 from the servers.  None of these commands query the server for
4390 additional articles.
4391
4392 @table @kbd
4393
4394 @item / /
4395 @itemx / s
4396 @kindex / / (Summary)
4397 @findex gnus-summary-limit-to-subject
4398 Limit the summary buffer to articles that match some subject
4399 (@code{gnus-summary-limit-to-subject}). 
4400
4401 @item / a
4402 @kindex / a (Summary)
4403 @findex gnus-summary-limit-to-author
4404 Limit the summary buffer to articles that match some author
4405 (@code{gnus-summary-limit-to-author}).
4406
4407 @item / u
4408 @itemx x
4409 @kindex / u (Summary)
4410 @kindex x (Summary)
4411 @findex gnus-summary-limit-to-unread
4412 Limit the summary buffer to articles not marked as read
4413 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
4414 buffer to articles strictly unread.  This means that ticked and
4415 dormant articles will also be excluded.
4416
4417 @item / m
4418 @kindex / m (Summary)
4419 @findex gnus-summary-limit-to-marks
4420 Ask for a mark and then limit to all articles that have not been marked
4421 with that mark (@code{gnus-summary-limit-to-marks}).
4422
4423 @item / t
4424 @kindex / t (Summary)
4425 @findex gnus-summary-limit-to-age
4426 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
4427 (@code{gnus-summary-limit-to-marks}).  If given a prefix, limit to
4428 articles younger than that number of days.
4429
4430 @item / n
4431 @kindex / n (Summary)
4432 @findex gnus-summary-limit-to-articles
4433 Limit the summary buffer to the current article
4434 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
4435 convention (@pxref{Process/Prefix}).
4436
4437 @item / w
4438 @kindex / w (Summary)
4439 @findex gnus-summary-pop-limit
4440 Pop the previous limit off the stack and restore it
4441 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
4442 the stack.
4443
4444 @item / v
4445 @kindex / v (Summary)
4446 @findex gnus-summary-limit-to-score
4447 Limit the summary buffer to articles that have a score at or above some
4448 score (@code{gnus-summary-limit-to-score}).
4449
4450 @item / E
4451 @itemx M S
4452 @kindex M S (Summary)
4453 @kindex / E (Summary)
4454 @findex gnus-summary-limit-include-expunged
4455 Display all expunged articles
4456 (@code{gnus-summary-limit-include-expunged}). 
4457
4458 @item / D
4459 @kindex / D (Summary)
4460 @findex gnus-summary-limit-include-dormant
4461 Display all dormant articles (@code{gnus-summary-limit-include-dormant}).
4462
4463 @item / d
4464 @kindex / d (Summary)
4465 @findex gnus-summary-limit-exclude-dormant
4466 Hide all dormant articles (@code{gnus-summary-limit-exclude-dormant}).
4467
4468 @item / T
4469 @kindex / T (Summary)
4470 @findex gnus-summary-limit-include-thread
4471 Include all the articles in the current thread.
4472
4473 @item / c
4474 @kindex / c (Summary)
4475 @findex gnus-summary-limit-exclude-childless-dormant
4476 Hide all dormant articles that have no children
4477 (@code{gnus-summary-limit-exclude-childless-dormant}). 
4478
4479 @item / C
4480 @kindex / C (Summary)
4481 @findex gnus-summary-limit-mark-excluded-as-read
4482 Mark all excluded unread articles as read
4483 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
4484 also mark excluded ticked and dormant articles as read.
4485
4486 @end table
4487
4488
4489 @node Threading
4490 @section Threading
4491 @cindex threading
4492 @cindex article threading
4493
4494 Gnus threads articles by default.  @dfn{To thread} is to put responses
4495 to articles directly after the articles they respond to---in a
4496 hierarchical fashion.
4497
4498 Threading is done by looking at the @code{References} headers of the
4499 articles.  In a perfect world, this would be enough to build pretty
4500 trees, but unfortunately, the @code{References} header is often broken
4501 or simply missing.  Weird news propagration excarcerbates the problem,
4502 so one has to employ other heuristics to get pleasing results.  A
4503 plethora of approaches exists, as detailed in horrible detail in
4504 @pxref{Customizing Threading}. 
4505
4506 First, a quick overview of the concepts:
4507
4508 @table @dfn
4509 @item root
4510 The top-most article in a thread; the first article in the thread.
4511
4512 @item thread
4513 A tree-like article structure.
4514
4515 @item sub-thread
4516 A small(er) section of this tree-like structure.
4517
4518 @item loose threads
4519 Threads often lose their roots due to article expiry, or due to the root
4520 already having been read in a previous session, and not displayed in the
4521 summary buffer.  We then typicall have many sub-threads that really
4522 belong to one thread, but are without connecting roots.  These are
4523 called loose threads.
4524
4525 @item thread gathering
4526 An attempt to gather loose threads into bigger threads.
4527
4528 @item sparse threads
4529 A thread where the missing articles have been ``guessed'' at, and are
4530 displayed as empty lines in the summary buffer.
4531
4532 @end table
4533
4534
4535 @menu
4536 * Customizing Threading::     Variables you can change to affect the threading.
4537 * Thread Commands::           Thread based commands in the summary buffer.
4538 @end menu
4539
4540
4541 @node Customizing Threading
4542 @subsection Customizing Threading
4543 @cindex customizing threading
4544
4545 @menu
4546 * Loose Threads::        How Gnus gathers loose threads into bigger threads.
4547 * Filling In Threads::   Making the threads displayed look fuller.
4548 * More Threading::       Even more variables for fiddling with threads.
4549 * Low-Level Threading::  You thought it was over... but you were wrong!
4550 @end menu
4551
4552
4553 @node Loose Threads
4554 @subsubsection Loose Threads
4555 @cindex <
4556 @cindex >
4557 @cindex loose threads
4558
4559 @table @code
4560 @item gnus-summary-make-false-root
4561 @vindex gnus-summary-make-false-root
4562 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
4563 and create a dummy root at the top.  (Wait a minute.  Root at the top?
4564 Yup.)  Loose subtrees occur when the real root has expired, or you've
4565 read or killed the root in a previous session.
4566
4567 When there is no real root of a thread, Gnus will have to fudge
4568 something.  This variable says what fudging method Gnus should use.
4569 There are four possible values:
4570
4571 @iftex
4572 @iflatex
4573 \gnusfigure{The Summary Buffer}{390}{
4574 \put(0,0){\epsfig{figure=tmp/summary-adopt.ps,width=7.5cm}}
4575 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=tmp/summary-empty.ps,width=7.5cm}}}
4576 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=tmp/summary-none.ps,width=7.5cm}}}
4577 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=tmp/summary-dummy.ps,width=7.5cm}}}
4578 }
4579 @end iflatex
4580 @end iftex
4581
4582 @cindex adopting articles
4583
4584 @table @code
4585
4586 @item adopt
4587 Gnus will make the first of the orphaned articles the parent.  This
4588 parent will adopt all the other articles.  The adopted articles will be
4589 marked as such by pointy brackets (@samp{<>}) instead of the standard
4590 square brackets (@samp{[]}).  This is the default method.
4591
4592 @item dummy
4593 @vindex gnus-summary-dummy-line-format
4594 Gnus will create a dummy summary line that will pretend to be the
4595 parent.  This dummy line does not correspond to any real article, so
4596 selecting it will just select the first real article after the dummy
4597 article.  @code{gnus-summary-dummy-line-format} is used to specify the
4598 format of the dummy roots.  It accepts only one format spec:  @samp{S},
4599 which is the subject of the article.  @xref{Formatting Variables}.
4600
4601 @item empty
4602 Gnus won't actually make any article the parent, but simply leave the
4603 subject field of all orphans except the first empty.  (Actually, it will
4604 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
4605 Buffer Format}).)
4606
4607 @item none
4608 Don't make any article parent at all.  Just gather the threads and
4609 display them after one another.
4610
4611 @item nil
4612 Don't gather loose threads.
4613 @end table
4614
4615 @item gnus-summary-gather-subject-limit
4616 @vindex gnus-summary-gather-subject-limit
4617 Loose threads are gathered by comparing subjects of articles.  If this
4618 variable is @code{nil}, Gnus requires an exact match between the
4619 subjects of the loose threads before gathering them into one big
4620 super-thread.  This might be too strict a requirement, what with the
4621 presence of stupid newsreaders that chop off long subject lines.  If
4622 you think so, set this variable to, say, 20 to require that only the
4623 first 20 characters of the subjects have to match.  If you set this
4624 variable to a really low number, you'll find that Gnus will gather
4625 everything in sight into one thread, which isn't very helpful.
4626
4627 @cindex fuzzy article gathering
4628 If you set this variable to the special value @code{fuzzy}, Gnus will
4629 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
4630 Matching}). 
4631
4632 @item gnus-simplify-subject-fuzzy-regexp
4633 @vindex gnus-simplify-subject-fuzzy-regexp
4634 This can either be a regular expression or list of regular expressions
4635 that match strings that will be removed from subjects if fuzzy subject
4636 simplification is used.
4637
4638 @item gnus-simplify-ignored-prefixes
4639 @vindex gnus-simplify-ignored-prefixes
4640 If you set @code{gnus-summary-gather-subject-limit} to something as low
4641 as 10, you might consider setting this variable to something sensible:
4642
4643 @c Written by Michael Ernst <mernst@cs.rice.edu>
4644 @lisp
4645 (setq gnus-simplify-ignored-prefixes
4646       (concat 
4647        "\\`\\[?\\("
4648        (mapconcat 
4649         'identity
4650         '("looking"
4651           "wanted" "followup" "summary\\( of\\)?"
4652           "help" "query" "problem" "question" 
4653           "answer" "reference" "announce"
4654           "How can I" "How to" "Comparison of"
4655           ;; ...
4656           )
4657         "\\|")
4658        "\\)\\s *\\("
4659        (mapconcat 'identity
4660                   '("for" "for reference" "with" "about")
4661                   "\\|")
4662        "\\)?\\]?:?[ \t]*"))
4663 @end lisp
4664
4665 All words that match this regexp will be removed before comparing two
4666 subjects. 
4667
4668 @item gnus-simplify-subject-functions
4669 @vindex gnus-simplify-subject-functions
4670 If non-@code{nil}, this variable overrides
4671 @code{gnus-summary-gather-subject-limit}.  This variable should be a
4672 list of functions to apply to the @code{Subject} string iteratively to
4673 arrive at the simplified version of the string.
4674
4675 Useful functions to put in this list include:
4676
4677 @table @code
4678 @item gnus-simplify-subject-re
4679 @findex gnus-simplify-subject-re
4680 Strip the leading @samp{Re:}.
4681
4682 @item gnus-simplify-subject-fuzzy
4683 @findex gnus-simplify-subject-fuzzy
4684 Simplify fuzzily.
4685
4686 @item gnus-simplify-whitespace
4687 @findex gnus-simplify-whitespace
4688 Remove excessive whitespace.
4689 @end table
4690
4691 You may also write your own functions, of course.
4692
4693
4694 @item gnus-summary-gather-exclude-subject
4695 @vindex gnus-summary-gather-exclude-subject
4696 Since loose thread gathering is done on subjects only, that might lead
4697 to many false hits, especially with certain common subjects like
4698 @samp{} and @samp{(none)}.  To make the situation slightly better,
4699 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
4700 what subjects should be excluded from the gathering process.@*
4701 The default is @samp{^ *$\\|^(none)$}.  
4702
4703 @item gnus-summary-thread-gathering-function
4704 @vindex gnus-summary-thread-gathering-function
4705 Gnus gathers threads by looking at @code{Subject} headers.  This means
4706 that totally unrelated articles may end up in the same ``thread'', which
4707 is confusing.  An alternate approach is to look at all the
4708 @code{Message-ID}s in all the @code{References} headers to find matches.
4709 This will ensure that no gathered threads ever include unrelated
4710 articles, but it also means that people who have posted with broken
4711 newsreaders won't be gathered properly.  The choice is yours---plague or
4712 cholera:
4713
4714 @table @code
4715 @item gnus-gather-threads-by-subject
4716 @findex gnus-gather-threads-by-subject
4717 This function is the default gathering function and looks at
4718 @code{Subject}s exclusively.
4719
4720 @item gnus-gather-threads-by-references
4721 @findex gnus-gather-threads-by-references
4722 This function looks at @code{References} headers exclusively.
4723 @end table
4724
4725 If you want to test gathering by @code{References}, you could say
4726 something like:
4727
4728 @lisp
4729 (setq gnus-summary-thread-gathering-function
4730       'gnus-gather-threads-by-references)
4731 @end lisp
4732
4733 @end table
4734
4735
4736 @node Filling In Threads
4737 @subsubsection Filling In Threads
4738
4739 @table @code
4740 @item gnus-fetch-old-headers
4741 @vindex gnus-fetch-old-headers
4742 If non-@code{nil}, Gnus will attempt to build old threads by fetching
4743 more old headers---headers to articles marked as read.  If you
4744 would like to display as few summary lines as possible, but still
4745 connect as many loose threads as possible, you should set this variable
4746 to @code{some} or a number.  If you set it to a number, no more than
4747 that number of extra old headers will be fetched.  In either case,
4748 fetching old headers only works if the backend you are using carries
4749 overview files---this would normally be @code{nntp}, @code{nnspool} and
4750 @code{nnml}.  Also remember that if the root of the thread has been
4751 expired by the server, there's not much Gnus can do about that.
4752
4753 This variable can also be set to @code{invisible}.  This won't have any
4754 visible effects, but is useful if you use the @kbd{A T} command a lot
4755 (@pxref{Finding the Parent}). 
4756
4757 @item gnus-build-sparse-threads
4758 @vindex gnus-build-sparse-threads
4759 Fetching old headers can be slow.  A low-rent similar effect can be
4760 gotten by setting this variable to @code{some}.  Gnus will then look at
4761 the complete @code{References} headers of all articles and try to string
4762 together articles that belong in the same thread.  This will leave
4763 @dfn{gaps} in the threading display where Gnus guesses that an article
4764 is missing from the thread.  (These gaps appear like normal summary
4765 lines.  If you select a gap, Gnus will try to fetch the article in
4766 question.)  If this variable is @code{t}, Gnus will display all these
4767 ``gaps'' without regard for whether they are useful for completing the
4768 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
4769 off sparse leaf nodes that don't lead anywhere.  This variable is
4770 @code{nil} by default.
4771
4772 @end table
4773
4774
4775 @node More Threading
4776 @subsubsection More Threading
4777
4778 @table @code
4779 @item gnus-show-threads
4780 @vindex gnus-show-threads
4781 If this variable is @code{nil}, no threading will be done, and all of
4782 the rest of the variables here will have no effect.  Turning threading
4783 off will speed group selection up a bit, but it is sure to make reading
4784 slower and more awkward.
4785
4786 @item gnus-thread-hide-subtree
4787 @vindex gnus-thread-hide-subtree
4788 If non-@code{nil}, all threads will be hidden when the summary buffer is
4789 generated.
4790
4791 @item gnus-thread-expunge-below
4792 @vindex gnus-thread-expunge-below
4793 All threads that have a total score (as defined by
4794 @code{gnus-thread-score-function}) less than this number will be
4795 expunged.  This variable is @code{nil} by default, which means that no
4796 threads are expunged.
4797
4798 @item gnus-thread-hide-killed
4799 @vindex gnus-thread-hide-killed
4800 if you kill a thread and this variable is non-@code{nil}, the subtree
4801 will be hidden.
4802
4803 @item gnus-thread-ignore-subject
4804 @vindex gnus-thread-ignore-subject
4805 Sometimes somebody changes the subject in the middle of a thread.  If
4806 this variable is non-@code{nil}, the subject change is ignored.  If it
4807 is @code{nil}, which is the default, a change in the subject will result
4808 in a new thread.
4809
4810 @item gnus-thread-indent-level
4811 @vindex gnus-thread-indent-level
4812 This is a number that says how much each sub-thread should be indented.
4813 The default is 4.
4814
4815 @end table
4816
4817
4818 @node Low-Level Threading
4819 @subsubsection Low-Level Threading
4820
4821 @table @code
4822
4823 @item gnus-parse-headers-hook
4824 @vindex gnus-parse-headers-hook
4825 Hook run before parsing any headers.  The default value is
4826 @code{(gnus-decode-rfc1522)}, which means that QPized headers will be
4827 slightly decoded in a hackish way.  This is likely to change in the
4828 future when Gnus becomes @sc{MIME}ified.
4829
4830 @item gnus-alter-header-function
4831 @vindex gnus-alter-header-function
4832 If non-@code{nil}, this function will be called to allow alteration of
4833 article header structures.  The function is called with one parameter,
4834 the article header vector, which it may alter in any way.  For instance,
4835 if you have a mail-to-news gateway which alters the @code{Message-ID}s
4836 in systematic ways (by adding prefixes and such), you can use this
4837 variable to un-scramble the @code{Message-ID}s so that they are more
4838 meaningful.  Here's one example:
4839
4840 @lisp
4841 (setq gnus-alter-header-function 'my-alter-message-id)
4842
4843 (defun my-alter-message-id (header)
4844   (let ((id (mail-header-id header)))
4845     (when (string-match
4846            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
4847       (mail-header-set-id
4848        (concat (match-string 1 id) "@@" (match-string 2 id))
4849        header))))
4850 @end lisp
4851
4852 @end table
4853
4854
4855 @node Thread Commands
4856 @subsection Thread Commands
4857 @cindex thread commands
4858
4859 @table @kbd
4860
4861 @item T k
4862 @itemx M-C-k
4863 @kindex T k (Summary)
4864 @kindex M-C-k (Summary)
4865 @findex gnus-summary-kill-thread
4866 Mark all articles in the current (sub-)thread as read
4867 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
4868 remove all marks instead.  If the prefix argument is negative, tick
4869 articles instead.
4870
4871 @item T l
4872 @itemx M-C-l
4873 @kindex T l (Summary)
4874 @kindex M-C-l (Summary)
4875 @findex gnus-summary-lower-thread
4876 Lower the score of the current (sub-)thread
4877 (@code{gnus-summary-lower-thread}). 
4878
4879 @item T i
4880 @kindex T i (Summary)
4881 @findex gnus-summary-raise-thread
4882 Increase the score of the current (sub-)thread
4883 (@code{gnus-summary-raise-thread}).
4884
4885 @item T #
4886 @kindex T # (Summary)
4887 @findex gnus-uu-mark-thread
4888 Set the process mark on the current (sub-)thread
4889 (@code{gnus-uu-mark-thread}).
4890
4891 @item T M-#
4892 @kindex T M-# (Summary)
4893 @findex gnus-uu-unmark-thread
4894 Remove the process mark from the current (sub-)thread
4895 (@code{gnus-uu-unmark-thread}).
4896
4897 @item T T
4898 @kindex T T (Summary)
4899 @findex gnus-summary-toggle-threads
4900 Toggle threading (@code{gnus-summary-toggle-threads}).
4901
4902 @item T s
4903 @kindex T s (Summary)
4904 @findex gnus-summary-show-thread
4905 Expose the (sub-)thread hidden under the current article, if any
4906 (@code{gnus-summary-show-thread}).
4907
4908 @item T h
4909 @kindex T h (Summary)
4910 @findex gnus-summary-hide-thread
4911 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
4912
4913 @item T S
4914 @kindex T S (Summary)
4915 @findex gnus-summary-show-all-threads
4916 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
4917
4918 @item T H
4919 @kindex T H (Summary)
4920 @findex gnus-summary-hide-all-threads
4921 Hide all threads (@code{gnus-summary-hide-all-threads}).
4922
4923 @item T t
4924 @kindex T t (Summary)
4925 @findex gnus-summary-rethread-current
4926 Re-thread the current article's thread
4927 (@code{gnus-summary-rethread-current}).  This works even when the
4928 summary buffer is otherwise unthreaded.
4929
4930 @item T ^
4931 @kindex T ^ (Summary)
4932 @findex gnus-summary-reparent-thread
4933 Make the current article the child of the marked (or previous) article
4934 (@code{gnus-summary-reparent-thread}).
4935
4936 @end table
4937
4938 The following commands are thread movement commands.  They all
4939 understand the numeric prefix.
4940
4941 @table @kbd
4942
4943 @item T n
4944 @kindex T n (Summary)
4945 @findex gnus-summary-next-thread
4946 Go to the next thread (@code{gnus-summary-next-thread}).
4947
4948 @item T p
4949 @kindex T p (Summary)
4950 @findex gnus-summary-prev-thread
4951 Go to the previous thread (@code{gnus-summary-prev-thread}).
4952
4953 @item T d
4954 @kindex T d (Summary)
4955 @findex gnus-summary-down-thread
4956 Descend the thread (@code{gnus-summary-down-thread}).
4957
4958 @item T u
4959 @kindex T u (Summary)
4960 @findex gnus-summary-up-thread
4961 Ascend the thread (@code{gnus-summary-up-thread}).
4962
4963 @item T o
4964 @kindex T o (Summary)
4965 @findex gnus-summary-top-thread
4966 Go to the top of the thread (@code{gnus-summary-top-thread}).
4967 @end table
4968
4969 @vindex gnus-thread-operation-ignore-subject 
4970 If you ignore subject while threading, you'll naturally end up with
4971 threads that have several different subjects in them.  If you then issue
4972 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
4973 wish to kill the entire thread, but just those parts of the thread that
4974 have the same subject as the current article.  If you like this idea,
4975 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
4976 is non-@code{nil} (which it is by default), subjects will be ignored
4977 when doing thread commands.  If this variable is @code{nil}, articles in
4978 the same thread with different subjects will not be included in the
4979 operation in question.  If this variable is @code{fuzzy}, only articles
4980 that have subjects fuzzily equal will be included (@pxref{Fuzzy
4981 Matching}).
4982
4983
4984 @node Sorting
4985 @section Sorting
4986
4987 @findex gnus-thread-sort-by-total-score
4988 @findex gnus-thread-sort-by-date
4989 @findex gnus-thread-sort-by-score
4990 @findex gnus-thread-sort-by-subject
4991 @findex gnus-thread-sort-by-author
4992 @findex gnus-thread-sort-by-number
4993 @vindex gnus-thread-sort-functions
4994 If you are using a threaded summary display, you can sort the threads by
4995 setting @code{gnus-thread-sort-functions}, which is a list of functions.
4996 By default, sorting is done on article numbers.  Ready-made sorting
4997 predicate functions include @code{gnus-thread-sort-by-number},
4998 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
4999 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score}, and
5000 @code{gnus-thread-sort-by-total-score}.
5001
5002 Each function takes two threads and returns non-@code{nil} if the first
5003 thread should be sorted before the other.  Note that sorting really is
5004 normally done by looking only at the roots of each thread.  If you use
5005 more than one function, the primary sort key should be the last function
5006 in the list.  You should probably always include
5007 @code{gnus-thread-sort-by-number} in the list of sorting
5008 functions---preferably first.  This will ensure that threads that are
5009 equal with respect to the other sort criteria will be displayed in
5010 ascending article order.
5011
5012 If you would like to sort by score, then by subject, and finally by
5013 number, you could do something like:
5014
5015 @lisp
5016 (setq gnus-thread-sort-functions 
5017       '(gnus-thread-sort-by-number
5018         gnus-thread-sort-by-subject
5019         gnus-thread-sort-by-total-score))
5020 @end lisp
5021
5022 The threads that have highest score will be displayed first in the
5023 summary buffer.  When threads have the same score, they will be sorted
5024 alphabetically.  The threads that have the same score and the same
5025 subject will be sorted by number, which is (normally) the sequence in
5026 which the articles arrived.
5027
5028 If you want to sort by score and then reverse arrival order, you could
5029 say something like:
5030
5031 @lisp
5032 (setq gnus-thread-sort-functions
5033       '((lambda (t1 t2) 
5034           (not (gnus-thread-sort-by-number t2 t1)))
5035         gnus-thread-sort-by-score))
5036 @end lisp
5037
5038 @vindex gnus-thread-score-function
5039 The function in the @code{gnus-thread-score-function} variable (default
5040 @code{+}) is used for calculating the total score of a thread.  Useful
5041 functions might be @code{max}, @code{min}, or squared means, or whatever
5042 tickles your fancy.
5043
5044 @findex gnus-article-sort-functions
5045 @findex gnus-article-sort-by-date
5046 @findex gnus-article-sort-by-score
5047 @findex gnus-article-sort-by-subject
5048 @findex gnus-article-sort-by-author
5049 @findex gnus-article-sort-by-number
5050 If you are using an unthreaded display for some strange reason or other,
5051 you have to fiddle with the @code{gnus-article-sort-functions} variable.
5052 It is very similar to the @code{gnus-thread-sort-functions}, except that
5053 it uses slightly different functions for article comparison.  Available
5054 sorting predicate functions are @code{gnus-article-sort-by-number},
5055 @code{gnus-article-sort-by-author}, @code{gnus-article-sort-by-subject},
5056 @code{gnus-article-sort-by-date}, and @code{gnus-article-sort-by-score}.
5057
5058 If you want to sort an unthreaded summary display by subject, you could
5059 say something like:
5060
5061 @lisp
5062 (setq gnus-article-sort-functions 
5063       '(gnus-article-sort-by-number
5064         gnus-article-sort-by-subject))
5065 @end lisp
5066
5067
5068
5069 @node Asynchronous Fetching
5070 @section Asynchronous Article Fetching
5071 @cindex asynchronous article fetching
5072 @cindex article pre-fetch
5073 @cindex pre-fetch
5074
5075 If you read your news from an @sc{nntp} server that's far away, the
5076 network latencies may make reading articles a chore.  You have to wait
5077 for a while after pressing @kbd{n} to go to the next article before the
5078 article appears.  Why can't Gnus just go ahead and fetch the article
5079 while you are reading the previous one?  Why not, indeed.
5080
5081 First, some caveats.  There are some pitfalls to using asynchronous
5082 article fetching, especially the way Gnus does it.  
5083
5084 Let's say you are reading article 1, which is short, and article 2 is
5085 quite long, and you are not interested in reading that.  Gnus does not
5086 know this, so it goes ahead and fetches article 2.  You decide to read
5087 article 3, but since Gnus is in the process of fetching article 2, the
5088 connection is blocked.
5089
5090 To avoid these situations, Gnus will open two (count 'em two)
5091 connections to the server.  Some people may think this isn't a very nice
5092 thing to do, but I don't see any real alternatives.  Setting up that
5093 extra connection takes some time, so Gnus startup will be slower.
5094
5095 Gnus will fetch more articles than you will read.  This will mean that
5096 the link between your machine and the @sc{nntp} server will become more
5097 loaded than if you didn't use article pre-fetch.  The server itself will
5098 also become more loaded---both with the extra article requests, and the
5099 extra connection.
5100
5101 Ok, so now you know that you shouldn't really use this thing...  unless
5102 you really want to.
5103
5104 @vindex gnus-asynchronous
5105 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
5106 happen automatically.
5107
5108 @vindex gnus-use-article-prefetch
5109 You can control how many articles are to be pre-fetched by setting
5110 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
5111 that when you read an article in the group, the backend will pre-fetch
5112 the next 30 articles.  If this variable is @code{t}, the backend will
5113 pre-fetch all the articles it can without bound.  If it is
5114 @code{nil}, no pre-fetching will be done.
5115
5116 @vindex gnus-async-prefetch-article-p
5117 @findex gnus-async-read-p
5118 There are probably some articles that you don't want to pre-fetch---read
5119 articles, for instance.  The @code{gnus-async-prefetch-article-p} variable controls whether an article is to be pre-fetched.  This function should
5120 return non-@code{nil} when the article in question is to be
5121 pre-fetched.  The default is @code{gnus-async-read-p}, which returns
5122 @code{nil} on read articles.  The function is called with an article
5123 data structure as the only parameter.
5124
5125 If, for instance, you wish to pre-fetch only unread articles shorter than 100 lines, you could say something like:
5126
5127 @lisp
5128 (defun my-async-short-unread-p (data)
5129   "Return non-nil for short, unread articles."
5130   (and (gnus-data-unread-p data)
5131        (< (mail-header-lines (gnus-data-header data))
5132           100)))
5133
5134 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
5135 @end lisp
5136
5137 These functions will be called many, many times, so they should
5138 preferably be short and sweet to avoid slowing down Gnus too much.
5139 It's probably a good idea to byte-compile things like this.
5140
5141 @vindex gnus-prefetched-article-deletion-strategy
5142 Articles have to be removed from the asynch buffer sooner or later.  The
5143 @code{gnus-prefetched-article-deletion-strategy} says when to remove
5144 articles.  This is a list that may contain the following elements:
5145
5146 @table @code
5147 @item read
5148 Remove articles when they are read.
5149
5150 @item exit
5151 Remove articles when exiting the group.
5152 @end table
5153
5154 The default value is @code{(read exit)}.
5155
5156 @vindex gnus-use-header-prefetch
5157 If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
5158 from the next group.
5159
5160
5161 @node Article Caching
5162 @section Article Caching
5163 @cindex article caching
5164 @cindex caching
5165
5166 If you have an @emph{extremely} slow @sc{nntp} connection, you may
5167 consider turning article caching on.  Each article will then be stored
5168 locally under your home directory.  As you may surmise, this could
5169 potentially use @emph{huge} amounts of disk space, as well as eat up all
5170 your inodes so fast it will make your head swim.  In vodka.
5171
5172 Used carefully, though, it could be just an easier way to save articles.
5173
5174 @vindex gnus-use-long-file-name
5175 @vindex gnus-cache-directory
5176 @vindex gnus-use-cache
5177 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
5178 all articles ticked or marked as dormant will then be copied
5179 over to your local cache (@code{gnus-cache-directory}).  Whether this
5180 cache is flat or hierarchal is controlled by the
5181 @code{gnus-use-long-file-name} variable, as usual.
5182
5183 When re-selecting a ticked or dormant article, it will be fetched from the
5184 cache instead of from the server.  As articles in your cache will never
5185 expire, this might serve as a method of saving articles while still
5186 keeping them where they belong.  Just mark all articles you want to save
5187 as dormant, and don't worry.
5188
5189 When an article is marked as read, is it removed from the cache.
5190
5191 @vindex gnus-cache-remove-articles
5192 @vindex gnus-cache-enter-articles
5193 The entering/removal of articles from the cache is controlled by the
5194 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
5195 variables.  Both are lists of symbols.  The first is @code{(ticked
5196 dormant)} by default, meaning that ticked and dormant articles will be
5197 put in the cache.  The latter is @code{(read)} by default, meaning that
5198 articles marked as read are removed from the cache.  Possibly
5199 symbols in these two lists are @code{ticked}, @code{dormant},
5200 @code{unread} and @code{read}.
5201
5202 @findex gnus-jog-cache
5203 So where does the massive article-fetching and storing come into the
5204 picture?  The @code{gnus-jog-cache} command will go through all
5205 subscribed newsgroups, request all unread articles, score them, and
5206 store them in the cache.  You should only ever, ever ever ever, use this
5207 command if 1) your connection to the @sc{nntp} server is really, really,
5208 really slow and 2) you have a really, really, really huge disk.
5209 Seriously.  One way to cut down on the number of articles downloaded is
5210 to score unwanted articles down and have them marked as read.  They will
5211 not then be downloaded by this command.
5212
5213 @vindex gnus-uncacheable-groups
5214 It is likely that you do not want caching on some groups.  For instance,
5215 if your @code{nnml} mail is located under your home directory, it makes no
5216 sense to cache it somewhere else under your home directory.  Unless you
5217 feel that it's neat to use twice as much space.  To limit the caching,
5218 you could set the @code{gnus-uncacheable-groups} regexp to
5219 @samp{^nnml}, for instance.  This variable is @code{nil} by
5220 default.
5221
5222 @findex gnus-cache-generate-nov-databases
5223 @findex gnus-cache-generate-active
5224 @vindex gnus-cache-active-file
5225 The cache stores information on what articles it contains in its active
5226 file (@code{gnus-cache-active-file}).  If this file (or any other parts
5227 of the cache) becomes all messed up for some reason or other, Gnus
5228 offers two functions that will try to set things right.  @kbd{M-x
5229 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
5230 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
5231 file.
5232
5233
5234 @node Persistent Articles
5235 @section Persistent Articles
5236 @cindex persistent articles
5237
5238 Closely related to article caching, we have @dfn{persistent articles}.
5239 In fact, it's just a different way of looking at caching, and much more
5240 useful in my opinion.
5241
5242 Say you're reading a newsgroup, and you happen on to some valuable gem
5243 that you want to keep and treasure forever.  You'd normally just save it
5244 (using one of the many saving commands) in some file.  The problem with
5245 that is that it's just, well, yucky.  Ideally you'd prefer just having
5246 the article remain in the group where you found it forever; untouched by
5247 the expiry going on at the news server.
5248
5249 This is what a @dfn{persistent article} is---an article that just won't
5250 be deleted.  It's implemented using the normal cache functions, but
5251 you use two explicit commands for managing persistent articles:
5252
5253 @table @kbd
5254
5255 @item *
5256 @kindex * (Summary)
5257 @findex gnus-cache-enter-article
5258 Make the current article persistent (@code{gnus-cache-enter-article}). 
5259
5260 @item M-*
5261 @kindex M-* (Summary)
5262 @findex gnus-cache-remove-article
5263 Remove the current article from the persistent articles
5264 (@code{gnus-cache-remove-article}).  This will normally delete the
5265 article. 
5266 @end table
5267
5268 Both these commands understand the process/prefix convention. 
5269
5270 To avoid having all ticked articles (and stuff) entered into the cache,
5271 you should set @code{gnus-use-cache} to @code{passive} if you're just
5272 interested in persistent articles:
5273
5274 @lisp
5275 (setq gnus-use-cache 'passive)
5276 @end lisp
5277
5278
5279 @node Article Backlog
5280 @section Article Backlog
5281 @cindex backlog
5282 @cindex article backlog
5283
5284 If you have a slow connection, but the idea of using caching seems
5285 unappealing to you (and it is, really), you can help the situation some
5286 by switching on the @dfn{backlog}.  This is where Gnus will buffer
5287 already read articles so that it doesn't have to re-fetch articles
5288 you've already read.  This only helps if you are in the habit of
5289 re-selecting articles you've recently read, of course.  If you never do
5290 that, turning the backlog on will slow Gnus down a little bit, and
5291 increase memory usage some.
5292
5293 @vindex gnus-keep-backlog
5294 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
5295 at most @var{n} old articles in a buffer for later re-fetching.  If this
5296 variable is non-@code{nil} and is not a number, Gnus will store
5297 @emph{all} read articles, which means that your Emacs will grow without
5298 bound before exploding and taking your machine down with you.  I put
5299 that in there just to keep y'all on your toes.  
5300
5301 This variable is @code{nil} by default.
5302
5303
5304 @node Saving Articles
5305 @section Saving Articles
5306 @cindex saving articles
5307
5308 Gnus can save articles in a number of ways.  Below is the documentation
5309 for saving articles in a fairly straight-forward fashion (i.e., little
5310 processing of the article is done before it is saved).  For a different
5311 approach (uudecoding, unsharing) you should use @code{gnus-uu}
5312 (@pxref{Decoding Articles}).
5313
5314 @vindex gnus-save-all-headers
5315 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
5316 unwanted headers before saving the article.
5317
5318 @vindex gnus-saved-headers
5319 If the preceding variable is @code{nil}, all headers that match the
5320 @code{gnus-saved-headers} regexp will be kept, while the rest will be
5321 deleted before saving.
5322
5323 @table @kbd
5324
5325 @item O o
5326 @itemx o
5327 @kindex O o (Summary)
5328 @kindex o (Summary)
5329 @findex gnus-summary-save-article
5330 @c @icon{gnus-summary-save-article}
5331 Save the current article using the default article saver
5332 (@code{gnus-summary-save-article}). 
5333
5334 @item O m
5335 @kindex O m (Summary)
5336 @findex gnus-summary-save-article-mail
5337 Save the current article in mail format
5338 (@code{gnus-summary-save-article-mail}). 
5339
5340 @item O r
5341 @kindex O r (Summary)
5342 @findex gnus-summary-save-article-rmail
5343 Save the current article in rmail format
5344 (@code{gnus-summary-save-article-rmail}). 
5345
5346 @item O f
5347 @kindex O f (Summary)
5348 @findex gnus-summary-save-article-file
5349 @c @icon{gnus-summary-save-article-file}
5350 Save the current article in plain file format
5351 (@code{gnus-summary-save-article-file}). 
5352
5353 @item O F
5354 @kindex O F (Summary)
5355 @findex gnus-summary-write-article-file
5356 Write the current article in plain file format, overwriting any previous
5357 file contents (@code{gnus-summary-write-article-file}). 
5358
5359 @item O b
5360 @kindex O b (Summary)
5361 @findex gnus-summary-save-article-body-file
5362 Save the current article body in plain file format
5363 (@code{gnus-summary-save-article-body-file}). 
5364
5365 @item O h
5366 @kindex O h (Summary)
5367 @findex gnus-summary-save-article-folder
5368 Save the current article in mh folder format
5369 (@code{gnus-summary-save-article-folder}). 
5370
5371 @item O v
5372 @kindex O v (Summary)
5373 @findex gnus-summary-save-article-vm
5374 Save the current article in a VM folder
5375 (@code{gnus-summary-save-article-vm}).
5376
5377 @item O p
5378 @kindex O p (Summary)
5379 @findex gnus-summary-pipe-output
5380 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
5381 the current article to a process (@code{gnus-summary-pipe-output}).
5382 @end table
5383
5384 @vindex gnus-prompt-before-saving
5385 All these commands use the process/prefix convention
5386 (@pxref{Process/Prefix}).  If you save bunches of articles using these
5387 functions, you might get tired of being prompted for files to save each
5388 and every article in.  The prompting action is controlled by
5389 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
5390 default, giving you that excessive prompting action you know and
5391 loathe.  If you set this variable to @code{t} instead, you'll be prompted
5392 just once for each series of articles you save.  If you like to really
5393 have Gnus do all your thinking for you, you can even set this variable
5394 to @code{nil}, which means that you will never be prompted for files to
5395 save articles in.  Gnus will simply save all the articles in the default
5396 files. 
5397
5398
5399 @vindex gnus-default-article-saver
5400 You can customize the @code{gnus-default-article-saver} variable to make
5401 Gnus do what you want it to.  You can use any of the four ready-made
5402 functions below, or you can create your own.
5403
5404 @table @code
5405
5406 @item gnus-summary-save-in-rmail
5407 @findex gnus-summary-save-in-rmail
5408 @vindex gnus-rmail-save-name
5409 @findex gnus-plain-save-name
5410 This is the default format, @dfn{babyl}.  Uses the function in the
5411 @code{gnus-rmail-save-name} variable to get a file name to save the
5412 article in.  The default is @code{gnus-plain-save-name}.
5413
5414 @item gnus-summary-save-in-mail
5415 @findex gnus-summary-save-in-mail
5416 @vindex gnus-mail-save-name
5417 Save in a Unix mail (mbox) file.  Uses the function in the
5418 @code{gnus-mail-save-name} variable to get a file name to save the
5419 article in.  The default is @code{gnus-plain-save-name}.
5420
5421 @item gnus-summary-save-in-file
5422 @findex gnus-summary-save-in-file
5423 @vindex gnus-file-save-name
5424 @findex gnus-numeric-save-name
5425 Append the article straight to an ordinary file.  Uses the function in
5426 the @code{gnus-file-save-name} variable to get a file name to save the
5427 article in.  The default is @code{gnus-numeric-save-name}.
5428
5429 @item gnus-summary-save-body-in-file
5430 @findex gnus-summary-save-body-in-file
5431 Append the article body to an ordinary file.  Uses the function in the
5432 @code{gnus-file-save-name} variable to get a file name to save the
5433 article in.  The default is @code{gnus-numeric-save-name}.
5434
5435 @item gnus-summary-save-in-folder
5436 @findex gnus-summary-save-in-folder
5437 @findex gnus-folder-save-name
5438 @findex gnus-Folder-save-name
5439 @vindex gnus-folder-save-name
5440 @cindex rcvstore
5441 @cindex MH folders
5442 Save the article to an MH folder using @code{rcvstore} from the MH
5443 library.  Uses the function in the @code{gnus-folder-save-name} variable
5444 to get a file name to save the article in.  The default is
5445 @code{gnus-folder-save-name}, but you can also use
5446 @code{gnus-Folder-save-name}, which creates capitalized names.
5447
5448 @item gnus-summary-save-in-vm
5449 @findex gnus-summary-save-in-vm
5450 Save the article in a VM folder.  You have to have the VM mail
5451 reader to use this setting.
5452 @end table
5453
5454 @vindex gnus-article-save-directory
5455 All of these functions, except for the last one, will save the article
5456 in the @code{gnus-article-save-directory}, which is initialized from the
5457 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
5458 default. 
5459
5460 As you can see above, the functions use different functions to find a
5461 suitable name of a file to save the article in.  Below is a list of
5462 available functions that generate names:
5463
5464 @table @code
5465
5466 @item gnus-Numeric-save-name
5467 @findex gnus-Numeric-save-name
5468 File names like @file{~/News/Alt.andrea-dworkin/45}.
5469
5470 @item gnus-numeric-save-name
5471 @findex gnus-numeric-save-name
5472 File names like @file{~/News/alt.andrea-dworkin/45}.
5473
5474 @item gnus-Plain-save-name
5475 @findex gnus-Plain-save-name
5476 File names like @file{~/News/Alt.andrea-dworkin}.
5477
5478 @item gnus-plain-save-name
5479 @findex gnus-plain-save-name
5480 File names like @file{~/News/alt.andrea-dworkin}.
5481 @end table
5482
5483 @vindex gnus-split-methods
5484 You can have Gnus suggest where to save articles by plonking a regexp into
5485 the @code{gnus-split-methods} alist.  For instance, if you would like to
5486 save articles related to Gnus in the file @file{gnus-stuff}, and articles
5487 related to VM in @code{vm-stuff}, you could set this variable to something
5488 like:
5489
5490 @lisp
5491 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
5492  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
5493  (my-choosing-function "../other-dir/my-stuff")
5494  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
5495 @end lisp
5496
5497 We see that this is a list where each element is a list that has two
5498 elements---the @dfn{match} and the @dfn{file}.  The match can either be
5499 a string (in which case it is used as a regexp to match on the article
5500 head); it can be a symbol (which will be called as a function with the
5501 group name as a parameter); or it can be a list (which will be
5502 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
5503 the @dfn{file} will be used as a default prompt.  In addition, the
5504 result of the operation itself will be used if the function or form
5505 called returns a string or a list of strings.
5506
5507 You basically end up with a list of file names that might be used when
5508 saving the current article.  (All ``matches'' will be used.)  You will
5509 then be prompted for what you really want to use as a name, with file
5510 name completion over the results from applying this variable.
5511
5512 This variable is @code{((gnus-article-archive-name))} by default, which
5513 means that Gnus will look at the articles it saves for an
5514 @code{Archive-name} line and use that as a suggestion for the file
5515 name. 
5516
5517 Here's an example function to clean up file names somewhat.  If you have
5518 lots of mail groups called things like
5519 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
5520 these group names before creating the file name to save to.  The
5521 following will do just that:
5522
5523 @lisp
5524 (defun my-save-name (group)
5525   (when (string-match "^nnml:mail." group)
5526     (substring group (match-end 0))))
5527
5528 (setq gnus-split-methods
5529       '((gnus-article-archive-name)
5530         (my-save-name)))
5531 @end lisp
5532
5533
5534 @vindex gnus-use-long-file-name
5535 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
5536 @code{nil}, all the preceding functions will replace all periods
5537 (@samp{.}) in the group names with slashes (@samp{/})---which means that
5538 the functions will generate hierarchies of directories instead of having
5539 all the files in the toplevel directory
5540 (@file{~/News/alt/andrea-dworkin} instead of
5541 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
5542 on most systems.  However, for historical reasons, this is @code{nil} on
5543 Xenix and usg-unix-v machines by default.
5544
5545 This function also affects kill and score file names.  If this variable
5546 is a list, and the list contains the element @code{not-score}, long file
5547 names will not be used for score files, if it contains the element
5548 @code{not-save}, long file names will not be used for saving, and if it
5549 contains the element @code{not-kill}, long file names will not be used
5550 for kill files.
5551
5552 If you'd like to save articles in a hierarchy that looks something like
5553 a spool, you could
5554
5555 @lisp
5556 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
5557 (setq gnus-default-article-saver 'gnus-summary-save-in-file) ; no encoding
5558 @end lisp
5559
5560 Then just save with @kbd{o}.  You'd then read this hierarchy with
5561 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
5562 the toplevel directory as the argument (@file{~/News/}).  Then just walk
5563 around to the groups/directories with @code{nneething}.
5564
5565
5566 @node Decoding Articles
5567 @section Decoding Articles
5568 @cindex decoding articles
5569
5570 Sometime users post articles (or series of articles) that have been
5571 encoded in some way or other.  Gnus can decode them for you.
5572
5573 @menu 
5574 * Uuencoded Articles::    Uudecode articles.
5575 * Shell Archives::        Unshar articles.
5576 * PostScript Files::      Split PostScript.
5577 * Other Files::           Plain save and binhex.
5578 * Decoding Variables::    Variables for a happy decoding.
5579 * Viewing Files::         You want to look at the result of the decoding?
5580 @end menu
5581
5582 @cindex series
5583 @cindex article series
5584 All these functions use the process/prefix convention
5585 (@pxref{Process/Prefix}) for finding out what articles to work on, with
5586 the extension that a ``single article'' means ``a single series''.  Gnus
5587 can find out by itself what articles belong to a series, decode all the
5588 articles and unpack/view/save the resulting file(s).
5589
5590 Gnus guesses what articles are in the series according to the following
5591 simplish rule: The subjects must be (nearly) identical, except for the
5592 last two numbers of the line.  (Spaces are largely ignored, however.)
5593
5594 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
5595 will find all the articles that match the regexp @samp{^cat.gif
5596 ([0-9]+/[0-9]+).*$}.  
5597
5598 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
5599 series}, will not be properly recognized by any of the automatic viewing
5600 commands, and you have to mark the articles manually with @kbd{#}.
5601
5602
5603 @node Uuencoded Articles
5604 @subsection Uuencoded Articles
5605 @cindex uudecode
5606 @cindex uuencoded articles
5607
5608 @table @kbd
5609
5610 @item X u
5611 @kindex X u (Summary)
5612 @findex gnus-uu-decode-uu
5613 @c @icon{gnus-uu-decode-uu}
5614 Uudecodes the current series (@code{gnus-uu-decode-uu}).
5615
5616 @item X U
5617 @kindex X U (Summary)
5618 @findex gnus-uu-decode-uu-and-save
5619 Uudecodes and saves the current series
5620 (@code{gnus-uu-decode-uu-and-save}).
5621
5622 @item X v u
5623 @kindex X v u (Summary)
5624 @findex gnus-uu-decode-uu-view
5625 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
5626
5627 @item X v U
5628 @kindex X v U (Summary)
5629 @findex gnus-uu-decode-uu-and-save-view
5630 Uudecodes, views and saves the current series
5631 (@code{gnus-uu-decode-uu-and-save-view}).
5632
5633 @end table
5634
5635 Remember that these all react to the presence of articles marked with
5636 the process mark.  If, for instance, you'd like to decode and save an
5637 entire newsgroup, you'd typically do @kbd{M P a}
5638 (@code{gnus-uu-mark-all}) and then @kbd{X U}
5639 (@code{gnus-uu-decode-uu-and-save}).
5640
5641 All this is very much different from how @code{gnus-uu} worked with
5642 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
5643 the sun.  This version of @code{gnus-uu} generally assumes that you mark
5644 articles in some way (@pxref{Setting Process Marks}) and then press
5645 @kbd{X u}.
5646
5647 @vindex gnus-uu-notify-files
5648 Note: When trying to decode articles that have names matching
5649 @code{gnus-uu-notify-files}, which is hard-coded to
5650 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
5651 automatically post an article on @samp{comp.unix.wizards} saying that
5652 you have just viewed the file in question.  This feature can't be turned
5653 off.
5654
5655
5656 @node Shell Archives
5657 @subsection Shell Archives
5658 @cindex unshar
5659 @cindex shell archives
5660 @cindex shared articles
5661
5662 Shell archives (``shar files'') used to be a popular way to distribute
5663 sources, but it isn't used all that much today.  In any case, we have
5664 some commands to deal with these:
5665
5666 @table @kbd
5667
5668 @item X s
5669 @kindex X s (Summary)
5670 @findex gnus-uu-decode-unshar
5671 Unshars the current series (@code{gnus-uu-decode-unshar}).
5672
5673 @item X S
5674 @kindex X S (Summary)
5675 @findex gnus-uu-decode-unshar-and-save
5676 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
5677
5678 @item X v s
5679 @kindex X v s (Summary)
5680 @findex gnus-uu-decode-unshar-view
5681 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
5682
5683 @item X v S
5684 @kindex X v S (Summary)
5685 @findex gnus-uu-decode-unshar-and-save-view
5686 Unshars, views and saves the current series
5687 (@code{gnus-uu-decode-unshar-and-save-view}). 
5688 @end table
5689
5690
5691 @node PostScript Files
5692 @subsection PostScript Files
5693 @cindex PostScript
5694
5695 @table @kbd
5696
5697 @item X p
5698 @kindex X p (Summary)
5699 @findex gnus-uu-decode-postscript
5700 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
5701
5702 @item X P
5703 @kindex X P (Summary)
5704 @findex gnus-uu-decode-postscript-and-save
5705 Unpack and save the current PostScript series
5706 (@code{gnus-uu-decode-postscript-and-save}).
5707
5708 @item X v p
5709 @kindex X v p (Summary)
5710 @findex gnus-uu-decode-postscript-view
5711 View the current PostScript series
5712 (@code{gnus-uu-decode-postscript-view}).
5713
5714 @item X v P
5715 @kindex X v P (Summary)
5716 @findex gnus-uu-decode-postscript-and-save-view
5717 View and save the current PostScript series
5718 (@code{gnus-uu-decode-postscript-and-save-view}). 
5719 @end table
5720
5721
5722 @node Other Files
5723 @subsection Other Files
5724
5725 @table @kbd
5726 @item X o
5727 @kindex X o (Summary)
5728 @findex gnus-uu-decode-save
5729 Save the current series
5730 (@code{gnus-uu-decode-save}).
5731
5732 @item X b
5733 @kindex X b (Summary)
5734 @findex gnus-uu-decode-binhex
5735 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
5736 doesn't really work yet.
5737 @end table
5738
5739
5740 @node Decoding Variables
5741 @subsection Decoding Variables
5742
5743 Adjective, not verb.
5744
5745 @menu 
5746 * Rule Variables::          Variables that say how a file is to be viewed.
5747 * Other Decode Variables::  Other decode variables.
5748 * Uuencoding and Posting::  Variables for customizing uuencoding.
5749 @end menu
5750
5751
5752 @node Rule Variables
5753 @subsubsection Rule Variables
5754 @cindex rule variables
5755
5756 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
5757 variables are of the form
5758   
5759 @lisp
5760       (list '(regexp1 command2)
5761             '(regexp2 command2)
5762             ...)
5763 @end lisp
5764
5765 @table @code
5766
5767 @item gnus-uu-user-view-rules
5768 @vindex gnus-uu-user-view-rules
5769 @cindex sox
5770 This variable is consulted first when viewing files.  If you wish to use,
5771 for instance, @code{sox} to convert an @samp{.au} sound file, you could
5772 say something like:
5773 @lisp
5774 (setq gnus-uu-user-view-rules
5775       (list '(\"\\\\.au$\" \"sox %s -t .aiff > /dev/audio\")))
5776 @end lisp
5777
5778 @item gnus-uu-user-view-rules-end
5779 @vindex gnus-uu-user-view-rules-end
5780 This variable is consulted if Gnus couldn't make any matches from the
5781 user and default view rules.
5782
5783 @item gnus-uu-user-archive-rules
5784 @vindex gnus-uu-user-archive-rules
5785 This variable can be used to say what commands should be used to unpack
5786 archives.
5787 @end table
5788
5789
5790 @node Other Decode Variables
5791 @subsubsection Other Decode Variables
5792
5793 @table @code
5794 @vindex gnus-uu-grabbed-file-functions
5795
5796 @item gnus-uu-grabbed-file-functions
5797 All functions in this list will be called right after each file has been
5798 successfully decoded---so that you can move or view files right away,
5799 and don't have to wait for all files to be decoded before you can do
5800 anything.  Ready-made functions you can put in this list are:
5801
5802 @table @code
5803
5804 @item gnus-uu-grab-view
5805 @findex gnus-uu-grab-view
5806 View the file.
5807
5808 @item gnus-uu-grab-move
5809 @findex gnus-uu-grab-move
5810 Move the file (if you're using a saving function.)
5811 @end table
5812
5813 @item gnus-uu-be-dangerous
5814 @vindex gnus-uu-be-dangerous
5815 Specifies what to do if unusual situations arise during decoding.  If
5816 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
5817 that didn't work, and overwrite existing files.  Otherwise, ask each
5818 time.
5819
5820 @item gnus-uu-ignore-files-by-name
5821 @vindex gnus-uu-ignore-files-by-name
5822 Files with name matching this regular expression won't be viewed.
5823
5824 @item gnus-uu-ignore-files-by-type
5825 @vindex gnus-uu-ignore-files-by-type
5826 Files with a @sc{mime} type matching this variable won't be viewed.
5827 Note that Gnus tries to guess what type the file is based on the name.
5828 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
5829 kludgey.
5830
5831 @item gnus-uu-tmp-dir
5832 @vindex gnus-uu-tmp-dir
5833 Where @code{gnus-uu} does its work.
5834
5835 @item gnus-uu-do-not-unpack-archives
5836 @vindex gnus-uu-do-not-unpack-archives
5837 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
5838 looking for files to display.
5839
5840 @item gnus-uu-view-and-save
5841 @vindex gnus-uu-view-and-save
5842 Non-@code{nil} means that the user will always be asked to save a file
5843 after viewing it.
5844
5845 @item gnus-uu-ignore-default-view-rules
5846 @vindex gnus-uu-ignore-default-view-rules
5847 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
5848 rules.
5849
5850 @item gnus-uu-ignore-default-archive-rules
5851 @vindex gnus-uu-ignore-default-archive-rules
5852 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
5853 unpacking commands.
5854
5855 @item gnus-uu-kill-carriage-return
5856 @vindex gnus-uu-kill-carriage-return
5857 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
5858 from articles.
5859
5860 @item gnus-uu-unmark-articles-not-decoded
5861 @vindex gnus-uu-unmark-articles-not-decoded
5862 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
5863 decoded articles as unread.
5864
5865 @item gnus-uu-correct-stripped-uucode
5866 @vindex gnus-uu-correct-stripped-uucode
5867 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
5868 uuencoded files that have had trailing spaces deleted.
5869
5870 @item gnus-uu-view-with-metamail
5871 @vindex gnus-uu-view-with-metamail
5872 @cindex metamail
5873 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
5874 commands defined by the rule variables and just fudge a @sc{mime}
5875 content type based on the file name.  The result will be fed to
5876 @code{metamail} for viewing.
5877
5878 @item gnus-uu-save-in-digest
5879 @vindex gnus-uu-save-in-digest
5880 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
5881 decoding, will save in digests.  If this variable is @code{nil},
5882 @code{gnus-uu} will just save everything in a file without any
5883 embellishments.  The digesting almost conforms to RFC1153---no easy way
5884 to specify any meaningful volume and issue numbers were found, so I
5885 simply dropped them.
5886
5887 @end table
5888
5889
5890 @node Uuencoding and Posting
5891 @subsubsection Uuencoding and Posting
5892
5893 @table @code
5894
5895 @item gnus-uu-post-include-before-composing
5896 @vindex gnus-uu-post-include-before-composing
5897 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
5898 before you compose the article.  If this variable is @code{t}, you can
5899 either include an encoded file with @kbd{C-c C-i} or have one included
5900 for you when you post the article.
5901
5902 @item gnus-uu-post-length
5903 @vindex gnus-uu-post-length
5904 Maximum length of an article.  The encoded file will be split into how
5905 many articles it takes to post the entire file.
5906
5907 @item gnus-uu-post-threaded
5908 @vindex gnus-uu-post-threaded
5909 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
5910 thread.  This may not be smart, as no other decoder I have seen is able
5911 to follow threads when collecting uuencoded articles.  (Well, I have
5912 seen one package that does that---@code{gnus-uu}, but somehow, I don't
5913 think that counts...) Default is @code{nil}.
5914
5915 @item gnus-uu-post-separate-description
5916 @vindex gnus-uu-post-separate-description
5917 Non-@code{nil} means that the description will be posted in a separate
5918 article.  The first article will typically be numbered (0/x).  If this
5919 variable is @code{nil}, the description the user enters will be included
5920 at the beginning of the first article, which will be numbered (1/x).
5921 Default is @code{t}.
5922
5923 @end table
5924
5925
5926 @node Viewing Files
5927 @subsection Viewing Files
5928 @cindex viewing files
5929 @cindex pseudo-articles
5930
5931 After decoding, if the file is some sort of archive, Gnus will attempt
5932 to unpack the archive and see if any of the files in the archive can be
5933 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
5934 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
5935 uncompress and de-tar the main file, and then view the two pictures.
5936 This unpacking process is recursive, so if the archive contains archives
5937 of archives, it'll all be unpacked.
5938
5939 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
5940 extracted file into the summary buffer.  If you go to these
5941 ``articles'', you will be prompted for a command to run (usually Gnus
5942 will make a suggestion), and then the command will be run.
5943
5944 @vindex gnus-view-pseudo-asynchronously
5945 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
5946 until the viewing is done before proceeding.
5947
5948 @vindex gnus-view-pseudos
5949 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
5950 the pseudo-articles into the summary buffer, but view them
5951 immediately.  If this variable is @code{not-confirm}, the user won't even
5952 be asked for a confirmation before viewing is done.
5953
5954 @vindex gnus-view-pseudos-separately 
5955 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
5956 pseudo-article will be created for each file to be viewed.  If
5957 @code{nil}, all files that use the same viewing command will be given as
5958 a list of parameters to that command.
5959
5960 @vindex gnus-insert-pseudo-articles
5961 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
5962 pseudo-articles when decoding.  It is @code{t} by default.
5963
5964 So; there you are, reading your @emph{pseudo-articles} in your
5965 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
5966 Why isn't anything real anymore? How did we get here?
5967
5968
5969 @node Article Treatment
5970 @section Article Treatment
5971
5972 Reading through this huge manual, you may have quite forgotten that the
5973 object of newsreaders is to actually, like, read what people have
5974 written.  Reading articles.  Unfortunately, people are quite bad at
5975 writing, so there are tons of functions and variables to make reading
5976 these articles easier.
5977
5978 @menu
5979 * Article Highlighting::    You want to make the article look like fruit salad.
5980 * Article Fontisizing::     Making emphasized text look niced.
5981 * Article Hiding::          You also want to make certain info go away.
5982 * Article Washing::         Lots of way-neat functions to make life better.
5983 * Article Buttons::         Click on URLs, Message-IDs, addresses and the like.
5984 * Article Date::            Grumble, UT!
5985 * Article Signature::       What is a signature?
5986 @end menu
5987
5988
5989 @node Article Highlighting
5990 @subsection Article Highlighting
5991 @cindex highlight
5992
5993 Not only do you want your article buffer to look like fruit salad, but
5994 you want it to look like technicolor fruit salad.
5995
5996 @table @kbd
5997
5998 @item W H a
5999 @kindex W H a (Summary)
6000 @findex gnus-article-highlight
6001 Highlight the current article (@code{gnus-article-highlight}).
6002
6003 @item W H h
6004 @kindex W H h (Summary)
6005 @findex gnus-article-highlight-headers
6006 @vindex gnus-header-face-alist
6007 Highlight the headers (@code{gnus-article-highlight-headers}).  The
6008 highlighting will be done according to the @code{gnus-header-face-alist}
6009 variable, which is a list where each element has the form @var{(regexp
6010 name content)}.  @var{regexp} is a regular expression for matching the
6011 header, @var{name} is the face used for highlighting the header name and
6012 @var{content} is the face for highlighting the header value.  The first
6013 match made will be used.  Note that @var{regexp} shouldn't have @samp{^}
6014 prepended---Gnus will add one.
6015
6016 @item W H c
6017 @kindex W H c (Summary)
6018 @findex gnus-article-highlight-citation
6019 Highlight cited text (@code{gnus-article-highlight-citation}). 
6020
6021 Some variables to customize the citation highlights:
6022
6023 @table @code
6024 @vindex gnus-cite-parse-max-size
6025
6026 @item gnus-cite-parse-max-size
6027 If the article size if bigger than this variable (which is 25000 by
6028 default), no citation highlighting will be performed.  
6029
6030 @item gnus-cite-prefix-regexp
6031 @vindex gnus-cite-prefix-regexp
6032 Regexp matching the longest possible citation prefix on a line. 
6033
6034 @item gnus-cite-max-prefix
6035 @vindex gnus-cite-max-prefix
6036 Maximum possible length for a citation prefix (default 20).
6037
6038 @item gnus-cite-face-list
6039 @vindex gnus-cite-face-list
6040 List of faces used for highlighting citations.  When there are citations
6041 from multiple articles in the same message, Gnus will try to give each
6042 citation from each article its own face.  This should make it easier to
6043 see who wrote what.
6044
6045 @item gnus-supercite-regexp
6046 @vindex gnus-supercite-regexp
6047 Regexp matching normal Supercite attribution lines.  
6048
6049 @item gnus-supercite-secondary-regexp
6050 @vindex gnus-supercite-secondary-regexp
6051 Regexp matching mangled Supercite attribution lines.
6052
6053 @item gnus-cite-minimum-match-count
6054 @vindex gnus-cite-minimum-match-count
6055 Minimum number of identical prefixes we have to see before we believe
6056 that it's a citation.
6057
6058 @item gnus-cite-attribution-prefix
6059 @vindex gnus-cite-attribution-prefix
6060 Regexp matching the beginning of an attribution line.
6061
6062 @item gnus-cite-attribution-suffix
6063 @vindex gnus-cite-attribution-suffix
6064 Regexp matching the end of an attribution line.
6065
6066 @item gnus-cite-attribution-face
6067 @vindex gnus-cite-attribution-face
6068 Face used for attribution lines.  It is merged with the face for the
6069 cited text belonging to the attribution.
6070
6071 @end table
6072
6073
6074 @item W H s
6075 @kindex W H s (Summary)
6076 @vindex gnus-signature-separator
6077 @vindex gnus-signature-face
6078 @findex gnus-article-highlight-signature
6079 Highlight the signature (@code{gnus-article-highlight-signature}).
6080 Everything after @code{gnus-signature-separator} (@pxref{Article
6081 Signature}) in an article will be considered a signature and will be
6082 highlighted with @code{gnus-signature-face}, which is @code{italic} by
6083 default.
6084
6085 @end table
6086
6087
6088 @node Article Fontisizing
6089 @subsection Article Fontisizing
6090 @cindex emphasis
6091 @cindex article emphasis
6092
6093 @findex gnus-article-emphasize
6094 @kindex W e (Summary)
6095 People commonly add emphasis to words in news articles by writing things
6096 like @samp{_this_} or @samp{*this*}.  Gnus can make this look nicer by
6097 running the article through the @kbd{W e}
6098 (@code{gnus-article-emphasize}) command.
6099
6100 @vindex gnus-article-emphasis
6101 How the emphasis is computed is controlled by the
6102 @code{gnus-article-emphasis} variable.  This is an alist where the first
6103 element is a regular expression to be matched.  The second is a number
6104 that says what regular expression grouping is used to find the entire
6105 emphasized word.  The third is a number that says what regexp grouping
6106 should be displayed and highlighted.  (The text between these two
6107 groupings will be hidden.)  The fourth is the face used for
6108 highlighting.
6109
6110 @lisp
6111 (setq gnus-article-emphasis
6112       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
6113         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
6114 @end lisp
6115
6116 @vindex gnus-emphasis-underline
6117 @vindex gnus-emphasis-bold
6118 @vindex gnus-emphasis-italic
6119 @vindex gnus-emphasis-underline-bold
6120 @vindex gnus-emphasis-underline-italic
6121 @vindex gnus-emphasis-bold-italic
6122 @vindex gnus-emphasis-underline-bold-italic
6123 By default, there are seven rules, and they use the following faces:
6124 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
6125 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
6126 @code{gnus-emphasis-underline-italic},
6127 @code{gnus-emphasis-underline-bold}, and
6128 @code{gnus-emphasis-underline-bold-italic}.  
6129
6130 If you want to change these faces, you can either use @kbd{M-x
6131 customize}, or you can use @code{copy-face}.  For instance, if you want
6132 to make @code{gnus-emphasis-italic} use a red face instead, you could
6133 say something like:
6134
6135 @lisp
6136 (copy-face 'red 'gnus-emphasis-italic)
6137 @end lisp
6138
6139
6140 @node Article Hiding
6141 @subsection Article Hiding
6142 @cindex article hiding
6143
6144 Or rather, hiding certain things in each article.  There usually is much
6145 too much cruft in most articles.  
6146
6147 @table @kbd
6148
6149 @item W W a
6150 @kindex W W a (Summary)
6151 @findex gnus-article-hide
6152 Do maximum hiding on the summary buffer (@kbd{gnus-article-hide}). 
6153
6154 @item W W h
6155 @kindex W W h (Summary)
6156 @findex gnus-article-hide-headers
6157 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
6158 Headers}. 
6159
6160 @item W W b
6161 @kindex W W b (Summary)
6162 @findex gnus-article-hide-boring-headers
6163 Hide headers that aren't particularly interesting
6164 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
6165
6166 @item W W s
6167 @kindex W W s (Summary)
6168 @findex gnus-article-hide-signature
6169 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
6170 Signature}. 
6171
6172 @item W W p
6173 @kindex W W p (Summary)
6174 @findex gnus-article-hide-pgp
6175 @vindex gnus-article-hide-pgp-hook
6176 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}).  The
6177 @code{gnus-article-hide-pgp-hook} hook will be run after a @sc{pgp}
6178 signature has been hidden.
6179
6180 @item W W P
6181 @kindex W W P (Summary)
6182 @findex gnus-article-hide-pem
6183 Hide @sc{pem} (privacy enhanced messages) cruft
6184 (@code{gnus-article-hide-pem}).
6185
6186 @item W W c
6187 @kindex W W c (Summary)
6188 @findex gnus-article-hide-citation
6189 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
6190 customizing the hiding:
6191
6192 @table @code
6193
6194 @item gnus-cite-hide-percentage
6195 @vindex gnus-cite-hide-percentage
6196 If the cited text is of a bigger percentage than this variable (default
6197 50), hide the cited text.
6198
6199 @item gnus-cite-hide-absolute
6200 @vindex gnus-cite-hide-absolute
6201 The cited text must have at least this length (default 10) before it
6202 is hidden.
6203
6204 @item gnus-cited-text-button-line-format
6205 @vindex gnus-cited-text-button-line-format
6206 Gnus adds buttons to show where the cited text has been hidden, and to
6207 allow toggle hiding the text.  The format of the variable is specified
6208 by this format-like variable (@pxref{Formatting Variables}).  These
6209 specs are valid:
6210
6211 @table @samp
6212 @item b
6213 Start point of the hidden text.
6214 @item e
6215 End point of the hidden text.
6216 @item l
6217 Length of the hidden text.
6218 @end table
6219
6220 @item gnus-cited-lines-visible
6221 @vindex gnus-cited-lines-visible
6222 The number of lines at the beginning of the cited text to leave shown. 
6223
6224 @end table
6225
6226 @item W W C
6227 @kindex W W C (Summary)
6228 @findex gnus-article-hide-citation-in-followups
6229 Hide cited text in articles that aren't roots
6230 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
6231 useful as an interactive command, but might be a handy function to stick
6232 in @code{gnus-article-display-hook} (@pxref{Customizing Articles}). 
6233
6234 @end table
6235
6236 All these ``hiding'' commands are toggles, but if you give a negative
6237 prefix to these commands, they will show what they have previously
6238 hidden.  If you give a positive prefix, they will always hide.
6239
6240 Also @pxref{Article Highlighting} for further variables for
6241 citation customization.
6242
6243
6244 @node Article Washing
6245 @subsection Article Washing
6246 @cindex washing
6247 @cindex article washing
6248
6249 We call this ``article washing'' for a really good reason.  Namely, the
6250 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
6251
6252 @dfn{Washing} is defined by us as ``changing something from something to
6253 something else'', but normally results in something looking better.
6254 Cleaner, perhaps.
6255
6256 @table @kbd
6257
6258 @item W l
6259 @kindex W l (Summary)
6260 @findex gnus-summary-stop-page-breaking
6261 Remove page breaks from the current article
6262 (@code{gnus-summary-stop-page-breaking}).
6263
6264 @item W r
6265 @kindex W r (Summary)
6266 @findex gnus-summary-caesar-message
6267 @c @icon{gnus-summary-caesar-message}
6268 Do a Caesar rotate (rot13) on the article buffer
6269 (@code{gnus-summary-caesar-message}). 
6270 Unreadable articles that tell you to read them with Caesar rotate or rot13.
6271 (Typically offensive jokes and such.)
6272
6273 It's commonly called ``rot13'' because each letter is rotated 13
6274 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
6275 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
6276 is rumoured to have employed this form of, uh, somewhat weak encryption.
6277
6278 @item W t
6279 @kindex W t (Summary)
6280 @findex gnus-summary-toggle-header
6281 Toggle whether to display all headers in the article buffer
6282 (@code{gnus-summary-toggle-header}). 
6283
6284 @item W v
6285 @kindex W v (Summary)
6286 @findex gnus-summary-verbose-header
6287 Toggle whether to display all headers in the article buffer permanently
6288 (@code{gnus-summary-verbose-header}).
6289
6290 @item W m
6291 @kindex W m (Summary)
6292 @findex gnus-summary-toggle-mime
6293 Toggle whether to run the article through @sc{mime} before displaying
6294 (@code{gnus-summary-toggle-mime}).
6295
6296 @item W o
6297 @kindex W o (Summary)
6298 @findex gnus-article-treat-overstrike
6299 Treat overstrike (@code{gnus-article-treat-overstrike}).
6300
6301 @item W d
6302 @kindex W d (Summary)
6303 @findex gnus-article-treat-dumbquotes
6304 Treat M******** sm*rtq**t*s (@code{gnus-article-treat-dumbquotes}).
6305
6306 @item W w
6307 @kindex W w (Summary)
6308 @findex gnus-article-fill-cited-article
6309 Do word wrap (@code{gnus-article-fill-cited-article}).  If you use this
6310 function in @code{gnus-article-display-hook}, it should be run fairly
6311 late and certainly after any highlighting.
6312
6313 You can give the command a numerical prefix to specify the width to use
6314 when filling.
6315
6316 @item W c
6317 @kindex W c (Summary)
6318 @findex gnus-article-remove-cr
6319 Remove CR (i. e., @samp{^M}s on the end of the lines)
6320 (@code{gnus-article-remove-cr}).
6321
6322 @item W q
6323 @kindex W q (Summary)
6324 @findex gnus-article-de-quoted-unreadable
6325 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
6326 Quoted-Printable is one common @sc{mime} encoding employed when sending
6327 non-ASCII (i. e., 8-bit) articles.  It typically makes strings like
6328 @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which doesn't look very
6329 readable to me.
6330
6331 @item W f
6332 @kindex W f (Summary)
6333 @cindex x-face
6334 @findex gnus-article-display-x-face
6335 @findex gnus-article-x-face-command
6336 @vindex gnus-article-x-face-command
6337 @vindex gnus-article-x-face-too-ugly
6338 @iftex
6339 @iflatex
6340 \include{xface}
6341 @end iflatex
6342 @end iftex
6343 Look for and display any X-Face headers
6344 (@code{gnus-article-display-x-face}).  The command executed by this
6345 function is given by the @code{gnus-article-x-face-command} variable.
6346 If this variable is a string, this string will be executed in a
6347 sub-shell.  If it is a function, this function will be called with the
6348 face as the argument.  If the @code{gnus-article-x-face-too-ugly} (which
6349 is a regexp) matches the @code{From} header, the face will not be shown.
6350 The default action under Emacs is to fork off an @code{xv} to view the
6351 face; under XEmacs the default action is to display the face before the
6352 @code{From} header.  (It's nicer if XEmacs has been compiled with X-Face
6353 support---that will make display somewhat faster.  If there's no native
6354 X-Face support, Gnus will try to convert the @code{X-Face} header using
6355 external programs from the @code{pbmplus} package and friends.)  If you
6356 want to have this function in the display hook, it should probably come
6357 last.
6358
6359 @item W b
6360 @kindex W b (Summary)
6361 @findex gnus-article-add-buttons
6362 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
6363 @xref{Article Buttons}
6364
6365 @item W B
6366 @kindex W B (Summary)
6367 @findex gnus-article-add-buttons-to-head
6368 Add clickable buttons to the article headers
6369 (@code{gnus-article-add-buttons-to-head}).  
6370
6371 @item W E l
6372 @kindex W E l (Summary)
6373 @findex gnus-article-strip-leading-blank-lines
6374 Remove all blank lines from the beginning of the article
6375 (@code{gnus-article-strip-leading-blank-lines}).
6376
6377 @item W E m
6378 @kindex W E m (Summary)
6379 @findex gnus-article-strip-multiple-blank-lines
6380 Replace all blank lines with empty lines and then all multiple empty
6381 lines with a single empty line.
6382 (@code{gnus-article-strip-multiple-blank-lines}).
6383
6384 @item W E t
6385 @kindex W E t (Summary)
6386 @findex gnus-article-remove-trailing-blank-lines
6387 Remove all blank lines at the end of the article
6388 (@code{gnus-article-remove-trailing-blank-lines}).
6389
6390 @item W E a
6391 @kindex W E a (Summary)
6392 @findex gnus-article-strip-blank-lines
6393 Do all the three commands above
6394 (@code{gnus-article-strip-blank-lines}).
6395
6396 @item W E s
6397 @kindex W E s (Summary)
6398 @findex gnus-article-strip-leading-space
6399 Remove all white space from the beginning of all lines of the article
6400 body (@code{gnus-article-strip-leading-space}).
6401
6402 @end table
6403
6404
6405 @node Article Buttons
6406 @subsection Article Buttons
6407 @cindex buttons
6408
6409 People often include references to other stuff in articles, and it would
6410 be nice if Gnus could just fetch whatever it is that people talk about
6411 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
6412 button on these references.
6413
6414 Gnus adds @dfn{buttons} to certain standard references by default:
6415 Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
6416 two variables, one that handles article bodies and one that handles
6417 article heads:
6418
6419 @table @code
6420
6421 @item gnus-button-alist
6422 @vindex gnus-button-alist
6423 This is an alist where each entry has this form:
6424
6425 @lisp
6426 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
6427 @end lisp
6428
6429 @table @var
6430
6431 @item regexp
6432 All text that match this regular expression will be considered an
6433 external reference.  Here's a typical regexp that matches embedded URLs:
6434 @samp{<URL:\\([^\n\r>]*\\)>}. 
6435
6436 @item button-par
6437 Gnus has to know which parts of the matches is to be highlighted.  This
6438 is a number that says what sub-expression of the regexp is to be
6439 highlighted.  If you want it all highlighted, you use 0 here.
6440
6441 @item use-p
6442 This form will be @code{eval}ed, and if the result is non-@code{nil},
6443 this is considered a match.  This is useful if you want extra sifting to
6444 avoid false matches.
6445
6446 @item function
6447 This function will be called when you click on this button.
6448
6449 @item data-par
6450 As with @var{button-par}, this is a sub-expression number, but this one
6451 says which part of the match is to be sent as data to @var{function}. 
6452
6453 @end table
6454
6455 So the full entry for buttonizing URLs is then
6456
6457 @lisp
6458 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
6459 @end lisp
6460
6461 @item gnus-header-button-alist
6462 @vindex gnus-header-button-alist
6463 This is just like the other alist, except that it is applied to the
6464 article head only, and that each entry has an additional element that is
6465 used to say what headers to apply the buttonize coding to:
6466
6467 @lisp
6468 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
6469 @end lisp
6470
6471 @var{HEADER} is a regular expression.
6472
6473 @item gnus-button-url-regexp
6474 @vindex gnus-button-url-regexp
6475 A regular expression that matches embedded URLs.  It is used in the
6476 default values of the variables above.
6477
6478 @item gnus-article-button-face
6479 @vindex gnus-article-button-face
6480 Face used on buttons.
6481
6482 @item gnus-article-mouse-face
6483 @vindex gnus-article-mouse-face
6484 Face used when the mouse cursor is over a button.
6485
6486 @end table
6487
6488
6489 @node Article Date
6490 @subsection Article Date
6491
6492 The date is most likely generated in some obscure timezone you've never
6493 heard of, so it's quite nice to be able to find out what the time was
6494 when the article was sent.
6495
6496 @table @kbd
6497
6498 @item W T u
6499 @kindex W T u (Summary)
6500 @findex gnus-article-date-ut
6501 Display the date in UT (aka. GMT, aka ZULU)
6502 (@code{gnus-article-date-ut}). 
6503
6504 @item W T l
6505 @kindex W T l (Summary)
6506 @findex gnus-article-date-local
6507 Display the date in the local timezone (@code{gnus-article-date-local}).
6508
6509 @item W T s
6510 @kindex W T s (Summary)
6511 @vindex gnus-article-time-format
6512 @findex gnus-article-date-user
6513 @findex format-time-string
6514 Display the date using a user-defined format
6515 (@code{gnus-article-date-user}).  The format is specified by the
6516 @code{gnus-article-time-format} variable, and is a string that's passed
6517 to @code{format-time-string}.  See the documentation of that variable
6518 for a list of possible format specs.
6519
6520 @item W T e
6521 @kindex W T e (Summary)
6522 @findex gnus-article-date-lapsed
6523 Say how much time has elapsed between the article was posted and now
6524 (@code{gnus-article-date-lapsed}).
6525
6526 @item W T o
6527 @kindex W T o (Summary)
6528 @findex gnus-article-date-original
6529 Display the original date (@code{gnus-article-date-original}).  This can
6530 be useful if you normally use some other conversion function and are
6531 worried that it might be doing something totally wrong.  Say, claiming
6532 that the article was posted in 1854.  Although something like that is
6533 @emph{totally} impossible.  Don't you trust me? *titter*
6534
6535 @end table
6536
6537
6538 @node Article Signature
6539 @subsection Article Signature
6540 @cindex signatures
6541 @cindex article signature
6542
6543 @vindex gnus-signature-separator
6544 Each article is divided into two parts---the head and the body.  The
6545 body can be divided into a signature part and a text part.  The variable
6546 that says what is to be considered a signature is
6547 @code{gnus-signature-separator}.  This is normally the standard
6548 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
6549 non-standard signature separators, so this variable can also be a list
6550 of regular expressions to be tested, one by one.  (Searches are done
6551 from the end of the body towards the beginning.)  One likely value is:
6552
6553 @lisp
6554 (setq gnus-signature-separator
6555       '("^-- $"         ; The standard
6556         "^-- *$"        ; A common mangling
6557         "^-------*$"    ; Many people just use a looong 
6558                         ; line of dashes.  Shame!
6559         "^ *--------*$" ; Double-shame!
6560         "^________*$"   ; Underscores are also popular
6561         "^========*$")) ; Pervert!
6562 @end lisp
6563
6564 The more permissive you are, the more likely it is that you'll get false
6565 positives.
6566
6567 @vindex gnus-signature-limit
6568 @code{gnus-signature-limit} provides a limit to what is considered a
6569 signature. 
6570
6571 @enumerate
6572 @item 
6573 If it is an integer, no signature may be longer (in characters) than
6574 that integer.
6575 @item 
6576 If it is a floating point number, no signature may be longer (in lines)
6577 than that number.
6578 @item 
6579 If it is a function, the function will be called without any parameters,
6580 and if it returns @code{nil}, there is no signature in the buffer.
6581 @item
6582 If it is a string, it will be used as a regexp.  If it matches, the text
6583 in question is not a signature.
6584 @end enumerate
6585
6586 This variable can also be a list where the elements may be of the types
6587 listed above.  Here's an example:
6588
6589 @lisp
6590 (setq gnus-signature-limit
6591       '(200.0 "^---*Forwarded article"))
6592 @end lisp
6593
6594 This means that if there are more than 200 lines after the signature
6595 separator, or the text after the signature separator is matched by
6596 the regular expression @samp{^---*Forwarded article}, then it isn't a
6597 signature after all.
6598
6599
6600 @node Article Commands
6601 @section Article Commands
6602
6603 @table @kbd
6604
6605 @item A P
6606 @cindex PostScript
6607 @cindex printing
6608 @kindex A P (Summary)
6609 @vindex gnus-ps-print-hook
6610 @findex gnus-summary-print-article 
6611 Generate and print a PostScript image of the article buffer
6612 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will be
6613 run just before printing the buffer.
6614
6615 @end table
6616
6617
6618 @node Summary Sorting
6619 @section Summary Sorting
6620 @cindex summary sorting
6621
6622 You can have the summary buffer sorted in various ways, even though I
6623 can't really see why you'd want that.
6624
6625 @table @kbd
6626
6627 @item C-c C-s C-n
6628 @kindex C-c C-s C-n (Summary)
6629 @findex gnus-summary-sort-by-number
6630 Sort by article number (@code{gnus-summary-sort-by-number}).
6631
6632 @item C-c C-s C-a
6633 @kindex C-c C-s C-a (Summary)
6634 @findex gnus-summary-sort-by-author
6635 Sort by author (@code{gnus-summary-sort-by-author}).
6636
6637 @item C-c C-s C-s
6638 @kindex C-c C-s C-s (Summary)
6639 @findex gnus-summary-sort-by-subject
6640 Sort by subject (@code{gnus-summary-sort-by-subject}).
6641
6642 @item C-c C-s C-d
6643 @kindex C-c C-s C-d (Summary)
6644 @findex gnus-summary-sort-by-date
6645 Sort by date (@code{gnus-summary-sort-by-date}).
6646
6647 @item C-c C-s C-l
6648 @kindex C-c C-s C-l (Summary)
6649 @findex gnus-summary-sort-by-lines
6650 Sort by lines (@code{gnus-summary-sort-by-lines}).
6651
6652 @item C-c C-s C-i
6653 @kindex C-c C-s C-i (Summary)
6654 @findex gnus-summary-sort-by-score
6655 Sort by score (@code{gnus-summary-sort-by-score}).
6656 @end table
6657
6658 These functions will work both when you use threading and when you don't
6659 use threading.  In the latter case, all summary lines will be sorted,
6660 line by line.  In the former case, sorting will be done on a
6661 root-by-root basis, which might not be what you were looking for.  To
6662 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
6663 Commands}).
6664
6665
6666 @node Finding the Parent
6667 @section Finding the Parent
6668 @cindex parent articles
6669 @cindex referring articles
6670
6671 @table @kbd
6672 @item ^
6673 @kindex ^ (Summary)
6674 @findex gnus-summary-refer-parent-article
6675 If you'd like to read the parent of the current article, and it is not
6676 displayed in the summary buffer, you might still be able to.  That is,
6677 if the current group is fetched by @sc{nntp}, the parent hasn't expired
6678 and the @code{References} in the current article are not mangled, you
6679 can just press @kbd{^} or @kbd{A r}
6680 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
6681 you'll get the parent.  If the parent is already displayed in the
6682 summary buffer, point will just move to this article.
6683
6684 If given a positive numerical prefix, fetch that many articles back into
6685 the ancestry.  If given a negative numerical prefix, fetch just that
6686 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
6687 grandparent and the grandgrandparent of the current article.  If you say
6688 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
6689 article. 
6690
6691 @item A R (Summary)
6692 @findex gnus-summary-refer-references
6693 @kindex A R (Summary)
6694 Fetch all articles mentioned in the @code{References} header of the
6695 article (@code{gnus-summary-refer-references}).
6696
6697 @item A T (Summary)
6698 @findex gnus-summary-refer-thread
6699 @kindex A T (Summary)
6700 Display the full thread where the current article appears
6701 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
6702 headers in the current group to work, so it usually takes a while.  If
6703 you do it often, you may consider setting @code{gnus-fetch-old-headers}
6704 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
6705 visible effects normally, but it'll make this command work a whole lot
6706 faster.  Of course, it'll make group entry somewhat slow.
6707
6708 @vindex gnus-refer-thread-limit
6709 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
6710 articles before the first displayed in the current group) headers to
6711 fetch when doing this command.  The default is 200.  If @code{t}, all
6712 the available headers will be fetched.  This variable can be overridden
6713 by giving the @kbd{A T} command a numerical prefix.
6714
6715 @item M-^ (Summary)
6716 @findex gnus-summary-refer-article
6717 @kindex M-^ (Summary)
6718 @cindex Message-ID
6719 @cindex fetching by Message-ID
6720 You can also ask the @sc{nntp} server for an arbitrary article, no
6721 matter what group it belongs to.  @kbd{M-^}
6722 (@code{gnus-summary-refer-article}) will ask you for a
6723 @code{Message-ID}, which is one of those long, hard-to-read thingies
6724 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
6725 have to get it all exactly right.  No fuzzy searches, I'm afraid.
6726 @end table
6727
6728 The current select method will be used when fetching by
6729 @code{Message-ID} from non-news select method, but you can override this
6730 by giving this command a prefix.
6731
6732 @vindex gnus-refer-article-method
6733 If the group you are reading is located on a backend that does not
6734 support fetching by @code{Message-ID} very well (like @code{nnspool}),
6735 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
6736 would, perhaps, be best if the @sc{nntp} server you consult is the one
6737 updating the spool you are reading from, but that's not really
6738 necessary.
6739
6740 Most of the mail backends support fetching by @code{Message-ID}, but do
6741 not do a particularly excellent job at it.  That is, @code{nnmbox} and
6742 @code{nnbabyl} are able to locate articles from any groups, while
6743 @code{nnml} and @code{nnfolder} are only able to locate articles that
6744 have been posted to the current group.  (Anything else would be too time
6745 consuming.)  @code{nnmh} does not support this at all.
6746
6747
6748 @node Alternative Approaches
6749 @section Alternative Approaches
6750
6751 Different people like to read news using different methods.  This being
6752 Gnus, we offer a small selection of minor modes for the summary buffers.
6753
6754 @menu
6755 * Pick and Read::               First mark articles and then read them.
6756 * Binary Groups::               Auto-decode all articles.
6757 @end menu
6758
6759
6760 @node Pick and Read
6761 @subsection Pick and Read
6762 @cindex pick and read
6763
6764 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
6765 a two-phased reading interface.  The user first marks in a summary
6766 buffer the articles she wants to read.  Then she starts reading the
6767 articles with just an article buffer displayed.
6768
6769 @findex gnus-pick-mode
6770 @kindex M-x gnus-pick-mode
6771 Gnus provides a summary buffer minor mode that allows
6772 this---@code{gnus-pick-mode}.  This basically means that a few process
6773 mark commands become one-keystroke commands to allow easy marking, and
6774 it provides one additional command for switching to the summary buffer.
6775
6776 Here are the available keystrokes when using pick mode:
6777
6778 @table @kbd
6779 @item .
6780 @kindex . (Pick)
6781 @findex gnus-summary-mark-as-processable
6782 Pick the article on the current line
6783 (@code{gnus-summary-mark-as-processable}).  If given a numerical prefix,
6784 go to that article and pick it.  (The line number is normally displayed
6785 at the beginning of the summary pick lines.)
6786
6787 @item SPACE
6788 @kindex SPACE (Pick)
6789 @findex gnus-pick-next-page
6790 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
6791 at the end of the buffer, start reading the picked articles.
6792
6793 @item u
6794 @kindex u (Pick)
6795 @findex gnus-summary-unmark-as-processable
6796 Unpick the article (@code{gnus-summary-unmark-as-processable}). 
6797
6798 @item U
6799 @kindex U (Pick)
6800 @findex gnus-summary-unmark-all-processable
6801 Unpick all articles (@code{gnus-summary-unmark-all-processable}). 
6802
6803 @item t
6804 @kindex t (Pick)
6805 @findex gnus-uu-mark-thread
6806 Pick the thread (@code{gnus-uu-mark-thread}). 
6807
6808 @item T
6809 @kindex T (Pick)
6810 @findex gnus-uu-unmark-thread
6811 Unpick the thread (@code{gnus-uu-unmark-thread}). 
6812
6813 @item r
6814 @kindex r (Pick)
6815 @findex gnus-uu-mark-region
6816 Pick the region (@code{gnus-uu-mark-region}). 
6817
6818 @item R
6819 @kindex R (Pick)
6820 @findex gnus-uu-unmark-region
6821 Unpick the region (@code{gnus-uu-unmark-region}). 
6822
6823 @item e
6824 @kindex e (Pick)
6825 @findex gnus-uu-mark-by-regexp
6826 Pick articles that match a regexp (@code{gnus-uu-mark-by-regexp}). 
6827
6828 @item E
6829 @kindex E (Pick)
6830 @findex gnus-uu-unmark-by-regexp
6831 Unpick articles that match a regexp (@code{gnus-uu-unmark-by-regexp}). 
6832
6833 @item b
6834 @kindex b (Pick)
6835 @findex gnus-uu-mark-buffer
6836 Pick the buffer (@code{gnus-uu-mark-buffer}). 
6837
6838 @item B
6839 @kindex B (Pick)
6840 @findex gnus-uu-unmark-buffer
6841 Unpick the buffer (@code{gnus-uu-unmark-buffer}). 
6842
6843 @item RET
6844 @kindex RET (Pick)
6845 @findex gnus-pick-start-reading
6846 @vindex gnus-pick-display-summary
6847 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
6848 given a prefix, mark all unpicked articles as read first.  If
6849 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
6850 will still be visible when you are reading.
6851
6852 @end table
6853
6854 If this sounds like a good idea to you, you could say:
6855
6856 @lisp
6857 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
6858 @end lisp
6859
6860 @vindex gnus-pick-mode-hook
6861 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
6862
6863 @vindex gnus-mark-unpicked-articles-as-read
6864 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
6865 all unpicked articles as read.  The default is @code{nil}.
6866
6867 @vindex gnus-summary-pick-line-format
6868 The summary line format in pick mode is slightly different from the
6869 standard format.  At the beginning of each line the line number is
6870 displayed.  The pick mode line format is controlled by the
6871 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
6872 Variables}).  It accepts the same format specs that
6873 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}). 
6874
6875
6876 @node Binary Groups
6877 @subsection Binary Groups
6878 @cindex binary groups
6879
6880 @findex gnus-binary-mode
6881 @kindex M-x gnus-binary-mode
6882 If you spend much time in binary groups, you may grow tired of hitting
6883 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
6884 is a minor mode for summary buffers that makes all ordinary Gnus article
6885 selection functions uudecode series of articles and display the result
6886 instead of just displaying the articles the normal way.  
6887
6888 @kindex g (Binary)
6889 @findex gnus-binary-show-article
6890 The only way, in fact, to see the actual articles is the @kbd{g}
6891 command, when you have turned on this mode
6892 (@code{gnus-binary-show-article}).
6893
6894 @vindex gnus-binary-mode-hook
6895 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
6896
6897
6898 @node Tree Display
6899 @section Tree Display
6900 @cindex trees
6901
6902 @vindex gnus-use-trees
6903 If you don't like the normal Gnus summary display, you might try setting
6904 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
6905 additional @dfn{tree buffer}.  You can execute all summary mode commands
6906 in the tree buffer.  
6907
6908 There are a few variables to customize the tree display, of course:
6909
6910 @table @code
6911 @item gnus-tree-mode-hook
6912 @vindex gnus-tree-mode-hook
6913 A hook called in all tree mode buffers.
6914
6915 @item gnus-tree-mode-line-format
6916 @vindex gnus-tree-mode-line-format
6917 A format string for the mode bar in the tree mode buffers.  The default
6918 is @samp{Gnus: %%b %S %Z}.  For a list of valid specs, @pxref{Summary
6919 Buffer Mode Line}. 
6920
6921 @item gnus-selected-tree-face
6922 @vindex gnus-selected-tree-face
6923 Face used for highlighting the selected article in the tree buffer.  The
6924 default is @code{modeline}.
6925
6926 @item gnus-tree-line-format
6927 @vindex gnus-tree-line-format
6928 A format string for the tree nodes.  The name is a bit of a misnomer,
6929 though---it doesn't define a line, but just the node.  The default value
6930 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
6931 the name of the poster.  It is vital that all nodes are of the same
6932 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
6933
6934 Valid specs are:
6935
6936 @table @samp
6937 @item n
6938 The name of the poster.
6939 @item f
6940 The @code{From} header.
6941 @item N
6942 The number of the article.
6943 @item [
6944 The opening bracket.
6945 @item ] 
6946 The closing bracket.
6947 @item s
6948 The subject.
6949 @end table
6950
6951 @xref{Formatting Variables}.
6952
6953 Variables related to the display are:
6954
6955 @table @code
6956 @item gnus-tree-brackets
6957 @vindex gnus-tree-brackets
6958 This is used for differentiating between ``real'' articles and
6959 ``sparse'' articles.  The format is @var{((real-open . real-close)
6960 (sparse-open . sparse-close) (dummy-open . dummy-close))}, and the
6961 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
6962
6963 @item gnus-tree-parent-child-edges
6964 @vindex gnus-tree-parent-child-edges
6965 This is a list that contains the characters used for connecting parent
6966 nodes to their children.  The default is @code{(?- ?\\ ?|)}. 
6967
6968 @end table
6969
6970 @item gnus-tree-minimize-window
6971 @vindex gnus-tree-minimize-window
6972 If this variable is non-@code{nil}, Gnus will try to keep the tree
6973 buffer as small as possible to allow more room for the other Gnus
6974 windows.  If this variable is a number, the tree buffer will never be
6975 higher than that number.  The default is @code{t}.  Note that if you
6976 have several windows displayed side-by-side in a frame and the tree
6977 buffer is one of these, minimizing the tree window will also resize all
6978 other windows displayed next to it.
6979
6980 @item gnus-generate-tree-function
6981 @vindex gnus-generate-tree-function
6982 @findex gnus-generate-horizontal-tree
6983 @findex gnus-generate-vertical-tree
6984 The function that actually generates the thread tree.  Two predefined
6985 functions are available: @code{gnus-generate-horizontal-tree} and
6986 @code{gnus-generate-vertical-tree} (which is the default).
6987
6988 @end table
6989
6990 Here's an example from a horizontal tree buffer:
6991
6992 @example
6993 @{***@}-(***)-[odd]-[Gun]
6994      |      \[Jan]
6995      |      \[odd]-[Eri]
6996      |      \(***)-[Eri]
6997      |            \[odd]-[Paa]
6998      \[Bjo]
6999      \[Gun]
7000      \[Gun]-[Jor]
7001 @end example
7002
7003 Here's the same thread displayed in a vertical tree buffer:
7004
7005 @example
7006 @{***@}
7007   |--------------------------\-----\-----\
7008 (***)                         [Bjo] [Gun] [Gun]
7009   |--\-----\-----\                          |
7010 [odd] [Jan] [odd] (***)                   [Jor]
7011   |           |     |--\
7012 [Gun]       [Eri] [Eri] [odd]
7013                           |
7014                         [Paa]
7015 @end example
7016
7017 If you're using horizontal trees, it might be nice to display the trees
7018 side-by-side with the summary buffer.  You could add something like the
7019 following to your @file{.gnus.el} file:
7020
7021 @lisp
7022 (setq gnus-use-trees t
7023       gnus-generate-tree-function 'gnus-generate-horizontal-tree
7024       gnus-tree-minimize-window nil)
7025 (gnus-add-configuration
7026  '(article
7027    (vertical 1.0
7028              (horizontal 0.25
7029                          (summary 0.75 point)
7030                          (tree 1.0))
7031              (article 1.0))))
7032 @end lisp
7033
7034 @xref{Windows Configuration}.
7035
7036
7037 @node Mail Group Commands
7038 @section Mail Group Commands
7039 @cindex mail group commands
7040
7041 Some commands only make sense in mail groups.  If these commands are
7042 invalid in the current group, they will raise a hell and let you know.
7043
7044 All these commands (except the expiry and edit commands) use the
7045 process/prefix convention (@pxref{Process/Prefix}).
7046
7047 @table @kbd
7048
7049 @item B e
7050 @kindex B e (Summary)
7051 @findex gnus-summary-expire-articles
7052 Expire all expirable articles in the group
7053 (@code{gnus-summary-expire-articles}).
7054
7055 @item B M-C-e
7056 @kindex B M-C-e (Summary)
7057 @findex gnus-summary-expire-articles-now
7058 Delete all the expirable articles in the group
7059 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
7060 articles eligible for expiry in the current group will
7061 disappear forever into that big @file{/dev/null} in the sky.
7062
7063 @item B DEL
7064 @kindex B DEL (Summary)
7065 @findex gnus-summary-delete-article
7066 @c @icon{gnus-summary-mail-delete}
7067 Delete the mail article.  This is ``delete'' as in ``delete it from your
7068 disk forever and ever, never to return again.'' Use with caution.
7069 (@code{gnus-summary-delete-article}).
7070
7071 @item B m
7072 @kindex B m (Summary)
7073 @cindex move mail
7074 @findex gnus-summary-move-article
7075 Move the article from one mail group to another
7076 (@code{gnus-summary-move-article}). 
7077
7078 @item B c
7079 @kindex B c (Summary)
7080 @cindex copy mail
7081 @findex gnus-summary-copy-article
7082 @c @icon{gnus-summary-mail-copy}
7083 Copy the article from one group (mail group or not) to a mail group
7084 (@code{gnus-summary-copy-article}).
7085
7086 @item B C
7087 @kindex B C (Summary)
7088 @cindex crosspost mail
7089 @findex gnus-summary-crosspost-article
7090 Crosspost the current article to some other group
7091 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
7092 the article in the other group, and the Xref headers of the article will
7093 be properly updated.
7094
7095 @item B i
7096 @kindex B i (Summary)
7097 @findex gnus-summary-import-article
7098 Import an arbitrary file into the current mail newsgroup
7099 (@code{gnus-summary-import-article}).  You will be prompted for a file
7100 name, a @code{From} header and a @code{Subject} header.
7101
7102 @item B r
7103 @kindex B r (Summary)
7104 @findex gnus-summary-respool-article
7105 Respool the mail article (@code{gnus-summary-move-article}).
7106 @code{gnus-summary-respool-default-method} will be used as the default
7107 select method when respooling.  This variable is @code{nil} by default,
7108 which means that the current group select method will be used instead.
7109
7110 @item B w
7111 @itemx e
7112 @kindex B w (Summary)
7113 @kindex e (Summary)
7114 @findex gnus-summary-edit-article
7115 @kindex C-c C-c (Article)
7116 Edit the current article (@code{gnus-summary-edit-article}).  To finish
7117 editing and make the changes permanent, type @kbd{C-c C-c}
7118 (@kbd{gnus-summary-edit-article-done}).  If you give a prefix to the
7119 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
7120
7121 @item B q
7122 @kindex B q (Summary)
7123 @findex gnus-summary-respool-query
7124 If you want to re-spool an article, you might be curious as to what group
7125 the article will end up in before you do the re-spooling.  This command
7126 will tell you (@code{gnus-summary-respool-query}). 
7127
7128 @item B p
7129 @kindex B p (Summary)
7130 @findex gnus-summary-article-posted-p
7131 Some people have a tendency to send you "courtesy" copies when they
7132 follow up to articles you have posted.  These usually have a
7133 @code{Newsgroups} header in them, but not always.  This command
7134 (@code{gnus-summary-article-posted-p}) will try to fetch the current
7135 article from your news server (or rather, from
7136 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
7137 report back whether it found the article or not.  Even if it says that
7138 it didn't find the article, it may have been posted anyway---mail
7139 propagation is much faster than news propagation, and the news copy may
7140 just not have arrived yet.
7141
7142 @end table
7143
7144 @vindex gnus-move-split-methods
7145 @cindex moving articles
7146 If you move (or copy) articles regularly, you might wish to have Gnus
7147 suggest where to put the articles.  @code{gnus-move-split-methods} is a
7148 variable that uses the same syntax as @code{gnus-split-methods}
7149 (@pxref{Saving Articles}).  You may customize that variable to create
7150 suggestions you find reasonable.
7151
7152 @lisp
7153 (setq gnus-move-split-methods
7154       '(("^From:.*Lars Magne" "nnml:junk")
7155         ("^Subject:.*gnus" "nnfolder:important")
7156         (".*" "nnml:misc")))
7157 @end lisp
7158
7159
7160 @node Various Summary Stuff
7161 @section Various Summary Stuff
7162
7163 @menu
7164 * Summary Group Information::         Information oriented commands.
7165 * Searching for Articles::            Multiple article commands.
7166 * Summary Generation Commands::       (Re)generating the summary buffer.
7167 * Really Various Summary Commands::   Those pesky non-conformant commands.
7168 @end menu
7169
7170 @table @code
7171 @vindex gnus-summary-mode-hook
7172 @item gnus-summary-mode-hook
7173 This hook is called when creating a summary mode buffer.
7174
7175 @vindex gnus-summary-generate-hook
7176 @item gnus-summary-generate-hook
7177 This is called as the last thing before doing the threading and the
7178 generation of the summary buffer.  It's quite convenient for customizing
7179 the threading variables based on what data the newsgroup has.  This hook
7180 is called from the summary buffer after most summary buffer variables
7181 have been set.
7182
7183 @vindex gnus-summary-prepare-hook
7184 @item gnus-summary-prepare-hook
7185 It is called after the summary buffer has been generated.  You might use
7186 it to, for instance, highlight lines or modify the look of the buffer in
7187 some other ungodly manner.  I don't care.
7188
7189 @vindex gnus-summary-ignore-duplicates
7190 @item gnus-summary-ignore-duplicates
7191 When Gnus discovers two articles that have the same @code{Message-ID},
7192 it has to do something drastic.  No articles are allowed to have the
7193 same @code{Message-ID}, but this may happen when reading mail from some
7194 sources.  Gnus allows you to customize what happens with this variable.
7195 If it is @code{nil} (which is the default), Gnus will rename the
7196 @code{Message-ID} (for display purposes only) and display the article as
7197 any other article.  If this variable is @code{t}, it won't display the
7198 article---it'll be as if it never existed.
7199
7200 @end table
7201
7202
7203 @node Summary Group Information
7204 @subsection Summary Group Information
7205
7206 @table @kbd
7207
7208 @item H f
7209 @kindex H f (Summary)
7210 @findex gnus-summary-fetch-faq
7211 @vindex gnus-group-faq-directory
7212 Try to fetch the FAQ (list of frequently asked questions) for the
7213 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
7214 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
7215 on a remote machine.  This variable can also be a list of directories.
7216 In that case, giving a prefix to this command will allow you to choose
7217 between the various sites.  @code{ange-ftp} or @code{efs} will probably
7218 be used for fetching the file.
7219
7220 @item H d
7221 @kindex H d (Summary)
7222 @findex gnus-summary-describe-group
7223 Give a brief description of the current group
7224 (@code{gnus-summary-describe-group}).  If given a prefix, force
7225 rereading the description from the server.
7226
7227 @item H h
7228 @kindex H h (Summary)
7229 @findex gnus-summary-describe-briefly
7230 Give an extremely brief description of the most important summary
7231 keystrokes (@code{gnus-summary-describe-briefly}).
7232
7233 @item H i
7234 @kindex H i (Summary)
7235 @findex gnus-info-find-node
7236 Go to the Gnus info node (@code{gnus-info-find-node}).
7237 @end table
7238
7239
7240 @node Searching for Articles
7241 @subsection Searching for Articles
7242
7243 @table @kbd
7244
7245 @item M-s
7246 @kindex M-s (Summary)
7247 @findex gnus-summary-search-article-forward
7248 Search through all subsequent articles for a regexp
7249 (@code{gnus-summary-search-article-forward}). 
7250
7251 @item M-r
7252 @kindex M-r (Summary)
7253 @findex gnus-summary-search-article-backward
7254 Search through all previous articles for a regexp
7255 (@code{gnus-summary-search-article-backward}). 
7256
7257 @item &
7258 @kindex & (Summary)
7259 @findex gnus-summary-execute-command
7260 This command will prompt you for a header field, a regular expression to
7261 match on this field, and a command to be executed if the match is made
7262 (@code{gnus-summary-execute-command}).  If given a prefix, search
7263 backward instead.
7264
7265 @item M-&
7266 @kindex M-& (Summary)
7267 @findex gnus-summary-universal-argument
7268 Perform any operation on all articles that have been marked with
7269 the process mark (@code{gnus-summary-universal-argument}).
7270 @end table
7271
7272 @node Summary Generation Commands
7273 @subsection Summary Generation Commands
7274
7275 @table @kbd
7276
7277 @item Y g
7278 @kindex Y g (Summary)
7279 @findex gnus-summary-prepare
7280 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
7281
7282 @item Y c 
7283 @kindex Y c (Summary)
7284 @findex gnus-summary-insert-cached-articles
7285 Pull all cached articles (for the current group) into the summary buffer
7286 (@code{gnus-summary-insert-cached-articles}).
7287
7288 @end table
7289
7290
7291 @node Really Various Summary Commands
7292 @subsection Really Various Summary Commands
7293
7294 @table @kbd
7295
7296 @item C-d
7297 @kindex C-d (Summary)
7298 @findex gnus-summary-enter-digest-group
7299 If the current article is a collection of other articles (for instance,
7300 a digest), you might use this command to enter a group based on the that
7301 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
7302 guess what article type is currently displayed unless you give a prefix
7303 to this command, which forces a ``digest'' interpretation.  Basically,
7304 whenever you see a message that is a collection of other messages of
7305 some format, you @kbd{C-d} and read these messages in a more convenient
7306 fashion.
7307
7308 @item M-C-d
7309 @kindex M-C-d (Summary)
7310 @findex gnus-summary-read-document
7311 This command is very similar to the one above, but lets you gather
7312 several documents into one biiig group
7313 (@code{gnus-summary-read-document}).  It does this by opening several
7314 @code{nndoc} groups for each document, and then opening an
7315 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
7316 command understands the process/prefix convention
7317 (@pxref{Process/Prefix}). 
7318
7319 @item C-t
7320 @kindex C-t (Summary)
7321 @findex gnus-summary-toggle-truncation
7322 Toggle truncation of summary lines
7323 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
7324 line centering function in the summary buffer, so it's not a good idea
7325 to have truncation switched off while reading articles.
7326
7327 @item =
7328 @kindex = (Summary)
7329 @findex gnus-summary-expand-window
7330 Expand the summary buffer window (@code{gnus-summary-expand-window}).
7331 If given a prefix, force an @code{article} window configuration. 
7332
7333 @end table
7334
7335
7336 @node Exiting the Summary Buffer
7337 @section Exiting the Summary Buffer
7338 @cindex summary exit
7339 @cindex exiting groups
7340
7341 Exiting from the summary buffer will normally update all info on the
7342 group and return you to the group buffer. 
7343
7344 @table @kbd
7345
7346 @item Z Z
7347 @itemx q
7348 @kindex Z Z (Summary)
7349 @kindex q (Summary)
7350 @findex gnus-summary-exit
7351 @vindex gnus-summary-exit-hook
7352 @vindex gnus-summary-prepare-exit-hook
7353 @c @icon{gnus-summary-exit}
7354 Exit the current group and update all information on the group
7355 (@code{gnus-summary-exit}). @code{gnus-summary-prepare-exit-hook} is
7356 called before doing much of the exiting, which calls
7357 @code{gnus-summary-expire-articles} by default.
7358 @code{gnus-summary-exit-hook} is called after finishing the exit
7359 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
7360 group mode having no more (unread) groups.
7361
7362 @item Z E
7363 @itemx Q
7364 @kindex Z E (Summary)
7365 @kindex Q (Summary)
7366 @findex gnus-summary-exit-no-update
7367 Exit the current group without updating any information on the group
7368 (@code{gnus-summary-exit-no-update}).
7369
7370 @item Z c
7371 @itemx c
7372 @kindex Z c (Summary)
7373 @kindex c (Summary)
7374 @findex gnus-summary-catchup-and-exit
7375 @c @icon{gnus-summary-catchup-and-exit}
7376 Mark all unticked articles in the group as read and then exit
7377 (@code{gnus-summary-catchup-and-exit}).
7378
7379 @item Z C
7380 @kindex Z C (Summary)
7381 @findex gnus-summary-catchup-all-and-exit
7382 Mark all articles, even the ticked ones, as read and then exit
7383 (@code{gnus-summary-catchup-all-and-exit}).
7384
7385 @item Z n
7386 @kindex Z n (Summary)
7387 @findex gnus-summary-catchup-and-goto-next-group
7388 Mark all articles as read and go to the next group
7389 (@code{gnus-summary-catchup-and-goto-next-group}). 
7390
7391 @item Z R
7392 @kindex Z R (Summary)
7393 @findex gnus-summary-reselect-current-group
7394 Exit this group, and then enter it again
7395 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
7396 all articles, both read and unread.
7397
7398 @item Z G
7399 @itemx M-g
7400 @kindex Z G (Summary)
7401 @kindex M-g (Summary)
7402 @findex gnus-summary-rescan-group
7403 @c @icon{gnus-summary-mail-get}
7404 Exit the group, check for new articles in the group, and select the
7405 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
7406 articles, both read and unread.
7407
7408 @item Z N
7409 @kindex Z N (Summary)
7410 @findex gnus-summary-next-group
7411 Exit the group and go to the next group
7412 (@code{gnus-summary-next-group}). 
7413
7414 @item Z P
7415 @kindex Z P (Summary)
7416 @findex gnus-summary-prev-group
7417 Exit the group and go to the previous group
7418 (@code{gnus-summary-prev-group}). 
7419
7420 @item Z s
7421 @kindex Z s (Summary)
7422 @findex gnus-summary-save-newsrc
7423 Save the current number of read/marked articles in the dribble buffer
7424 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
7425 given a prefix, also save the @file{.newsrc} file(s).  Using this
7426 command will make exit without updating (the @kbd{Q} command) worthless.
7427 @end table
7428
7429 @vindex gnus-exit-group-hook
7430 @code{gnus-exit-group-hook} is called when you exit the current
7431 group.  
7432
7433 @findex gnus-summary-wake-up-the-dead
7434 @findex gnus-dead-summary-mode
7435 @vindex gnus-kill-summary-on-exit
7436 If you're in the habit of exiting groups, and then changing your mind
7437 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
7438 If you do that, Gnus won't kill the summary buffer when you exit it.
7439 (Quelle surprise!)  Instead it will change the name of the buffer to
7440 something like @samp{*Dead Summary ... *} and install a minor mode
7441 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
7442 buffer, you'll find that all keys are mapped to a function called
7443 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
7444 summary buffer will result in a live, normal summary buffer.  
7445
7446 There will never be more than one dead summary buffer at any one time. 
7447
7448 @vindex gnus-use-cross-reference
7449 The data on the current group will be updated (which articles you have
7450 read, which articles you have replied to, etc.) when you exit the
7451 summary buffer.  If the @code{gnus-use-cross-reference} variable is
7452 @code{t} (which is the default), articles that are cross-referenced to
7453 this group and are marked as read, will also be marked as read in the
7454 other subscribed groups they were cross-posted to.  If this variable is
7455 neither @code{nil} nor @code{t}, the article will be marked as read in
7456 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
7457
7458
7459 @node Crosspost Handling
7460 @section Crosspost Handling
7461
7462 @cindex velveeta
7463 @cindex spamming
7464 Marking cross-posted articles as read ensures that you'll never have to
7465 read the same article more than once.  Unless, of course, somebody has
7466 posted it to several groups separately.  Posting the same article to
7467 several groups (not cross-posting) is called @dfn{spamming}, and you are
7468 by law required to send nasty-grams to anyone who perpetrates such a
7469 heinous crime.  You may want to try NoCeM handling to filter out spam
7470 (@pxref{NoCeM}). 
7471
7472 Remember: Cross-posting is kinda ok, but posting the same article
7473 separately to several groups is not.  Massive cross-posting (aka.
7474 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
7475 @code{gnus-summary-mail-crosspost-complaint} command to complain about
7476 excessive crossposting (@pxref{Summary Mail Commands}).
7477
7478 @cindex cross-posting
7479 @cindex Xref
7480 @cindex @sc{nov}
7481 One thing that may cause Gnus to not do the cross-posting thing
7482 correctly is if you use an @sc{nntp} server that supports @sc{xover}
7483 (which is very nice, because it speeds things up considerably) which
7484 does not include the @code{Xref} header in its @sc{nov} lines.  This is
7485 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
7486 even with @sc{xover} by registering the @code{Xref} lines of all
7487 articles you actually read, but if you kill the articles, or just mark
7488 them as read without reading them, Gnus will not get a chance to snoop
7489 the @code{Xref} lines out of these articles, and will be unable to use
7490 the cross reference mechanism.
7491
7492 @cindex LIST overview.fmt
7493 @cindex overview.fmt
7494 To check whether your @sc{nntp} server includes the @code{Xref} header
7495 in its overview files, try @samp{telnet your.nntp.server nntp},
7496 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
7497 overview.fmt}.  This may not work, but if it does, and the last line you
7498 get does not read @samp{Xref:full}, then you should shout and whine at
7499 your news admin until she includes the @code{Xref} header in the
7500 overview files.
7501
7502 @vindex gnus-nov-is-evil
7503 If you want Gnus to get the @code{Xref}s right all the time, you have to
7504 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
7505 considerably.
7506
7507 C'est la vie.
7508
7509 For an alternative approach, @pxref{Duplicate Suppression}.
7510
7511
7512 @node Duplicate Suppression
7513 @section Duplicate Suppression
7514
7515 By default, Gnus tries to make sure that you don't have to read the same
7516 article more than once by utilizing the crossposting mechanism
7517 (@pxref{Crosspost Handling}).  However, that simple and efficient
7518 approach may not work satisfactory for some users for various
7519 reasons.  
7520
7521 @enumerate
7522 @item 
7523 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
7524 is evil and not very common.
7525
7526 @item 
7527 The @sc{nntp} server may fail to include the @code{Xref} header in the
7528 @file{.overview} data bases.  This is evil and all too common, alas.
7529
7530 @item
7531 You may be reading the same group (or several related groups) from
7532 different @sc{nntp} servers.
7533
7534 @item
7535 You may be getting mail that duplicates articles posted to groups.
7536 @end enumerate
7537
7538 I'm sure there are other situations where @code{Xref} handling fails as
7539 well, but these four are the most common situations.
7540
7541 If, and only if, @code{Xref} handling fails for you, then you may
7542 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
7543 will remember the @code{Message-ID}s of all articles you have read or
7544 otherwise marked as read, and then, as if by magic, mark them as read
7545 all subsequent times you see them---in @emph{all} groups.  Using this
7546 mechanism is quite likely to be somewhat inefficient, but not overly
7547 so.  It's certainly preferable to reading the same articles more than
7548 once.
7549
7550 Duplicate suppression is not a very subtle instrument.  It's more like a
7551 sledge hammer than anything else.  It works in a very simple
7552 fashion---if you have marked an article as read, it adds this Message-ID
7553 to a cache.  The next time it sees this Message-ID, it will mark the
7554 article as read with the @samp{M} mark.  It doesn't care what group it
7555 saw the article in.
7556
7557 @table @code
7558 @item gnus-suppress-duplicates
7559 @vindex gnus-suppress-duplicates
7560 If non-@code{nil}, suppress duplicates.
7561
7562 @item gnus-save-duplicate-list
7563 @vindex gnus-save-duplicate-list
7564 If non-@code{nil}, save the list of duplicates to a file.  This will
7565 make startup and shutdown take longer, so the default is @code{nil}.
7566 However, this means that only duplicate articles read in a single Gnus
7567 session are suppressed.
7568
7569 @item gnus-duplicate-list-length
7570 @vindex gnus-duplicate-list-length
7571 This variable says how many @code{Message-ID}s to keep in the duplicate
7572 suppression list.  The default is 10000.  
7573
7574 @item gnus-duplicate-file
7575 @vindex gnus-duplicate-file
7576 The name of the file to store the duplicate suppression list in.  The
7577 default is @file{~/News/suppression}.
7578 @end table
7579
7580 If you have a tendency to stop and start Gnus often, setting
7581 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
7582 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
7583 the other hand, saving the list makes startup and shutdown much slower,
7584 so that means that if you stop and start Gnus often, you should set
7585 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
7586 to you to figure out, I think.
7587
7588
7589 @node The Article Buffer
7590 @chapter The Article Buffer
7591 @cindex article buffer
7592
7593 The articles are displayed in the article buffer, of which there is only
7594 one.  All the summary buffers share the same article buffer unless you
7595 tell Gnus otherwise.
7596
7597 @menu
7598 * Hiding Headers::        Deciding what headers should be displayed.
7599 * Using MIME::            Pushing articles through @sc{mime} before reading them.
7600 * Customizing Articles::  Tailoring the look of the articles.
7601 * Article Keymap::        Keystrokes available in the article buffer.
7602 * Misc Article::          Other stuff.
7603 @end menu
7604
7605
7606 @node Hiding Headers
7607 @section Hiding Headers
7608 @cindex hiding headers
7609 @cindex deleting headers
7610
7611 The top section of each article is the @dfn{head}.  (The rest is the
7612 @dfn{body}, but you may have guessed that already.)
7613
7614 @vindex gnus-show-all-headers
7615 There is a lot of useful information in the head: the name of the person
7616 who wrote the article, the date it was written and the subject of the
7617 article.  That's well and nice, but there's also lots of information
7618 most people do not want to see---what systems the article has passed
7619 through before reaching you, the @code{Message-ID}, the
7620 @code{References}, etc. ad nauseum---and you'll probably want to get rid
7621 of some of those lines.  If you want to keep all those lines in the
7622 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
7623
7624 Gnus provides you with two variables for sifting headers:
7625
7626 @table @code
7627
7628 @item gnus-visible-headers
7629 @vindex gnus-visible-headers
7630 If this variable is non-@code{nil}, it should be a regular expression
7631 that says what headers you wish to keep in the article buffer.  All
7632 headers that do not match this variable will be hidden.
7633
7634 For instance, if you only want to see the name of the person who wrote
7635 the article and the subject, you'd say:
7636
7637 @lisp
7638 (setq gnus-visible-headers "^From:\\|^Subject:")
7639 @end lisp
7640
7641 This variable can also be a list of regexps to match headers to
7642 remain visible.
7643
7644 @item gnus-ignored-headers
7645 @vindex gnus-ignored-headers
7646 This variable is the reverse of @code{gnus-visible-headers}.  If this
7647 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
7648 should be a regular expression that matches all lines that you want to
7649 hide.  All lines that do not match this variable will remain visible.
7650
7651 For instance, if you just want to get rid of the @code{References} line
7652 and the @code{Xref} line, you might say:
7653
7654 @lisp
7655 (setq gnus-ignored-headers "^References:\\|^Xref:")
7656 @end lisp
7657
7658 This variable can also be a list of regexps to match headers to
7659 be removed.
7660
7661 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
7662 variable will have no effect.
7663
7664 @end table
7665
7666 @vindex gnus-sorted-header-list
7667 Gnus can also sort the headers for you.  (It does this by default.)  You
7668 can control the sorting by setting the @code{gnus-sorted-header-list}
7669 variable.  It is a list of regular expressions that says in what order
7670 the headers are to be displayed.
7671
7672 For instance, if you want the name of the author of the article first,
7673 and then the subject, you might say something like:
7674
7675 @lisp
7676 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
7677 @end lisp
7678
7679 Any headers that are to remain visible, but are not listed in this
7680 variable, will be displayed in random order after all the headers listed in this variable.
7681
7682 @findex gnus-article-hide-boring-headers
7683 @vindex gnus-article-display-hook
7684 @vindex gnus-boring-article-headers
7685 You can hide further boring headers by entering
7686 @code{gnus-article-hide-boring-headers} into
7687 @code{gnus-article-display-hook}.  What this function does depends on
7688 the @code{gnus-boring-article-headers} variable.  It's a list, but this
7689 list doesn't actually contain header names.  Instead is lists various
7690 @dfn{boring conditions} that Gnus can check and remove from sight.
7691
7692 These conditions are:
7693 @table @code
7694 @item empty
7695 Remove all empty headers.
7696 @item newsgroups
7697 Remove the @code{Newsgroups} header if it only contains the current group
7698 name. 
7699 @item followup-to
7700 Remove the @code{Followup-To} header if it is identical to the
7701 @code{Newsgroups} header.
7702 @item reply-to
7703 Remove the @code{Reply-To} header if it lists the same address as the
7704 @code{From} header.
7705 @item date
7706 Remove the @code{Date} header if the article is less than three days
7707 old.
7708 @item long-to
7709 Remove the @code{To} header if it is very long.
7710 @item many-to
7711 Remove all @code{To} headers if there are more than one.
7712 @end table
7713
7714 To include the four first elements, you could say something like;
7715
7716 @lisp
7717 (setq gnus-boring-article-headers 
7718       '(empty newsgroups followup-to reply-to))
7719 @end lisp
7720
7721 This is also the default value for this variable.
7722
7723
7724 @node Using MIME
7725 @section Using @sc{mime}
7726 @cindex @sc{mime}
7727
7728 Mime is a standard for waving your hands through the air, aimlessly,
7729 while people stand around yawning.
7730
7731 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
7732 while all newsreaders die of fear.
7733
7734 @sc{mime} may specify what character set the article uses, the encoding
7735 of the characters, and it also makes it possible to embed pictures and
7736 other naughty stuff in innocent-looking articles.
7737
7738 @vindex gnus-show-mime
7739 @vindex gnus-show-mime-method
7740 @vindex gnus-strict-mime
7741 @findex metamail-buffer
7742 Gnus handles @sc{mime} by pushing the articles through
7743 @code{gnus-show-mime-method}, which is @code{metamail-buffer} by
7744 default.  Set @code{gnus-show-mime} to @code{t} if you want to use
7745 @sc{mime} all the time.  However, if @code{gnus-strict-mime} is
7746 non-@code{nil}, the @sc{mime} method will only be used if there are
7747 @sc{mime} headers in the article.  If you have @code{gnus-show-mime}
7748 set, then you'll see some unfortunate display glitches in the article
7749 buffer.  These can't be avoided.
7750
7751 It might be best to just use the toggling functions from the summary
7752 buffer to avoid getting nasty surprises. (For instance, you enter the
7753 group @samp{alt.sing-a-long} and, before you know it, @sc{mime} has
7754 decoded the sound file in the article and some horrible sing-a-long song
7755 comes screaming out your speakers, and you can't find the volume
7756 button, because there isn't one, and people are starting to look at you,
7757 and you try to stop the program, but you can't, and you can't find the
7758 program to control the volume, and everybody else in the room suddenly
7759 decides to look at you disdainfully, and you'll feel rather stupid.)
7760
7761 Any similarity to real events and people is purely coincidental.  Ahem.
7762
7763
7764 @node Customizing Articles
7765 @section Customizing Articles
7766 @cindex article customization
7767
7768 @vindex gnus-article-display-hook
7769 The @code{gnus-article-display-hook} is called after the article has
7770 been inserted into the article buffer.  It is meant to handle all
7771 treatment of the article before it is displayed. 
7772
7773 @findex gnus-article-maybe-highlight
7774 By default this hook just contains @code{gnus-article-hide-headers},
7775 @code{gnus-article-treat-overstrike}, and
7776 @code{gnus-article-maybe-highlight}, but there are thousands, nay
7777 millions, of functions you can put in this hook.  For an overview of
7778 functions @pxref{Article Highlighting}, @pxref{Article Hiding},
7779 @pxref{Article Washing}, @pxref{Article Buttons} and @pxref{Article
7780 Date}.  Note that the order of functions in this hook might affect
7781 things, so you may have to fiddle a bit to get the desired results. 
7782
7783 You can, of course, write your own functions.  The functions are called
7784 from the article buffer, and you can do anything you like, pretty much.
7785 There is no information that you have to keep in the buffer---you can
7786 change everything.  However, you shouldn't delete any headers.  Instead
7787 make them invisible if you want to make them go away.
7788
7789
7790 @node Article Keymap
7791 @section Article Keymap
7792
7793 Most of the keystrokes in the summary buffer can also be used in the
7794 article buffer.  They should behave as if you typed them in the summary
7795 buffer, which means that you don't actually have to have a summary
7796 buffer displayed while reading.  You can do it all from the article
7797 buffer.
7798
7799 A few additional keystrokes are available:
7800
7801 @table @kbd
7802
7803 @item SPACE
7804 @kindex SPACE (Article)
7805 @findex gnus-article-next-page
7806 Scroll forwards one page (@code{gnus-article-next-page}).
7807
7808 @item DEL
7809 @kindex DEL (Article)
7810 @findex gnus-article-prev-page
7811 Scroll backwards one page (@code{gnus-article-prev-page}).
7812
7813 @item C-c ^
7814 @kindex C-c ^ (Article)
7815 @findex gnus-article-refer-article
7816 If point is in the neighborhood of a @code{Message-ID} and you press
7817 @kbd{r}, Gnus will try to get that article from the server
7818 (@code{gnus-article-refer-article}).
7819
7820 @item C-c C-m
7821 @kindex C-c C-m (Article)
7822 @findex gnus-article-mail
7823 Send a reply to the address near point (@code{gnus-article-mail}).  If
7824 given a prefix, include the mail.
7825
7826 @item s
7827 @kindex s (Article)
7828 @findex gnus-article-show-summary
7829 Reconfigure the buffers so that the summary buffer becomes visible
7830 (@code{gnus-article-show-summary}).
7831
7832 @item ?
7833 @kindex ? (Article)
7834 @findex gnus-article-describe-briefly
7835 Give a very brief description of the available keystrokes
7836 (@code{gnus-article-describe-briefly}). 
7837
7838 @item TAB
7839 @kindex TAB (Article)
7840 @findex gnus-article-next-button
7841 Go to the next button, if any (@code{gnus-article-next-button}).  This
7842 only makes sense if you have buttonizing turned on.
7843
7844 @item M-TAB
7845 @kindex M-TAB (Article)
7846 @findex gnus-article-prev-button
7847 Go to the previous button, if any (@code{gnus-article-prev-button}).  
7848
7849 @end table
7850
7851
7852 @node Misc Article
7853 @section Misc Article
7854
7855 @table @code
7856
7857 @item gnus-single-article-buffer
7858 @vindex gnus-single-article-buffer
7859 If non-@code{nil}, use the same article buffer for all the groups.
7860 (This is the default.)  If @code{nil}, each group will have its own
7861 article buffer.
7862
7863 @vindex gnus-article-prepare-hook
7864 @item gnus-article-prepare-hook
7865 This hook is called right after the article has been inserted into the
7866 article buffer.  It is mainly intended for functions that do something
7867 depending on the contents; it should probably not be used for changing
7868 the contents of the article buffer.
7869
7870 @vindex gnus-article-display-hook
7871 @item gnus-article-display-hook
7872 This hook is called as the last thing when displaying an article, and is
7873 intended for modifying the contents of the buffer, doing highlights,
7874 hiding headers, and the like.
7875
7876 @item gnus-article-mode-hook
7877 @vindex gnus-article-mode-hook
7878 Hook called in article mode buffers.
7879
7880 @item gnus-article-mode-syntax-table
7881 @vindex gnus-article-mode-syntax-table
7882 Syntax table used in article buffers.  It is initialized from
7883 @code{text-mode-syntax-table}. 
7884
7885 @vindex gnus-article-mode-line-format
7886 @item gnus-article-mode-line-format
7887 This variable is a format string along the same lines as
7888 @code{gnus-summary-mode-line-format}.  It accepts the same
7889 format specifications as that variable, with one extension:
7890
7891 @table @samp
7892 @item w
7893 The @dfn{wash status} of the article.  This is a short string with one
7894 character for each possible article wash operation that may have been
7895 performed. 
7896 @end table
7897
7898 @vindex gnus-break-pages
7899
7900 @item gnus-break-pages
7901 Controls whether @dfn{page breaking} is to take place.  If this variable
7902 is non-@code{nil}, the articles will be divided into pages whenever a
7903 page delimiter appears in the article.  If this variable is @code{nil},
7904 paging will not be done.
7905
7906 @item gnus-page-delimiter
7907 @vindex gnus-page-delimiter
7908 This is the delimiter mentioned above.  By default, it is @samp{^L}
7909 (formfeed).
7910 @end table
7911
7912
7913 @node Composing Messages
7914 @chapter Composing Messages
7915 @cindex composing messages
7916 @cindex messages
7917 @cindex mail
7918 @cindex sending mail
7919 @cindex reply
7920 @cindex followup
7921 @cindex post
7922
7923 @kindex C-c C-c (Post)
7924 All commands for posting and mailing will put you in a message buffer
7925 where you can edit the article all you like, before you send the article
7926 by pressing @kbd{C-c C-c}.  @xref{Top, , Top, message, The Message
7927 Manual}.  If you are in a foreign news group, and you wish to post the
7928 article using the foreign server, you can give a prefix to @kbd{C-c C-c}
7929 to make Gnus try to post using the foreign server.
7930
7931 @menu 
7932 * Mail::                 Mailing and replying.
7933 * Post::                 Posting and following up.
7934 * Posting Server::       What server should you post via?
7935 * Mail and Post::        Mailing and posting at the same time.
7936 * Archived Messages::    Where Gnus stores the messages you've sent.
7937 * Drafts::               Postponing messages and rejected messages.
7938 * Rejected Articles::    What happens if the server doesn't like your article?
7939 @end menu
7940
7941 Also see @pxref{Canceling and Superseding} for information on how to
7942 remove articles you shouldn't have posted.
7943
7944
7945 @node Mail
7946 @section Mail
7947
7948 Variables for customizing outgoing mail:
7949
7950 @table @code
7951 @item gnus-uu-digest-headers
7952 @vindex gnus-uu-digest-headers
7953 List of regexps to match headers included in digested messages.  The
7954 headers will be included in the sequence they are matched.
7955
7956 @item gnus-add-to-list
7957 @vindex gnus-add-to-list
7958 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
7959 that have none when you do a @kbd{a}.
7960
7961 @end table
7962
7963
7964 @node Post
7965 @section Post
7966
7967 Variables for composing news articles:
7968
7969 @table @code
7970 @item gnus-sent-message-ids-file
7971 @vindex gnus-sent-message-ids-file
7972 Gnus will keep a @code{Message-ID} history file of all the mails it has
7973 sent.  If it discovers that it has already sent a mail, it will ask the
7974 user whether to re-send the mail.  (This is primarily useful when
7975 dealing with @sc{soup} packets and the like where one is apt to send the
7976 same packet multiple times.)  This variable says what the name of this
7977 history file is.  It is @file{~/News/Sent-Message-IDs} by default.  Set
7978 this variable to @code{nil} if you don't want Gnus to keep a history
7979 file.
7980
7981 @item gnus-sent-message-ids-length
7982 @vindex gnus-sent-message-ids-length
7983 This variable says how many @code{Message-ID}s to keep in the history
7984 file.  It is 1000 by default.
7985
7986 @end table
7987
7988
7989 @node Posting Server
7990 @section Posting Server
7991
7992 When you press those magical @kbd{C-c C-c} keys to ship off your latest
7993 (extremely intelligent, of course) article, where does it go?
7994
7995 Thank you for asking.  I hate you.
7996
7997 @vindex gnus-post-method
7998
7999 It can be quite complicated.  Normally, Gnus will use the same native
8000 server.  However.  If your native server doesn't allow posting, just
8001 reading, you probably want to use some other server to post your
8002 (extremely intelligent and fabulously interesting) articles.  You can
8003 then set the @code{gnus-post-method} to some other method:
8004
8005 @lisp
8006 (setq gnus-post-method '(nnspool ""))
8007 @end lisp
8008
8009 Now, if you've done this, and then this server rejects your article, or
8010 this server is down, what do you do then?  To override this variable you
8011 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
8012 the ``current'' server for posting.
8013
8014 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
8015 Gnus will prompt you for what method to use for posting.  
8016
8017 You can also set @code{gnus-post-method} to a list of select methods.
8018 If that's the case, Gnus will always prompt you for what method to use
8019 for posting. 
8020
8021
8022 @node Mail and Post
8023 @section Mail and Post
8024
8025 Here's a list of variables relevant to both mailing and
8026 posting:
8027
8028 @table @code
8029 @item gnus-mailing-list-groups
8030 @findex gnus-mailing-list-groups
8031 @cindex mailing lists
8032
8033 If your news server offers groups that are really mailing lists
8034 gatewayed to the @sc{nntp} server, you can read those groups without
8035 problems, but you can't post/followup to them without some difficulty.
8036 One solution is to add a @code{to-address} to the group parameters
8037 (@pxref{Group Parameters}).  An easier thing to do is set the
8038 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
8039 really are mailing lists.  Then, at least, followups to the mailing
8040 lists will work most of the time.  Posting to these groups (@kbd{a}) is
8041 still a pain, though.
8042
8043 @end table
8044
8045 You may want to do spell-checking on messages that you send out.  Or, if
8046 you don't want to spell-check by hand, you could add automatic
8047 spell-checking via the @code{ispell} package:
8048
8049 @cindex ispell
8050 @findex ispell-message
8051 @lisp
8052 (add-hook 'message-send-hook 'ispell-message) 
8053 @end lisp
8054
8055
8056 @node Archived Messages
8057 @section Archived Messages
8058 @cindex archived messages
8059 @cindex sent messages
8060
8061 Gnus provides a few different methods for storing the mail and news you
8062 send.  The default method is to use the @dfn{archive virtual server} to
8063 store the messages.  If you want to disable this completely, the
8064 @code{gnus-message-archive-group} variable should be @code{nil}, which
8065 is the default.
8066
8067 @vindex gnus-message-archive-method
8068 @code{gnus-message-archive-method} says what virtual server Gnus is to
8069 use to store sent messages.  The default is:
8070
8071 @lisp
8072 (nnfolder "archive"
8073           (nnfolder-directory   "~/Mail/archive")
8074           (nnfolder-active-file "~/Mail/archive/active")
8075           (nnfolder-get-new-mail nil)
8076           (nnfolder-inhibit-expiry t))
8077 @end lisp
8078
8079 You can, however, use any mail select method (@code{nnml},
8080 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likeable select method
8081 for doing this sort of thing, though.  If you don't like the default
8082 directory chosen, you could say something like:
8083
8084 @lisp
8085 (setq gnus-message-archive-method
8086       '(nnfolder "archive" 
8087                  (nnfolder-inhibit-expiry t)
8088                  (nnfolder-active-file "~/News/sent-mail/active")
8089                  (nnfolder-directory "~/News/sent-mail/")))
8090 @end lisp
8091
8092 @vindex gnus-message-archive-group
8093 @cindex Gcc
8094 Gnus will insert @code{Gcc} headers in all outgoing messages that point
8095 to one or more group(s) on that server.  Which group to use is
8096 determined by the @code{gnus-message-archive-group} variable.  
8097
8098 This variable can be used to do the following:
8099
8100 @itemize @bullet
8101 @item a string
8102 Messages will be saved in that group.
8103 @item a list of strings
8104 Messages will be saved in all those groups.
8105 @item an alist of regexps, functions and forms
8106 When a key ``matches'', the result is used.
8107 @item @code{nil}
8108 No message archiving will take place.  This is the default.
8109 @end itemize
8110
8111 Let's illustrate:
8112
8113 Just saving to a single group called @samp{MisK}:
8114 @lisp
8115 (setq gnus-message-archive-group "MisK")
8116 @end lisp
8117
8118 Saving to two groups, @samp{MisK} and @samp{safe}:
8119 @lisp
8120 (setq gnus-message-archive-group '("MisK" "safe"))
8121 @end lisp
8122
8123 Save to different groups based on what group you are in:
8124 @lisp
8125 (setq gnus-message-archive-group 
8126       '(("^alt" "sent-to-alt")
8127         ("mail" "sent-to-mail")
8128         (".*" "sent-to-misc")))
8129 @end lisp
8130
8131 More complex stuff:
8132 @lisp
8133 (setq gnus-message-archive-group 
8134       '((if (message-news-p)
8135             "misc-news" 
8136           "misc-mail")))
8137 @end lisp       
8138
8139 How about storing all news messages in one file, but storing all mail
8140 messages in one file per month:
8141
8142 @lisp
8143 (setq gnus-message-archive-group
8144       '((if (message-news-p)
8145             "misc-news" 
8146           (concat "mail." (format-time-string 
8147                            "%Y-%m" (current-time))))))
8148 @end lisp
8149
8150 (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
8151 use a different value for @code{gnus-message-archive-group} there.)
8152
8153 Now, when you send a message off, it will be stored in the appropriate
8154 group.  (If you want to disable storing for just one particular message,
8155 you can just remove the @code{Gcc} header that has been inserted.)  The
8156 archive group will appear in the group buffer the next time you start
8157 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
8158 enter it and read the articles in it just like you'd read any other
8159 group.  If the group gets really big and annoying, you can simply rename
8160 if (using @kbd{G r} in the group buffer) to something
8161 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
8162 continue to be stored in the old (now empty) group.
8163
8164 That's the default method of archiving sent messages.  Gnus offers a
8165 different way for the people who don't like the default method.  In that
8166 case you should set @code{gnus-message-archive-group} to @code{nil};
8167 this will disable archiving.
8168
8169 @table @code
8170 @item gnus-outgoing-message-group 
8171 @vindex gnus-outgoing-message-group 
8172 All outgoing messages will be put in this group.  If you want to store
8173 all your outgoing mail and articles in the group @samp{nnml:archive},
8174 you set this variable to that value.  This variable can also be a list of
8175 group names.
8176
8177 If you want to have greater control over what group to put each
8178 message in, you can set this variable to a function that checks the
8179 current newsgroup name and then returns a suitable group name (or list
8180 of names).
8181
8182 This variable can be used instead of @code{gnus-message-archive-group},
8183 but the latter is the preferred method.
8184 @end table
8185
8186
8187 @c @node Posting Styles
8188 @c @section Posting Styles
8189 @c @cindex posting styles
8190 @c @cindex styles
8191 @c 
8192 @c All them variables, they make my head swim.  
8193 @c 
8194 @c So what if you want a different @code{Organization} and signature based
8195 @c on what groups you post to?  And you post both from your home machine
8196 @c and your work machine, and you want different @code{From} lines, and so
8197 @c on? 
8198 @c 
8199 @c @vindex gnus-posting-styles
8200 @c One way to do stuff like that is to write clever hooks that change the
8201 @c variables you need to have changed.  That's a bit boring, so somebody
8202 @c came up with the bright idea of letting the user specify these things in
8203 @c a handy alist.  Here's an example of a @code{gnus-posting-styles}
8204 @c variable: 
8205 @c 
8206 @c @lisp
8207 @c ((".*" 
8208 @c   (signature . "Peace and happiness")
8209 @c   (organization . "What me?"))
8210 @c  ("^comp" 
8211 @c   (signature . "Death to everybody"))
8212 @c  ("comp.emacs.i-love-it" 
8213 @c   (organization . "Emacs is it")))
8214 @c @end lisp
8215 @c 
8216 @c As you might surmise from this example, this alist consists of several
8217 @c @dfn{styles}.  Each style will be applicable if the first element
8218 @c ``matches'', in some form or other.  The entire alist will be iterated
8219 @c over, from the beginning towards the end, and each match will be
8220 @c applied, which means that attributes in later styles that match override
8221 @c the same attributes in earlier matching styles.  So
8222 @c @samp{comp.programming.literate} will have the @samp{Death to everybody}
8223 @c signature and the @samp{What me?} @code{Organization} header.
8224 @c 
8225 @c The first element in each style is called the @code{match}.  If it's a
8226 @c string, then Gnus will try to regexp match it against the group name.
8227 @c If it's a function symbol, that function will be called with no
8228 @c arguments.  If it's a variable symbol, then the variable will be
8229 @c referenced.  If it's a list, then that list will be @code{eval}ed.  In
8230 @c any case, if this returns a non-@code{nil} value, then the style is said
8231 @c to @dfn{match}.
8232 @c 
8233 @c Each style may contain a arbitrary amount of @dfn{attributes}.  Each
8234 @c attribute consists of a @var{(name . value)} pair.  The attribute name
8235 @c can be one of @code{signature}, @code{organization} or @code{from}.  The
8236 @c attribute name can also be a string.  In that case, this will be used as
8237 @c a header name, and the value will be inserted in the headers of the
8238 @c article.
8239 @c 
8240 @c The attribute value can be a string (used verbatim), a function (the
8241 @c return value will be used), a variable (its value will be used) or a
8242 @c list (it will be @code{eval}ed and the return value will be used).
8243 @c 
8244 @c So here's a new example:
8245 @c 
8246 @c @lisp
8247 @c (setq gnus-posting-styles
8248 @c       '((".*" 
8249 @c           (signature . "~/.signature") 
8250 @c           (from . "user@@foo (user)")
8251 @c           ("X-Home-Page" . (getenv "WWW_HOME"))
8252 @c           (organization . "People's Front Against MWM"))
8253 @c         ("^rec.humor" 
8254 @c           (signature . my-funny-signature-randomizer))
8255 @c         ((equal (system-name) "gnarly")
8256 @c           (signature . my-quote-randomizer))
8257 @c         (posting-from-work-p
8258 @c           (signature . "~/.work-signature")
8259 @c           (from . "user@@bar.foo (user)")
8260 @c           (organization . "Important Work, Inc"))
8261 @c         ("^nn.+:" 
8262 @c           (signature . "~/.mail-signature"))))
8263 @c @end lisp
8264
8265 @node Drafts
8266 @section Drafts
8267 @cindex drafts
8268
8269 If you are writing a message (mail or news) and suddenly remember that
8270 you have a steak in the oven (or some pesto in the food processor, you
8271 craaazy vegetarians), you'll probably wish there was a method to save
8272 the message you are writing so that you can continue editing it some
8273 other day, and send it when you feel its finished.
8274
8275 Well, don't worry about it.  Whenever you start composing a message of
8276 some sort using the Gnus mail and post commands, the buffer you get will
8277 automatically associate to an article in a special @dfn{draft} group.
8278 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
8279 article will be saved there.  (Auto-save files also go to the draft
8280 group.) 
8281
8282 @cindex nndraft
8283 @vindex nndraft-directory
8284 The draft group is a special group (which is implemented as an
8285 @code{nndraft} group, if you absolutely have to know) called
8286 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
8287 @code{nndraft} is to store its files.  What makes this group special is
8288 that you can't tick any articles in it or mark any articles as
8289 read---all articles in the group are permanently unread.
8290
8291 If the group doesn't exist, it will be created and you'll be subscribed
8292 to it.  The only way to make it disappear from the Group buffer is to
8293 unsubscribe it. 
8294
8295 @c @findex gnus-dissociate-buffer-from-draft
8296 @c @kindex C-c M-d (Mail)
8297 @c @kindex C-c M-d (Post)
8298 @c @findex gnus-associate-buffer-with-draft
8299 @c @kindex C-c C-d (Mail)
8300 @c @kindex C-c C-d (Post)
8301 @c If you're writing some super-secret message that you later want to
8302 @c encode with PGP before sending, you may wish to turn the auto-saving
8303 @c (and association with the draft group) off.  You never know who might be
8304 @c interested in reading all your extremely valuable and terribly horrible
8305 @c and interesting secrets.  The @kbd{C-c M-d}
8306 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
8307 @c If you change your mind and want to turn the auto-saving back on again,
8308 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
8309 @c 
8310 @c @vindex gnus-use-draft
8311 @c To leave association with the draft group off by default, set
8312 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default. 
8313
8314 @findex gnus-draft-edit-message
8315 @kindex D e (Draft)
8316 When you want to continue editing the article, you simply enter the
8317 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
8318 that.  You will be placed in a buffer where you left off.
8319
8320 Rejected articles will also be put in this draft group (@pxref{Rejected
8321 Articles}).
8322
8323 @findex gnus-draft-send-all-messages
8324 @findex gnus-draft-send-message
8325 If you have lots of rejected messages you want to post (or mail) without
8326 doing further editing, you can use the @kbd{D s} command
8327 (@code{gnus-draft-send-message}).  This command understands the
8328 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
8329 command (@code{gnus-draft-send-all-messages}) will ship off all messages
8330 in the buffer.
8331
8332 If you have some messages that you wish not to send, you can use the
8333 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
8334 as unsendable.  This is a toggling command.
8335
8336
8337 @node Rejected Articles
8338 @section Rejected Articles
8339 @cindex rejected articles
8340
8341 Sometimes a news server will reject an article.  Perhaps the server
8342 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
8343 @emph{there be demons}.  Perhaps you have included too much cited text.
8344 Perhaps the disk is full.  Perhaps the server is down.
8345
8346 These situations are, of course, totally beyond the control of Gnus.
8347 (Gnus, of course, loves the way you look, always feels great, has angels
8348 fluttering around inside of it, doesn't care about how much cited text
8349 you include, never runs full and never goes down.)  So Gnus saves these
8350 articles until some later time when the server feels better.
8351
8352 The rejected articles will automatically be put in a special draft group
8353 (@pxref{Drafts}).  When the server comes back up again, you'd then
8354 typically enter that group and send all the articles off.
8355
8356
8357 @node Select Methods
8358 @chapter Select Methods
8359 @cindex foreign groups
8360 @cindex select methods
8361
8362 A @dfn{foreign group} is a group not read by the usual (or
8363 default) means.  It could be, for instance, a group from a different
8364 @sc{nntp} server, it could be a virtual group, or it could be your own
8365 personal mail group.
8366
8367 A foreign group (or any group, really) is specified by a @dfn{name} and
8368 a @dfn{select method}.  To take the latter first, a select method is a
8369 list where the first element says what backend to use (e.g. @code{nntp},
8370 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
8371 name}.  There may be additional elements in the select method, where the
8372 value may have special meaning for the backend in question.
8373
8374 One could say that a select method defines a @dfn{virtual server}---so
8375 we do just that (@pxref{The Server Buffer}).
8376
8377 The @dfn{name} of the group is the name the backend will recognize the
8378 group as.
8379
8380 For instance, the group @samp{soc.motss} on the @sc{nntp} server
8381 @samp{some.where.edu} will have the name @samp{soc.motss} and select
8382 method @code{(nntp "some.where.edu")}.  Gnus will call this group
8383 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
8384 backend just knows this group as @samp{soc.motss}.
8385
8386 The different methods all have their peculiarities, of course.
8387
8388 @menu
8389 * The Server Buffer::     Making and editing virtual servers.
8390 * Getting News::          Reading USENET news with Gnus.
8391 * Getting Mail::          Reading your personal mail with Gnus.
8392 * Other Sources::         Reading directories, files, SOUP packets.
8393 * Combined Groups::       Combining groups into one group.
8394 * Gnus Unplugged::        Reading news and mail offline.
8395 @end menu
8396
8397
8398 @node The Server Buffer
8399 @section The Server Buffer
8400
8401 Traditionally, a @dfn{server} is a machine or a piece of software that
8402 one connects to, and then requests information from.  Gnus does not
8403 connect directly to any real servers, but does all transactions through
8404 one backend or other.  But that's just putting one layer more between
8405 the actual media and Gnus, so we might just as well say that each
8406 backend represents a virtual server.
8407
8408 For instance, the @code{nntp} backend may be used to connect to several
8409 different actual @sc{nntp} servers, or, perhaps, to many different ports
8410 on the same actual @sc{nntp} server.  You tell Gnus which backend to
8411 use, and what parameters to set by specifying a @dfn{select method}.
8412
8413 These select method specifications can sometimes become quite
8414 complicated---say, for instance, that you want to read from the
8415 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
8416 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
8417 Anyways, if you had to specify that for each group that used this
8418 server, that would be too much work, so Gnus offers a way of naming
8419 select methods, which is what you do in the server buffer.
8420
8421 To enter the server buffer, use the @kbd{^}
8422 (@code{gnus-group-enter-server-mode}) command in the group buffer.
8423
8424 @menu
8425 * Server Buffer Format::      You can customize the look of this buffer.
8426 * Server Commands::           Commands to manipulate servers.
8427 * Example Methods::           Examples server specifications.
8428 * Creating a Virtual Server:: An example session.
8429 * Server Variables::          Which variables to set.
8430 * Servers and Methods::       You can use server names as select methods.
8431 * Unavailable Servers::       Some servers you try to contact may be down.
8432 @end menu
8433
8434 @vindex gnus-server-mode-hook
8435 @code{gnus-server-mode-hook} is run when creating the server buffer.
8436
8437
8438 @node Server Buffer Format
8439 @subsection Server Buffer Format
8440 @cindex server buffer format
8441
8442 @vindex gnus-server-line-format
8443 You can change the look of the server buffer lines by changing the
8444 @code{gnus-server-line-format} variable.  This is a @code{format}-like
8445 variable, with some simple extensions:
8446
8447 @table @samp
8448
8449 @item h 
8450 How the news is fetched---the backend name.
8451
8452 @item n
8453 The name of this server.
8454
8455 @item w
8456 Where the news is to be fetched from---the address.
8457
8458 @item s
8459 The opened/closed/denied status of the server.
8460 @end table
8461
8462 @vindex gnus-server-mode-line-format
8463 The mode line can also be customized by using the
8464 @code{gnus-server-mode-line-format} variable.  The following specs are
8465 understood: 
8466
8467 @table @samp
8468 @item S
8469 Server name.
8470
8471 @item M
8472 Server method.
8473 @end table
8474
8475 Also @pxref{Formatting Variables}.
8476
8477
8478 @node Server Commands
8479 @subsection Server Commands
8480 @cindex server commands
8481
8482 @table @kbd
8483
8484 @item a
8485 @kindex a (Server)
8486 @findex gnus-server-add-server
8487 Add a new server (@code{gnus-server-add-server}).
8488
8489 @item e
8490 @kindex e (Server)
8491 @findex gnus-server-edit-server
8492 Edit a server (@code{gnus-server-edit-server}).
8493
8494 @item SPACE
8495 @kindex SPACE (Server)
8496 @findex gnus-server-read-server
8497 Browse the current server (@code{gnus-server-read-server}).
8498
8499 @item q
8500 @kindex q (Server)
8501 @findex gnus-server-exit
8502 Return to the group buffer (@code{gnus-server-exit}).
8503
8504 @item k
8505 @kindex k (Server)
8506 @findex gnus-server-kill-server
8507 Kill the current server (@code{gnus-server-kill-server}).
8508
8509 @item y
8510 @kindex y (Server)
8511 @findex gnus-server-yank-server
8512 Yank the previously killed server (@code{gnus-server-yank-server}).
8513
8514 @item c
8515 @kindex c (Server)
8516 @findex gnus-server-copy-server
8517 Copy the current server (@code{gnus-server-copy-server}).
8518
8519 @item l
8520 @kindex l (Server)
8521 @findex gnus-server-list-servers
8522 List all servers (@code{gnus-server-list-servers}).
8523
8524 @item s
8525 @kindex s (Server)
8526 @findex gnus-server-scan-server
8527 Request that the server scan its sources for new articles
8528 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
8529 servers. 
8530
8531 @item g
8532 @kindex g (Server)
8533 @findex gnus-server-regenerate-server
8534 Request that the server regenerate all its data structures
8535 (@code{gnus-server-regenerate-server}).  This can be useful if you have
8536 a mail backend that has gotten out of synch.
8537
8538 @end table
8539
8540
8541 @node Example Methods
8542 @subsection Example Methods
8543
8544 Most select methods are pretty simple and self-explanatory: 
8545
8546 @lisp
8547 (nntp "news.funet.fi")
8548 @end lisp
8549
8550 Reading directly from the spool is even simpler:
8551
8552 @lisp
8553 (nnspool "")
8554 @end lisp
8555
8556 As you can see, the first element in a select method is the name of the
8557 backend, and the second is the @dfn{address}, or @dfn{name}, if you
8558 will. 
8559
8560 After these two elements, there may be an arbitrary number of
8561 @var{(variable form)} pairs.
8562
8563 To go back to the first example---imagine that you want to read from
8564 port 15 on that machine.  This is what the select method should
8565 look like then:
8566
8567 @lisp
8568 (nntp "news.funet.fi" (nntp-port-number 15))
8569 @end lisp
8570
8571 You should read the documentation to each backend to find out what
8572 variables are relevant, but here's an @code{nnmh} example:
8573
8574 @code{nnmh} is a mail backend that reads a spool-like structure.  Say
8575 you have two structures that you wish to access: One is your private
8576 mail spool, and the other is a public one.  Here's the possible spec for
8577 your private mail:
8578
8579 @lisp
8580 (nnmh "private" (nnmh-directory "~/private/mail/"))
8581 @end lisp
8582
8583 (This server is then called @samp{private}, but you may have guessed
8584 that.)
8585
8586 Here's the method for a public spool:
8587
8588 @lisp
8589 (nnmh "public" 
8590       (nnmh-directory "/usr/information/spool/") 
8591       (nnmh-get-new-mail nil))
8592 @end lisp
8593
8594 If you are behind a firewall and only have access to the @sc{nntp}
8595 server from the firewall machine, you can instruct Gnus to @code{rlogin}
8596 on the firewall machine and telnet from there to the @sc{nntp} server.
8597 Doing this can be rather fiddly, but your virtual server definition
8598 should probably look something like this:
8599
8600 @lisp
8601 (nntp "firewall"
8602       (nntp-address "the.firewall.machine")
8603       (nntp-open-connection-function nntp-open-rlogin)
8604       (nntp-end-of-line "\n")
8605       (nntp-rlogin-parameters
8606        ("telnet" "the.real.nntp.host" "nntp")))
8607 @end lisp
8608
8609
8610
8611 @node Creating a Virtual Server
8612 @subsection Creating a Virtual Server
8613
8614 If you're saving lots of articles in the cache by using persistent
8615 articles, you may want to create a virtual server to read the cache.
8616
8617 First you need to add a new server.  The @kbd{a} command does that.  It
8618 would probably be best to use @code{nnspool} to read the cache.  You
8619 could also use @code{nnml} or @code{nnmh}, though.
8620
8621 Type @kbd{a nnspool RET cache RET}.
8622
8623 You should now have a brand new @code{nnspool} virtual server called
8624 @samp{cache}.  You now need to edit it to have the right definitions.
8625 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
8626 will contain the following:
8627
8628 @lisp
8629 (nnspool "cache")
8630 @end lisp
8631
8632 Change that to:
8633
8634 @lisp
8635 (nnspool "cache"
8636          (nnspool-spool-directory "~/News/cache/")
8637          (nnspool-nov-directory "~/News/cache/")
8638          (nnspool-active-file "~/News/cache/active"))
8639 @end lisp
8640
8641 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
8642 @kbd{RET} over this virtual server, you should be entered into a browse
8643 buffer, and you should be able to enter any of the groups displayed.
8644
8645
8646 @node Server Variables
8647 @subsection Server Variables
8648
8649 One sticky point when defining variables (both on backends and in Emacs
8650 in general) is that some variables are typically initialized from other
8651 variables when the definition of the variables is being loaded.  If you
8652 change the "base" variable after the variables have been loaded, you
8653 won't change the "derived" variables.
8654
8655 This typically affects directory and file variables.  For instance,
8656 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
8657 directory variables are initialized from that variable, so
8658 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
8659 new virtual @code{nnml} server, it will @emph{not} suffice to set just
8660 @code{nnml-directory}---you have to explicitly set all the file
8661 variables to be what you want them to be.  For a complete list of
8662 variables for each backend, see each backend's section later in this
8663 manual, but here's an example @code{nnml} definition:
8664
8665 @lisp
8666 (nnml "public" 
8667       (nnml-directory "~/my-mail/")
8668       (nnml-active-file "~/my-mail/active")
8669       (nnml-newsgroups-file "~/my-mail/newsgroups"))
8670 @end lisp
8671
8672
8673 @node Servers and Methods
8674 @subsection Servers and Methods
8675
8676 Wherever you would normally use a select method
8677 (e.g. @code{gnus-secondary-select-method}, in the group select method,
8678 when browsing a foreign server) you can use a virtual server name
8679 instead.  This could potentially save lots of typing.  And it's nice all
8680 over.
8681
8682
8683 @node Unavailable Servers
8684 @subsection Unavailable Servers
8685
8686 If a server seems to be unreachable, Gnus will mark that server as
8687 @code{denied}.  That means that any subsequent attempt to make contact
8688 with that server will just be ignored.  ``It can't be opened,'' Gnus
8689 will tell you, without making the least effort to see whether that is
8690 actually the case or not.
8691
8692 That might seem quite naughty, but it does make sense most of the time.
8693 Let's say you have 10 groups subscribed to on server
8694 @samp{nephelococcygia.com}.  This server is located somewhere quite far
8695 away from you and the machine is quite slow, so it takes 1 minute just
8696 to find out that it refuses connection to you today.  If Gnus were to
8697 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
8698 attempt to do that.  Once it has gotten a single ``connection refused'',
8699 it will regard that server as ``down''.
8700
8701 So, what happens if the machine was only feeling unwell temporarily?
8702 How do you test to see whether the machine has come up again?
8703
8704 You jump to the server buffer (@pxref{The Server Buffer}) and poke it
8705 with the following commands:
8706
8707 @table @kbd
8708
8709 @item O
8710 @kindex O (Server)
8711 @findex gnus-server-open-server
8712 Try to establish connection to the server on the current line
8713 (@code{gnus-server-open-server}).
8714
8715 @item C
8716 @kindex C (Server)
8717 @findex gnus-server-close-server
8718 Close the connection (if any) to the server
8719 (@code{gnus-server-close-server}).
8720
8721 @item D
8722 @kindex D (Server)
8723 @findex gnus-server-deny-server
8724 Mark the current server as unreachable
8725 (@code{gnus-server-deny-server}). 
8726
8727 @item M-o
8728 @kindex M-o (Server)
8729 @findex gnus-server-open-all-servers
8730 Open the connections to all servers in the buffer
8731 (@code{gnus-server-open-all-servers}). 
8732
8733 @item M-c
8734 @kindex M-c (Server)
8735 @findex gnus-server-close-all-servers
8736 Close the connections to all servers in the buffer
8737 (@code{gnus-server-close-all-servers}). 
8738
8739 @item R
8740 @kindex R (Server)
8741 @findex gnus-server-remove-denials
8742 Remove all marks to whether Gnus was denied connection from any servers
8743 (@code{gnus-server-remove-denials}). 
8744
8745 @end table
8746
8747
8748 @node Getting News
8749 @section Getting News
8750 @cindex reading news
8751 @cindex news backends
8752
8753 A newsreader is normally used for reading news.  Gnus currently provides
8754 only two methods of getting news---it can read from an @sc{nntp} server,
8755 or it can read from a local spool.
8756
8757 @menu
8758 * NNTP::               Reading news from an @sc{nntp} server.
8759 * News Spool::         Reading news from the local spool.
8760 @end menu
8761
8762
8763 @node NNTP
8764 @subsection @sc{nntp}
8765 @cindex nntp
8766
8767 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
8768 You just specify @code{nntp} as method and the address of the @sc{nntp}
8769 server as the, uhm, address.
8770
8771 If the @sc{nntp} server is located at a non-standard port, setting the
8772 third element of the select method to this port number should allow you
8773 to connect to the right port.  You'll have to edit the group info for
8774 that (@pxref{Foreign Groups}).
8775
8776 The name of the foreign group can be the same as a native group.  In
8777 fact, you can subscribe to the same group from as many different servers
8778 you feel like.  There will be no name collisions.
8779
8780 The following variables can be used to create a virtual @code{nntp}
8781 server: 
8782
8783 @table @code
8784
8785 @item nntp-server-opened-hook
8786 @vindex nntp-server-opened-hook
8787 @cindex @sc{mode reader}
8788 @cindex authinfo
8789 @cindex authentification
8790 @cindex nntp authentification
8791 @findex nntp-send-authinfo
8792 @findex nntp-send-mode-reader
8793 is run after a connection has been made.  It can be used to send
8794 commands to the @sc{nntp} server after it has been contacted.  By
8795 default it sends the command @code{MODE READER} to the server with the
8796 @code{nntp-send-mode-reader} function.  This function should always be
8797 present in this hook.
8798
8799 @item nntp-authinfo-function 
8800 @vindex nntp-authinfo-function 
8801 This function will be used to send @samp{AUTHINFO} to the @sc{nntp}
8802 server.  Available functions include:
8803
8804 @table @code
8805 @item nntp-send-authinfo
8806 @findex nntp-send-authinfo
8807 This function will use your current login name as the user name and will
8808 prompt you for the password.  This is the default.
8809
8810 @item nntp-send-nosy-authinfo
8811 @findex nntp-send-nosy-authinfo
8812 This function will prompt you for both user name and password.
8813
8814 @item nntp-send-authinfo-from-file
8815 @findex nntp-send-authinfo-from-file
8816 This function will use your current login name as the user name and will
8817 read the @sc{nntp} password from @file{~/.nntp-authinfo}.
8818 @end table
8819
8820 @item nntp-server-action-alist 
8821 @vindex nntp-server-action-alist 
8822 This is a list of regexps to match on server types and actions to be
8823 taken when matches are made.  For instance, if you want Gnus to beep
8824 every time you connect to innd, you could say something like:
8825
8826 @lisp
8827 (setq nntp-server-action-alist
8828       '(("innd" (ding))))
8829 @end lisp
8830
8831 You probably don't want to do that, though.
8832
8833 The default value is
8834
8835 @lisp
8836 '(("nntpd 1\\.5\\.11t" 
8837    (remove-hook 'nntp-server-opened-hook 'nntp-send-mode-reader)))
8838 @end lisp
8839
8840 This ensures that Gnus doesn't send the @code{MODE READER} command to
8841 nntpd 1.5.11t, since that command chokes that server, I've been told. 
8842
8843 @item nntp-maximum-request
8844 @vindex nntp-maximum-request
8845 If the @sc{nntp} server doesn't support @sc{nov} headers, this backend
8846 will collect headers by sending a series of @code{head} commands.  To
8847 speed things up, the backend sends lots of these commands without
8848 waiting for reply, and then reads all the replies.  This is controlled
8849 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
8850 your network is buggy, you should set this to 1.
8851
8852 @item nntp-connection-timeout
8853 @vindex nntp-connection-timeout
8854 If you have lots of foreign @code{nntp} groups that you connect to
8855 regularly, you're sure to have problems with @sc{nntp} servers not
8856 responding properly, or being too loaded to reply within reasonable
8857 time.  This is can lead to awkward problems, which can be helped
8858 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
8859 that says how many seconds the @code{nntp} backend should wait for a
8860 connection before giving up.  If it is @code{nil}, which is the default,
8861 no timeouts are done.
8862
8863 @c @item nntp-command-timeout
8864 @c @vindex nntp-command-timeout
8865 @c @cindex PPP connections
8866 @c @cindex dynamic IP addresses
8867 @c If you're running Gnus on a machine that has a dynamically assigned
8868 @c address, Gnus may become confused.  If the address of your machine
8869 @c changes after connecting to the @sc{nntp} server, Gnus will simply sit
8870 @c waiting forever for replies from the server.  To help with this
8871 @c unfortunate problem, you can set this command to a number.  Gnus will
8872 @c then, if it sits waiting for a reply from the server longer than that
8873 @c number of seconds, shut down the connection, start a new one, and resend
8874 @c the command.  This should hopefully be transparent to the user.  A
8875 @c likely number is 30 seconds.
8876 @c 
8877 @c @item nntp-retry-on-break
8878 @c @vindex nntp-retry-on-break
8879 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
8880 @c hangs.  This will have much the same effect as the command timeout
8881 @c described above.
8882
8883 @item nntp-server-hook
8884 @vindex nntp-server-hook
8885 This hook is run as the last step when connecting to an @sc{nntp}
8886 server.
8887
8888 @findex nntp-open-rlogin
8889 @findex nntp-open-telnet
8890 @findex nntp-open-network-stream
8891 @item nntp-open-connection-function
8892 @vindex nntp-open-connection-function
8893 This function is used to connect to the remote system.  Three pre-made
8894 functions are @code{nntp-open-network-stream}, which is the default, and
8895 simply connects to some port or other on the remote system.  The other
8896 two are @code{nntp-open-rlogin}, which does an @samp{rlogin} on the
8897 remote system, and then does a @samp{telnet} to the @sc{nntp} server
8898 available there, and @code{nntp-open-telnet}, which does a @samp{telnet}
8899 to the remote system and then another @samp{telnet} to get to the
8900 @sc{nntp} server.
8901
8902 @code{nntp-open-rlogin}-related variables:
8903
8904 @table @code
8905
8906 @item nntp-rlogin-program 
8907 @vindex nntp-rlogin-program 
8908 Program used to log in on remote machines.  The default is @samp{rsh},
8909 but @samp{ssh} is a popular alternative.
8910
8911 @item nntp-rlogin-parameters
8912 @vindex nntp-rlogin-parameters
8913 This list will be used as the parameter list given to @code{rsh}.
8914
8915 @item nntp-rlogin-user-name
8916 @vindex nntp-rlogin-user-name
8917 User name on the remote system.
8918
8919 @end table
8920
8921 @code{nntp-open-telnet}-related variables:
8922
8923 @table @code
8924 @item nntp-telnet-command
8925 @vindex nntp-telnet-command
8926 Command used to start @code{telnet}.
8927
8928 @item nntp-telnet-switches
8929 @vindex nntp-telnet-switches
8930 List of strings to be used as the switches to the @code{telnet} command.
8931
8932 @item nntp-telnet-user-name
8933 @vindex nntp-telnet-user-name
8934 User name for log in on the remote system.
8935
8936 @item nntp-telnet-passwd
8937 @vindex nntp-telnet-passwd
8938 Password to use when logging in.
8939
8940 @item nntp-telnet-parameters
8941 @vindex nntp-telnet-parameters
8942 A list of strings executed as a command after logging in
8943 via @code{telnet}.
8944
8945 @end table
8946
8947 @item nntp-end-of-line
8948 @vindex nntp-end-of-line
8949 String to use as end-of-line marker when talking to the @sc{nntp}
8950 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
8951 using @code{rlogin} to talk to the server.
8952
8953 @item nntp-rlogin-user-name
8954 @vindex nntp-rlogin-user-name
8955 User name on the remote system when using the @code{rlogin} connect
8956 function. 
8957
8958 @item nntp-address
8959 @vindex nntp-address
8960 The address of the remote system running the @sc{nntp} server.
8961
8962 @item nntp-port-number
8963 @vindex nntp-port-number
8964 Port number to connect to when using the @code{nntp-open-network-stream}
8965 connect function.
8966
8967 @item nntp-buggy-select
8968 @vindex nntp-buggy-select
8969 Set this to non-@code{nil} if your select routine is buggy.
8970
8971 @item nntp-nov-is-evil 
8972 @vindex nntp-nov-is-evil 
8973 If the @sc{nntp} server does not support @sc{nov}, you could set this
8974 variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
8975 can be used.
8976
8977 @item nntp-xover-commands
8978 @vindex nntp-xover-commands
8979 @cindex nov
8980 @cindex XOVER
8981 List of strings used as commands to fetch @sc{nov} lines from a
8982 server.  The default value of this variable is @code{("XOVER"
8983 "XOVERVIEW")}. 
8984
8985 @item nntp-nov-gap
8986 @vindex nntp-nov-gap
8987 @code{nntp} normally sends just one big request for @sc{nov} lines to
8988 the server.  The server responds with one huge list of lines.  However,
8989 if you have read articles 2-5000 in the group, and only want to read
8990 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
8991 lines that you will not need.  This variable says how
8992 big a gap between two consecutive articles is allowed to be before the
8993 @code{XOVER} request is split into several request.  Note that if your
8994 network is fast, setting this variable to a really small number means
8995 that fetching will probably be slower.  If this variable is @code{nil},
8996 @code{nntp} will never split requests.  The default is 5.
8997
8998 @item nntp-prepare-server-hook
8999 @vindex nntp-prepare-server-hook
9000 A hook run before attempting to connect to an @sc{nntp} server.
9001
9002 @item nntp-warn-about-losing-connection
9003 @vindex nntp-warn-about-losing-connection
9004 If this variable is non-@code{nil}, some noise will be made when a
9005 server closes connection.
9006
9007 @end table
9008
9009
9010 @node News Spool
9011 @subsection News Spool
9012 @cindex nnspool
9013 @cindex news spool
9014
9015 Subscribing to a foreign group from the local spool is extremely easy,
9016 and might be useful, for instance, to speed up reading groups that
9017 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
9018 instance. 
9019
9020 Anyways, you just specify @code{nnspool} as the method and @code{""} (or
9021 anything else) as the address.
9022
9023 If you have access to a local spool, you should probably use that as the
9024 native select method (@pxref{Finding the News}).  It is normally faster
9025 than using an @code{nntp} select method, but might not be.  It depends.
9026 You just have to try to find out what's best at your site.
9027
9028 @table @code
9029
9030 @item nnspool-inews-program
9031 @vindex nnspool-inews-program
9032 Program used to post an article.
9033
9034 @item nnspool-inews-switches
9035 @vindex nnspool-inews-switches
9036 Parameters given to the inews program when posting an article. 
9037
9038 @item nnspool-spool-directory
9039 @vindex nnspool-spool-directory
9040 Where @code{nnspool} looks for the articles.  This is normally
9041 @file{/usr/spool/news/}.
9042
9043 @item nnspool-nov-directory 
9044 @vindex nnspool-nov-directory 
9045 Where @code{nnspool} will look for @sc{nov} files.  This is normally
9046 @file{/usr/spool/news/over.view/}.
9047
9048 @item nnspool-lib-dir
9049 @vindex nnspool-lib-dir
9050 Where the news lib dir is (@file{/usr/lib/news/} by default).
9051
9052 @item nnspool-active-file
9053 @vindex nnspool-active-file
9054 The path to the active file.
9055
9056 @item nnspool-newsgroups-file
9057 @vindex nnspool-newsgroups-file
9058 The path to the group descriptions file.
9059
9060 @item nnspool-history-file
9061 @vindex nnspool-history-file
9062 The path to the news history file.
9063
9064 @item nnspool-active-times-file
9065 @vindex nnspool-active-times-file
9066 The path to the active date file.
9067
9068 @item nnspool-nov-is-evil
9069 @vindex nnspool-nov-is-evil
9070 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
9071 that it finds.
9072
9073 @item nnspool-sift-nov-with-sed
9074 @vindex nnspool-sift-nov-with-sed
9075 @cindex sed
9076 If non-@code{nil}, which is the default, use @code{sed} to get the
9077 relevant portion from the overview file.  If nil, @code{nnspool} will
9078 load the entire file into a buffer and process it there.
9079
9080 @end table
9081
9082
9083 @node Getting Mail
9084 @section Getting Mail
9085 @cindex reading mail
9086 @cindex mail
9087
9088 Reading mail with a newsreader---isn't that just plain WeIrD? But of
9089 course.
9090
9091 @menu
9092 * Getting Started Reading Mail:: A simple cookbook example.
9093 * Splitting Mail::               How to create mail groups.
9094 * Mail Backend Variables::       Variables for customizing mail handling.
9095 * Fancy Mail Splitting::         Gnus can do hairy splitting of incoming mail.
9096 * Mail and Procmail::            Reading mail groups that procmail create.
9097 * Incorporating Old Mail::       What about the old mail you have?
9098 * Expiring Mail::                Getting rid of unwanted mail.
9099 * Washing Mail::                 Removing gruft from the mail you get.
9100 * Duplicates::                   Dealing with duplicated mail.
9101 * Not Reading Mail::             Using mail backends for reading other files.
9102 * Choosing a Mail Backend::      Gnus can read a variety of mail formats.
9103 @end menu
9104
9105
9106 @node Getting Started Reading Mail
9107 @subsection Getting Started Reading Mail
9108
9109 It's quite easy to use Gnus to read your new mail.  You just plonk the
9110 mail backend of your choice into @code{gnus-secondary-select-methods},
9111 and things will happen automatically.
9112
9113 For instance, if you want to use @code{nnml} (which is a "one file per
9114 mail" backend), you could put the following in your @file{.gnus} file:
9115
9116 @lisp
9117 (setq gnus-secondary-select-methods
9118       '((nnml "private")))
9119 @end lisp
9120
9121 Now, the next time you start Gnus, this backend will be queried for new
9122 articles, and it will move all the messages in your spool file to its
9123 directory, which is @code{~/Mail/} by default.  The new group that will
9124 be created (@samp{mail.misc}) will be subscribed, and you can read it
9125 like any other group.
9126
9127 You will probably want to split the mail into several groups, though:
9128
9129 @lisp
9130 (setq nnmail-split-methods
9131       '(("junk" "^From:.*Lars Ingebrigtsen")
9132         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
9133         ("other" "")))
9134 @end lisp
9135
9136 This will result in three new @code{nnml} mail groups being created:
9137 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
9138 mail that doesn't fit into the first two groups will be placed in the
9139 last group.
9140
9141 This should be sufficient for reading mail with Gnus.  You might want to
9142 give the other sections in this part of the manual a perusal, though.
9143 Especially @pxref{Choosing a Mail Backend} and @pxref{Expiring Mail}. 
9144
9145
9146 @node Splitting Mail
9147 @subsection Splitting Mail
9148 @cindex splitting mail
9149 @cindex mail splitting
9150
9151 @vindex nnmail-split-methods
9152 The @code{nnmail-split-methods} variable says how the incoming mail is
9153 to be split into groups.
9154
9155 @lisp
9156 (setq nnmail-split-methods
9157   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
9158     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
9159     ("mail.other" "")))
9160 @end lisp
9161
9162 This variable is a list of lists, where the first element of each of
9163 these lists is the name of the mail group (they do not have to be called
9164 something beginning with @samp{mail}, by the way), and the second
9165 element is a regular expression used on the header of each mail to
9166 determine if it belongs in this mail group.  The first string may
9167 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
9168 insert sub-expressions from the matched text.  For instance:
9169
9170 @lisp
9171 ("list.\\1" "From:.*\\(.*\\)-list@@majordomo.com")
9172 @end lisp
9173
9174 If the first element is the special symbol @code{junk}, then messages
9175 that match the regexp will disappear into the aether.  Use with
9176 extreme caution. 
9177
9178 The second element can also be a function.  In that case, it will be
9179 called narrowed to the headers with the first element of the rule as the
9180 argument.  It should return a non-@code{nil} value if it thinks that the
9181 mail belongs in that group.
9182
9183 The last of these groups should always be a general one, and the regular
9184 expression should @emph{always} be @samp{} so that it matches any mails
9185 that haven't been matched by any of the other regexps.  (These rules are
9186 processed from the beginning of the alist toward the end.  The first
9187 rule to make a match will "win", unless you have crossposting enabled.
9188 In that case, all matching rules will "win".)
9189
9190 If you like to tinker with this yourself, you can set this variable to a
9191 function of your choice.  This function will be called without any
9192 arguments in a buffer narrowed to the headers of an incoming mail
9193 message.  The function should return a list of group names that it
9194 thinks should carry this mail message.
9195
9196 Note that the mail backends are free to maul the poor, innocent,
9197 incoming headers all they want to.  They all add @code{Lines} headers;
9198 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
9199 @code{From<SPACE>} line to something else.
9200
9201 @vindex nnmail-crosspost
9202 The mail backends all support cross-posting.  If several regexps match,
9203 the mail will be ``cross-posted'' to all those groups.
9204 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
9205 that no articles are crossposted to the general (@samp{}) group.
9206
9207 @vindex nnmail-crosspost-link-function
9208 @cindex crosspost
9209 @cindex links
9210 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
9211 the crossposted articles.  However, not all file systems support hard
9212 links.  If that's the case for you, set
9213 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
9214 variable is @code{add-name-to-file} by default.)  
9215
9216 @kindex M-x nnmail-split-history
9217 @kindex nnmail-split-history
9218 If you wish to see where the previous mail split put the messages, you
9219 can use the @kbd{M-x nnmail-split-history} command.
9220
9221 Gnus gives you all the opportunity you could possibly want for shooting
9222 yourself in the foot.  Let's say you create a group that will contain
9223 all the mail you get from your boss.  And then you accidentally
9224 unsubscribe from the group.  Gnus will still put all the mail from your
9225 boss in the unsubscribed group, and so, when your boss mails you ``Have
9226 that report ready by Monday or you're fired!'', you'll never see it and,
9227 come Tuesday, you'll still believe that you're gainfully employed while
9228 you really should be out collecting empty bottles to save up for next
9229 month's rent money.
9230
9231
9232 @node Mail Backend Variables
9233 @subsection Mail Backend Variables
9234
9235 These variables are (for the most part) pertinent to all the various
9236 mail backends.
9237
9238 @table @code
9239 @vindex nnmail-read-incoming-hook
9240 @item nnmail-read-incoming-hook
9241 The mail backends all call this hook after reading new mail.  You can
9242 use this hook to notify any mail watch programs, if you want to.
9243
9244 @vindex nnmail-spool-file
9245 @item nnmail-spool-file
9246 @cindex POP mail
9247 @cindex MAILHOST
9248 @cindex movemail
9249 @vindex nnmail-pop-password
9250 @vindex nnmail-pop-password-required
9251 The backends will look for new mail in this file.  If this variable is
9252 @code{nil}, the mail backends will never attempt to fetch mail by
9253 themselves.  If you are using a POP mail server and your name is
9254 @samp{larsi}, you should set this variable to @samp{po:larsi}.  If
9255 your name is not @samp{larsi}, you should probably modify that
9256 slightly, but you may have guessed that already, you smart & handsome
9257 devil!  You can also set this variable to @code{pop}, and Gnus will try
9258 to figure out the POP mail string by itself.  In any case, Gnus will
9259 call @code{movemail} which will contact the POP server named in the
9260 @code{MAILHOST} environment variable.  If the POP server needs a
9261 password, you can either set @code{nnmail-pop-password-required} to
9262 @code{t} and be prompted for the password, or set
9263 @code{nnmail-pop-password} to the password itself.
9264
9265 @code{nnmail-spool-file} can also be a list of mailboxes.
9266
9267 Your Emacs has to have been configured with @samp{--with-pop} before
9268 compilation.  This is the default, but some installations have it
9269 switched off.
9270
9271 When you use a mail backend, Gnus will slurp all your mail from your
9272 inbox and plonk it down in your home directory.  Gnus doesn't move any
9273 mail if you're not using a mail backend---you have to do a lot of magic
9274 invocations first.  At the time when you have finished drawing the
9275 pentagram, lightened the candles, and sacrificed the goat, you really
9276 shouldn't be too surprised when Gnus moves your mail.
9277
9278 @vindex nnmail-use-procmail
9279 @vindex nnmail-procmail-suffix
9280 @item nnmail-use-procmail
9281 If non-@code{nil}, the mail backends will look in
9282 @code{nnmail-procmail-directory} for incoming mail.  All the files in
9283 that directory that have names ending in @code{nnmail-procmail-suffix}
9284 will be considered incoming mailboxes, and will be searched for new
9285 mail.
9286
9287 @vindex nnmail-crash-box
9288 @item nnmail-crash-box
9289 When a mail backend reads a spool file, mail is first moved to this
9290 file, which is @file{~/.gnus-crash-box} by default.  If this file
9291 already exists, it will always be read (and incorporated) before any
9292 other spool files.
9293
9294 @vindex nnmail-prepare-incoming-hook
9295 @item nnmail-prepare-incoming-hook
9296 This is run in a buffer that holds all the new incoming mail, and can be
9297 used for, well, anything, really.
9298
9299 @vindex nnmail-split-hook
9300 @item nnmail-split-hook
9301 @findex article-decode-rfc1522
9302 @findex RFC1522 decoding
9303 Hook run in the buffer where the mail headers of each message is kept
9304 just before the splitting based on these headers is done.  The hook is
9305 free to modify the buffer contents in any way it sees fit---the buffer
9306 is discarded after the splitting has been done, and no changes performed
9307 in the buffer will show up in any files.  @code{gnus-article-decode-rfc1522}
9308 is one likely function to add to this hook.
9309
9310 @vindex nnmail-pre-get-new-mail-hook
9311 @vindex nnmail-post-get-new-mail-hook
9312 @item nnmail-pre-get-new-mail-hook
9313 @itemx nnmail-post-get-new-mail-hook
9314 These are two useful hooks executed when treating new incoming
9315 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
9316 starting to handle the new mail) and
9317 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
9318 is done).  Here's and example of using these two hooks to change the
9319 default file modes the new mail files get:
9320
9321 @lisp
9322 (add-hook 'gnus-pre-get-new-mail-hook 
9323           (lambda () (set-default-file-modes 511)))
9324
9325 (add-hook 'gnus-post-get-new-mail-hook 
9326           (lambda () (set-default-file-modes 551)))
9327 @end lisp
9328
9329 @item nnmail-tmp-directory
9330 @vindex nnmail-tmp-directory
9331 This variable says where to move incoming mail to -- while processing
9332 it.  This is usually done in the same directory that the mail backend
9333 inhabits (e.g., @file{~/Mail/}), but if this variable is non-@code{nil},
9334 it will be used instead.
9335
9336 @item nnmail-movemail-program
9337 @vindex nnmail-movemail-program
9338 This program is executed to move mail from the user's inbox to her home
9339 directory.  The default is @samp{movemail}.
9340
9341 This can also be a function.  In that case, the function will be called
9342 with two parameters -- the name of the inbox, and the file to be moved
9343 to.
9344
9345 @item nnmail-delete-incoming
9346 @vindex nnmail-delete-incoming
9347 @cindex incoming mail files
9348 @cindex deleting incoming files
9349 If non-@code{nil}, the mail backends will delete the temporary incoming
9350 file after splitting mail into the proper groups.  This is @code{t} by
9351 default.
9352
9353 @c This is @code{nil} by
9354 @c default for reasons of security.
9355
9356 @c Since Red Gnus is an alpha release, it is to be expected to lose mail.
9357 (No Gnus release since (ding) Gnus 0.10 (or something like that) have
9358 lost mail, I think, but that's not the point.  (Except certain versions
9359 of Red Gnus.))  By not deleting the Incoming* files, one can be sure not
9360 to lose mail -- if Gnus totally whacks out, one can always recover what
9361 was lost.
9362
9363 You may delete the @file{Incoming*} files at will.
9364
9365 @item nnmail-use-long-file-names
9366 @vindex nnmail-use-long-file-names
9367 If non-@code{nil}, the mail backends will use long file and directory
9368 names.  Groups like @samp{mail.misc} will end up in directories
9369 (assuming use of @code{nnml} backend) or files (assuming use of
9370 @code{nnfolder} backend) like @file{mail.misc}.  If it is @code{nil},
9371 the same group will end up in @file{mail/misc}.
9372
9373 @item nnmail-delete-file-function
9374 @vindex nnmail-delete-file-function
9375 @findex delete-file
9376 Function called to delete files.  It is @code{delete-file} by default. 
9377
9378 @item nnmail-cache-accepted-message-ids
9379 @vindex nnmail-cache-accepted-message-ids
9380 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
9381 the backend (via @code{Gcc}, for instance) into the mail duplication
9382 discovery cache.  The default is @code{nil}.
9383
9384 @end table
9385
9386
9387 @node Fancy Mail Splitting
9388 @subsection Fancy Mail Splitting
9389 @cindex mail splitting
9390 @cindex fancy mail splitting
9391
9392 @vindex nnmail-split-fancy
9393 @findex nnmail-split-fancy
9394 If the rather simple, standard method for specifying how to split mail
9395 doesn't allow you to do what you want, you can set
9396 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
9397 play with the @code{nnmail-split-fancy} variable.
9398
9399 Let's look at an example value of this variable first:
9400
9401 @lisp
9402 ;; Messages from the mailer daemon are not crossposted to any of
9403 ;; the ordinary groups.  Warnings are put in a separate group
9404 ;; from real errors.
9405 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
9406                    "mail.misc"))
9407    ;; Non-error messages are crossposted to all relevant
9408    ;; groups, but we don't crosspost between the group for the
9409    ;; (ding) list and the group for other (ding) related mail.
9410    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
9411          ("subject" "ding" "ding.misc"))
9412       ;; Other mailing lists...
9413       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
9414       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
9415       ;; People...
9416       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
9417    ;; Unmatched mail goes to the catch all group.
9418    "misc.misc")
9419 @end lisp
9420
9421 This variable has the format of a @dfn{split}.  A split is a (possibly)
9422 recursive structure where each split may contain other splits.  Here are
9423 the five possible split syntaxes:
9424
9425 @enumerate
9426
9427 @item 
9428 @samp{group}: If the split is a string, that will be taken as a group name. 
9429
9430 @item
9431 @var{(FIELD VALUE SPLIT)}: If the split is a list, the first element of
9432 which is a string, then store the message as specified by SPLIT, if
9433 header FIELD (a regexp) contains VALUE (also a regexp).
9434
9435 @item
9436 @var{(| SPLIT...)}: If the split is a list, and the first element is
9437 @code{|} (vertical bar), then process each SPLIT until one of them
9438 matches.  A SPLIT is said to match if it will cause the mail message to
9439 be stored in one or more groups.
9440
9441 @item
9442 @var{(& SPLIT...)}: If the split is a list, and the first element is
9443 @code{&}, then process all SPLITs in the list.
9444
9445 @item 
9446 @code{junk}: If the split is the symbol @code{junk}, then don't save
9447 this message anywhere.
9448
9449 @item
9450 @var{(: function arg1 arg2 ...)}:  If the split is a list, and the first
9451 element is @code{:}, then the second element will be called as a
9452 function with @var{args} given as arguments.  The function should return
9453 a SPLIT.
9454
9455 @end enumerate
9456
9457 In these splits, @var{FIELD} must match a complete field name.
9458 @var{VALUE} must match a complete word according to the fundamental mode
9459 syntax table.  You can use @code{.*} in the regexps to match partial
9460 field names or words.  In other words, all @var{VALUE}'s are wrapped in
9461 @samp{\<} and @samp{\>} pairs.
9462
9463 @vindex nnmail-split-abbrev-alist
9464 @var{FIELD} and @var{VALUE} can also be lisp symbols, in that case they
9465 are expanded as specified by the variable
9466 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
9467 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
9468 value.
9469
9470 @vindex nnmail-split-fancy-syntax-table
9471 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
9472 when all this splitting is performed.
9473
9474 If you want to have Gnus create groups dynamically based on some
9475 information in the headers (i.e., do @code{replace-match}-like
9476 substitions in the group names), you can say things like:
9477
9478 @example
9479 (any "debian-\(\\w*\\)@@lists.debian.org" "mail.debian.\\1")
9480 @end example
9481
9482 @node Mail and Procmail
9483 @subsection Mail and Procmail
9484 @cindex procmail
9485
9486 @cindex slocal
9487 @cindex elm
9488 Many people use @code{procmail} (or some other mail filter program or
9489 external delivery agent---@code{slocal}, @code{elm}, etc) to split
9490 incoming mail into groups.  If you do that, you should set
9491 @code{nnmail-spool-file} to @code{procmail} to ensure that the mail
9492 backends never ever try to fetch mail by themselves.
9493
9494 This also means that you probably don't want to set
9495 @code{nnmail-split-methods} either, which has some, perhaps, unexpected
9496 side effects.
9497
9498 When a mail backend is queried for what groups it carries, it replies
9499 with the contents of that variable, along with any groups it has figured
9500 out that it carries by other means.  None of the backends, except
9501 @code{nnmh}, actually go out to the disk and check what groups actually
9502 exist.  (It's not trivial to distinguish between what the user thinks is
9503 a basis for a newsgroup and what is just a plain old file or directory.)
9504
9505 This means that you have to tell Gnus (and the backends) by hand what
9506 groups exist.
9507
9508 Let's take the @code{nnmh} backend as an example:
9509
9510 The folders are located in @code{nnmh-directory}, say, @file{~/Mail/}.
9511 There are three folders, @file{foo}, @file{bar} and @file{mail.baz}.
9512
9513 Go to the group buffer and type @kbd{G m}.  When prompted, answer
9514 @samp{foo} for the name and @samp{nnmh} for the method.  Repeat
9515 twice for the two other groups, @samp{bar} and @samp{mail.baz}.  Be sure
9516 to include all your mail groups.
9517
9518 That's it.  You are now set to read your mail.  An active file for this
9519 method will be created automatically.
9520
9521 @vindex nnmail-procmail-suffix
9522 @vindex nnmail-procmail-directory
9523 If you use @code{nnfolder} or any other backend that store more than a
9524 single article in each file, you should never have procmail add mails to
9525 the file that Gnus sees.  Instead, procmail should put all incoming mail
9526 in @code{nnmail-procmail-directory}.  To arrive at the file name to put
9527 the incoming mail in, append @code{nnmail-procmail-suffix} to the group
9528 name.  The mail backends will read the mail from these files.
9529
9530 @vindex nnmail-resplit-incoming
9531 When Gnus reads a file called @file{mail.misc.spool}, this mail will be
9532 put in the @code{mail.misc}, as one would expect.  However, if you want
9533 Gnus to split the mail the normal way, you could set
9534 @code{nnmail-resplit-incoming} to @code{t}.
9535
9536 @vindex nnmail-keep-last-article
9537 If you use @code{procmail} to split things directly into an @code{nnmh}
9538 directory (which you shouldn't do), you should set
9539 @code{nnmail-keep-last-article} to non-@code{nil} to prevent Gnus from
9540 ever expiring the final article (i.e., the article with the highest
9541 article number) in a mail newsgroup.  This is quite, quite important.
9542
9543 Here's an example setup:  The incoming spools are located in
9544 @file{~/incoming/} and have @samp{""} as suffixes (i.e., the incoming
9545 spool files have the same names as the equivalent groups).  The
9546 @code{nnfolder} backend is to be used as the mail interface, and the
9547 @code{nnfolder} directory is @file{~/fMail/}.
9548
9549 @lisp
9550 (setq nnfolder-directory "~/fMail/")
9551 (setq nnmail-spool-file 'procmail)
9552 (setq nnmail-procmail-directory "~/incoming/")
9553 (setq gnus-secondary-select-methods '((nnfolder "")))
9554 (setq nnmail-procmail-suffix "")
9555 @end lisp
9556
9557
9558 @node Incorporating Old Mail
9559 @subsection Incorporating Old Mail
9560
9561 Most people have lots of old mail stored in various file formats.  If
9562 you have set up Gnus to read mail using one of the spiffy Gnus mail
9563 backends, you'll probably wish to have that old mail incorporated into
9564 your mail groups.
9565
9566 Doing so can be quite easy.
9567
9568 To take an example: You're reading mail using @code{nnml}
9569 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
9570 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
9571 file filled with important, but old, mail.  You want to move it into
9572 your @code{nnml} groups.
9573
9574 Here's how:
9575
9576 @enumerate
9577 @item
9578 Go to the group buffer.
9579
9580 @item 
9581 Type `G f' and give the path to the mbox file when prompted to create an
9582 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
9583
9584 @item 
9585 Type `SPACE' to enter the newly created group.
9586
9587 @item
9588 Type `M P b' to process-mark all articles in this group's buffer
9589 (@pxref{Setting Process Marks}).
9590
9591 @item 
9592 Type `B r' to respool all the process-marked articles, and answer
9593 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
9594 @end enumerate
9595
9596 All the mail messages in the mbox file will now also be spread out over
9597 all your @code{nnml} groups.  Try entering them and check whether things
9598 have gone without a glitch.  If things look ok, you may consider
9599 deleting the mbox file, but I wouldn't do that unless I was absolutely
9600 sure that all the mail has ended up where it should be.
9601
9602 Respooling is also a handy thing to do if you're switching from one mail
9603 backend to another.  Just respool all the mail in the old mail groups
9604 using the new mail backend.
9605
9606
9607 @node Expiring Mail
9608 @subsection Expiring Mail
9609 @cindex article expiry
9610
9611 Traditional mail readers have a tendency to remove mail articles when
9612 you mark them as read, in some way.  Gnus takes a fundamentally
9613 different approach to mail reading.
9614
9615 Gnus basically considers mail just to be news that has been received in
9616 a rather peculiar manner.  It does not think that it has the power to
9617 actually change the mail, or delete any mail messages.  If you enter a
9618 mail group, and mark articles as ``read'', or kill them in some other
9619 fashion, the mail articles will still exist on the system.  I repeat:
9620 Gnus will not delete your old, read mail.  Unless you ask it to, of
9621 course.
9622
9623 To make Gnus get rid of your unwanted mail, you have to mark the
9624 articles as @dfn{expirable}.  This does not mean that the articles will
9625 disappear right away, however.  In general, a mail article will be
9626 deleted from your system if, 1) it is marked as expirable, AND 2) it is
9627 more than one week old.  If you do not mark an article as expirable, it
9628 will remain on your system until hell freezes over.  This bears
9629 repeating one more time, with some spurious capitalizations: IF you do
9630 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
9631
9632 @vindex gnus-auto-expirable-newsgroups
9633 You do not have to mark articles as expirable by hand.  Groups that
9634 match the regular expression @code{gnus-auto-expirable-newsgroups} will
9635 have all articles that you read marked as expirable automatically.  All
9636 articles marked as expirable have an @samp{E} in the first
9637 column in the summary buffer.
9638
9639 By default, if you have auto expiry switched on, Gnus will mark all the
9640 articles you read as expirable, no matter if they were read or unread
9641 before.  To avoid having articles marked as read marked as expirable
9642 automatically, you can put something like the following in your
9643 @file{.gnus} file:
9644
9645 @vindex gnus-mark-article-hook
9646 @lisp
9647 (remove-hook 'gnus-mark-article-hook                                
9648              'gnus-summary-mark-read-and-unread-as-read)            
9649 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
9650 @end lisp
9651
9652 Note that making a group auto-expirable doesn't mean that all read
9653 articles are expired---only the articles marked as expirable
9654 will be expired.  Also note that using the @kbd{d} command won't make
9655 groups expirable---only semi-automatic marking of articles as read will
9656 mark the articles as expirable in auto-expirable groups.
9657
9658 Let's say you subscribe to a couple of mailing lists, and you want the
9659 articles you have read to disappear after a while:
9660
9661 @lisp
9662 (setq gnus-auto-expirable-newsgroups 
9663       "mail.nonsense-list\\|mail.nice-list")
9664 @end lisp
9665
9666 Another way to have auto-expiry happen is to have the element
9667 @code{auto-expire} in the group parameters of the group. 
9668
9669 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
9670 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
9671 don't really mix very well.  
9672
9673 @vindex nnmail-expiry-wait
9674 The @code{nnmail-expiry-wait} variable supplies the default time an
9675 expirable article has to live.  Gnus starts counting days from when the
9676 message @emph{arrived}, not from when it was sent.  The default is seven
9677 days.
9678
9679 Gnus also supplies a function that lets you fine-tune how long articles
9680 are to live, based on what group they are in.  Let's say you want to
9681 have one month expiry period in the @samp{mail.private} group, a one day
9682 expiry period in the @samp{mail.junk} group, and a six day expiry period
9683 everywhere else:
9684
9685 @vindex nnmail-expiry-wait-function
9686 @lisp
9687 (setq nnmail-expiry-wait-function
9688       (lambda (group)
9689        (cond ((string= group "mail.private")
9690                31)
9691              ((string= group "mail.junk")
9692                1)
9693              ((string= group "important")
9694                'never)
9695              (t
9696                6))))
9697 @end lisp
9698
9699 The group names this function is fed are ``unadorned'' group
9700 names---no @samp{nnml:} prefixes and the like.
9701
9702 The @code{nnmail-expiry-wait} variable and
9703 @code{nnmail-expiry-wait-function} function can either be a number (not
9704 necessarily an integer) or one of the symbols @code{immediate} or
9705 @code{never}.
9706
9707 You can also use the @code{expiry-wait} group parameter to selectively
9708 change the expiry period (@pxref{Group Parameters}).
9709
9710 @vindex nnmail-keep-last-article
9711 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
9712 expire the final article in a mail newsgroup.  This is to make life
9713 easier for procmail users.
9714
9715 @vindex gnus-total-expirable-newsgroups
9716 By the way: That line up there, about Gnus never expiring non-expirable
9717 articles, is a lie.  If you put @code{total-expire} in the group
9718 parameters, articles will not be marked as expirable, but all read
9719 articles will be put through the expiry process.  Use with extreme
9720 caution.  Even more dangerous is the
9721 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
9722 this regexp will have all read articles put through the expiry process,
9723 which means that @emph{all} old mail articles in the groups in question
9724 will be deleted after a while.  Use with extreme caution, and don't come
9725 crying to me when you discover that the regexp you used matched the
9726 wrong group and all your important mail has disappeared.  Be a
9727 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
9728 with!  So there!
9729
9730 Most people make most of their mail groups total-expirable, though. 
9731
9732
9733 @node Washing Mail
9734 @subsection Washing Mail
9735 @cindex mail washing
9736 @cindex list server brain damage
9737 @cindex incoming mail treatment
9738
9739 Mailers and list servers are notorious for doing all sorts of really,
9740 really stupid things with mail.  ``Hey, RFC822 doesn't explicitly
9741 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
9742 end of all lines passing through our server, so let's do that!!!!1!''
9743 Yes, but RFC822 wasn't designed to be read by morons.  Things that were
9744 considered to be self-evident were not discussed.  So.  Here we are.
9745
9746 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
9747 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
9748 be shocked and dismayed by this, but I haven't got the energy.  It is to
9749 laugh.
9750
9751 Gnus provides a plethora of functions for washing articles while
9752 displaying them, but it might be nicer to do the filtering before
9753 storing the mail to disc.  For that purpose, we have three hooks and
9754 various functions that can be put in these hooks.
9755
9756 @table @code
9757 @item nnmail-prepare-incoming-hook
9758 @vindex nnmail-prepare-incoming-hook
9759 This hook is called before doing anything with the mail and is meant for
9760 grand, sweeping gestures.  Functions to be used include:
9761
9762 @table @code
9763 @item nnheader-ms-strip-cr
9764 @findex nnheader-ms-strip-cr
9765 Remove trailing carriage returns from each line.  This is default on
9766 Emacs running on MS machines.
9767
9768 @end table
9769
9770 @item nnmail-prepare-incoming-header-hook
9771 @vindex nnmail-prepare-incoming-header-hook
9772 This hook is called narrowed to each header.  It can be used when
9773 cleaning up the headers.  Functions that can be used include:
9774
9775 @table @code
9776 @item nnmail-remove-leading-whitespace
9777 @findex nnmail-remove-leading-whitespace
9778 Clear leading white space that ``helpful'' listservs have added to the
9779 headers to make them look nice.  Aaah.  
9780
9781 @item nnmail-remove-list-identifiers
9782 @findex nnmail-remove-list-identifiers
9783 Some list servers add an identifier---for example, @samp{(idm)}---to the
9784 beginning of all @code{Subject} headers.  I'm sure that's nice for
9785 people who use stone age mail readers.  This function will remove
9786 strings that match the @code{nnmail-list-identifiers} regexp, which can
9787 also be a list of regexp.
9788
9789 For instance, if you want to remove the @samp{(idm)} and the
9790 @samp{nagnagnag} identifiers:
9791
9792 @lisp
9793 (setq nnmail-list-identifiers
9794       '("(idm)" "nagnagnag"))
9795 @end lisp
9796
9797 @item nnmail-remove-tabs
9798 @findex nnmail-remove-tabs
9799 Translate all @samp{TAB} characters into @samp{SPACE} characters. 
9800
9801 @end table
9802
9803 @item nnmail-prepare-incoming-message-hook
9804 @vindex nnmail-prepare-incoming-message-hook
9805 This hook is called narrowed to each message.  Functions to be used
9806 include: 
9807
9808 @table @code
9809 @item article-de-quoted-unreadable
9810 @findex article-de-quoted-unreadable
9811 Decode Quoted Readable encoding.
9812
9813 @end table
9814 @end table
9815
9816
9817 @node Duplicates
9818 @subsection Duplicates
9819
9820 @vindex nnmail-treat-duplicates
9821 @vindex nnmail-message-id-cache-length
9822 @vindex nnmail-message-id-cache-file
9823 @cindex duplicate mails
9824 If you are a member of a couple of mailing lists, you will sometimes
9825 receive two copies of the same mail.  This can be quite annoying, so
9826 @code{nnmail} checks for and treats any duplicates it might find.  To do
9827 this, it keeps a cache of old @code{Message-ID}s---
9828 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
9829 default.  The approximate maximum number of @code{Message-ID}s stored
9830 there is controlled by the @code{nnmail-message-id-cache-length}
9831 variable, which is 1000 by default. (So 1000 @code{Message-ID}s will be
9832 stored.) If all this sounds scary to you, you can set
9833 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
9834 default), and @code{nnmail} won't delete duplicate mails.  Instead it
9835 will insert a warning into the head of the mail saying that it thinks
9836 that this is a duplicate of a different message.
9837
9838 This variable can also be a function.  If that's the case, the function
9839 will be called from a buffer narrowed to the message in question with
9840 the @code{Message-ID} as a parameter.  The function must return either
9841 @code{nil}, @code{warn}, or @code{delete}.
9842
9843 You can turn this feature off completely by setting the variable to
9844 @code{nil}.
9845
9846 If you want all the duplicate mails to be put into a special
9847 @dfn{duplicates} group, you could do that using the normal mail split
9848 methods:
9849
9850 @lisp
9851 (setq nnmail-split-fancy
9852       '(| ;; Messages duplicates go to a separate group.
9853           ("gnus-warning" "duplication of message" "duplicate")
9854           ;; Message from daemons, postmaster, and the like to another.
9855           (any mail "mail.misc")
9856           ;; Other rules.
9857           [ ... ] ))
9858 @end lisp
9859
9860 Or something like:
9861 @lisp
9862 (setq nnmail-split-methods 
9863       '(("duplicates" "^Gnus-Warning:")
9864         ;; Other rules.
9865         [...]))
9866 @end lisp
9867
9868 Here's a neat feature: If you know that the recipient reads her mail
9869 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
9870 @code{delete}, you can send her as many insults as you like, just by
9871 using a @code{Message-ID} of a mail that you know that she's already
9872 received.  Think of all the fun!  She'll never see any of it!  Whee!
9873
9874
9875 @node Not Reading Mail
9876 @subsection Not Reading Mail
9877
9878 If you start using any of the mail backends, they have the annoying
9879 habit of assuming that you want to read mail with them.  This might not
9880 be unreasonable, but it might not be what you want.
9881
9882 If you set @code{nnmail-spool-file} to @code{nil}, none of the backends
9883 will ever attempt to read incoming mail, which should help.
9884
9885 @vindex nnbabyl-get-new-mail
9886 @vindex nnmbox-get-new-mail
9887 @vindex nnml-get-new-mail
9888 @vindex nnmh-get-new-mail
9889 @vindex nnfolder-get-new-mail
9890 This might be too much, if, for instance, you are reading mail quite
9891 happily with @code{nnml} and just want to peek at some old @sc{rmail}
9892 file you have stashed away with @code{nnbabyl}.  All backends have
9893 variables called backend-@code{get-new-mail}.  If you want to disable
9894 the @code{nnbabyl} mail reading, you edit the virtual server for the
9895 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
9896
9897 All the mail backends will call @code{nn}*@code{-prepare-save-mail-hook}
9898 narrowed to the article to be saved before saving it when reading
9899 incoming mail.
9900
9901
9902 @node Choosing a Mail Backend
9903 @subsection Choosing a Mail Backend
9904
9905 Gnus will read the mail spool when you activate a mail group.  The mail
9906 file is first copied to your home directory.  What happens after that
9907 depends on what format you want to store your mail in.
9908
9909 @menu
9910 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
9911 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
9912 * Mail Spool::                  Store your mail in a private spool?
9913 * MH Spool::                    An mhspool-like backend.
9914 * Mail Folders::                Having one file for each group.
9915 @end menu
9916
9917
9918 @node Unix Mail Box
9919 @subsubsection Unix Mail Box
9920 @cindex nnmbox
9921 @cindex unix mail box
9922
9923 @vindex nnmbox-active-file
9924 @vindex nnmbox-mbox-file
9925 The @dfn{nnmbox} backend will use the standard Un*x mbox file to store
9926 mail.  @code{nnmbox} will add extra headers to each mail article to say
9927 which group it belongs in.
9928
9929 Virtual server settings:
9930
9931 @table @code
9932 @item nnmbox-mbox-file
9933 @vindex nnmbox-mbox-file
9934 The name of the mail box in the user's home directory. 
9935
9936 @item nnmbox-active-file
9937 @vindex nnmbox-active-file
9938 The name of the active file for the mail box.
9939
9940 @item nnmbox-get-new-mail
9941 @vindex nnmbox-get-new-mail
9942 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
9943 into groups.
9944 @end table
9945
9946
9947 @node Rmail Babyl
9948 @subsubsection Rmail Babyl
9949 @cindex nnbabyl
9950 @cindex rmail mbox
9951
9952 @vindex nnbabyl-active-file
9953 @vindex nnbabyl-mbox-file
9954 The @dfn{nnbabyl} backend will use a babyl mail box (aka. @dfn{rmail
9955 mbox}) to store mail. @code{nnbabyl} will add extra headers to each mail
9956 article to say which group it belongs in.
9957
9958 Virtual server settings:
9959
9960 @table @code
9961 @item nnbabyl-mbox-file
9962 @vindex nnbabyl-mbox-file
9963 The name of the rmail mbox file.
9964
9965 @item nnbabyl-active-file
9966 @vindex nnbabyl-active-file
9967 The name of the active file for the rmail box.
9968
9969 @item nnbabyl-get-new-mail
9970 @vindex nnbabyl-get-new-mail
9971 If non-@code{nil}, @code{nnbabyl} will read incoming mail. 
9972 @end table
9973
9974
9975 @node Mail Spool
9976 @subsubsection Mail Spool
9977 @cindex nnml
9978 @cindex mail @sc{nov} spool
9979
9980 The @dfn{nnml} spool mail format isn't compatible with any other known
9981 format.  It should be used with some caution.
9982
9983 @vindex nnml-directory
9984 If you use this backend, Gnus will split all incoming mail into files,
9985 one file for each mail, and put the articles into the corresponding
9986 directories under the directory specified by the @code{nnml-directory}
9987 variable.  The default value is @file{~/Mail/}.
9988
9989 You do not have to create any directories beforehand; Gnus will take
9990 care of all that.
9991
9992 If you have a strict limit as to how many files you are allowed to store
9993 in your account, you should not use this backend.  As each mail gets its
9994 own file, you might very well occupy thousands of inodes within a few
9995 weeks.  If this is no problem for you, and it isn't a problem for you
9996 having your friendly systems administrator walking around, madly,
9997 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
9998 know that this is probably the fastest format to use.  You do not have
9999 to trudge through a big mbox file just to read your new mail.
10000
10001 @code{nnml} is probably the slowest backend when it comes to article
10002 splitting.  It has to create lots of files, and it also generates
10003 @sc{nov} databases for the incoming mails.  This makes it the fastest
10004 backend when it comes to reading mail.
10005
10006 Virtual server settings:
10007
10008 @table @code
10009 @item nnml-directory
10010 @vindex nnml-directory
10011 All @code{nnml} directories will be placed under this directory. 
10012
10013 @item nnml-active-file
10014 @vindex nnml-active-file
10015 The active file for the @code{nnml} server.
10016
10017 @item nnml-newsgroups-file
10018 @vindex nnml-newsgroups-file
10019 The @code{nnml} group descriptions file.  @xref{Newsgroups File
10020 Format}. 
10021
10022 @item nnml-get-new-mail
10023 @vindex nnml-get-new-mail
10024 If non-@code{nil}, @code{nnml} will read incoming mail.
10025
10026 @item nnml-nov-is-evil
10027 @vindex nnml-nov-is-evil
10028 If non-@code{nil}, this backend will ignore any @sc{nov} files.  
10029
10030 @item nnml-nov-file-name
10031 @vindex nnml-nov-file-name
10032 The name of the @sc{nov} files.  The default is @file{.overview}. 
10033
10034 @item nnml-prepare-save-mail-hook
10035 @vindex nnml-prepare-save-mail-hook
10036 Hook run narrowed to an article before saving.
10037
10038 @end table
10039
10040 @findex nnml-generate-nov-databases
10041 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
10042 you can do a complete update by typing @kbd{M-x
10043 nnml-generate-nov-databases}.  This command will trawl through the
10044 entire @code{nnml} hierarchy, looking at each and every article, so it
10045 might take a while to complete.  A better interface to this
10046 functionality can be found in the server buffer (@pxref{Server
10047 Commands}). 
10048
10049
10050 @node MH Spool
10051 @subsubsection MH Spool
10052 @cindex nnmh
10053 @cindex mh-e mail spool
10054
10055 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
10056 @sc{nov} databases and it doesn't keep an active file.  This makes
10057 @code{nnmh} a @emph{much} slower backend than @code{nnml}, but it also
10058 makes it easier to write procmail scripts for.
10059
10060 Virtual server settings:
10061
10062 @table @code
10063 @item nnmh-directory
10064 @vindex nnmh-directory
10065 All @code{nnmh} directories will be located under this directory.
10066
10067 @item nnmh-get-new-mail
10068 @vindex nnmh-get-new-mail
10069 If non-@code{nil}, @code{nnmh} will read incoming mail.
10070
10071 @item nnmh-be-safe
10072 @vindex nnmh-be-safe
10073 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
10074 sure that the articles in the folder are actually what Gnus thinks they
10075 are.  It will check date stamps and stat everything in sight, so
10076 setting this to @code{t} will mean a serious slow-down.  If you never
10077 use anything but Gnus to read the @code{nnmh} articles, you do not have
10078 to set this variable to @code{t}.
10079 @end table
10080
10081
10082 @node Mail Folders
10083 @subsubsection Mail Folders
10084 @cindex nnfolder
10085 @cindex mbox folders
10086 @cindex mail folders
10087
10088 @code{nnfolder} is a backend for storing each mail group in a separate
10089 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
10090 will add extra headers to keep track of article numbers and arrival
10091 dates.
10092
10093 Virtual server settings:
10094
10095 @table @code
10096 @item nnfolder-directory
10097 @vindex nnfolder-directory
10098 All the @code{nnfolder} mail boxes will be stored under this directory. 
10099
10100 @item nnfolder-active-file
10101 @vindex nnfolder-active-file
10102 The name of the active file.
10103
10104 @item nnfolder-newsgroups-file
10105 @vindex nnfolder-newsgroups-file
10106 The name of the group descriptions file.  @xref{Newsgroups File Format}.
10107
10108 @item nnfolder-get-new-mail
10109 @vindex nnfolder-get-new-mail
10110 If non-@code{nil}, @code{nnfolder} will read incoming mail.
10111 @end table
10112
10113 @findex nnfolder-generate-active-file
10114 @kindex M-x nnfolder-generate-active-file
10115 If you have lots of @code{nnfolder}-like files you'd like to read with
10116 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
10117 command to make @code{nnfolder} aware of all likely files in
10118 @code{nnfolder-directory}.
10119
10120
10121 @node Other Sources
10122 @section Other Sources
10123
10124 Gnus can do more than just read news or mail.  The methods described
10125 below allow Gnus to view directories and files as if they were
10126 newsgroups.
10127
10128 @menu
10129 * Directory Groups::      You can read a directory as if it was a newsgroup.
10130 * Anything Groups::       Dired?  Who needs dired?
10131 * Document Groups::       Single files can be the basis of a group.
10132 * SOUP::                  Reading @sc{SOUP} packets ``offline''.
10133 * Web Searches::          Creating groups from articles that match a string.
10134 * Mail-To-News Gateways:: Posting articles via mail-to-news gateways.
10135 @end menu
10136
10137
10138 @node Directory Groups
10139 @subsection Directory Groups
10140 @cindex nndir
10141 @cindex directory groups
10142
10143 If you have a directory that has lots of articles in separate files in
10144 it, you might treat it as a newsgroup.  The files have to have numerical
10145 names, of course.
10146
10147 This might be an opportune moment to mention @code{ange-ftp} (and its
10148 successor @code{efs}), that most wonderful of all wonderful Emacs
10149 packages.  When I wrote @code{nndir}, I didn't think much about it---a
10150 backend to read directories.  Big deal.
10151
10152 @code{ange-ftp} changes that picture dramatically.  For instance, if you
10153 enter the @code{ange-ftp} file name
10154 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
10155 @code{ange-ftp} or @code{efs} will actually allow you to read this
10156 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
10157
10158 @code{nndir} will use @sc{nov} files if they are present.
10159
10160 @code{nndir} is a ``read-only'' backend---you can't delete or expire
10161 articles with this method.  You can use @code{nnmh} or @code{nnml} for
10162 whatever you use @code{nndir} for, so you could switch to any of those
10163 methods if you feel the need to have a non-read-only @code{nndir}.
10164
10165
10166 @node Anything Groups
10167 @subsection Anything Groups
10168 @cindex nneething
10169
10170 From the @code{nndir} backend (which reads a single spool-like
10171 directory), it's just a hop and a skip to @code{nneething}, which
10172 pretends that any arbitrary directory is a newsgroup.  Strange, but
10173 true.
10174
10175 When @code{nneething} is presented with a directory, it will scan this
10176 directory and assign article numbers to each file.  When you enter such
10177 a group, @code{nneething} must create ``headers'' that Gnus can use.
10178 After all, Gnus is a newsreader, in case you're
10179 forgetting. @code{nneething} does this in a two-step process.  First, it
10180 snoops each file in question.  If the file looks like an article (i.e.,
10181 the first few lines look like headers), it will use this as the head.
10182 If this is just some arbitrary file without a head (e.g. a C source
10183 file), @code{nneething} will cobble up a header out of thin air.  It
10184 will use file ownership, name and date and do whatever it can with these
10185 elements.
10186
10187 All this should happen automatically for you, and you will be presented
10188 with something that looks very much like a newsgroup.  Totally like a
10189 newsgroup, to be precise.  If you select an article, it will be displayed
10190 in the article buffer, just as usual.
10191
10192 If you select a line that represents a directory, Gnus will pop you into
10193 a new summary buffer for this @code{nneething} group.  And so on.  You can
10194 traverse the entire disk this way, if you feel like, but remember that
10195 Gnus is not dired, really, and does not intend to be, either.
10196
10197 There are two overall modes to this action---ephemeral or solid.  When
10198 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
10199 will not store information on what files you have read, and what files
10200 are new, and so on.  If you create a solid @code{nneething} group the
10201 normal way with @kbd{G m}, Gnus will store a mapping table between
10202 article numbers and file names, and you can treat this group like any
10203 other groups.  When you activate a solid @code{nneething} group, you will
10204 be told how many unread articles it contains, etc., etc.
10205
10206 Some variables:
10207
10208 @table @code
10209 @item nneething-map-file-directory
10210 @vindex nneething-map-file-directory
10211 All the mapping files for solid @code{nneething} groups will be stored
10212 in this directory, which defaults to @file{~/.nneething/}.
10213
10214 @item nneething-exclude-files
10215 @vindex nneething-exclude-files
10216 All files that match this regexp will be ignored.  Nice to use to exclude
10217 auto-save files and the like, which is what it does by default.
10218
10219 @item nneething-map-file
10220 @vindex nneething-map-file
10221 Name of the map files.
10222 @end table
10223
10224
10225 @node Document Groups
10226 @subsection Document Groups
10227 @cindex nndoc
10228 @cindex documentation group
10229 @cindex help group
10230
10231 @code{nndoc} is a cute little thing that will let you read a single file
10232 as a newsgroup.  Several files types are supported:
10233
10234 @table @code
10235 @cindex babyl
10236 @cindex rmail mbox
10237
10238 @item babyl
10239 The babyl (rmail) mail box.
10240 @cindex mbox
10241 @cindex Unix mbox
10242
10243 @item mbox
10244 The standard Unix mbox file.
10245
10246 @cindex MMDF mail box
10247 @item mmdf
10248 The MMDF mail box format.
10249
10250 @item news
10251 Several news articles appended into a file.
10252
10253 @item rnews
10254 @cindex rnews batch files
10255 The rnews batch transport format.
10256 @cindex forwarded messages
10257
10258 @item forward
10259 Forwarded articles.
10260
10261 @item mime-digest
10262 @cindex digest
10263 @cindex MIME digest
10264 @cindex 1153 digest
10265 @cindex RFC 1153 digest
10266 @cindex RFC 341 digest
10267 MIME (RFC 1341) digest format.
10268
10269 @item standard-digest
10270 The standard (RFC 1153) digest format.
10271
10272 @item slack-digest
10273 Non-standard digest format---matches most things, but does it badly. 
10274 @end table
10275
10276 You can also use the special ``file type'' @code{guess}, which means
10277 that @code{nndoc} will try to guess what file type it is looking at.
10278 @code{digest} means that @code{nndoc} should guess what digest type the
10279 file is.
10280
10281 @code{nndoc} will not try to change the file or insert any extra headers into
10282 it---it will simply, like, let you use the file as the basis for a
10283 group.  And that's it.
10284
10285 If you have some old archived articles that you want to insert into your
10286 new & spiffy Gnus mail backend, @code{nndoc} can probably help you with
10287 that.  Say you have an old @file{RMAIL} file with mail that you now want
10288 to split into your new @code{nnml} groups.  You look at that file using
10289 @code{nndoc} (using the @kbd{G f} command in the group buffer
10290 (@pxref{Foreign Groups})), set the process mark on all the articles in
10291 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
10292 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
10293 file is now also stored in lots of @code{nnml} directories, and you can
10294 delete that pesky @file{RMAIL} file.  If you have the guts!
10295
10296 Virtual server variables:
10297
10298 @table @code
10299 @item nndoc-article-type
10300 @vindex nndoc-article-type
10301 This should be one of @code{mbox}, @code{babyl}, @code{digest},
10302 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
10303 @code{rfc822-forward}, @code{mime-digest}, @code{standard-digest},
10304 @code{slack-digest}, @code{clari-briefs} or @code{guess}.
10305
10306 @item nndoc-post-type
10307 @vindex nndoc-post-type
10308 This variable says whether Gnus is to consider the group a news group or
10309 a mail group.  There are two valid values:  @code{mail} (the default)
10310 and @code{news}.
10311 @end table
10312
10313 @menu
10314 * Document Server Internals::   How to add your own document types.
10315 @end menu
10316
10317
10318 @node Document Server Internals
10319 @subsubsection Document Server Internals
10320
10321 Adding new document types to be recognized by @code{nndoc} isn't
10322 difficult.  You just have to whip up a definition of what the document
10323 looks like, write a predicate function to recognize that document type,
10324 and then hook into @code{nndoc}.
10325
10326 First, here's an example document type definition:
10327
10328 @example
10329 (mmdf 
10330  (article-begin .  "^\^A\^A\^A\^A\n")
10331  (body-end .  "^\^A\^A\^A\^A\n"))
10332 @end example
10333
10334 The definition is simply a unique @dfn{name} followed by a series of
10335 regexp pseudo-variable settings.  Below are the possible
10336 variables---don't be daunted by the number of variables; most document
10337 types can be defined with very few settings:
10338
10339 @table @code
10340 @item first-article
10341 If present, @code{nndoc} will skip past all text until it finds
10342 something that match this regexp.  All text before this will be
10343 totally ignored. 
10344
10345 @item article-begin
10346 This setting has to be present in all document type definitions.  It
10347 says what the beginning of each article looks like.
10348
10349 @item head-begin-function
10350 If present, this should be a function that moves point to the head of
10351 the article.
10352
10353 @item nndoc-head-begin
10354 If present, this should be a regexp that matches the head of the
10355 article. 
10356
10357 @item nndoc-head-end
10358 This should match the end of the head of the article.  It defaults to
10359 @samp{^$}---the empty line.
10360
10361 @item body-begin-function
10362 If present, this function should move point to the beginning of the body
10363 of the article.
10364
10365 @item body-begin
10366 This should match the beginning of the body of the article.  It defaults
10367 to @samp{^\n}.
10368
10369 @item body-end-function
10370 If present, this function should move point to the end of the body of
10371 the article.
10372
10373 @item body-end
10374 If present, this should match the end of the body of the article.
10375
10376 @item file-end
10377 If present, this should match the end of the file.  All text after this
10378 regexp will be totally ignored. 
10379
10380 @end table
10381
10382 So, using these variables @code{nndoc} is able to dissect a document
10383 file into a series of articles, each with a head and a body.  However, a
10384 few more variables are needed since not all document types are all that
10385 news-like---variables needed to transform the head or the body into
10386 something that's palatable for Gnus:
10387
10388 @table @code
10389 @item prepare-body-function
10390 If present, this function will be called when requesting an article.  It
10391 will be called with point at the start of the body, and is useful if the
10392 document has encoded some parts of its contents. 
10393
10394 @item article-transform-function
10395 If present, this function is called when requesting an article.  It's
10396 meant to be used for more wide-ranging transformation of both head and
10397 body of the article.
10398
10399 @item generate-head-function
10400 If present, this function is called to generate a head that Gnus can
10401 understand.  It is called with the article number as a parameter, and is
10402 expected to generate a nice head for the article in question.  It is
10403 called when requesting the headers of all articles.
10404
10405 @end table
10406
10407 Let's look at the most complicated example I can come up with---standard
10408 digests:
10409
10410 @example
10411 (standard-digest
10412  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
10413  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
10414  (prepare-body-function . nndoc-unquote-dashes)
10415  (body-end-function . nndoc-digest-body-end)
10416  (head-end . "^ ?$")
10417  (body-begin . "^ ?\n")
10418  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
10419  (subtype digest guess))
10420 @end example
10421
10422 We see that all text before a 70-width line of dashes is ignored; all
10423 text after a line that starts with that @samp{^End of} is also ignored;
10424 each article begins with a 30-width line of dashes; the line separating
10425 the head from the body may contain a single space; and that the body is
10426 run through @code{nndoc-unquote-dashes} before being delivered.
10427
10428 To hook your own document definition into @code{nndoc}, use the
10429 @code{nndoc-add-type} function.  It takes two parameters---the first is
10430 the definition itself and the second (optional) parameter says where in
10431 the document type definition alist to put this definition.  The alist is
10432 traversed sequentially, and @code{nndoc-TYPE-type-p} is called for a given type @code{TYPE}.  So @code{nndoc-mmdf-type-p} is called to see whether a document
10433 is of @code{mmdf} type, and so on.  These type predicates should return
10434 @code{nil} if the document is not of the correct type; @code{t} if it is
10435 of the correct type; and a number if the document might be of the
10436 correct type.  A high number means high probability; a low number means
10437 low probability with @samp{0} being the lowest valid number.
10438
10439
10440 @node SOUP
10441 @subsection SOUP
10442 @cindex SOUP
10443 @cindex offline
10444
10445 In the PC world people often talk about ``offline'' newsreaders.  These
10446 are thingies that are combined reader/news transport monstrosities.
10447 With built-in modem programs.  Yecchh!
10448
10449 Of course, us Unix Weenie types of human beans use things like
10450 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
10451 transport things like Ghod intended.  And then we just use normal
10452 newsreaders.  
10453
10454 However, it can sometimes be convenient to do something a that's a bit
10455 easier on the brain if you have a very slow modem, and you're not really
10456 that interested in doing things properly.  
10457
10458 A file format called @sc{soup} has been developed for transporting news
10459 and mail from servers to home machines and back again.  It can be a bit
10460 fiddly.
10461
10462 First some terminology:
10463
10464 @table @dfn
10465
10466 @item server
10467 This is the machine that is connected to the outside world and where you
10468 get news and/or mail from.
10469
10470 @item home machine
10471 This is the machine that you want to do the actual reading and responding
10472 on.  It is typically not connected to the rest of the world in any way.
10473
10474 @item packet
10475 Something that contains messages and/or commands.  There are two kinds
10476 of packets:
10477
10478 @table @dfn
10479 @item message packets
10480 These are packets made at the server, and typically contain lots of
10481 messages for you to read.  These are called @file{SoupoutX.tgz} by
10482 default, where @var{X} is a number.
10483
10484 @item response packets
10485 These are packets made at the home machine, and typically contains
10486 replies that you've written.  These are called @file{SoupinX.tgz} by
10487 default, where @var{X} is a number.
10488
10489 @end table
10490
10491 @end table
10492
10493
10494 @enumerate
10495
10496 @item
10497 You log in on the server and create a @sc{soup} packet.  You can either
10498 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
10499 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
10500 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
10501
10502 @item 
10503 You transfer the packet home.  Rail, boat, car or modem will do fine.
10504
10505 @item
10506 You put the packet in your home directory.
10507
10508 @item
10509 You fire up Gnus on your home machine using the @code{nnsoup} backend as
10510 the native or secondary server.
10511
10512 @item
10513 You read articles and mail and answer and followup to the things you
10514 want (@pxref{SOUP Replies}).
10515
10516 @item 
10517 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
10518 packet.
10519
10520 @item 
10521 You transfer this packet to the server.  
10522
10523 @item
10524 You use Gnus to mail this packet out with the @kbd{G s s} command.
10525
10526 @item
10527 You then repeat until you die.
10528
10529 @end enumerate
10530
10531 So you basically have a bipartite system---you use @code{nnsoup} for
10532 reading and Gnus for packing/sending these @sc{soup} packets.
10533
10534 @menu
10535 * SOUP Commands::     Commands for creating and sending @sc{soup} packets
10536 * SOUP Groups::       A backend for reading @sc{soup} packets.
10537 * SOUP Replies::      How to enable @code{nnsoup} to take over mail and news.
10538 @end menu
10539
10540
10541 @node SOUP Commands
10542 @subsubsection SOUP Commands
10543
10544 These are commands for creating and manipulating @sc{soup} packets.
10545
10546 @table @kbd
10547 @item G s b
10548 @kindex G s b (Group)
10549 @findex gnus-group-brew-soup
10550 Pack all unread articles in the current group
10551 (@code{gnus-group-brew-soup}).  This command understands the
10552 process/prefix convention.
10553
10554 @item G s w
10555 @kindex G s w (Group)
10556 @findex gnus-soup-save-areas
10557 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
10558
10559 @item G s s
10560 @kindex G s s (Group)
10561 @findex gnus-soup-send-replies
10562 Send all replies from the replies packet
10563 (@code{gnus-soup-send-replies}). 
10564
10565 @item G s p
10566 @kindex G s p (Group)
10567 @findex gnus-soup-pack-packet
10568 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}). 
10569
10570 @item G s r
10571 @kindex G s r (Group)
10572 @findex nnsoup-pack-replies
10573 Pack all replies into a replies packet (@code{nnsoup-pack-replies}). 
10574
10575 @item O s
10576 @kindex O s (Summary)
10577 @findex gnus-soup-add-article
10578 This summary-mode command adds the current article to a @sc{soup} packet
10579 (@code{gnus-soup-add-article}).  It understands the process/prefix
10580 convention (@pxref{Process/Prefix}). 
10581
10582 @end table
10583
10584
10585 There are a few variables to customize where Gnus will put all these
10586 thingies:  
10587
10588 @table @code
10589
10590 @item gnus-soup-directory
10591 @vindex gnus-soup-directory
10592 Directory where Gnus will save intermediate files while composing
10593 @sc{soup} packets.  The default is @file{~/SoupBrew/}. 
10594
10595 @item gnus-soup-replies-directory
10596 @vindex gnus-soup-replies-directory
10597 This is what Gnus will use as a temporary directory while sending our
10598 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
10599
10600 @item gnus-soup-prefix-file
10601 @vindex gnus-soup-prefix-file
10602 Name of the file where Gnus stores the last used prefix.  The default is
10603 @samp{gnus-prefix}. 
10604
10605 @item gnus-soup-packer
10606 @vindex gnus-soup-packer
10607 A format string command for packing a @sc{soup} packet.  The default is
10608 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}. 
10609
10610 @item gnus-soup-unpacker
10611 @vindex gnus-soup-unpacker
10612 Format string command for unpacking a @sc{soup} packet.  The default is
10613 @samp{gunzip -c %s | tar xvf -}.
10614
10615 @item gnus-soup-packet-directory
10616 @vindex gnus-soup-packet-directory
10617 Where Gnus will look for reply packets.  The default is @file{~/}. 
10618
10619 @item gnus-soup-packet-regexp
10620 @vindex gnus-soup-packet-regexp
10621 Regular expression matching @sc{soup} reply packets in
10622 @code{gnus-soup-packet-directory}. 
10623
10624 @end table
10625  
10626
10627 @node SOUP Groups
10628 @subsubsection @sc{soup} Groups
10629 @cindex nnsoup
10630
10631 @code{nnsoup} is the backend for reading @sc{soup} packets.  It will
10632 read incoming packets, unpack them, and put them in a directory where
10633 you can read them at leisure.
10634
10635 These are the variables you can use to customize its behavior:
10636
10637 @table @code
10638
10639 @item nnsoup-tmp-directory
10640 @vindex nnsoup-tmp-directory
10641 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
10642 directory.  (@file{/tmp/} by default.)  
10643
10644 @item nnsoup-directory
10645 @vindex nnsoup-directory
10646 @code{nnsoup} then moves each message and index file to this directory.
10647 The default is @file{~/SOUP/}.
10648
10649 @item nnsoup-replies-directory 
10650 @vindex nnsoup-replies-directory 
10651 All replies will be stored in this directory before being packed into a
10652 reply packet.  The default is @file{~/SOUP/replies/"}.
10653
10654 @item nnsoup-replies-format-type
10655 @vindex nnsoup-replies-format-type
10656 The @sc{soup} format of the replies packets.  The default is @samp{?n}
10657 (rnews), and I don't think you should touch that variable.  I probably
10658 shouldn't even have documented it.  Drats!  Too late!
10659
10660 @item nnsoup-replies-index-type
10661 @vindex nnsoup-replies-index-type
10662 The index type of the replies packet.  The default is @samp{?n}, which
10663 means ``none''.  Don't fiddle with this one either!
10664
10665 @item nnsoup-active-file
10666 @vindex nnsoup-active-file
10667 Where @code{nnsoup} stores lots of information.  This is not an ``active
10668 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
10669 this file or mess it up in any way, you're dead.  The default is
10670 @file{~/SOUP/active}.
10671
10672 @item nnsoup-packer
10673 @vindex nnsoup-packer
10674 Format string command for packing a reply @sc{soup} packet.  The default
10675 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}. 
10676
10677 @item nnsoup-unpacker
10678 @vindex nnsoup-unpacker
10679 Format string command for unpacking incoming @sc{soup} packets.  The
10680 default is @samp{gunzip -c %s | tar xvf -}. 
10681
10682 @item nnsoup-packet-directory
10683 @vindex nnsoup-packet-directory
10684 Where @code{nnsoup} will look for incoming packets.  The default is
10685 @file{~/}.  
10686
10687 @item nnsoup-packet-regexp
10688 @vindex nnsoup-packet-regexp
10689 Regular expression matching incoming @sc{soup} packets.  The default is
10690 @samp{Soupout}.
10691
10692 @item nnsoup-always-save
10693 @vindex nnsoup-always-save
10694 If non-@code{nil}, save the replies buffer after each posted message.
10695
10696 @end table
10697
10698
10699 @node SOUP Replies
10700 @subsubsection SOUP Replies
10701
10702 Just using @code{nnsoup} won't mean that your postings and mailings end
10703 up in @sc{soup} reply packets automagically.  You have to work a bit
10704 more for that to happen.
10705
10706 @findex nnsoup-set-variables
10707 The @code{nnsoup-set-variables} command will set the appropriate
10708 variables to ensure that all your followups and replies end up in the
10709 @sc{soup} system.
10710
10711 In specific, this is what it does:
10712
10713 @lisp
10714 (setq message-send-news-function 'nnsoup-request-post)
10715 (setq message-send-mail-function 'nnsoup-request-mail)
10716 @end lisp
10717
10718 And that's it, really.  If you only want news to go into the @sc{soup}
10719 system you just use the first line.  If you only want mail to be
10720 @sc{soup}ed you use the second.
10721
10722
10723 @node Web Searches
10724 @subsection Web Searches
10725 @cindex nnweb
10726 @cindex DejaNews
10727 @cindex Alta Vista
10728 @cindex InReference
10729 @cindex Usenet searches
10730 @cindex searching the Usenet
10731
10732 It's, like, too neat to search the Usenet for articles that match a
10733 string, but it, like, totally @emph{sucks}, like, totally, to use one of
10734 those, like, Web browsers, and you, like, have to, rilly, like, look at
10735 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
10736 searches without having to use a browser.
10737
10738 The @code{nnweb} backend allows an easy interface to the mighty search
10739 engine.  You create an @code{nnweb} group, enter a search pattern, and
10740 then enter the group and read the articles like you would any normal
10741 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
10742 Groups}) will do this in an easy-to-use fashion.
10743
10744 @code{nnweb} groups don't really lend themselves to being solid
10745 groups---they have a very fleeting idea of article numbers.  In fact,
10746 each time you enter an @code{nnweb} group (not even changing the search
10747 pattern), you are likely to get the articles ordered in a different
10748 manner.  Not even using duplicate suppression (@pxref{Duplicate
10749 Suppression}) will help, since @code{nnweb} doesn't even know the
10750 @code{Message-ID} of the articles before reading them using some search
10751 engines (DejaNews, for instance).  The only possible way to keep track
10752 of which articles you've read is by scoring on the @code{Date}
10753 header---mark all articles posted before the last date you read the
10754 group as read.
10755
10756 If the search engine changes its output substantially, @code{nnweb}
10757 won't be able to parse it and will fail.  One could hardly fault the Web
10758 providers if they were to do this---their @emph{raison d'être} is to
10759 make money off of advertisements, not to provide services to the
10760 community.  Since @code{nnweb} washes the ads off all the articles, one
10761 might think that the providers might be somewhat miffed.  We'll see.
10762
10763 You must have the @code{url} and @code{w3} package installed to be able
10764 to use @code{nnweb}.
10765
10766 Virtual server variables:
10767
10768 @table @code
10769 @item nnweb-type
10770 @vindex nnweb-type
10771 What search engine type is being used.  The currently supported types
10772 are @code{dejanews}, @code{dejanewsold}, @code{altavista} and
10773 @code{reference}.
10774
10775 @item nnweb-search
10776 @vindex nnweb-search
10777 The search string to feed to the search engine.
10778
10779 @item nnweb-max-hits
10780 @vindex nnweb-max-hits
10781 Advisory maximum number of hits per search to display.  The default is
10782 100.
10783
10784 @item nnweb-type-definition
10785 @vindex nnweb-type-definition
10786 Type-to-definition alist.  This alist says what @code{nnweb} should do
10787 with the various search engine types.  The following elements must be
10788 present: 
10789
10790 @table @code
10791 @item article
10792 Function to decode the article and provide something that Gnus
10793 understands. 
10794
10795 @item map
10796 Function to create an article number to message header and URL alist. 
10797
10798 @item search
10799 Function to send the search string to the search engine.
10800
10801 @item address
10802 The address the aforementioned function should send the search string
10803 to. 
10804
10805 @item id
10806 Format string URL to fetch an article by @code{Message-ID}.
10807 @end table
10808
10809 @end table
10810
10811
10812
10813 @node Mail-To-News Gateways
10814 @subsection Mail-To-News Gateways
10815 @cindex mail-to-news gateways
10816 @cindex gateways
10817
10818 If your local @code{nntp} server doesn't allow posting, for some reason
10819 or other, you can post using one of the numerous mail-to-news gateways.
10820 The @code{nngateway} backend provides the interface.
10821
10822 Note that you can't read anything from this backend---it can only be
10823 used to post with.
10824
10825 Server variables:
10826
10827 @table @code
10828 @item nngateway-address 
10829 @vindex nngateway-address 
10830 This is the address of the mail-to-news gateway.
10831
10832 @item nngateway-header-transformation
10833 @vindex nngateway-header-transformation
10834 News headers often have to be transformed in some odd way or other
10835 for the mail-to-news gateway to accept it.  This variable says what 
10836 transformation should be called, and defaults to
10837 @code{nngateway-simple-header-transformation}.  The function is called
10838 narrowed to the headers to be transformed and with one parameter---the
10839 gateway address.
10840
10841 This default function just inserts a new @code{To} header based on the
10842 @code{Newsgroups} header and the gateway address.
10843 For instance, an article with this @code{Newsgroups} header:
10844
10845 @example
10846 Newsgroups: alt.religion.emacs
10847 @end example
10848
10849 will get this @code{From} header inserted:
10850
10851 @example
10852 To: alt-religion-emacs@@GATEWAY
10853 @end example
10854
10855 @end table
10856
10857 So, to use this, simply say something like:
10858
10859 @lisp
10860 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
10861 @end lisp
10862
10863
10864 @node Combined Groups
10865 @section Combined Groups
10866
10867 Gnus allows combining a mixture of all the other group types into bigger
10868 groups.
10869
10870 @menu
10871 * Virtual Groups::     Combining articles from many groups.
10872 * Kibozed Groups::     Looking through parts of the newsfeed for articles.
10873 @end menu
10874
10875
10876 @node Virtual Groups
10877 @subsection Virtual Groups
10878 @cindex nnvirtual
10879 @cindex virtual groups
10880
10881 An @dfn{nnvirtual group} is really nothing more than a collection of
10882 other groups.
10883
10884 For instance, if you are tired of reading many small groups, you can
10885 put them all in one big group, and then grow tired of reading one
10886 big, unwieldy group.  The joys of computing!
10887
10888 You specify @code{nnvirtual} as the method.  The address should be a
10889 regexp to match component groups.
10890
10891 All marks in the virtual group will stick to the articles in the
10892 component groups.  So if you tick an article in a virtual group, the
10893 article will also be ticked in the component group from whence it came.
10894 (And vice versa---marks from the component groups will also be shown in
10895 the virtual group.)
10896
10897 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
10898 newsgroups into one, big, happy newsgroup:
10899
10900 @lisp
10901 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
10902 @end lisp
10903
10904 The component groups can be native or foreign; everything should work
10905 smoothly, but if your computer explodes, it was probably my fault.
10906
10907 Collecting the same group from several servers might actually be a good
10908 idea if users have set the Distribution header to limit distribution.
10909 If you would like to read @samp{soc.motss} both from a server in Japan
10910 and a server in Norway, you could use the following as the group regexp:
10911
10912 @example
10913 "^nntp+some.server.jp:soc.motss$\\|^nntp+some.server.no:soc.motss$"
10914 @end example
10915
10916 This should work kinda smoothly---all articles from both groups should
10917 end up in this one, and there should be no duplicates.  Threading (and
10918 the rest) will still work as usual, but there might be problems with the
10919 sequence of articles.  Sorting on date might be an option here
10920 (@pxref{Selecting a Group}).
10921
10922 One limitation, however---all groups included in a virtual
10923 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
10924 zombie groups can't be component groups for @code{nnvirtual} groups.
10925
10926 @vindex nnvirtual-always-rescan
10927 If the @code{nnvirtual-always-rescan} is non-@code{nil},
10928 @code{nnvirtual} will always scan groups for unread articles when
10929 entering a virtual group.  If this variable is @code{nil} (which is the
10930 default) and you read articles in a component group after the virtual
10931 group has been activated, the read articles from the component group
10932 will show up when you enter the virtual group.  You'll also see this
10933 effect if you have two virtual groups that have a component group in
10934 common.  If that's the case, you should set this variable to @code{t}.
10935 Or you can just tap @code{M-g} on the virtual group every time before
10936 you enter it---it'll have much the same effect.
10937
10938
10939 @node Kibozed Groups
10940 @subsection Kibozed Groups
10941 @cindex nnkiboze
10942 @cindex kibozing
10943
10944 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
10945 the news feed''.  @code{nnkiboze} is a backend that will do this for
10946 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
10947 with useless requests!  Oh happiness!
10948
10949 @kindex G k (Group)
10950 To create a kibozed group, use the @kbd{G k} command in the group
10951 buffer. 
10952
10953 The address field of the @code{nnkiboze} method is, as with
10954 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
10955 @code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
10956 and @code{nnvirtual} end.
10957
10958 In addition to this regexp detailing component groups, an @code{nnkiboze} group
10959 must have a score file to say what articles are to be included in
10960 the group (@pxref{Scoring}).
10961
10962 @kindex M-x nnkiboze-generate-groups
10963 @findex nnkiboze-generate-groups
10964 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
10965 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
10966 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
10967 all the articles in all the component groups and run them through the
10968 scoring process to determine if there are any articles in the groups
10969 that are to be part of the @code{nnkiboze} groups.
10970
10971 Please limit the number of component groups by using restrictive
10972 regexps.  Otherwise your sysadmin may become annoyed with you, and the
10973 @sc{nntp} site may throw you off and never let you back in again.
10974 Stranger things have happened.
10975
10976 @code{nnkiboze} component groups do not have to be alive---they can be dead,
10977 and they can be foreign.  No restrictions.
10978
10979 @vindex nnkiboze-directory
10980 The generation of an @code{nnkiboze} group means writing two files in
10981 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
10982 contains the @sc{nov} header lines for all the articles in the group,
10983 and the other is an additional @file{.newsrc} file to store information
10984 on what groups have been searched through to find component articles.
10985
10986 Articles marked as read in the @code{nnkiboze} group will have
10987 their @sc{nov} lines removed from the @sc{nov} file.
10988
10989
10990 @node Gnus Unplugged
10991 @section Gnus Unplugged
10992 @cindex offline
10993 @cindex unplugged
10994 @cindex Agent
10995 @cindex Gnus Agent
10996 @cindex Gnus Unplugged
10997
10998 In olden times (ca. February '88), people used to run their newsreaders
10999 on big machines with permanent connections to the net.  News transport
11000 was dealt with by news servers, and all the newsreaders had to do was to
11001 read news.  Believe it or not.
11002
11003 Nowadays most people read news and mail at home, and use some sort of
11004 modem to connect to the net.  To avoid running up huge phone bills, it
11005 would be nice to have a way to slurp down all the news and mail, hang up
11006 the phone, read for several hours, and then upload any responses you
11007 have to make.  And then you repeat the procedure.
11008
11009 Of course, you can use news servers for doing this as well.  I've used
11010 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
11011 for some years, but doing that's a bore.  Moving the news server
11012 functionality up to the newsreader makes sense if you're the only person
11013 reading news on a machine.
11014
11015 Using Gnus as an ``offline'' newsreader is quite simple.
11016
11017 @itemize @bullet
11018 @item
11019 First, set up Gnus as you would do if you were running it on a machine
11020 that has full connection to the net.  Go ahead.  I'll still be waiting
11021 here.
11022
11023 @item
11024 Then, put the following magical incantation at the end of your
11025 @file{.gnus.el} file:
11026
11027 @lisp
11028 (gnus-agentize)
11029 @end lisp
11030 @end itemize
11031
11032 That's it.  Gnus is now an ``offline'' newsreader.
11033
11034 Of course, to use it as such, you have to learn a few new commands.
11035
11036 @menu
11037 * Agent Basics::           How it all is supposed to work.
11038 * Agent Categories::       How to tell the Gnus Agent what to download.
11039 * Agent Commands::         New commands for all the buffers.
11040 * Outgoing Messages::      What happens when you post/mail something?
11041 * Agent Variables::        Customizing is fun.
11042 * Example Setup::          An example @file{.gnus.el} file for offline people.
11043 @end menu
11044
11045
11046 @node Agent Basics
11047 @subsection Agent Basics
11048
11049 First, let's get some terminology out of the way.
11050
11051 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
11052 connection to the net (and notified the Agent that this is the case).
11053 When the connection to the net is up again (and Gnus knows this), the
11054 Agent is @dfn{plugged}.
11055
11056 The @dfn{local} machine is the one you're running on, and which isn't
11057 connected to the net continously.
11058
11059 @dfn{Downloading} means fetching things from the net to your local
11060 machine.  @dfn{Uploading} is doing the opposite.
11061
11062 Let's take a typical Gnus session using the Agent.
11063
11064 @itemize @bullet
11065
11066 @item
11067 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
11068 Agent in a disconnected state.  You can read all the news that you have
11069 already fetched while in this mode.
11070
11071 @item
11072 You then decide to see whether any new news has arrived.  You connect
11073 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
11074 to make Gnus become @dfn{plugged}.
11075
11076 @item
11077 You can then read the new news immediately, or you can download the news
11078 onto your local machine.  If you want to do the latter, you press @kbd{J
11079 s} to fetch all the eligible articles in all the groups.  (To let Gnus
11080 know which articles you want to download, @pxref{Agent Categories}.)
11081
11082 @item
11083 After fetching the articles, you press @kbd{J j} to make Gnus become
11084 unplugged again, and you shut down the PPP thing (or whatever).  And
11085 then you read the news offline.
11086
11087 @item
11088 And then you go to step 2.
11089 @end itemize
11090
11091 Here are some things you should do the first time (or so) that you use
11092 the Agent.
11093
11094 @itemize @bullet
11095
11096 @item
11097 Decide which servers should be covered by the Agent.  If you have a mail
11098 backend, it would probably be nonsensical to have it covered by the
11099 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
11100 @kbd{J a} the server (or servers) that you wish to have covered by the
11101 Agent (@pxref{Server Agent Commands}).  This will typically be only the
11102 primary select method, which is listed on the bottom in the buffer.
11103
11104 @item
11105 Decide on download policy.  @xref{Agent Categories}
11106
11107 @item
11108 Uhm... that's it.
11109 @end itemize
11110
11111
11112 @node Agent Categories
11113 @subsection Agent Categories
11114
11115 One of the main reasons to integrate the news transport layer into the
11116 newsreader is to allow greater control over what articles to download.
11117 There's not much point in downloading huge amounts of articles, just to
11118 find out that you're not interested in reading any of them.  It's better
11119 to be somewhat more conservative in choosing what to download, and then
11120 mark the articles for downloading manually if it should turn out that
11121 you're interested in the articles anyway.
11122
11123 The main way to control what is to be downloaded is to create a
11124 @dfn{category} and then assign some (or all) groups to this category. 
11125 Gnus has its own buffer for creating and managing categories.
11126
11127 @menu
11128 * Category Syntax::       What a category looks like.
11129 * The Category Buffer::   A buffer for maintaining categories.
11130 * Category Variables::    Customize'r'Us.
11131 @end menu
11132
11133
11134 @node Category Syntax
11135 @subsubsection Category Syntax
11136
11137 A category consists of two things.
11138
11139 @enumerate
11140 @item
11141 A predicate which (generally) gives a rough outline of which articles
11142 are eligible for downloading; and
11143
11144 @item
11145 a score rule which (generally) gives you a finer granularity when
11146 deciding what articles to download.  (Note that this @dfn{download
11147 score} is wholly unrelated to normal scores.)
11148 @end enumerate
11149
11150 A predicate consists of predicates with logical operators sprinkled in
11151 between.
11152
11153 Perhaps some examples are in order.
11154
11155 Here's a simple predicate.  (It's the default predicate, in fact, used
11156 for all groups that don't belong to any other category.)
11157
11158 @lisp
11159 short
11160 @end lisp
11161
11162 Quite simple, eh?  This predicate is true if and only if the article is
11163 short (for some value of ``short'').
11164
11165 Here's a more complex predicate:
11166
11167 @lisp
11168 (or high
11169     (and
11170      (not low)
11171      (not long)))
11172 @end lisp
11173
11174 This means that an article should be downloaded if it has a high score,
11175 or if the score is not low and the article is not long.  You get the
11176 drift.
11177
11178 The available logical operators are @code{or}, @code{and} and
11179 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
11180 @samp{|}, @code{&} and @code{!} instead.)
11181
11182 The following predicates are pre-defined, but if none of these fit what
11183 you want to do, you can write your own.
11184
11185 @table @code
11186 @item short
11187 True iff the article is shorter than @code{gnus-agent-short-article}
11188 lines; default 100.
11189
11190 @item long
11191 True iff the article is longer than @code{gnus-agent-long-article}
11192 lines; default 200.
11193
11194 @item low
11195 True iff the article has a download score less than
11196 @code{gnus-agent-low-score}; default 0.
11197
11198 @item high
11199 True iff the article has a download score greater than
11200 @code{gnus-agent-high-score}; default 0.
11201
11202 @item spam
11203 True iff the Gnus Agent guesses that the article is spam.  The
11204 heuristics may change over time, but at present it just computes a
11205 checksum and sees whether articles match.
11206
11207 @item true
11208 Always true.
11209
11210 @item false
11211 Always false.
11212 @end table
11213
11214 If you want to create your own predicate function, here's what you have
11215 to know:  The functions are called with no parameters, but the
11216 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
11217 useful values.
11218
11219 Now, the syntax of the download score is the same as the syntax of
11220 normal score files, except that all elements that require actually
11221 seeing the article itself are verboten.  This means that only the
11222 following headers can be scored on: @code{From}, @code{Subject},
11223 @code{Date}, @code{Xref}, @code{Lines}, @code{Chars}, @code{Message-ID},
11224 and @code{References}.
11225
11226
11227 @node The Category Buffer
11228 @subsubsection The Category Buffer
11229
11230 You'd normally do all category maintenance from the category buffer.
11231 When you enter it for the first time (with the @kbd{J c} command from
11232 the group buffer), you'll only see the @code{default} category.
11233
11234 The following commands are available in this buffer:
11235
11236 @table @kbd
11237 @item q
11238 @kindex q (Category)
11239 @findex gnus-category-exit
11240 Return to the group buffer (@code{gnus-category-exit}).
11241
11242 @item k
11243 @kindex k (Category)
11244 @findex gnus-category-kill
11245 Kill the current category (@code{gnus-category-kill}).
11246
11247 @item c
11248 @kindex c (Category)
11249 @findex gnus-category-copy
11250 Copy the current category (@code{gnus-category-copy}).
11251
11252 @item a
11253 @kindex a (Category)
11254 @findex gnus-category-add
11255 Add a new category (@code{gnus-category-add}).
11256
11257 @item p
11258 @kindex p (Category)
11259 @findex gnus-category-edit-predicate
11260 Edit the predicate of the current category
11261 (@code{gnus-category-edit-predicate}).
11262
11263 @item g
11264 @kindex g (Category)
11265 @findex gnus-category-edit-groups
11266 Edit the list of groups belonging to the current category
11267 (@code{gnus-category-edit-groups}).
11268
11269 @item s
11270 @kindex s (Category)
11271 @findex gnus-category-edit-score
11272 Edit the download score rule of the current category
11273 (@code{gnus-category-edit-score}).
11274
11275 @item l
11276 @kindex l (Category)
11277 @findex gnus-category-list
11278 List all the categories (@code{gnus-category-list}).
11279 @end table
11280
11281
11282 @node Category Variables
11283 @subsubsection Category Variables
11284
11285 @table @code
11286 @item gnus-category-mode-hook
11287 @vindex gnus-category-mode-hook
11288 Hook run in category buffers.
11289
11290 @item gnus-category-line-format
11291 @vindex gnus-category-line-format
11292 Format of the lines in the category buffer (@pxref{Formatting
11293 Variables}).  Legal elements are:
11294
11295 @table @samp
11296 @item c
11297 The name of the category.
11298
11299 @item g
11300 The number of groups in the category.
11301 @end table
11302
11303 @item gnus-category-mode-line-format
11304 @vindex gnus-category-mode-line-format
11305 Format of the category mode line.
11306
11307 @item gnus-agent-short-article 
11308 @vindex gnus-agent-short-article 
11309 Articles that have fewer lines than this are short.  Default 100.
11310
11311 @item gnus-agent-long-article 
11312 @vindex gnus-agent-long-article 
11313 Articles that have more lines than this are long.  Default 200.
11314
11315 @item gnus-agent-low-score 
11316 @vindex gnus-agent-low-score 
11317 Articles that have a score lower than this have a low score.  Default
11318 0. 
11319
11320 @item gnus-agent-high-score 
11321 @vindex gnus-agent-high-score 
11322 Articles that have a score higher than this have a high score.  Default
11323 0. 
11324
11325 @end table
11326
11327
11328 @node Agent Commands
11329 @subsection Agent Commands
11330
11331 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
11332 (@code{gnus-agent-toggle-plugged} command works in all modes, and
11333 toggles the plugged/unplugged state of the Gnus Agent.
11334
11335
11336 @menu
11337 * Group Agent Commands::
11338 * Summary Agent Commands::
11339 * Server Agent Commands::
11340 @end menu
11341
11342 You can run a complete batch fetch from the command line with the
11343 following incantation:
11344
11345 @cindex gnus-agent-batch-fetch
11346 @example
11347 $ emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch
11348 @end example
11349
11350
11351
11352 @node Group Agent Commands
11353 @subsubsection Group Agent Commands
11354
11355 @table @kbd
11356 @item J u 
11357 @kindex J u (Agent Group)
11358 @findex gnus-agent-fetch-group
11359 Fetch all eligible articles in the current group
11360 (@code{gnus-agent-fetch-group}).
11361
11362 @item J c
11363 @kindex J c (Agent Group)
11364 @findex gnus-enter-category-buffer
11365 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
11366
11367 @item J s
11368 @kindex J s (Agent Group)
11369 @findex gnus-agent-fetch-session
11370 Fetch all eligible articles in all groups
11371 (@code{gnus-agent-fetch-session}).
11372
11373 @item J S
11374 @kindex J S (Agent Group)
11375 @findex gnus-group-send-drafts
11376 Send all sendable messages in the draft group
11377 (@code{gnus-agent-fetch-session}).  @xref{Drafts}
11378
11379 @item J a
11380 @kindex J a (Agent Group)
11381 @findex gnus-agent-add-group
11382 Add the current group to an Agent category
11383 (@code{gnus-agent-add-group}).
11384
11385 @end table
11386
11387
11388 @node Summary Agent Commands
11389 @subsubsection Summary Agent Commands
11390
11391 @table @kbd
11392 @item J #
11393 @kindex J # (Agent Summary)
11394 @findex gnus-agent-mark-article
11395 Mark the article for downloading (@code{gnus-agent-mark-article}).
11396
11397 @item J M-#
11398 @kindex J M-# (Agent Summary)
11399 @findex gnus-agent-unmark-article
11400 Remove the downloading mark from the article
11401 (@code{gnus-agent-unmark-article}).
11402
11403 @item @@
11404 @kindex @@ (Agent Summary)
11405 @findex gnus-agent-toggle-mark
11406 Toggle whether to download the article (@code{gnus-agent-toggle-mark}).
11407
11408 @item J c
11409 @kindex J c (Agent Summary)
11410 @findex gnus-agent-catchup
11411 Mark all undownloaded articles as read (@code{gnus-agent-catchup}).
11412
11413 @end table
11414
11415
11416 @node Server Agent Commands
11417 @subsubsection Server Agent Commands
11418
11419 @table @kbd
11420 @item J a
11421 @kindex J a (Agent Server)
11422 @findex gnus-agent-add-server
11423 Add the current server to the list of servers covered by the Gnus Agent
11424 (@code{gnus-agent-add-server}).
11425
11426 @item J r
11427 @kindex J r (Agent Server)
11428 @findex gnus-agent-remove-server
11429 Remove the current server from the list of servers covered by the Gnus
11430 Agent (@code{gnus-agent-remove-server}).
11431
11432 @end table
11433
11434
11435 @node Outgoing Messages
11436 @subsection Outgoing Messages
11437
11438 When Gnus is unplugged, all outgoing messages (both mail and news) are
11439 stored in the draft groups (@pxref{Drafts}).  You can view them there
11440 after posting, and edit them at will.
11441
11442 When Gnus is plugged again, you can send the messages either from the
11443 draft group with the special commands available there, or you can use
11444 the @kbd{J S} command in the group buffer to send all the sendable
11445 messages in the draft group.
11446
11447
11448
11449 @node Agent Variables
11450 @subsection Agent Variables
11451
11452 @table @code
11453 @item gnus-agent-directory
11454 @vindex gnus-agent-directory
11455 Where the Gnus Agent will store its files.  The default is
11456 @file{~/News/agent/}.
11457
11458 @item gnus-agent-plugged-hook
11459 @vindex gnus-agent-plugged-hook
11460 Hook run when connecting to the network.
11461
11462 @item gnus-agent-unplugged-hook
11463 @vindex gnus-agent-unplugged-hook
11464 Hook run when disconnecting from the network.
11465
11466 @end table
11467
11468
11469 @node Example Setup
11470 @subsection Example Setup
11471
11472 If you don't want to read this manual, and you have a fairly standard
11473 setup, you may be able to use something like the following as your
11474 @file{.gnus.el} file to get started.
11475
11476 @lisp
11477 ;;; Define how Gnus is to fetch news.  We do this over NNTP
11478 ;;; from your ISP's server.
11479 (setq gnus-select-method '(nntp "nntp.your-isp.com"))
11480
11481 ;;; Define how Gnus is to read your mail.  We read mail from
11482 ;;; your ISP's POP server.
11483 (setenv "MAILHOST" "pop.your-isp.com")
11484 (setq nnmail-spool-file "po:username")
11485
11486 ;;; Say how Gnus is to store the mail.  We use nnml groups.
11487 (setq gnus-secondary-select-methods '((nnml "")))
11488
11489 ;;; Make Gnus into an offline newsreader.
11490 (gnus-agentize)
11491 @end lisp
11492
11493 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
11494 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
11495 gnus}.
11496
11497 If this is the first time you've run Gnus, you will be subscribed
11498 automatically to a few default newsgroups.  You'll probably want to
11499 subscribe to more groups, and to do that, you have to query the
11500 @sc{nntp} server for a complete list of groups with the @kbd{A A}
11501 command.  This usually takes quite a while, but you only have to do it
11502 once.
11503
11504 After reading and parsing a while, you'll be presented with a list of
11505 groups.  Subscribe to the ones you want to read with the @kbd{u}
11506 command.  @kbd{l} to make all the killed groups disappear after you've
11507 subscribe to all the groups you want to read.  (@kbd{A k} will bring
11508 back all the killed groups.)
11509
11510 You can now read the groups at once, or you can download the articles
11511 with the @kbd{J s} command.  And then read the rest of this manual to
11512 find out which of the other gazillion things you want to customize.
11513
11514
11515 @node Scoring
11516 @chapter Scoring
11517 @cindex scoring
11518
11519 Other people use @dfn{kill files}, but we here at Gnus Towers like
11520 scoring better than killing, so we'd rather switch than fight.  They do
11521 something completely different as well, so sit up straight and pay
11522 attention!
11523
11524 @vindex gnus-summary-mark-below
11525 All articles have a default score (@code{gnus-summary-default-score}),
11526 which is 0 by default.  This score may be raised or lowered either
11527 interactively or by score files.  Articles that have a score lower than
11528 @code{gnus-summary-mark-below} are marked as read.
11529
11530 Gnus will read any @dfn{score files} that apply to the current group
11531 before generating the summary buffer.
11532
11533 There are several commands in the summary buffer that insert score
11534 entries based on the current article.  You can, for instance, ask Gnus to
11535 lower or increase the score of all articles with a certain subject.
11536
11537 There are two sorts of scoring entries: Permanent and temporary.
11538 Temporary score entries are self-expiring entries.  Any entries that are
11539 temporary and have not been used for, say, a week, will be removed
11540 silently to help keep the sizes of the score files down.
11541
11542 @menu 
11543 * Summary Score Commands::   Adding score entries for the current group.
11544 * Group Score Commands::     General score commands.
11545 * Score Variables::          Customize your scoring.  (My, what terminology).
11546 * Score File Format::        What a score file may contain.
11547 * Score File Editing::       You can edit score files by hand as well.
11548 * Adaptive Scoring::         Big Sister Gnus knows what you read.
11549 * Home Score File::          How to say where new score entries are to go.
11550 * Followups To Yourself::    Having Gnus notice when people answer you.
11551 * Scoring Tips::             How to score effectively.
11552 * Reverse Scoring::          That problem child of old is not problem.
11553 * Global Score Files::       Earth-spanning, ear-splitting score files.
11554 * Kill Files::               They are still here, but they can be ignored.
11555 * Converting Kill Files::    Translating kill files to score files.
11556 * GroupLens::                Getting predictions on what you like to read.
11557 * Advanced Scoring::         Using logical expressions to build score rules.
11558 * Score Decays::             It can be useful to let scores wither away.
11559 @end menu
11560
11561
11562 @node Summary Score Commands
11563 @section Summary Score Commands
11564 @cindex score commands
11565
11566 The score commands that alter score entries do not actually modify real
11567 score files.  That would be too inefficient.  Gnus maintains a cache of
11568 previously loaded score files, one of which is considered the
11569 @dfn{current score file alist}.  The score commands simply insert
11570 entries into this list, and upon group exit, this list is saved.
11571
11572 The current score file is by default the group's local score file, even
11573 if no such score file actually exists.  To insert score commands into
11574 some other score file (e.g. @file{all.SCORE}), you must first make this
11575 score file the current one.
11576
11577 General score commands that don't actually change the score file:
11578
11579 @table @kbd
11580
11581 @item V s
11582 @kindex V s (Summary)
11583 @findex gnus-summary-set-score
11584 Set the score of the current article (@code{gnus-summary-set-score}).  
11585
11586 @item V S
11587 @kindex V S (Summary)
11588 @findex gnus-summary-current-score
11589 Display the score of the current article
11590 (@code{gnus-summary-current-score}).   
11591
11592 @item V t
11593 @kindex V t (Summary)
11594 @findex gnus-score-find-trace
11595 Display all score rules that have been used on the current article
11596 (@code{gnus-score-find-trace}).   
11597
11598 @item V R
11599 @kindex V R (Summary)
11600 @findex gnus-summary-rescore
11601 Run the current summary through the scoring process
11602 (@code{gnus-summary-rescore}).  This might be useful if you're playing
11603 around with your score files behind Gnus' back and want to see the
11604 effect you're having.
11605
11606 @item V a
11607 @kindex V a (Summary)
11608 @findex gnus-summary-score-entry
11609 Add a new score entry, and allow specifying all elements 
11610 (@code{gnus-summary-score-entry}).
11611
11612 @item V c
11613 @kindex V c (Summary)
11614 @findex gnus-score-change-score-file
11615 Make a different score file the current
11616 (@code{gnus-score-change-score-file}). 
11617
11618 @item V e
11619 @kindex V e (Summary)
11620 @findex gnus-score-edit-current-scores
11621 Edit the current score file (@code{gnus-score-edit-current-scores}).
11622 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
11623 File Editing}).
11624
11625 @item V f
11626 @kindex V f (Summary)
11627 @findex gnus-score-edit-file
11628 Edit a score file and make this score file the current one
11629 (@code{gnus-score-edit-file}).
11630
11631 @item V F
11632 @kindex V F (Summary)
11633 @findex gnus-score-flush-cache
11634 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
11635 after editing score files.
11636
11637 @item V C
11638 @kindex V C (Summary)
11639 @findex gnus-score-customize
11640 Customize a score file in a visually pleasing manner
11641 (@code{gnus-score-customize}). 
11642
11643 @end table
11644
11645 The rest of these commands modify the local score file.
11646
11647 @table @kbd
11648
11649 @item V m
11650 @kindex V m (Summary)
11651 @findex gnus-score-set-mark-below
11652 Prompt for a score, and mark all articles with a score below this as
11653 read (@code{gnus-score-set-mark-below}).
11654
11655 @item V x
11656 @kindex V x (Summary)
11657 @findex gnus-score-set-expunge-below
11658 Prompt for a score, and add a score rule to the current score file to
11659 expunge all articles below this score
11660 (@code{gnus-score-set-expunge-below}).
11661 @end table
11662
11663 The keystrokes for actually making score entries follow a very regular
11664 pattern, so there's no need to list all the commands.  (Hundreds of
11665 them.)  
11666
11667 @findex gnus-summary-increase-score
11668 @findex gnus-summary-lower-score
11669
11670 @enumerate
11671 @item
11672 The first key is either @kbd{I} (upper case i) for increasing the score
11673 or @kbd{L} for lowering the score. 
11674 @item
11675 The second key says what header you want to score on.  The following
11676 keys are available:
11677 @table @kbd
11678
11679 @item a
11680 Score on the author name.
11681
11682 @item s
11683 Score on the subject line.
11684
11685 @item x
11686 Score on the Xref line---i.e., the cross-posting line.
11687
11688 @item t
11689 Score on thread---the References line.
11690
11691 @item d
11692 Score on the date.
11693
11694 @item l
11695 Score on the number of lines.
11696
11697 @item i
11698 Score on the Message-ID.
11699
11700 @item f
11701 Score on followups.
11702
11703 @item b
11704 Score on the body.
11705
11706 @item h
11707 Score on the head.
11708 @end table
11709
11710 @item
11711 The third key is the match type.  Which match types are valid depends on
11712 what headers you are scoring on.
11713
11714 @table @code
11715
11716 @item strings 
11717
11718 @table @kbd
11719
11720 @item e
11721 Exact matching.
11722
11723 @item s
11724 Substring matching.
11725
11726 @item f
11727 Fuzzy matching (@pxref{Fuzzy Matching}).
11728
11729 @item r
11730 Regexp matching
11731 @end table
11732
11733 @item date
11734 @table @kbd
11735
11736 @item b
11737 Before date.
11738
11739 @item a
11740 At date.
11741
11742 @item n
11743 This date.
11744 @end table
11745
11746 @item number
11747 @table @kbd
11748
11749 @item <
11750 Less than number.
11751
11752 @item =
11753 Equal to number.
11754
11755 @item >
11756 Greater than number.
11757 @end table
11758 @end table
11759
11760 @item 
11761 The fourth and final key says whether this is a temporary (i.e., expiring)
11762 score entry, or a permanent (i.e., non-expiring) score entry, or whether
11763 it is to be done immediately, without adding to the score file.
11764 @table @kbd
11765
11766 @item t
11767 Temporary score entry.
11768
11769 @item p
11770 Permanent score entry.
11771
11772 @item i
11773 Immediately scoring.
11774 @end table
11775
11776 @end enumerate
11777
11778 So, let's say you want to increase the score on the current author with
11779 exact matching permanently: @kbd{I a e p}.  If you want to lower the
11780 score based on the subject line, using substring matching, and make a
11781 temporary score entry: @kbd{L s s t}.  Pretty easy.
11782
11783 To make things a bit more complicated, there are shortcuts.  If you use
11784 a capital letter on either the second or third keys, Gnus will use
11785 defaults for the remaining one or two keystrokes.  The defaults are
11786 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
11787 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
11788
11789 These functions take both the numerical prefix and the symbolic prefix
11790 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
11791 (or increase) the score of the article.  A symbolic prefix of @code{a}
11792 says to use the @file{all.SCORE} file for the command instead of the
11793 current score file.
11794
11795 @vindex gnus-score-mimic-keymap
11796 The @code{gnus-score-mimic-keymap} says whether these commands will
11797 pretend they are keymaps or not.
11798
11799
11800 @node Group Score Commands
11801 @section Group Score Commands
11802 @cindex group score commands
11803
11804 There aren't many of these as yet, I'm afraid.
11805
11806 @table @kbd
11807
11808 @item W f
11809 @kindex W f (Group)
11810 @findex gnus-score-flush-cache
11811 Gnus maintains a cache of score alists to avoid having to reload them
11812 all the time.  This command will flush the cache
11813 (@code{gnus-score-flush-cache}). 
11814
11815 @end table
11816
11817
11818 @node Score Variables
11819 @section Score Variables
11820 @cindex score variables
11821
11822 @table @code
11823
11824 @item gnus-use-scoring
11825 @vindex gnus-use-scoring
11826 If @code{nil}, Gnus will not check for score files, and will not, in
11827 general, do any score-related work.  This is @code{t} by default.
11828
11829 @item gnus-kill-killed
11830 @vindex gnus-kill-killed
11831 If this variable is @code{nil}, Gnus will never apply score files to
11832 articles that have already been through the kill process.  While this
11833 may save you lots of time, it also means that if you apply a kill file
11834 to a group, and then change the kill file and want to run it over you
11835 group again to kill more articles, it won't work.  You have to set this
11836 variable to @code{t} to do that.  (It is @code{t} by default.)
11837
11838 @item gnus-kill-files-directory
11839 @vindex gnus-kill-files-directory
11840 All kill and score files will be stored in this directory, which is
11841 initialized from the @code{SAVEDIR} environment variable by default.
11842 This is @file{~/News/} by default.
11843
11844 @item gnus-score-file-suffix
11845 @vindex gnus-score-file-suffix
11846 Suffix to add to the group name to arrive at the score file name
11847 (@samp{SCORE} by default.)
11848
11849 @item gnus-score-uncacheable-files
11850 @vindex gnus-score-uncacheable-files
11851 @cindex score cache
11852 All score files are normally cached to avoid excessive re-loading of
11853 score files.  However, if this might make you Emacs grow big and
11854 bloated, so this regexp can be used to weed out score files unlikely to be needed again.  It would be a bad idea to deny caching of
11855 @file{all.SCORE}, while it might be a good idea to not cache
11856 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
11857 variable is @samp{ADAPT$} by default, so no adaptive score files will
11858 be cached.
11859
11860 @item gnus-save-score
11861 @vindex gnus-save-score
11862 If you have really complicated score files, and do lots of batch
11863 scoring, then you might set this variable to @code{t}.  This will make
11864 Gnus save the scores into the @file{.newsrc.eld} file.
11865
11866 @item gnus-score-interactive-default-score
11867 @vindex gnus-score-interactive-default-score
11868 Score used by all the interactive raise/lower commands to raise/lower
11869 score with.  Default is 1000, which may seem excessive, but this is to
11870 ensure that the adaptive scoring scheme gets enough room to play with.
11871 We don't want the small changes from the adaptive scoring to overwrite
11872 manually entered data.
11873
11874 @item gnus-summary-default-score
11875 @vindex gnus-summary-default-score
11876 Default score of an article, which is 0 by default.
11877
11878 @item gnus-summary-expunge-below
11879 @vindex gnus-summary-expunge-below
11880 Don't display the summary lines of articles that have scores lower than
11881 this variable.  This is @code{nil} by default, which means that no
11882 articles will be hidden.  This variable is local to the summary buffers,
11883 and has to be set from @code{gnus-summary-mode-hook}.
11884
11885 @item gnus-score-over-mark
11886 @vindex gnus-score-over-mark
11887 Mark (in the third column) used for articles with a score over the
11888 default.  Default is @samp{+}.
11889
11890 @item gnus-score-below-mark
11891 @vindex gnus-score-below-mark
11892 Mark (in the third column) used for articles with a score below the
11893 default.  Default is @samp{-}.
11894
11895 @item gnus-score-find-score-files-function
11896 @vindex gnus-score-find-score-files-function
11897 Function used to find score files for the current group.  This function
11898 is called with the name of the group as the argument. 
11899
11900 Predefined functions available are:
11901 @table @code
11902
11903 @item gnus-score-find-single
11904 @findex gnus-score-find-single
11905 Only apply the group's own score file.
11906
11907 @item gnus-score-find-bnews
11908 @findex gnus-score-find-bnews
11909 Apply all score files that match, using bnews syntax.  This is the
11910 default.  If the current group is @samp{gnu.emacs.gnus}, for instance, 
11911 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
11912 @file{gnu.all.SCORE} would all apply.  In short, the instances of
11913 @samp{all} in the score file names are translated into @samp{.*}, and
11914 then a regexp match is done.
11915
11916 This means that if you have some score entries that you want to apply to
11917 all groups, then you put those entries in the @file{all.SCORE} file. 
11918
11919 The score files are applied in a semi-random order, although Gnus will
11920 try to apply the more general score files before the more specific score
11921 files.  It does this by looking at the number of elements in the score
11922 file names---discarding the @samp{all} elements.
11923
11924 @item gnus-score-find-hierarchical
11925 @findex gnus-score-find-hierarchical
11926 Apply all score files from all the parent groups.  This means that you
11927 can't have score files like @file{all.SCORE}, but you can have
11928 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE}.
11929
11930 @end table
11931 This variable can also be a list of functions.  In that case, all these
11932 functions will be called, and all the returned lists of score files will
11933 be applied.  These functions can also return lists of score alists
11934 directly.  In that case, the functions that return these non-file score
11935 alists should probably be placed before the ``real'' score file
11936 functions, to ensure that the last score file returned is the local
11937 score file.  Phu.
11938
11939 @item gnus-score-expiry-days
11940 @vindex gnus-score-expiry-days
11941 This variable says how many days should pass before an unused score file
11942 entry is expired.  If this variable is @code{nil}, no score file entries
11943 are expired.  It's 7 by default.
11944
11945 @item gnus-update-score-entry-dates
11946 @vindex gnus-update-score-entry-dates
11947 If this variable is non-@code{nil}, matching score entries will have
11948 their dates updated.  (This is how Gnus controls expiry---all
11949 non-matching entries will become too old while matching entries will
11950 stay fresh and young.)  However, if you set this variable to @code{nil},
11951 even matching entries will grow old and will have to face that oh-so
11952 grim reaper.  
11953
11954 @item gnus-score-after-write-file-function
11955 @vindex gnus-score-after-write-file-function
11956 Function called with the name of the score file just written.
11957
11958 @end table
11959
11960
11961 @node Score File Format
11962 @section Score File Format
11963 @cindex score file format
11964
11965 A score file is an @code{emacs-lisp} file that normally contains just a
11966 single form.  Casual users are not expected to edit these files;
11967 everything can be changed from the summary buffer.
11968
11969 Anyway, if you'd like to dig into it yourself, here's an example:
11970
11971 @lisp
11972 (("from"
11973   ("Lars Ingebrigtsen" -10000)
11974   ("Per Abrahamsen")
11975   ("larsi\\|lmi" -50000 nil R))
11976  ("subject"
11977   ("Ding is Badd" nil 728373))
11978  ("xref"
11979   ("alt.politics" -1000 728372 s))
11980  ("lines"
11981   (2 -100 nil <))
11982  (mark 0)
11983  (expunge -1000)
11984  (mark-and-expunge -10)
11985  (read-only nil)
11986  (orphan -10)
11987  (adapt t)
11988  (files "/hom/larsi/News/gnu.SCORE")
11989  (exclude-files "all.SCORE")
11990  (local (gnus-newsgroup-auto-expire t)
11991         (gnus-summary-make-false-root empty))
11992  (eval (ding)))
11993 @end lisp
11994
11995 This example demonstrates most score file elements.  For a different
11996 approach, see @pxref{Advanced Scoring}.
11997
11998 Even though this looks much like lisp code, nothing here is actually
11999 @code{eval}ed.  The lisp reader is used to read this form, though, so it
12000 has to be valid syntactically, if not semantically.
12001
12002 Six keys are supported by this alist:
12003
12004 @table @code
12005
12006 @item STRING
12007 If the key is a string, it is the name of the header to perform the
12008 match on.  Scoring can only be performed on these eight headers:
12009 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
12010 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
12011 these headers, there are three strings to tell Gnus to fetch the entire
12012 article and do the match on larger parts of the article: @code{Body}
12013 will perform the match on the body of the article, @code{Head} will
12014 perform the match on the head of the article, and @code{All} will
12015 perform the match on the entire article.  Note that using any of these
12016 last three keys will slow down group entry @emph{considerably}.  The
12017 final ``header'' you can score on is @code{Followup}.  These score
12018 entries will result in new score entries being added for all follow-ups
12019 to articles that matches these score entries.
12020
12021 Following this key is a arbitrary number of score entries, where each
12022 score entry has one to four elements.
12023 @enumerate
12024
12025 @item 
12026 The first element is the @dfn{match element}.  On most headers this will
12027 be a string, but on the Lines and Chars headers, this must be an
12028 integer. 
12029
12030 @item 
12031 If the second element is present, it should be a number---the @dfn{score
12032 element}.  This number should be an integer in the neginf to posinf
12033 interval.  This number is added to the score of the article if the match
12034 is successful.  If this element is not present, the
12035 @code{gnus-score-interactive-default-score} number will be used
12036 instead.  This is 1000 by default.
12037
12038 @item 
12039 If the third element is present, it should be a number---the @dfn{date
12040 element}.  This date says when the last time this score entry matched,
12041 which provides a mechanism for expiring the score entries.  It this
12042 element is not present, the score entry is permanent.  The date is
12043 represented by the number of days since December 31, 1 BCE.
12044
12045 @item 
12046 If the fourth element is present, it should be a symbol---the @dfn{type
12047 element}.  This element specifies what function should be used to see
12048 whether this score entry matches the article.  What match types that can
12049 be used depends on what header you wish to perform the match on.
12050 @table @dfn
12051
12052 @item From, Subject, References, Xref, Message-ID
12053 For most header types, there are the @code{r} and @code{R} (regexp), as
12054 well as @code{s} and @code{S} (substring) types, and @code{e} and
12055 @code{E} (exact match), and @code{w} (word match) types.  If this
12056 element is not present, Gnus will assume that substring matching should
12057 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
12058 that the matches will be done in a case-sensitive manner.  All these
12059 one-letter types are really just abbreviations for the @code{regexp},
12060 @code{string}, @code{exact}, and @code{word} types, which you can use
12061 instead, if you feel like.
12062
12063 @item Lines, Chars
12064 These two headers use different match types: @code{<}, @code{>},
12065 @code{=}, @code{>=} and @code{<=}.  When matching on @code{Lines}, be
12066 careful because some backends (like @code{nndir}) do not generate
12067 @code{Lines} header, so every article ends up being marked as having 0
12068 lines.  This can lead to strange results if you happen to lower score of
12069 the articles with few lines.
12070
12071 @item Date
12072 For the Date header we have three kinda silly match types:
12073 @code{before}, @code{at} and @code{after}.  I can't really imagine this
12074 ever being useful, but, like, it would feel kinda silly not to provide
12075 this function.  Just in case.  You never know.  Better safe than sorry.
12076 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
12077 sex on a first date.  (I have been told that at least one person, and I
12078 quote, ``found this function indispensable'', however.)
12079
12080 @cindex ISO8601
12081 @cindex date
12082 A more useful match type is @code{regexp}.  With it, you can match the
12083 date string using a regular expression.  The date is normalized to
12084 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
12085 you want to match all articles that have been posted on April 1st in
12086 every year, you could use @samp{....0401.........} as a match string,
12087 for instance.  (Note that the date is kept in its original time zone, so
12088 this will match articles that were posted when it was April 1st where
12089 the article was posted from.  Time zones are such wholesome fun for the
12090 whole family, eh?)
12091
12092 @item Head, Body, All
12093 These three match keys use the same match types as the @code{From} (etc)
12094 header uses.
12095
12096 @item Followup
12097 This match key is somewhat special, in that it will match the
12098 @code{From} header, and affect the score of not only the matching
12099 articles, but also all followups to the matching articles.  This allows
12100 you e.g. increase the score of followups to your own articles, or
12101 decrease the score of followups to the articles of some known
12102 trouble-maker.  Uses the same match types as the @code{From} header
12103 uses.  (Using this match key will lead to creation of @file{ADAPT}
12104 files.) 
12105
12106 @item Thread
12107 This match key works along the same lines as the @code{Followup} match
12108 key.  If you say that you want to score on a (sub-)thread started by an article with a @code{Message-ID} @var{X}, then you add a
12109 @samp{thread} match.  This will add a new @samp{thread} match for each
12110 article that has @var{X} in its @code{References} header.  (These new
12111 @samp{thread} matches will use the @code{Message-ID}s of these matching
12112 articles.)  This will ensure that you can raise/lower the score of an
12113 entire thread, even though some articles in the thread may not have
12114 complete @code{References} headers.  Note that using this may lead to
12115 undeterministic scores of the articles in the thread.  (Using this match
12116 key will lead to creation of @file{ADAPT} files.)
12117 @end table
12118 @end enumerate
12119
12120 @cindex Score File Atoms
12121 @item mark
12122 The value of this entry should be a number.  Any articles with a score
12123 lower than this number will be marked as read.
12124
12125 @item expunge
12126 The value of this entry should be a number.  Any articles with a score
12127 lower than this number will be removed from the summary buffer.
12128
12129 @item mark-and-expunge
12130 The value of this entry should be a number.  Any articles with a score
12131 lower than this number will be marked as read and removed from the
12132 summary buffer.
12133
12134 @item thread-mark-and-expunge
12135 The value of this entry should be a number.  All articles that belong to
12136 a thread that has a total score below this number will be marked as read
12137 and removed from the summary buffer.  @code{gnus-thread-score-function}
12138 says how to compute the total score for a thread.
12139
12140 @item files
12141 The value of this entry should be any number of file names.  These files
12142 are assumed to be score files as well, and will be loaded the same way
12143 this one was.
12144
12145 @item exclude-files
12146 The clue of this entry should be any number of files.  These files will
12147 not be loaded, even though they would normally be so, for some reason or
12148 other. 
12149
12150 @item eval
12151 The value of this entry will be @code{eval}el.  This element will be
12152 ignored when handling global score files. 
12153
12154 @item read-only
12155 Read-only score files will not be updated or saved.  Global score files
12156 should feature this atom (@pxref{Global Score Files}).
12157
12158 @item orphan
12159 The value of this entry should be a number.  Articles that do not have
12160 parents will get this number added to their scores.  Imagine you follow
12161 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
12162 will only follow a few of the threads, also want to see any new threads.
12163
12164 You can do this with the following two score file entries:
12165
12166 @example
12167         (orphan -500)
12168         (mark-and-expunge -100)
12169 @end example
12170
12171 When you enter the group the first time, you will only see the new
12172 threads.  You then raise the score of the threads that you find
12173 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
12174 rest.  Next time you enter the group, you will see new articles in the
12175 interesting threads, plus any new threads.
12176
12177 I.e.---the orphan score atom is for high-volume groups where there
12178 exist a few interesting threads which can't be found automatically by
12179 ordinary scoring rules.
12180
12181 @item adapt
12182 This entry controls the adaptive scoring.  If it is @code{t}, the
12183 default adaptive scoring rules will be used.  If it is @code{ignore}, no
12184 adaptive scoring will be performed on this group.  If it is a list, this
12185 list will be used as the adaptive scoring rules.  If it isn't present,
12186 or is something other than @code{t} or @code{ignore}, the default
12187 adaptive scoring rules will be used.  If you want to use adaptive
12188 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
12189 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
12190 not want adaptive scoring.  If you only want adaptive scoring in a few
12191 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
12192 insert @code{(adapt t)} in the score files of the groups where you want
12193 it. 
12194
12195 @item adapt-file
12196 All adaptive score entries will go to the file named by this entry.  It
12197 will also be applied when entering the group.  This atom might be handy
12198 if you want to adapt on several groups at once, using the same adaptive
12199 file for a number of groups.
12200
12201 @item local
12202 @cindex local variables
12203 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
12204 Each @var{var} will be made buffer-local to the current summary buffer,
12205 and set to the value specified.  This is a convenient, if somewhat
12206 strange, way of setting variables in some groups if you don't like hooks
12207 much.  Note that the @var{value} won't be evaluated.
12208 @end table
12209
12210
12211 @node Score File Editing
12212 @section Score File Editing
12213
12214 You normally enter all scoring commands from the summary buffer, but you
12215 might feel the urge to edit them by hand as well, so we've supplied you
12216 with a mode for that.  
12217
12218 It's simply a slightly customized @code{emacs-lisp} mode, with these
12219 additional commands:
12220
12221 @table @kbd
12222
12223 @item C-c C-c
12224 @kindex C-c C-c (Score)
12225 @findex gnus-score-edit-done
12226 Save the changes you have made and return to the summary buffer
12227 (@code{gnus-score-edit-done}). 
12228
12229 @item C-c C-d
12230 @kindex C-c C-d (Score)
12231 @findex gnus-score-edit-insert-date
12232 Insert the current date in numerical format
12233 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
12234 you were wondering.
12235
12236 @item C-c C-p
12237 @kindex C-c C-p (Score)
12238 @findex gnus-score-pretty-print
12239 The adaptive score files are saved in an unformatted fashion.  If you
12240 intend to read one of these files, you want to @dfn{pretty print} it
12241 first.  This command (@code{gnus-score-pretty-print}) does that for
12242 you. 
12243
12244 @end table
12245
12246 Type @kbd{M-x gnus-score-mode} to use this mode.
12247
12248 @vindex gnus-score-mode-hook
12249 @code{gnus-score-menu-hook} is run in score mode buffers.
12250
12251 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
12252 e} to begin editing score files.
12253
12254
12255 @node Adaptive Scoring
12256 @section Adaptive Scoring
12257 @cindex adaptive scoring
12258
12259 If all this scoring is getting you down, Gnus has a way of making it all
12260 happen automatically---as if by magic.  Or rather, as if by artificial
12261 stupidity, to be precise.
12262
12263 @vindex gnus-use-adaptive-scoring
12264 When you read an article, or mark an article as read, or kill an
12265 article, you leave marks behind.  On exit from the group, Gnus can sniff
12266 these marks and add score elements depending on what marks it finds.
12267 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
12268 @code{t} or @code{(line)}.  If you want score adaptively on separate
12269 words appearing in the subjects, you should set this variable to
12270 @code{(word)}.  If you want to use both adaptive methods, set this
12271 variable to @code{(word line)}.
12272
12273 @vindex gnus-default-adaptive-score-alist
12274 To give you complete control over the scoring process, you can customize
12275 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
12276 might look something like this:
12277
12278 @lisp
12279 (defvar gnus-default-adaptive-score-alist
12280   '((gnus-unread-mark)
12281     (gnus-ticked-mark (from 4))
12282     (gnus-dormant-mark (from 5))
12283     (gnus-del-mark (from -4) (subject -1))
12284     (gnus-read-mark (from 4) (subject 2))
12285     (gnus-expirable-mark (from -1) (subject -1))
12286     (gnus-killed-mark (from -1) (subject -3))
12287     (gnus-kill-file-mark)
12288     (gnus-ancient-mark)
12289     (gnus-low-score-mark)
12290     (gnus-catchup-mark (from -1) (subject -1))))
12291 @end lisp
12292
12293 As you see, each element in this alist has a mark as a key (either a
12294 variable name or a ``real'' mark---a character).  Following this key is
12295 a arbitrary number of header/score pairs.  If there are no header/score
12296 pairs following the key, no adaptive scoring will be done on articles
12297 that have that key as the article mark.  For instance, articles with
12298 @code{gnus-unread-mark} in the example above will not get adaptive score
12299 entries.
12300
12301 Each article can have only one mark, so just a single of these rules
12302 will be applied to each article.
12303
12304 To take @code{gnus-del-mark} as an example---this alist says that all
12305 articles that have that mark (i.e., are marked with @samp{D}) will have a
12306 score entry added to lower based on the @code{From} header by -4, and
12307 lowered by @code{Subject} by -1.  Change this to fit your prejudices. 
12308
12309 If you have marked 10 articles with the same subject with
12310 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
12311 That means that that subject will get a score of ten times -1, which
12312 should be, unless I'm much mistaken, -10.
12313
12314 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
12315 the read articles will be marked with the @samp{E} mark.  This'll
12316 probably make adaptive scoring slightly impossible, so auto-expiring and
12317 adaptive scoring doesn't really mix very well.
12318
12319 The headers you can score on are @code{from}, @code{subject},
12320 @code{message-id}, @code{references}, @code{xref}, @code{lines},
12321 @code{chars} and @code{date}.  In addition, you can score on
12322 @code{followup}, which will create an adaptive score entry that matches
12323 on the @code{References} header using the @code{Message-ID} of the
12324 current article, thereby matching the following thread.  
12325
12326 You can also score on @code{thread}, which will try to score all
12327 articles that appear in a thread.  @code{thread} matches uses a
12328 @code{Message-ID} to match on the @code{References} header of the
12329 article.  If the match is made, the @code{Message-ID} of the article is
12330 added to the @code{thread} rule.  (Think about it.  I'd recommend two
12331 aspirins afterwards.)
12332
12333 If you use this scheme, you should set the score file atom @code{mark}
12334 to something small---like -300, perhaps, to avoid having small random
12335 changes result in articles getting marked as read.
12336
12337 After using adaptive scoring for a week or so, Gnus should start to
12338 become properly trained and enhance the authors you like best, and kill
12339 the authors you like least, without you having to say so explicitly. 
12340
12341 You can control what groups the adaptive scoring is to be performed on
12342 by using the score files (@pxref{Score File Format}).  This will also
12343 let you use different rules in different groups.
12344
12345 @vindex gnus-adaptive-file-suffix
12346 The adaptive score entries will be put into a file where the name is the
12347 group name with @code{gnus-adaptive-file-suffix} appended.  The default
12348 is @samp{ADAPT}.
12349
12350 @vindex gnus-score-exact-adapt-limit
12351 When doing adaptive scoring, substring or fuzzy matching would probably
12352 give you the best results in most cases.  However, if the header one
12353 matches is short, the possibility for false positives is great, so if
12354 the length of the match is less than
12355 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
12356 this variable is @code{nil}, exact matching will always be used to avoid
12357 this problem.
12358
12359 @vindex gnus-default-adaptive-word-score-alist
12360 As mentioned above, you can adapt either on individual words or entire
12361 headers.  If you adapt on words, the
12362 @code{gnus-default-adaptive-word-score-alist} variable says what score
12363 each instance of a word should add given a mark.
12364
12365 @lisp
12366 (setq gnus-default-adaptive-word-score-alist  
12367       `((,gnus-read-mark . 30)
12368         (,gnus-catchup-mark . -10)
12369         (,gnus-killed-mark . -20)
12370         (,gnus-del-mark . -15)))
12371 @end lisp
12372
12373 This is the default value.  If you have adaption on words enabled, every
12374 word that appears in subjects of articles marked with
12375 @code{gnus-read-mark} will result in a score rule that increase the
12376 score with 30 points.
12377
12378 @vindex gnus-default-ignored-adaptive-words
12379 @vindex gnus-ignored-adaptive-words
12380 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
12381 will be ignored.  If you wish to add more words to be ignored, use the
12382 @code{gnus-ignored-adaptive-words} list instead.
12383
12384 @vindex gnus-adaptive-word-syntax-table
12385 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
12386 syntax table in effect.  It is similar to the standard syntax table, but
12387 it considers numbers to be non-word-constituent characters.
12388
12389 After using this scheme for a while, it might be nice to write a
12390 @code{gnus-psychoanalyze-user} command to go through the rules and see
12391 what words you like and what words you don't like.  Or perhaps not.
12392
12393 Note that the adaptive word scoring thing is highly experimental and is
12394 likely to change in the future.  Initial impressions seem to indicate
12395 that it's totally useless as it stands.  Some more work (involving more
12396 rigorous statistical methods) will have to be done to make this useful. 
12397
12398
12399 @node Home Score File
12400 @section Home Score File
12401
12402 The score file where new score file entries will go is called the
12403 @dfn{home score file}.  This is normally (and by default) the score file
12404 for the group itself.  For instance, the home score file for
12405 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
12406
12407 However, this may not be what you want.  It is often convenient to share
12408 a common home score file among many groups---all @samp{emacs} groups
12409 could perhaps use the same home score file.
12410
12411 @vindex gnus-home-score-file
12412 The variable that controls this is @code{gnus-home-score-file}.  It can
12413 be:
12414
12415 @enumerate
12416 @item
12417 A string.  Then this file will be used as the home score file for all
12418 groups. 
12419
12420 @item
12421 A function. The result of this function will be used as the home score
12422 file.  The function will be called with the name of the group as the
12423 parameter. 
12424
12425 @item
12426 A list.  The elements in this list can be:
12427
12428 @enumerate
12429 @item 
12430 @var{(regexp file-name)}.  If the @var{regexp} matches the group name,
12431 the @var{file-name} will will be used as the home score file.
12432
12433 @item 
12434 A function. If the function returns non-nil, the result will be used as
12435 the home score file.
12436
12437 @item 
12438 A string.  Use the string as the home score file.
12439 @end enumerate
12440
12441 The list will be traversed from the beginning towards the end looking
12442 for matches.
12443
12444 @end enumerate
12445
12446 So, if you want to use just a single score file, you could say:
12447
12448 @lisp
12449 (setq gnus-home-score-file
12450       "my-total-score-file.SCORE")
12451 @end lisp
12452
12453 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
12454 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
12455
12456 @lisp
12457 (setq gnus-home-score-file
12458       'gnus-hierarchial-home-score-file)
12459 @end lisp
12460
12461 This is a ready-made function provided for your convenience.
12462
12463 If you want to have one score file for the @samp{emacs} groups and
12464 another for the @samp{comp} groups, while letting all other groups use
12465 their own home score files:
12466
12467 @lisp
12468 (setq gnus-home-score-file
12469       ;; All groups that match the regexp "\\.emacs"
12470       '("\\.emacs" "emacs.SCORE")
12471       ;; All the comp groups in one score file
12472        ("^comp" "comp.SCORE"))
12473 @end lisp
12474    
12475 @vindex gnus-home-adapt-file
12476 @code{gnus-home-adapt-file} works exactly the same way as
12477 @code{gnus-home-score-file}, but says what the home adaptive score file
12478 is instead.  All new adaptive file entries will go into the file
12479 specified by this variable, and the same syntax is allowed.
12480
12481 In addition to using @code{gnus-home-score-file} and
12482 @code{gnus-home-adapt-file}, you can also use group parameters
12483 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
12484 Parameters}) to achieve much the same.  Group and topic parameters take
12485 precedence over this variable.
12486
12487
12488 @node Followups To Yourself
12489 @section Followups To Yourself
12490
12491 Gnus offers two commands for picking out the @code{Message-ID} header in
12492 the current buffer.  Gnus will then add a score rule that scores using
12493 this @code{Message-ID} on the @code{References} header of other
12494 articles.  This will, in effect, increase the score of all articles that
12495 respond to the article in the current buffer.  Quite useful if you want
12496 to easily note when people answer what you've said.
12497
12498 @table @code
12499
12500 @item gnus-score-followup-article
12501 @findex gnus-score-followup-article
12502 This will add a score to articles that directly follow up your own
12503 article. 
12504
12505 @item gnus-score-followup-thread
12506 @findex gnus-score-followup-thread
12507 This will add a score to all articles that appear in a thread ``below''
12508 your own article.
12509 @end table
12510
12511 @vindex message-sent-hook
12512 These two functions are both primarily meant to be used in hooks like
12513 @code{message-sent-hook}.  
12514
12515 If you look closely at your own @code{Message-ID}, you'll notice that
12516 the first two or three characters are always the same.  Here's two of
12517 mine:  
12518
12519 @example
12520 <x6u3u47icf.fsf@@eyesore.no>
12521 <x6sp9o7ibw.fsf@@eyesore.no>
12522 @end example
12523
12524 So ``my'' ident on this machine is @samp{x6}.  This can be
12525 exploited---the following rule will raise the score on all followups to
12526 myself: 
12527
12528 @lisp
12529 ("references"
12530  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore.no>"
12531   1000 nil r))
12532 @end lisp
12533
12534 Whether it's the first two or first three characters that are ``yours''
12535 is system-dependent.
12536
12537
12538 @node Scoring Tips
12539 @section Scoring Tips
12540 @cindex scoring tips
12541
12542 @table @dfn
12543
12544 @item Crossposts
12545 @cindex crossposts
12546 @cindex scoring crossposts
12547 If you want to lower the score of crossposts, the line to match on is
12548 the @code{Xref} header.
12549 @lisp
12550 ("xref" (" talk.politics.misc:" -1000))
12551 @end lisp
12552
12553 @item Multiple crossposts
12554 If you want to lower the score of articles that have been crossposted to
12555 more than, say, 3 groups:
12556 @lisp
12557 ("xref" ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+" -1000 nil r))
12558 @end lisp
12559
12560 @item Matching on the body
12561 This is generally not a very good idea---it takes a very long time.
12562 Gnus actually has to fetch each individual article from the server.  But
12563 you might want to anyway, I guess.  Even though there are three match
12564 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
12565 and stick with it in each score file.  If you use any two, each article
12566 will be fetched @emph{twice}.  If you want to match a bit on the
12567 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
12568 the matches.  
12569
12570 @item Marking as read
12571 You will probably want to mark articles that has a score below a certain
12572 number as read.  This is most easily achieved by putting the following
12573 in your @file{all.SCORE} file:
12574 @lisp
12575 ((mark -100))
12576 @end lisp
12577 You may also consider doing something similar with @code{expunge}.  
12578
12579 @item Negated character classes
12580 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
12581 That will match newlines, which might lead to, well, The Unknown.  Say
12582 @code{[^abcd\n]*} instead.
12583 @end table
12584
12585
12586 @node Reverse Scoring
12587 @section Reverse Scoring
12588 @cindex reverse scoring
12589
12590 If you want to keep just articles that have @samp{Sex with Emacs} in the
12591 subject header, and expunge all other articles, you could put something
12592 like this in your score file:
12593
12594 @lisp
12595 (("subject"
12596   ("Sex with Emacs" 2))
12597  (mark 1)
12598  (expunge 1))
12599 @end lisp
12600
12601 So, you raise all articles that match @samp{Sex with Emacs} and mark the
12602 rest as read, and expunge them to boot.
12603
12604
12605 @node Global Score Files
12606 @section Global Score Files
12607 @cindex global score files
12608
12609 Sure, other newsreaders have ``global kill files''.  These are usually
12610 nothing more than a single kill file that applies to all groups, stored
12611 in the user's home directory.  Bah!  Puny, weak newsreaders!
12612
12613 What I'm talking about here are Global Score Files.  Score files from
12614 all over the world, from users everywhere, uniting all nations in one
12615 big, happy score file union!  Ange-score!  New and untested!
12616
12617 @vindex gnus-global-score-files
12618 All you have to do to use other people's score files is to set the
12619 @code{gnus-global-score-files} variable.  One entry for each score file,
12620 or each score file directory.  Gnus will decide by itself what score
12621 files are applicable to which group.
12622
12623 Say you want to use the score file
12624 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
12625 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory:
12626
12627 @lisp
12628 (setq gnus-global-score-files
12629       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
12630         "/ftp@@ftp.some-where:/pub/score/"))
12631 @end lisp
12632
12633 @findex gnus-score-search-global-directories
12634 Simple, eh?  Directory names must end with a @samp{/}.  These
12635 directories are typically scanned only once during each Gnus session.
12636 If you feel the need to manually re-scan the remote directories, you can
12637 use the @code{gnus-score-search-global-directories} command.
12638
12639 Note that, at present, using this option will slow down group entry
12640 somewhat.  (That is---a lot.)
12641
12642 If you want to start maintaining score files for other people to use,
12643 just put your score file up for anonymous ftp and announce it to the
12644 world.  Become a retro-moderator!  Participate in the retro-moderator
12645 wars sure to ensue, where retro-moderators battle it out for the
12646 sympathy of the people, luring them to use their score files on false
12647 premises!  Yay!  The net is saved!
12648
12649 Here are some tips for the would-be retro-moderator, off the top of my
12650 head: 
12651
12652 @itemize @bullet
12653
12654 @item 
12655 Articles heavily crossposted are probably junk. 
12656 @item
12657 To lower a single inappropriate article, lower by @code{Message-ID}.
12658 @item
12659 Particularly brilliant authors can be raised on a permanent basis. 
12660 @item
12661 Authors that repeatedly post off-charter for the group can safely be
12662 lowered out of existence.
12663 @item
12664 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
12665 articles completely.
12666
12667 @item 
12668 Use expiring score entries to keep the size of the file down.  You
12669 should probably have a long expiry period, though, as some sites keep
12670 old articles for a long time.
12671 @end itemize
12672
12673 ... I wonder whether other newsreaders will support global score files
12674 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
12675 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
12676 holding our breath yet?
12677
12678
12679 @node Kill Files
12680 @section Kill Files
12681 @cindex kill files
12682
12683 Gnus still supports those pesky old kill files.  In fact, the kill file
12684 entries can now be expiring, which is something I wrote before Daniel
12685 Quinlan thought of doing score files, so I've left the code in there.
12686
12687 In short, kill processing is a lot slower (and I do mean @emph{a lot})
12688 than score processing, so it might be a good idea to rewrite your kill
12689 files into score files.
12690
12691 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
12692 forms into this file, which means that you can use kill files as some
12693 sort of primitive hook function to be run on group entry, even though
12694 that isn't a very good idea.
12695
12696 Normal kill files look like this:
12697
12698 @lisp
12699 (gnus-kill "From" "Lars Ingebrigtsen")
12700 (gnus-kill "Subject" "ding")
12701 (gnus-expunge "X")
12702 @end lisp
12703
12704 This will mark every article written by me as read, and remove the
12705 marked articles from the summary buffer.  Very useful, you'll agree.
12706
12707 Other programs use a totally different kill file syntax.  If Gnus
12708 encounters what looks like a @code{rn} kill file, it will take a stab at
12709 interpreting it. 
12710
12711 Two summary functions for editing a GNUS kill file:
12712
12713 @table @kbd
12714
12715 @item M-k
12716 @kindex M-k (Summary)
12717 @findex gnus-summary-edit-local-kill
12718 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
12719
12720 @item M-K
12721 @kindex M-K (Summary)
12722 @findex gnus-summary-edit-global-kill
12723 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
12724 @end table
12725
12726 Two group mode functions for editing the kill files:
12727
12728 @table @kbd
12729
12730 @item M-k
12731 @kindex M-k (Group)
12732 @findex gnus-group-edit-local-kill
12733 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
12734
12735 @item M-K
12736 @kindex M-K (Group)
12737 @findex gnus-group-edit-global-kill
12738 Edit the general kill file (@code{gnus-group-edit-global-kill}).
12739 @end table
12740
12741 Kill file variables:
12742
12743 @table @code
12744 @item gnus-kill-file-name
12745 @vindex gnus-kill-file-name
12746 A kill file for the group @samp{soc.motss} is normally called
12747 @file{soc.motss.KILL}.  The suffix appended to the group name to get
12748 this file name is detailed by the @code{gnus-kill-file-name} variable.
12749 The ``global'' kill file (not in the score file sense of ``global'', of
12750 course) is just called @file{KILL}.
12751
12752 @vindex gnus-kill-save-kill-file
12753 @item gnus-kill-save-kill-file
12754 If this variable is non-@code{nil}, Gnus will save the
12755 kill file after processing, which is necessary if you use expiring
12756 kills. 
12757
12758 @item gnus-apply-kill-hook
12759 @vindex gnus-apply-kill-hook
12760 @findex gnus-apply-kill-file-unless-scored
12761 @findex gnus-apply-kill-file
12762 A hook called to apply kill files to a group.  It is
12763 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
12764 kill file if you have a score file for the same group, you can set this
12765 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
12766 kill files to be processed, you should set this variable to @code{nil}.
12767
12768 @item gnus-kill-file-mode-hook
12769 @vindex gnus-kill-file-mode-hook
12770 A hook called in kill-file mode buffers.
12771
12772 @end table
12773
12774
12775 @node Converting Kill Files
12776 @section Converting Kill Files
12777 @cindex kill files
12778 @cindex converting kill files
12779
12780 If you have loads of old kill files, you may want to convert them into
12781 score files.  If they are ``regular'', you can use
12782 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
12783 by hand.
12784
12785 The kill to score conversion package isn't included in Gnus by default.
12786 You can fetch it from
12787 @file{http://www.ifi.uio.no/~larsi/ding-other/gnus-kill-to-score}.  
12788
12789 If your old kill files are very complex---if they contain more
12790 non-@code{gnus-kill} forms than not, you'll have to convert them by
12791 hand.  Or just let them be as they are.  Gnus will still use them as
12792 before. 
12793
12794
12795 @node GroupLens
12796 @section GroupLens
12797 @cindex GroupLens
12798
12799 GroupLens is a collaborative filtering system that helps you work
12800 together with other people to find the quality news articles out of the
12801 huge volume of news articles generated every day.
12802
12803 To accomplish this the GroupLens system combines your opinions about
12804 articles you have already read with the opinions of others who have done
12805 likewise and gives you a personalized prediction for each unread news
12806 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
12807 rate articles, and finds other people that rate articles the same way.
12808 Once it has found some people you agree with it tells you, in the form
12809 of a prediction, what they thought of the article.  You can use this
12810 prediction to help you decide whether or not you want to read the
12811 article.
12812
12813 @menu
12814 * Using GroupLens::          How to make Gnus use GroupLens.
12815 * Rating Articles::          Letting GroupLens know how you rate articles.
12816 * Displaying Predictions::   Displaying predictions given by GroupLens.
12817 * GroupLens Variables::      Customizing GroupLens.
12818 @end menu
12819
12820
12821 @node Using GroupLens
12822 @subsection Using GroupLens
12823
12824 To use GroupLens you must register a pseudonym with your local Better
12825 Bit Bureau (BBB).
12826 @samp{http://www.cs.umn.edu/Research/GroupLens/bbb.html} is the only
12827 better bit in town at the moment.
12828
12829 Once you have registered you'll need to set a couple of variables.
12830
12831 @table @code
12832
12833 @item gnus-use-grouplens
12834 @vindex gnus-use-grouplens
12835 Setting this variable to a non-@code{nil} value will make Gnus hook into
12836 all the relevant GroupLens functions.
12837
12838 @item grouplens-pseudonym
12839 @vindex grouplens-pseudonym
12840 This variable should be set to the pseudonym you got when registering
12841 with the Better Bit Bureau.
12842
12843 @item grouplens-newsgroups
12844 @vindex grouplens-newsgroups
12845 A list of groups that you want to get GroupLens predictions for. 
12846
12847 @end table
12848
12849 That's the minimum of what you need to get up and running with GroupLens.
12850 Once you've registered, GroupLens will start giving you scores for
12851 articles based on the average of what other people think.  But, to get
12852 the real benefit of GroupLens you need to start rating articles
12853 yourself.  Then the scores GroupLens gives you will be personalized for
12854 you, based on how the people you usually agree with have already rated.
12855
12856
12857 @node Rating Articles
12858 @subsection Rating Articles
12859
12860 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
12861 Where 1 means something like this article is a waste of bandwidth and 5
12862 means that the article was really good.  The basic question to ask
12863 yourself is, "on a scale from 1 to 5 would I like to see more articles
12864 like this one?"
12865
12866 There are four ways to enter a rating for an article in GroupLens.
12867
12868 @table @kbd
12869
12870 @item r
12871 @kindex r (GroupLens)
12872 @findex bbb-summary-rate-article
12873 This function will prompt you for a rating on a scale of one to five.
12874
12875 @item k
12876 @kindex k (GroupLens)
12877 @findex grouplens-score-thread
12878 This function will prompt you for a rating, and rate all the articles in
12879 the thread.  This is really useful for some of those long running giant
12880 threads in rec.humor.
12881
12882 @end table
12883
12884 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
12885 the score of the article you're reading.
12886
12887 @table @kbd
12888
12889 @item 1-5 n
12890 @kindex n (GroupLens)
12891 @findex grouplens-next-unread-article
12892 Rate the article and go to the next unread article.
12893
12894 @item 1-5 ,
12895 @kindex , (GroupLens)
12896 @findex grouplens-best-unread-article
12897 Rate the article and go to the next unread article with the highest score.
12898
12899 @end table
12900
12901 If you want to give the current article a score of 4 and then go to the
12902 next article, just type @kbd{4 n}.
12903
12904
12905 @node Displaying Predictions
12906 @subsection Displaying Predictions
12907
12908 GroupLens makes a prediction for you about how much you will like a
12909 news article.  The predictions from GroupLens are on a scale from 1 to
12910 5, where 1 is the worst and 5 is the best.  You can use the predictions
12911 from GroupLens in one of three ways controlled by the variable
12912 @code{gnus-grouplens-override-scoring}.
12913
12914 @vindex gnus-grouplens-override-scoring
12915 There are three ways to display predictions in grouplens.  You may
12916 choose to have the GroupLens scores contribute to, or override the
12917 regular gnus scoring mechanism. override is the default; however, some
12918 people prefer to see the Gnus scores plus the grouplens scores.  To get
12919 the separate scoring behavior you need to set
12920 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
12921 GroupLens predictions combined with the grouplens scores set it to
12922 @code{'override} and to combine the scores set
12923 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
12924 the combine option you will also want to set the values for
12925 @code{grouplens-prediction-offset} and
12926 @code{grouplens-score-scale-factor}.
12927
12928 @vindex grouplens-prediction-display
12929 In either case, GroupLens gives you a few choices for how you would like
12930 to see your predictions displayed.  The display of predictions is
12931 controlled by the @code{grouplens-prediction-display} variable.
12932
12933 The following are valid values for that variable.
12934
12935 @table @code
12936 @item prediction-spot
12937 The higher the prediction, the further to the right an @samp{*} is
12938 displayed. 
12939
12940 @item confidence-interval
12941 A numeric confidence interval.
12942
12943 @item prediction-bar
12944 The higher the prediction, the longer the bar.
12945
12946 @item confidence-bar
12947 Numerical confidence.
12948
12949 @item confidence-spot
12950 The spot gets bigger with more confidence.
12951
12952 @item prediction-num
12953 Plain-old numeric value.
12954
12955 @item confidence-plus-minus
12956 Prediction +/- confidence.
12957
12958 @end table
12959
12960
12961 @node GroupLens Variables
12962 @subsection GroupLens Variables
12963
12964 @table @code
12965
12966 @item gnus-summary-grouplens-line-format
12967 The summary line format used in GroupLens-enhanced summary buffers.  It
12968 accepts the same specs as the normal summary line format (@pxref{Summary
12969 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-20,20n%]%)
12970 %s\n}.
12971
12972 @item grouplens-bbb-host
12973 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
12974 default.
12975
12976 @item grouplens-bbb-port
12977 Port of the host running the bbbd server.  The default is 9000.
12978
12979 @item grouplens-score-offset
12980 Offset the prediction by this value.  In other words, subtract the
12981 prediction value by this number to arrive at the effective score.  The
12982 default is 0.
12983
12984 @item grouplens-score-scale-factor 
12985 This variable allows the user to magnify the effect of GroupLens scores.
12986 The scale factor is applied after the offset.  The default is 1.
12987
12988 @end table
12989
12990
12991 @node Advanced Scoring
12992 @section Advanced Scoring
12993
12994 Scoring on Subjects and From headers is nice enough, but what if you're
12995 really interested in what a person has to say only when she's talking
12996 about a particular subject?  Or what if you really don't want to
12997 read what person A has to say when she's following up to person B, but
12998 want to read what she says when she's following up to person C?
12999
13000 By using advanced scoring rules you may create arbitrarily complex
13001 scoring patterns.
13002
13003 @menu
13004 * Advanced Scoring Syntax::     A definition.
13005 * Advanced Scoring Examples::   What they look like.
13006 * Advanced Scoring Tips::       Getting the most out of it.
13007 @end menu
13008
13009
13010 @node Advanced Scoring Syntax
13011 @subsection Advanced Scoring Syntax
13012
13013 Ordinary scoring rules have a string as the first element in the rule.
13014 Advanced scoring rules have a list as the first element.  The second
13015 element is the score to be applied if the first element evaluated to a
13016 non-@code{nil} value.
13017
13018 These lists may consist of three logical operators, one redirection
13019 operator, and various match operators.
13020
13021 Logical operators:
13022
13023 @table @code
13024 @item &
13025 @itemx and
13026 This logical operator will evaluate each of its arguments until it finds
13027 one that evaluates to @code{false}, and then it'll stop.  If all arguments
13028 evaluate to @code{true} values, then this operator will return
13029 @code{true}. 
13030
13031 @item |
13032 @itemx or
13033 This logical operator will evaluate each of its arguments until it finds
13034 one that evaluates to @code{true}.  If no arguments are @code{true},
13035 then this operator will return @code{false}.
13036
13037 @item !
13038 @itemx not
13039 @itemx Â¬
13040 This logical operator only takes a single argument.  It returns the
13041 logical negation of the value of its argument.
13042
13043 @end table
13044
13045 There is an @dfn{indirection operator} that will make its arguments
13046 apply to the ancestors of the current article being scored.  For
13047 instance, @code{1-} will make score rules apply to the parent of the
13048 current article.  @code{2-} will make score rules apply to the
13049 grandparent of the current article.  Alternatively, you can write
13050 @code{^^}, where the number of @code{^}s (carets) says how far back into
13051 the ancestry you want to go.
13052
13053 Finally, we have the match operators.  These are the ones that do the
13054 real work.  Match operators are header name strings followed by a match
13055 and a match type.  A typical match operator looks like @samp{("from"
13056 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
13057 simple scoring, and the match types are also the same.
13058
13059
13060 @node Advanced Scoring Examples
13061 @subsection Advanced Scoring Examples
13062
13063 Let's say you want to increase the score of articles written by Lars
13064 when he's talking about Gnus:
13065
13066 @example
13067 ((& 
13068   ("from" "Lars Ingebrigtsen")
13069   ("subject" "Gnus"))
13070  1000)
13071 @end example
13072
13073 Quite simple, huh?
13074
13075 When he writes long articles, he sometimes has something nice to say: 
13076
13077 @example
13078 ((& 
13079   ("from" "Lars Ingebrigtsen")
13080   (|
13081    ("subject" "Gnus")
13082    ("lines" 100 >)))
13083  1000)
13084 @end example
13085
13086 However, when he responds to things written by Reig Eigil Logge, you
13087 really don't want to read what he's written:
13088
13089 @example
13090 ((&
13091   ("from" "Lars Ingebrigtsen")
13092   (1- ("from" "Reig Eigir Logge")))
13093  -100000)
13094 @end example
13095
13096 Everybody that follows up Redmondo when he writes about disappearing
13097 socks should have their scores raised, but only when they talk about
13098 white socks.  However, when Lars talks about socks, it's usually not
13099 very interesting:
13100
13101 @example
13102 ((&
13103   (1-
13104    (&
13105     ("from" "redmondo@@.*no" r)
13106     ("body" "disappearing.*socks" t)))
13107   (! ("from" "Lars Ingebrigtsen"))
13108   ("body" "white.*socks"))
13109  1000)
13110 @end example
13111
13112 The possibilities are endless.
13113
13114
13115 @node Advanced Scoring Tips
13116 @subsection Advanced Scoring Tips
13117
13118 The @code{&} and @code{|} logical operators do short-circuit logic.
13119 That is, they stop processing their arguments when it's clear what the
13120 result of the operation will be.  For instance, if one of the arguments
13121 of an @code{&} evaluates to @code{false}, there's no point in evaluating
13122 the rest of the arguments.  This means that you should put slow matches
13123 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
13124 @samp{subject}) first.
13125
13126 The indirection arguments (@code{1-} and so on) will make their
13127 arguments work on previous generations of the thread.  If you say
13128 something like:
13129
13130 @example
13131 ...
13132 (1-
13133  (1-
13134   ("from" "lars")))
13135 ...
13136 @end example
13137
13138 Then that means "score on the from header of the grandparent of the
13139 current article".  An indirection is quite fast, but it's better to say:
13140
13141 @example
13142 (1-
13143  (& 
13144   ("from" "Lars")
13145   ("subject" "Gnus")))
13146 @end example
13147
13148 than it is to say:
13149
13150 @example
13151 (&
13152  (1- ("from" "Lars"))
13153  (1- ("subject" "Gnus")))
13154 @end example
13155
13156
13157 @node Score Decays
13158 @section Score Decays
13159 @cindex score decays
13160 @cindex decays
13161
13162 You may find that your scores have a tendency to grow without
13163 bounds, especially if you're using adaptive scoring.  If scores get too
13164 big, they lose all meaning---they simply max out and it's difficult to
13165 use them in any sensible way.
13166
13167 @vindex gnus-decay-scores
13168 @findex gnus-decay-score
13169 @vindex gnus-score-decay-function
13170 Gnus provides a mechanism for decaying scores to help with this problem.
13171 When score files are loaded and @code{gnus-decay-scores} is
13172 non-@code{nil}, Gnus will run the score files through the decaying
13173 mechanism thereby lowering the scores of all non-permanent score rules.
13174 The decay itself if performed by the @code{gnus-score-decay-function}
13175 function, which is @code{gnus-decay-score} by default.  Here's the
13176 definition of that function:
13177
13178 @lisp
13179 (defun gnus-decay-score (score)
13180   "Decay SCORE according to `gnus-score-decay-constant' and `gnus-score-decay-scale'."
13181   (floor
13182    (- score
13183       (* (if (< score 0) 1 -1)
13184          (min (abs score)
13185               (max gnus-score-decay-constant
13186                    (* (abs score)
13187                       gnus-score-decay-scale)))))))
13188 @end lisp
13189
13190 @vindex gnus-score-decay-scale
13191 @vindex gnus-score-decay-constant
13192 @code{gnus-score-decay-constant} is 3 by default and
13193 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
13194
13195 @enumerate
13196 @item
13197 Scores between -3 and 3 will be set to 0 when this function is called.
13198
13199 @item
13200 Scores with magnitudes between 3 and 60 will be shrunk by 3.
13201
13202 @item
13203 Scores with magnitudes greater than 60 will be shrunk by 5% of the
13204 score.
13205 @end enumerate
13206
13207 If you don't like this decay function, write your own.  It is called
13208 with the score to be decayed as its only parameter, and it should return
13209 the new score, which should be an integer.
13210
13211 Gnus will try to decay scores once a day.  If you haven't run Gnus for
13212 four days, Gnus will decay the scores four times, for instance.
13213
13214
13215 @node Various
13216 @chapter Various
13217
13218 @menu
13219 * Process/Prefix::             A convention used by many treatment commands.
13220 * Interactive::                Making Gnus ask you many questions.
13221 * Symbolic Prefixes::          How to supply some Gnus functions with options.
13222 * Formatting Variables::       You can specify what buffers should look like.
13223 * Windows Configuration::      Configuring the Gnus buffer windows.
13224 * Compilation::                How to speed Gnus up.
13225 * Mode Lines::                 Displaying information in the mode lines.
13226 * Highlighting and Menus::     Making buffers look all nice and cozy.
13227 * Buttons::                    Get tendonitis in ten easy steps!
13228 * Daemons::                    Gnus can do things behind your back.
13229 * NoCeM::                      How to avoid spam and other fatty foods.
13230 * Undo::                       Some actions can be undone.
13231 * Moderation::                 What to do if you're a moderator.
13232 * XEmacs Enhancements::        There are more pictures and stuff under XEmacs.
13233 * Fuzzy Matching::             What's the big fuzz?
13234 * Thwarting Email Spam::       A how-to on avoiding unsolited commercial email.
13235 * Various Various::            Things that are really various.
13236 @end menu
13237
13238
13239 @node Process/Prefix
13240 @section Process/Prefix
13241 @cindex process/prefix convention
13242
13243 Many functions, among them functions for moving, decoding and saving
13244 articles, use what is known as the @dfn{Process/Prefix convention}.
13245
13246 This is a method for figuring out what articles the user wants the
13247 command to be performed on.
13248
13249 It goes like this:
13250
13251 If the numeric prefix is N, perform the operation on the next N
13252 articles, starting with the current one.  If the numeric prefix is
13253 negative, perform the operation on the previous N articles, starting
13254 with the current one.
13255
13256 @vindex transient-mark-mode
13257 If @code{transient-mark-mode} in non-@code{nil} and the region is
13258 active, all articles in the region will be worked upon.
13259
13260 If there is no numeric prefix, but some articles are marked with the
13261 process mark, perform the operation on the articles marked with
13262 the process mark.
13263
13264 If there is neither a numeric prefix nor any articles marked with the
13265 process mark, just perform the operation on the current article.
13266
13267 Quite simple, really, but it needs to be made clear so that surprises
13268 are avoided.
13269
13270 Commands that react to the process mark will push the current list of
13271 process marked articles onto a stack and will then clear all process
13272 marked articles.  You can restore the previous configuration with the
13273 @kbd{M P y} command (@pxref{Setting Process Marks}).
13274
13275 @vindex gnus-summary-goto-unread
13276 One thing that seems to shock & horrify lots of people is that, for
13277 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
13278 Since each @kbd{d} (which marks the current article as read) by default
13279 goes to the next unread article after marking, this means that @kbd{3 d}
13280 will mark the next three unread articles as read, no matter what the
13281 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
13282 @code{nil} for a more straightforward action.
13283
13284
13285 @node Interactive
13286 @section Interactive
13287 @cindex interaction
13288
13289 @table @code
13290
13291 @item gnus-novice-user
13292 @vindex gnus-novice-user
13293 If this variable is non-@code{nil}, you are either a newcomer to the
13294 World of Usenet, or you are very cautious, which is a nice thing to be,
13295 really.  You will be given questions of the type ``Are you sure you want
13296 to do this?'' before doing anything dangerous.  This is @code{t} by
13297 default.
13298
13299 @item gnus-expert-user
13300 @vindex gnus-expert-user
13301 If this variable is non-@code{nil}, you will never ever be asked any
13302 questions by Gnus.  It will simply assume you know what you're doing, no
13303 matter how strange.
13304
13305 @item gnus-interactive-catchup
13306 @vindex gnus-interactive-catchup
13307 Require confirmation before catching up a group if non-@code{nil}.  It
13308 is @code{t} by default.
13309
13310 @item gnus-interactive-exit
13311 @vindex gnus-interactive-exit
13312 Require confirmation before exiting Gnus.  This variable is @code{t} by
13313 default. 
13314 @end table
13315
13316
13317 @node Symbolic Prefixes
13318 @section Symbolic Prefixes
13319 @cindex symbolic prefixes
13320
13321 Quite a lot of Emacs commands react to the (numeric) prefix.  For
13322 instance, @kbd{C-u 4 C-f} moves point four charaters forward, and
13323 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
13324 rule of 900 to the current article.
13325
13326 This is all nice and well, but what if you want to give a command some
13327 additional information?  Well, what most commands do is interpret the
13328 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
13329 doesn't want a backup file to be created when saving the current buffer,
13330 for instance.  But what if you want to save without making a backup
13331 file, and you want Emacs to flash lights and play a nice tune at the
13332 same time?  You can't, and you're probably perfectly happy that way.
13333
13334 @kindex M-i (Summary)
13335 @findex gnus-symbolic-argument
13336 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
13337 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
13338 character typed in is the value.  You can stack as many @kbd{M-i}
13339 prefixes as you want.  @kbd{M-i a M-C-u} means ``feed the @kbd{M-C-u}
13340 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b M-C-u} means
13341 ``feed the @kbd{M-C-u} command the symbolic prefixes @code{a} and
13342 @code{b}''.  You get the drift.
13343
13344 Typing in symbolic prefixes to commands that don't accept them doesn't
13345 hurt, but it doesn't do any good either.  Currently not many Gnus
13346 functions make use of the symbolic prefix.
13347
13348 If you're interested in how Gnus implements this, @pxref{Extended
13349 Interactive}.
13350
13351
13352 @node Formatting Variables
13353 @section Formatting Variables
13354 @cindex formatting variables
13355
13356 Throughout this manual you've probably noticed lots of variables called things like @code{gnus-group-line-format} and
13357 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
13358 output lines in the various buffers.  There's quite a lot of them.
13359 Fortunately, they all use the same syntax, so there's not that much to
13360 be annoyed by.
13361
13362 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
13363 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
13364 lots of percentages everywhere.  
13365
13366 @menu 
13367 * Formatting Basics::     A formatting variable is basically a format string.
13368 * Advanced Formatting::   Modifying output in various ways.
13369 * User-Defined Specs::    Having Gnus call your own functions.
13370 * Formatting Fonts::      Making the formatting look colorful and nice.
13371 @end menu
13372
13373 Currently Gnus uses the following formatting variables:
13374 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
13375 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
13376 @code{gnus-group-mode-line-format},
13377 @code{gnus-summary-mode-line-format},
13378 @code{gnus-article-mode-line-format},
13379 @code{gnus-server-mode-line-format}, and
13380 @code{gnus-summary-pick-line-format}.
13381
13382 All these format variables can also be arbitrary elisp forms.  In that
13383 case, they will be @code{eval}ed to insert the required lines.
13384
13385 @kindex M-x gnus-update-format
13386 @findex gnus-update-format
13387 Gnus includes a command to help you while creating your own format
13388 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
13389 update the spec in question and pop you to a buffer where you can
13390 examine the resulting lisp code to be run to generate the line.  
13391
13392
13393
13394 @node Formatting Basics
13395 @subsection Formatting Basics
13396
13397 Each @samp{%} element will be replaced by some string or other when the
13398 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
13399 spec, and pad with spaces to get a 5-character field''.
13400
13401 As with normal C and Emacs Lisp formatting strings, the numerical
13402 modifier between the @samp{%} and the formatting type character will
13403 @dfn{pad} the output so that it is always at least that long.
13404 @samp{%5y} will make the field always (at least) five characters wide by
13405 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
13406 the right instead.
13407
13408 You may also wish to limit the length of the field to protect against
13409 particularly wide values.  For that you can say @samp{%4,6y}, which
13410 means that the field will never be more than 6 characters wide and never
13411 less than 4 characters wide.
13412
13413
13414 @node Advanced Formatting
13415 @subsection Advanced Formatting
13416
13417 It is frequently useful to post-process the fields in some way.
13418 Padding, limiting, cutting off parts and suppressing certain values can
13419 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
13420 look like @samp{%~(cut 3)~(ignore "0")y}.
13421
13422 These are the valid modifiers:
13423
13424 @table @code
13425 @item pad
13426 @itemx pad-left
13427 Pad the field to the left with spaces until it reaches the required
13428 length.
13429
13430 @item pad-right
13431 Pad the field to the right with spaces until it reaches the required
13432 length.
13433
13434 @item max
13435 @itemx max-left
13436 Cut off characters from the left until it reaches the specified length.
13437
13438 @item max-right
13439 Cut off characters from the right until it reaches the specified
13440 length. 
13441
13442 @item cut
13443 @itemx cut-left
13444 Cut off the specified number of characters from the left.
13445
13446 @item cut-right
13447 Cut off the specified number of characters from the right.
13448
13449 @item ignore
13450 Return an empty string if the field is equal to the specified value. 
13451
13452 @item form
13453 Use the specified form as the field value when the @samp{@@} spec is
13454 used. 
13455 @end table
13456
13457 Let's take an example.  The @samp{%o} spec in the summary mode lines
13458 will return a date in compact ISO8601 format---@samp{19960809T230410}.
13459 This is quite a mouthful, so we want to shave off the century number and
13460 the time, leaving us with a six-character date.  That would be
13461 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
13462 maxing, and we need the padding to ensure that the date is never less
13463 than 6 characters to make it look nice in columns.)
13464
13465 Ignoring is done first; then cutting; then maxing; and then as the very
13466 last operation, padding.  
13467
13468 If you use lots of these advanced thingies, you'll find that Gnus gets
13469 quite slow.  This can be helped enormously by running @kbd{M-x
13470 gnus-compile} when you are satisfied with the look of your lines.
13471 @xref{Compilation}. 
13472
13473
13474 @node User-Defined Specs
13475 @subsection User-Defined Specs
13476
13477 All the specs allow for inserting user defined specifiers---@samp{u}.
13478 The next character in the format string should be a letter.  Gnus
13479 will call the function @code{gnus-user-format-function-}@samp{X}, where
13480 @samp{X} is the letter following @samp{%u}.  The function will be passed
13481 a single parameter---what the parameter means depends on what buffer
13482 it's being called from.  The function should return a string, which will
13483 be inserted into the buffer just like information from any other
13484 specifier.  This function may also be called with dummy values, so it
13485 should protect against that.
13486
13487 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
13488 much the same without defining new functions.  Here's an example:
13489 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
13490 given here will be evaluated to yield the current line number, and then
13491 inserted.
13492
13493
13494 @node Formatting Fonts
13495 @subsection Formatting Fonts
13496
13497 There are specs for highlighting, and these are shared by all the format
13498 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
13499 the special @code{mouse-face} property set, which means that it will be
13500 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
13501 over it.
13502
13503 Text inside the @samp{%[} and @samp{%]} specifiers will have their
13504 normal faces set using @code{gnus-face-0}, which is @code{bold} by
13505 default.  If you say @samp{%1[}, you'll get @code{gnus-face-1} instead,
13506 and so on.  Create as many faces as you wish.  The same goes for the
13507 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
13508 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
13509
13510 Here's an alternative recipe for the group buffer:
13511
13512 @lisp
13513 ;; Create three face types.
13514 (setq gnus-face-1 'bold)
13515 (setq gnus-face-3 'italic)
13516
13517 ;; We want the article count to be in 
13518 ;; a bold and green face.  So we create 
13519 ;; a new face called `my-green-bold'.
13520 (copy-face 'bold 'my-green-bold)
13521 ;; Set the color.
13522 (set-face-foreground 'my-green-bold "ForestGreen")
13523 (setq gnus-face-2 'my-green-bold)
13524
13525 ;; Set the new & fancy format.
13526 (setq gnus-group-line-format 
13527       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
13528 @end lisp
13529
13530 I'm sure you'll be able to use this scheme to create totally unreadable
13531 and extremely vulgar displays.  Have fun!
13532
13533 Note that the @samp{%(} specs (and friends) do not make any sense on the
13534 mode-line variables.
13535
13536
13537 @node Windows Configuration
13538 @section Windows Configuration
13539 @cindex windows configuration
13540
13541 No, there's nothing here about X, so be quiet.
13542
13543 @vindex gnus-use-full-window
13544 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
13545 other windows and occupy the entire Emacs screen by itself.  It is
13546 @code{t} by default.
13547
13548 @vindex gnus-buffer-configuration
13549 @code{gnus-buffer-configuration} describes how much space each Gnus
13550 buffer should be given.  Here's an excerpt of this variable:
13551
13552 @lisp
13553 ((group (vertical 1.0 (group 1.0 point)
13554                       (if gnus-carpal (group-carpal 4))))
13555  (article (vertical 1.0 (summary 0.25 point) 
13556                         (article 1.0))))
13557 @end lisp
13558
13559 This is an alist.  The @dfn{key} is a symbol that names some action or
13560 other.  For instance, when displaying the group buffer, the window
13561 configuration function will use @code{group} as the key.  A full list of
13562 possible names is listed below.
13563
13564 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
13565 should occupy.  To take the @code{article} split as an example -
13566
13567 @lisp
13568 (article (vertical 1.0 (summary 0.25 point)
13569                        (article 1.0)))
13570 @end lisp
13571
13572 This @dfn{split} says that the summary buffer should occupy 25% of upper
13573 half of the screen, and that it is placed over the article buffer.  As
13574 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
13575 reaching for that calculator there).  However, the special number
13576 @code{1.0} is used to signal that this buffer should soak up all the
13577 rest of the space available after the rest of the buffers have taken
13578 whatever they need.  There should be only one buffer with the @code{1.0}
13579 size spec per split.
13580
13581 Point will be put in the buffer that has the optional third element
13582 @code{point}. 
13583
13584 Here's a more complicated example:
13585
13586 @lisp
13587 (article (vertical 1.0 (group 4)
13588                        (summary 0.25 point)
13589                        (if gnus-carpal (summary-carpal 4))
13590                        (article 1.0)))
13591 @end lisp
13592
13593 If the size spec is an integer instead of a floating point number, 
13594 then that number will be used to say how many lines a buffer should
13595 occupy, not a percentage.
13596
13597 If the @dfn{split} looks like something that can be @code{eval}ed (to be
13598 precise---if the @code{car} of the split is a function or a subr), this
13599 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
13600 be used as a split.  This means that there will be three buffers if
13601 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
13602 is non-@code{nil}.
13603
13604 Not complicated enough for you?  Well, try this on for size:
13605
13606 @lisp
13607 (article (horizontal 1.0 
13608              (vertical 0.5
13609                  (group 1.0)
13610                  (gnus-carpal 4))
13611              (vertical 1.0
13612                  (summary 0.25 point)
13613                  (summary-carpal 4)
13614                  (article 1.0))))
13615 @end lisp
13616
13617 Whoops.  Two buffers with the mystery 100% tag.  And what's that
13618 @code{horizontal} thingie?  
13619
13620 If the first element in one of the split is @code{horizontal}, Gnus will
13621 split the window horizontally, giving you two windows side-by-side.
13622 Inside each of these strips you may carry on all you like in the normal
13623 fashion.  The number following @code{horizontal} says what percentage of
13624 the screen is to be given to this strip.
13625
13626 For each split, there @emph{must} be one element that has the 100% tag.
13627 The splitting is never accurate, and this buffer will eat any leftover
13628 lines from the splits.
13629
13630 To be slightly more formal, here's a definition of what a valid split
13631 may look like:
13632
13633 @example
13634 split       = frame | horizontal | vertical | buffer | form
13635 frame       = "(frame " size *split ")"
13636 horizontal  = "(horizontal " size *split ")"
13637 vertical    = "(vertical " size *split ")"
13638 buffer      = "(" buffer-name " " size *[ "point" ] ")"
13639 size        = number | frame-params
13640 buffer-name = group | article | summary ...
13641 @end example
13642
13643 The limitations are that the @code{frame} split can only appear as the
13644 top-level split.  @var{form} should be an Emacs Lisp form that should
13645 return a valid split.  We see that each split is fully recursive, and
13646 may contain any number of @code{vertical} and @code{horizontal} splits. 
13647
13648 @vindex gnus-window-min-width
13649 @vindex gnus-window-min-height
13650 @cindex window height
13651 @cindex window width
13652 Finding the right sizes can be a bit complicated.  No window may be less
13653 than @code{gnus-window-min-height} (default 1) characters high, and all
13654 windows must be at least @code{gnus-window-min-width} (default 1)
13655 characters wide.  Gnus will try to enforce this before applying the
13656 splits.  If you want to use the normal Emacs window width/height limit,
13657 you can just set these two variables to @code{nil}.
13658
13659 If you're not familiar with Emacs terminology, @code{horizontal} and
13660 @code{vertical} splits may work the opposite way of what you'd expect.
13661 Windows inside a @code{horizontal} split are shown side-by-side, and
13662 windows within a @code{vertical} split are shown above each other.
13663
13664 @findex gnus-configure-frame
13665 If you want to experiment with window placement, a good tip is to call
13666 @code{gnus-configure-frame} directly with a split.  This is the function
13667 that does all the real work when splitting buffers.  Below is a pretty
13668 nonsensical configuration with 5 windows; two for the group buffer and
13669 three for the article buffer.  (I said it was nonsensical.)  If you
13670 @code{eval} the statement below, you can get an idea of how that would
13671 look straight away, without going through the normal Gnus channels.
13672 Play with it until you're satisfied, and then use
13673 @code{gnus-add-configuration} to add your new creation to the buffer
13674 configuration list. 
13675
13676 @lisp
13677 (gnus-configure-frame
13678  '(horizontal 1.0
13679     (vertical 10
13680       (group 1.0)
13681       (article 0.3 point))
13682     (vertical 1.0
13683       (article 1.0)
13684       (horizontal 4
13685         (group 1.0)
13686         (article 10)))))
13687 @end lisp
13688
13689 You might want to have several frames as well.  No prob---just use the
13690 @code{frame} split:
13691
13692 @lisp
13693 (gnus-configure-frame
13694  '(frame 1.0
13695          (vertical 1.0
13696                    (summary 0.25 point)
13697                    (article 1.0))
13698          (vertical ((height . 5) (width . 15)
13699                     (user-position . t)
13700                     (left . -1) (top . 1))
13701                    (picon 1.0))))
13702
13703 @end lisp
13704
13705 This split will result in the familiar summary/article window
13706 configuration in the first (or ``main'') frame, while a small additional
13707 frame will be created where picons will be shown.  As you can see,
13708 instead of the normal @code{1.0} top-level spec, each additional split
13709 should have a frame parameter alist as the size spec.
13710 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
13711 Reference Manual}.  Under XEmacs, a frame property list will be
13712 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
13713 is such a plist.
13714
13715 Here's a list of all possible keys for
13716 @code{gnus-buffer-configuration}:
13717
13718 @code{group}, @code{summary}, @code{article}, @code{server},
13719 @code{browse}, @code{message}, @code{pick}, @code{info},
13720 @code{summary-faq}, @code{edit-group}, @code{edit-server},
13721 @code{edit-score}, @code{post}, @code{reply}, @code{forward},
13722 @code{reply-yank}, @code{mail-bounce}, @code{draft}, @code{pipe},
13723 @code{bug}, @code{compose-bounce}, and @code{score-trace}.
13724
13725 Note that the @code{message} key is used for both
13726 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
13727 it is desirable to distinguish between the two, something like this
13728 might be used:
13729
13730 @lisp
13731 (message (horizontal 1.0
13732                      (vertical 1.0 (message 1.0 point))
13733                      (vertical 0.24
13734                                (if (buffer-live-p gnus-summary-buffer)
13735                                    '(summary 0.5))
13736                                (group 1.0)))))
13737 @end lisp
13738
13739 @findex gnus-add-configuration
13740 Since the @code{gnus-buffer-configuration} variable is so long and
13741 complicated, there's a function you can use to ease changing the config
13742 of a single setting: @code{gnus-add-configuration}.  If, for instance,
13743 you want to change the @code{article} setting, you could say:
13744
13745 @lisp
13746 (gnus-add-configuration
13747  '(article (vertical 1.0
13748                (group 4)
13749                (summary .25 point)
13750                (article 1.0))))
13751 @end lisp
13752
13753 You'd typically stick these @code{gnus-add-configuration} calls in your
13754 @file{.gnus.el} file or in some startup hook---they should be run after
13755 Gnus has been loaded.
13756
13757 @vindex gnus-always-force-window-configuration
13758 If all windows mentioned in the configuration are already visible, Gnus
13759 won't change the window configuration.  If you always want to force the
13760 ``right'' window configuration, you can set
13761 @code{gnus-always-force-window-configuration} to non-@code{nil}.
13762
13763
13764 @node Compilation
13765 @section Compilation
13766 @cindex compilation
13767 @cindex byte-compilation
13768
13769 @findex gnus-compile
13770
13771 Remember all those line format specification variables?
13772 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
13773 on.  Now, Gnus will of course heed whatever these variables are, but,
13774 unfortunately, changing them will mean a quite significant slow-down.
13775 (The default values of these variables have byte-compiled functions
13776 associated with them, while the user-generated versions do not, of
13777 course.) 
13778
13779 To help with this, you can run @kbd{M-x gnus-compile} after you've
13780 fiddled around with the variables and feel that you're (kind of)
13781 satisfied.  This will result in the new specs being byte-compiled, and
13782 you'll get top speed again.  Gnus will save these compiled specs in the
13783 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
13784 this function, though---you should compile them yourself by sticking
13785 them into the @code{.gnus.el} file and byte-compiling that file.)
13786
13787
13788 @node Mode Lines
13789 @section Mode Lines
13790 @cindex mode lines
13791
13792 @vindex gnus-updated-mode-lines
13793 @code{gnus-updated-mode-lines} says what buffers should keep their mode
13794 lines updated.  It is a list of symbols.  Supported symbols include
13795 @code{group}, @code{article}, @code{summary}, @code{server},
13796 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
13797 Gnus will keep that mode line updated with information that may be
13798 pertinent.  If this variable is @code{nil}, screen refresh may be
13799 quicker.
13800
13801 @cindex display-time
13802
13803 @vindex gnus-mode-non-string-length
13804 By default, Gnus displays information on the current article in the mode
13805 lines of the summary and article buffers.  The information Gnus wishes
13806 to display (e.g. the subject of the article) is often longer than the
13807 mode lines, and therefore have to be cut off at some point.  The
13808 @code{gnus-mode-non-string-length} variable says how long the other
13809 elements on the line is (i.e., the non-info part).  If you put
13810 additional elements on the mode line (e.g. a clock), you should modify
13811 this variable:
13812
13813 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
13814 @lisp
13815 (add-hook 'display-time-hook
13816           (lambda () (setq gnus-mode-non-string-length
13817                            (+ 21
13818                               (if line-number-mode 5 0)
13819                               (if column-number-mode 4 0)
13820                               (length display-time-string)))))
13821 @end lisp
13822
13823 If this variable is @code{nil} (which is the default), the mode line
13824 strings won't be chopped off, and they won't be padded either.  Note
13825 that the default is unlikely to be desirable, as even the percentage
13826 complete in the buffer may be crowded off the mode line; the user should
13827 configure this variable appropriately for her configuration.
13828
13829
13830 @node Highlighting and Menus
13831 @section Highlighting and Menus
13832 @cindex visual
13833 @cindex highlighting
13834 @cindex menus
13835
13836 @vindex gnus-visual
13837 The @code{gnus-visual} variable controls most of the Gnus-prettifying
13838 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
13839 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
13840 file.
13841
13842 This variable can be a list of visual properties that are enabled.  The
13843 following elements are valid, and are all included by default:
13844
13845 @table @code
13846 @item group-highlight
13847 Do highlights in the group buffer.
13848 @item summary-highlight
13849 Do highlights in the summary buffer.
13850 @item article-highlight
13851 Do highlights in the article buffer.
13852 @item highlight
13853 Turn on highlighting in all buffers.
13854 @item group-menu
13855 Create menus in the group buffer.
13856 @item summary-menu
13857 Create menus in the summary buffers.
13858 @item article-menu
13859 Create menus in the article buffer.
13860 @item browse-menu
13861 Create menus in the browse buffer.
13862 @item server-menu
13863 Create menus in the server buffer.
13864 @item score-menu
13865 Create menus in the score buffers.
13866 @item menu
13867 Create menus in all buffers.
13868 @end table
13869
13870 So if you only want highlighting in the article buffer and menus in all
13871 buffers, you could say something like:
13872
13873 @lisp
13874 (setq gnus-visual '(article-highlight menu))
13875 @end lisp
13876
13877 If you want highlighting only and no menus whatsoever, you'd say:
13878
13879 @lisp
13880 (setq gnus-visual '(highlight))
13881 @end lisp
13882
13883 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
13884 in all Gnus buffers.
13885
13886 Other general variables that influence the look of all buffers include:
13887
13888 @table @code
13889 @item gnus-mouse-face
13890 @vindex gnus-mouse-face
13891 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
13892 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
13893
13894 @end table
13895
13896 There are hooks associated with the creation of all the different menus:
13897
13898 @table @code
13899
13900 @item gnus-article-menu-hook
13901 @vindex gnus-article-menu-hook
13902 Hook called after creating the article mode menu.
13903
13904 @item gnus-group-menu-hook
13905 @vindex gnus-group-menu-hook
13906 Hook called after creating the group mode menu.
13907
13908 @item gnus-summary-menu-hook
13909 @vindex gnus-summary-menu-hook
13910 Hook called after creating the summary mode menu.
13911
13912 @item gnus-server-menu-hook
13913 @vindex gnus-server-menu-hook
13914 Hook called after creating the server mode menu.
13915
13916 @item gnus-browse-menu-hook
13917 @vindex gnus-browse-menu-hook
13918 Hook called after creating the browse mode menu.
13919
13920 @item gnus-score-menu-hook
13921 @vindex gnus-score-menu-hook
13922 Hook called after creating the score mode menu.
13923
13924 @end table
13925
13926
13927 @node Buttons
13928 @section Buttons
13929 @cindex buttons
13930 @cindex mouse
13931 @cindex click
13932
13933 Those new-fangled @dfn{mouse} contraptions is very popular with the
13934 young, hep kids who don't want to learn the proper way to do things
13935 these days.  Why, I remember way back in the summer of '89, when I was
13936 using Emacs on a Tops 20 system.  Three hundred users on one single
13937 machine, and every user was running Simula compilers.  Bah!
13938
13939 Right.
13940
13941 @vindex gnus-carpal
13942 Well, you can make Gnus display bufferfuls of buttons you can click to
13943 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
13944 really.  Tell the chiropractor I sent you.
13945
13946
13947 @table @code
13948
13949 @item gnus-carpal-mode-hook
13950 @vindex gnus-carpal-mode-hook
13951 Hook run in all carpal mode buffers.
13952
13953 @item gnus-carpal-button-face
13954 @vindex gnus-carpal-button-face
13955 Face used on buttons.
13956
13957 @item gnus-carpal-header-face
13958 @vindex gnus-carpal-header-face
13959 Face used on carpal buffer headers.
13960
13961 @item gnus-carpal-group-buffer-buttons
13962 @vindex gnus-carpal-group-buffer-buttons
13963 Buttons in the group buffer.
13964
13965 @item gnus-carpal-summary-buffer-buttons
13966 @vindex gnus-carpal-summary-buffer-buttons
13967 Buttons in the summary buffer.
13968
13969 @item gnus-carpal-server-buffer-buttons
13970 @vindex gnus-carpal-server-buffer-buttons
13971 Buttons in the server buffer.
13972
13973 @item gnus-carpal-browse-buffer-buttons
13974 @vindex gnus-carpal-browse-buffer-buttons
13975 Buttons in the browse buffer.
13976 @end table
13977
13978 All the @code{buttons} variables are lists.  The elements in these list
13979 are either cons cells where the @code{car} contains a text to be displayed and
13980 the @code{cdr} contains a function symbol, or a simple string.
13981
13982
13983 @node Daemons
13984 @section Daemons
13985 @cindex demons
13986 @cindex daemons
13987
13988 Gnus, being larger than any program ever written (allegedly), does lots
13989 of strange stuff that you may wish to have done while you're not
13990 present.  For instance, you may want it to check for new mail once in a
13991 while.  Or you may want it to close down all connections to all servers
13992 when you leave Emacs idle.  And stuff like that.
13993
13994 Gnus will let you do stuff like that by defining various
13995 @dfn{handlers}.  Each handler consists of three elements:  A
13996 @var{function}, a @var{time}, and an @var{idle} parameter.
13997
13998 Here's an example of a handler that closes connections when Emacs has
13999 been idle for thirty minutes:
14000
14001 @lisp
14002 (gnus-demon-close-connections nil 30)
14003 @end lisp
14004
14005 Here's a handler that scans for PGP headers every hour when Emacs is
14006 idle: 
14007
14008 @lisp
14009 (gnus-demon-scan-pgp 60 t)
14010 @end lisp
14011
14012 This @var{time} parameter and than @var{idle} parameter work together
14013 in a strange, but wonderful fashion.  Basically, if @var{idle} is
14014 @code{nil}, then the function will be called every @var{time} minutes.
14015
14016 If @var{idle} is @code{t}, then the function will be called after
14017 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
14018 the function will never be called.  But once Emacs goes idle, the
14019 function will be called every @var{time} minutes.
14020
14021 If @var{idle} is a number and @var{time} is a number, the function will
14022 be called every @var{time} minutes only when Emacs has been idle for
14023 @var{idle} minutes.
14024
14025 If @var{idle} is a number and @var{time} is @code{nil}, the function
14026 will be called once every time Emacs has been idle for @var{idle}
14027 minutes.  
14028
14029 And if @var{time} is a string, it should look like @samp{07:31}, and
14030 the function will then be called once every day somewhere near that
14031 time.  Modified by the @var{idle} parameter, of course.
14032
14033 @vindex gnus-demon-timestep
14034 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
14035 seconds.  This is 60 by default.  If you change that variable,
14036 all the timings in the handlers will be affected.)
14037
14038 @vindex gnus-use-demon
14039 To set the whole thing in motion, though, you have to set
14040 @code{gnus-use-demon} to @code{t}.
14041
14042 So, if you want to add a handler, you could put something like this in
14043 your @file{.gnus} file:
14044
14045 @findex gnus-demon-add-handler
14046 @lisp
14047 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
14048 @end lisp
14049
14050 @findex gnus-demon-add-nocem
14051 @findex gnus-demon-add-scanmail
14052 @findex gnus-demon-add-rescan
14053 @findex gnus-demon-add-scan-timestamps
14054 @findex gnus-demon-add-disconnection
14055 Some ready-made functions to do this have been created:
14056 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
14057 @code{gnus-demon-add-nntp-close-connection}, 
14058 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
14059 @code{gnus-demon-add-scanmail}.  Just put those functions in your
14060 @file{.gnus} if you want those abilities.
14061
14062 @findex gnus-demon-init
14063 @findex gnus-demon-cancel
14064 @vindex gnus-demon-handlers
14065 If you add handlers to @code{gnus-demon-handlers} directly, you should
14066 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
14067 daemons, you can use the @code{gnus-demon-cancel} function.
14068
14069 Note that adding daemons can be pretty naughty if you overdo it.  Adding
14070 functions that scan all news and mail from all servers every two seconds
14071 is a sure-fire way of getting booted off any respectable system.  So
14072 behave.
14073
14074
14075 @node NoCeM
14076 @section NoCeM
14077 @cindex nocem
14078 @cindex spam
14079
14080 @dfn{Spamming} is posting the same article lots and lots of times.
14081 Spamming is bad.  Spamming is evil.  
14082
14083 Spamming is usually canceled within a day or so by various anti-spamming
14084 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
14085 NoCeM is pronounced ``no see-'em'', and means what the name
14086 implies---these are messages that make the offending articles, like, go
14087 away.  
14088
14089 What use are these NoCeM messages if the articles are canceled anyway?
14090 Some sites do not honor cancel messages and some sites just honor cancels
14091 from a select few people.  Then you may wish to make use of the NoCeM
14092 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
14093
14094 Gnus can read and parse the messages in this group automatically, and
14095 this will make spam disappear.  
14096
14097 There are some variables to customize, of course:
14098
14099 @table @code
14100 @item gnus-use-nocem
14101 @vindex gnus-use-nocem
14102 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
14103 by default. 
14104
14105 @item gnus-nocem-groups
14106 @vindex gnus-nocem-groups
14107 Gnus will look for NoCeM messages in the groups in this list.  The
14108 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
14109 "alt.nocem.misc" "news.admin.net-abuse.announce")}. 
14110
14111 @item gnus-nocem-issuers
14112 @vindex gnus-nocem-issuers
14113 There are many people issuing NoCeM messages.  This list says what
14114 people you want to listen to.  The default is @code{("Automoose-1"
14115 "rbraver@@ohww.norman.ok.us" "clewis@@ferret.ocunix.on.ca"
14116 "jem@@xpat.com" "snowhare@@xmission.com" "red@@redpoll.mrfs.oh.us
14117 (Richard E. Depew)")}; fine, upstanding citizens all of them.
14118
14119 Known despammers that you can put in this list include:
14120
14121 @table @samp
14122 @item clewis@@ferret.ocunix.on.ca;
14123 @cindex Chris Lewis
14124 Chris Lewis---Major Canadian despammer who has probably canceled more
14125 usenet abuse than anybody else.
14126
14127 @item Automoose-1
14128 @cindex CancelMoose[tm]
14129 The CancelMoose[tm] on autopilot.  The CancelMoose[tm] is reputed to be
14130 Norwegian, and was the person(s) who invented NoCeM.  
14131
14132 @item jem@@xpat.com;
14133 @cindex Jem
14134 John Milburn---despammer located in Korea who is getting very busy these
14135 days.
14136
14137 @item red@@redpoll.mrfs.oh.us (Richard E. Depew)
14138 Richard E. Depew---lone American despammer.  He mostly cancels binary
14139 postings to non-binary groups and removes spews (regurgitated articles).
14140 @end table
14141
14142 You do not have to heed NoCeM messages from all these people---just the
14143 ones you want to listen to.  You also don't have to accept all NoCeM
14144 messages from the people you like.  Each NoCeM message has a @dfn{type}
14145 header that gives the message a (more or less, usually less) rigorous
14146 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
14147 @samp{binary}, and @samp{troll}.  To specify this, you have to use
14148 @var{(issuer conditions ...)} elements in the list.  Each condition is
14149 either a string (which is a regexp that matches types you want to use)
14150 or a list on the form @code{(not STRING)}, where @var{string} is a
14151 regexp that matches types you don't want to use.
14152
14153 For instance, if you want all NoCeM messages from Chris Lewis except his
14154 @samp{troll} messages, you'd say:
14155
14156 @lisp
14157 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
14158 @end lisp
14159
14160 On the other hand, if you just want nothing but his @samp{spam} and
14161 @samp{spew} messages, you'd say:
14162
14163 @lisp
14164 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
14165 @end lisp
14166
14167 The specs are applied left-to-right.
14168
14169
14170 @item gnus-nocem-verifyer
14171 @vindex gnus-nocem-verifyer
14172 @findex mc-verify
14173 This should be a function for verifying that the NoCeM issuer is who she
14174 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
14175 function.  If this is too slow and you don't care for verification
14176 (which may be dangerous), you can set this variable to @code{nil}.
14177
14178 If you want signed NoCeM messages to be verified and unsigned messages
14179 not to be verified (but used anyway), you could do something like:
14180
14181 @lisp
14182 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
14183
14184 (defun my-gnus-mc-verify ()
14185   (not (eq 'forged
14186            (ignore-errors
14187              (if (mc-verify)
14188                  t
14189                'forged)))))
14190 @end lisp
14191
14192 This might be dangerous, though.
14193
14194 @item gnus-nocem-directory
14195 @vindex gnus-nocem-directory
14196 This is where Gnus will store its NoCeM cache files.  The default is
14197 @file{~/News/NoCeM/}. 
14198
14199 @item gnus-nocem-expiry-wait
14200 @vindex gnus-nocem-expiry-wait
14201 The number of days before removing old NoCeM entries from the cache.
14202 The default is 15.  If you make it shorter Gnus will be faster, but you
14203 might then see old spam.
14204
14205 @end table
14206
14207 Using NoCeM could potentially be a memory hog.  If you have many living
14208 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
14209 big.  If this is a problem, you should kill off all (or most) of your
14210 unsubscribed groups (@pxref{Subscription Commands}).
14211
14212
14213 @node Undo
14214 @section Undo
14215 @cindex undo
14216
14217 It is very useful to be able to undo actions one has done.  In normal
14218 Emacs buffers, it's easy enough---you just push the @code{undo} button.
14219 In Gnus buffers, however, it isn't that simple.
14220
14221 The things Gnus displays in its buffer is of no value whatsoever to
14222 Gnus---it's all just data designed to look nice to the user.
14223 Killing a group in the group buffer with @kbd{C-k} makes the line
14224 disappear, but that's just a side-effect of the real action---the
14225 removal of the group in question from the internal Gnus structures.
14226 Undoing something like that can't be done by the normal Emacs
14227 @code{undo} function.
14228
14229 Gnus tries to remedy this somewhat by keeping track of what the user
14230 does and coming up with actions that would reverse the actions the user
14231 takes.  When the user then presses the @code{undo} key, Gnus will run
14232 the code to reverse the previous action, or the previous actions.
14233 However, not all actions are easily reversible, so Gnus currently offers
14234 a few key functions to be undoable.  These include killing groups,
14235 yanking groups, and changing the list of read articles of groups.
14236 That's it, really.  More functions may be added in the future, but each
14237 added function means an increase in data to be stored, so Gnus will
14238 never be totally undoable.
14239
14240 @findex gnus-undo-mode
14241 @vindex gnus-use-undo
14242 @findex gnus-undo
14243 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
14244 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
14245 default.  The @kbd{M-C-_} key performs the @code{gnus-undo} command
14246 command, which should feel kinda like the normal Emacs @code{undo}
14247 command. 
14248
14249
14250 @node Moderation
14251 @section Moderation
14252 @cindex moderation
14253
14254 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
14255 It is not included in the standard Gnus package.  Write a mail to
14256 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
14257 get a copy.
14258
14259 The moderation package is implemented as a minor mode for summary
14260 buffers.  Put
14261
14262 @lisp
14263 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
14264 @end lisp
14265
14266 in your @file{.gnus.el} file.
14267
14268 If you are the moderator of @samp{rec.zoofle}, this is how it's
14269 supposed to work:
14270
14271 @enumerate
14272 @item 
14273 You split your incoming mail by matching on
14274 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
14275 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
14276
14277 @item
14278 You enter that group once in a while and post articles using the @kbd{e}
14279 (edit-and-post) or @kbd{s} (just send unedited) commands.
14280
14281 @item
14282 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
14283 articles that weren't approved by you, you can cancel them with the
14284 @kbd{c} command.
14285 @end enumerate
14286
14287 To use moderation mode in these two groups, say:
14288
14289 @lisp
14290 (setq gnus-moderated-list
14291       "^nnml:rec.zoofle$\\|^rec.zoofle$")
14292 @end lisp
14293
14294
14295 @node XEmacs Enhancements
14296 @section XEmacs Enhancements
14297 @cindex XEmacs
14298
14299 XEmacs is able to display pictures and stuff, so Gnus has taken
14300 advantage of that.
14301
14302 @menu
14303 * Picons::    How to display pictures of what your reading.
14304 * Smileys::   Show all those happy faces the way they were meant to be shown.
14305 * Toolbar::   Click'n'drool.
14306 * XVarious::  Other XEmacsy Gnusey variables.
14307 @end menu
14308
14309
14310 @node Picons
14311 @subsection Picons
14312
14313 @iftex
14314 @iflatex
14315 \include{picons}
14316 @end iflatex
14317 @end iftex
14318
14319 So...  You want to slow down your news reader even more!  This is a
14320 good way to do so.  Its also a great way to impress people staring
14321 over your shoulder as you read news.
14322
14323 @menu
14324 * Picon Basics::           What are picons and How do I get them.
14325 * Picon Requirements::     Don't go further if you aren't using XEmacs.
14326 * Easy Picons::            Displaying Picons---the easy way.
14327 * Hard Picons::            The way you should do it.  You'll learn something.
14328 * Picon Configuration::    Other variables you can trash/tweak/munge/play with.
14329 @end menu
14330
14331
14332 @node Picon Basics
14333 @subsubsection Picon Basics
14334
14335 What are Picons?  To quote directly from the Picons Web site:
14336
14337 @iftex
14338 @iflatex
14339 \margindex{}
14340 @end iflatex
14341 @end iftex
14342
14343 @quotation 
14344 @dfn{Picons} is short for ``personal icons''.  They're small,
14345 constrained images used to represent users and domains on the net,
14346 organized into databases so that the appropriate image for a given
14347 e-mail address can be found.  Besides users and domains, there are picon
14348 databases for Usenet newsgroups and weather forecasts.  The picons are
14349 in either monochrome @code{XBM} format or color @code{XPM} and
14350 @code{GIF} formats.
14351 @end quotation
14352
14353 For instructions on obtaining and installing the picons databases, point
14354 your Web browser at
14355 @file{http://www.cs.indiana.edu/picons/ftp/index.html}.
14356
14357 @vindex gnus-picons-database
14358 Gnus expects picons to be installed into a location pointed to by
14359 @code{gnus-picons-database}.
14360
14361
14362 @node Picon Requirements
14363 @subsubsection Picon Requirements
14364
14365 To have Gnus display Picons for you, you must be running XEmacs
14366 19.13 or greater since all other versions of Emacs aren't yet able to
14367 display images.
14368
14369 Additionally, you must have @code{xpm} support compiled into XEmacs.
14370
14371 @vindex gnus-picons-convert-x-face
14372 If you want to display faces from @code{X-Face} headers, you must have
14373 the @code{netpbm} utilities installed, or munge the
14374 @code{gnus-picons-convert-x-face} variable to use something else.
14375
14376
14377 @node Easy Picons
14378 @subsubsection Easy Picons
14379
14380 To enable displaying picons, simply put the following line in your
14381 @file{~/.gnus} file and start Gnus.
14382
14383 @lisp
14384 (setq gnus-use-picons t)
14385 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
14386 (add-hook 'gnus-summary-prepare-hook 'gnus-group-display-picons t)
14387 (add-hook 'gnus-article-display-hook 'gnus-picons-article-display-x-face)
14388 @end lisp
14389
14390
14391 @node Hard Picons
14392 @subsubsection Hard Picons 
14393
14394 @iftex
14395 @iflatex
14396 \margindex{}
14397 @end iflatex
14398 @end iftex
14399
14400 Gnus can display picons for you as you enter and leave groups and
14401 articles.  It knows how to interact with three sections of the picons
14402 database.  Namely, it can display the picons newsgroup pictures,
14403 author's face picture(s), and the authors domain.  To enable this
14404 feature, you need to first decide where to display them.
14405
14406 @table @code 
14407
14408 @item gnus-picons-display-where 
14409 @vindex gnus-picons-display-where 
14410 Where the picon images should be displayed.  It is @code{picons} by
14411 default (which by default maps to the buffer @samp{*Picons*}).  Other
14412 valid places could be @code{article}, @code{summary}, or
14413 @samp{*scratch*} for all I care.  Just make sure that you've made the
14414 buffer visible using the standard Gnus window configuration
14415 routines---@pxref{Windows Configuration}.
14416
14417 @item gnus-picons-group-excluded-groups
14418 @vindex gnus-picons-group-excluded-groups
14419 Groups that are matched by this regexp won't have their group icons
14420 displayed. 
14421
14422 @end table
14423
14424 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
14425 window configuration for you to include the @code{picons} buffer.
14426
14427 Now that you've made that decision, you need to add the following
14428 functions to the appropriate hooks so these pictures will get
14429 displayed at the right time.
14430
14431 @vindex gnus-article-display-hook
14432 @vindex gnus-picons-display-where
14433 @table @code
14434 @item gnus-article-display-picons
14435 @findex gnus-article-display-picons
14436 Looks up and displays the picons for the author and the author's domain
14437 in the @code{gnus-picons-display-where} buffer.  Should be added to the
14438 @code{gnus-article-display-hook}.
14439
14440 @item gnus-group-display-picons
14441 @findex gnus-article-display-picons
14442 Displays picons representing the current group.  This function should
14443 be added to the @code{gnus-summary-prepare-hook} or to the
14444 @code{gnus-article-display-hook} if @code{gnus-picons-display-where}
14445 is set to @code{article}.
14446
14447 @item gnus-picons-article-display-x-face
14448 @findex gnus-article-display-picons
14449 Decodes and displays the X-Face header if present.  This function
14450 should be added to @code{gnus-article-display-hook}.
14451
14452 @end table
14453
14454 Note:  You must append them to the hook, so make sure to specify 't'
14455 for the append flag of @code{add-hook}:
14456
14457 @lisp
14458 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
14459 @end lisp
14460
14461
14462 @node Picon Configuration
14463 @subsubsection Picon Configuration
14464
14465 @iftex
14466 @iflatex
14467 \margindex{}
14468 @end iflatex
14469 @end iftex
14470
14471 The following variables offer further control over how things are
14472 done, where things are located, and other useless stuff you really
14473 don't need to worry about.
14474
14475 @table @code
14476 @item gnus-picons-database
14477 @vindex gnus-picons-database
14478 The location of the picons database.  Should point to a directory
14479 containing the @file{news}, @file{domains}, @file{users} (and so on)
14480 subdirectories.  Defaults to @file{/usr/local/faces}.
14481
14482 @item gnus-picons-news-directory
14483 @vindex gnus-picons-news-directory
14484 Sub-directory of the faces database containing the icons for
14485 newsgroups.
14486
14487 @item gnus-picons-user-directories
14488 @vindex gnus-picons-user-directories
14489 List of subdirectories to search in @code{gnus-picons-database} for user
14490 faces.  @code{("local" "users" "usenix" "misc")} is the default.
14491
14492 @item gnus-picons-domain-directories
14493 @vindex gnus-picons-domain-directories
14494 List of subdirectories to search in @code{gnus-picons-database} for
14495 domain name faces.  Defaults to @code{("domains")}.  Some people may
14496 want to add @samp{unknown} to this list.
14497
14498 @item gnus-picons-convert-x-face
14499 @vindex gnus-picons-convert-x-face
14500 The command to use to convert the @code{X-Face} header to an X bitmap
14501 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
14502 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
14503 gnus-picons-x-face-file-name)}
14504
14505 @item gnus-picons-x-face-file-name
14506 @vindex gnus-picons-x-face-file-name
14507 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
14508 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
14509
14510 @iftex
14511 @iflatex
14512 \margindex{}
14513 @end iflatex
14514 @end iftex
14515
14516 @item gnus-picons-buffer
14517 @vindex gnus-picons-buffer
14518 The name of the buffer that @code{picons} points to.  Defaults to
14519 @samp{*Icon Buffer*}.
14520
14521 @end table
14522
14523 @node Smileys
14524 @subsection Smileys
14525 @cindex smileys
14526
14527 @iftex
14528 @iflatex
14529 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=tmp/BigFace.ps,height=20cm}}
14530 \input{smiley}
14531 @end iflatex
14532 @end iftex
14533
14534 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
14535 currently the only package that uses Smiley, it is documented here.
14536
14537 In short---to use Smiley in Gnus, put the following in your
14538 @file{.gnus.el} file:
14539
14540 @lisp
14541 (add-hook 'gnus-article-display-hook 'gnus-smiley-display t)
14542 @end lisp
14543
14544 Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
14545 the like---to pictures and displays those instead of the text smiley
14546 faces.  The conversion is controlled by a list of regexps that matches
14547 text and maps that to file names.
14548
14549 @vindex smiley-nosey-regexp-alist
14550 @vindex smiley-deformed-regexp-alist
14551 Smiley supplies two example conversion alists by default:
14552 @code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
14553 and so on), and @code{smiley-nosey-regexp-alist} (which matches
14554 @samp{:-)}, @samp{:-(} and so on).
14555
14556 The alist used is specified by the @code{smiley-regexp-alist} variable,
14557 which defaults to the value of @code{smiley-deformed-regexp-alist}.
14558
14559 The first item in each element is the regexp to be matched; the second
14560 element is the regexp match group that is to be replaced by the picture;
14561 and the third element is the name of the file to be displayed.
14562
14563 The following variables customize where Smiley will look for these
14564 files, as well as the color to be used and stuff:
14565
14566 @table @code
14567
14568 @item smiley-data-directory
14569 @vindex smiley-data-directory
14570 Where Smiley will look for smiley faces files.
14571
14572 @item smiley-flesh-color
14573 @vindex smiley-flesh-color
14574 Skin color.  The default is @samp{yellow}, which is really racist.
14575
14576 @item smiley-features-color
14577 @vindex smiley-features-color
14578 Color of the features of the face.  The default is @samp{black}.
14579
14580 @item smiley-tongue-color
14581 @vindex smiley-tongue-color
14582 Color of the tongue.  The default is @samp{red}.
14583
14584 @item smiley-circle-color
14585 @vindex smiley-circle-color
14586 Color of the circle around the face.  The default is @samp{black}.
14587
14588 @item smiley-mouse-face
14589 @vindex smiley-mouse-face
14590 Face used for mouse highlighting over the smiley face.
14591
14592 @end table
14593
14594
14595 @node Toolbar
14596 @subsection Toolbar
14597
14598 @table @code
14599
14600 @iftex
14601 @iflatex
14602 \margindex{}
14603 @end iflatex
14604 @end iftex
14605
14606 @item gnus-use-toolbar
14607 @vindex gnus-use-toolbar
14608 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
14609 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
14610 @code{right-toolbar}, or @code{left-toolbar}.
14611
14612 @item gnus-group-toolbar
14613 @vindex gnus-group-toolbar
14614 The toolbar in the group buffer.
14615
14616 @item gnus-summary-toolbar
14617 @vindex gnus-summary-toolbar
14618 The toolbar in the summary buffer.
14619
14620 @item gnus-summary-mail-toolbar
14621 @vindex gnus-summary-mail-toolbar
14622 The toolbar in the summary buffer of mail groups.
14623
14624 @end table
14625
14626
14627 @node XVarious
14628 @subsection Various XEmacs Variables
14629
14630 @table @code
14631 @item gnus-xmas-glyph-directory
14632 @vindex gnus-xmas-glyph-directory
14633 This is where Gnus will look for pictures.  Gnus will normally
14634 auto-detect this directory, but you may set it manually if you have an
14635 unusual directory structure.
14636
14637 @item gnus-xmas-logo-color-alist
14638 @vindex gnus-xmas-logo-color-alist
14639 This is an alist where the key is a type symbol and the values are the
14640 foreground and background color of the splash page glyph.
14641
14642 @item gnus-xmas-logo-color-style
14643 @vindex gnus-xmas-logo-color-style
14644 This is the key used to look up the color in the alist described above.
14645 Legal values include @code{flame}, @code{pine}, @code{moss},
14646 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
14647 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
14648
14649 @item gnus-xmas-modeline-glyph
14650 @vindex gnus-xmas-modeline-glyph
14651 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
14652 default. 
14653
14654 @iftex
14655 @iflatex
14656 \margindex{}
14657 @end iflatex
14658 @end iftex
14659
14660 @end table
14661
14662
14663
14664
14665 @node Fuzzy Matching
14666 @section Fuzzy Matching
14667 @cindex fuzzy matching
14668
14669 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
14670 things like scoring, thread gathering and thread comparison.  
14671
14672 As opposed to regular expression matching, fuzzy matching is very fuzzy.
14673 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
14674 means, and the implementation has changed over time.
14675
14676 Basically, it tries to remove all noise from lines before comparing.
14677 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
14678 out of the strings before comparing the results.  This often leads to
14679 adequate results---even when faced with strings generated by text
14680 manglers masquerading as newsreaders.
14681
14682
14683 @node Thwarting Email Spam
14684 @section Thwarting Email Spam
14685 @cindex email spam
14686 @cindex spam
14687 @cindex UCE
14688 @cindex unsolicited commercial email
14689
14690 In these last days of the Usenet, commercial vultures are hanging about
14691 and grepping through news like crazy to find email addresses they can
14692 foist off their scams and products to.  As a reaction to this, many
14693 people have started putting nonsense addresses into their @code{From}
14694 lines.  I think this is counterproductive---it makes it difficult for
14695 people to send you legitimate mail in response to things you write, as
14696 well as making it difficult to see who wrote what.  This rewriting may
14697 perhaps be a bigger menace than the unsolicited commercial email itself
14698 in the end.
14699
14700 The biggest problem I have with email spam is that it comes in under
14701 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
14702 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
14703 mail group, only to find two pyramid schemes, seven advertisements
14704 (``New!  Miracle tonic for growing full, lustrouos hair on your toes!'')
14705 and one mail asking me to repent and find some god.
14706
14707 This is annoying.
14708
14709 The way to deal with this is having Gnus split out all spam into a
14710 @samp{spam} mail group (@pxref{Splitting Mail}).
14711
14712 First, pick one (1) valid mail address that you can be reached at, and
14713 put it in your @code{From} header of all your news articles.  (I've
14714 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
14715 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
14716 sysadm whether your sendmail installation accepts keywords in the local
14717 part of the mail address.)
14718
14719 @lisp
14720 (setq message-default-news-headers
14721       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
14722 @end lisp
14723
14724 Then put the following split rule in @code{nnmail-split-fancy}
14725 (@pxref{Fancy Mail Splitting}):
14726
14727 @lisp
14728 (
14729  ...
14730  (to "larsi@@trym.ifi.uio.no"
14731       (| ("subject" "re:.*" "misc")
14732          ("references" ".*@@.*" "misc")
14733          "spam"))
14734  ...
14735 )
14736 @end lisp
14737
14738 This says that all mail to this address is suspect, but if it has a
14739 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
14740 header, it's probably ok.  All the rest goes to the @samp{spam} group.
14741 (This idea probably comes from Tim Pierce.)
14742
14743 In addition, many mail spammers talk directly to your @code{smtp} server
14744 and do not include your email address explicitly in the @code{To}
14745 header.  Why they do this is unknown---perhaps it's to thwart this
14746 twarting scheme?  In any case, this is trivial to deal with---you just
14747 put anything not addressed to you in the @samp{spam} group by ending
14748 your fancy split rule in this way:
14749
14750 @lisp
14751 (
14752  ...
14753  (to "larsi" "misc")
14754  "spam")
14755 @end lisp
14756
14757 In my experience, this will sort virtually everything into the right
14758 group.  You still have to check the @samp{spam} group from time to time to
14759 check for legitimate mail, though.  If you feel like being a good net
14760 citizen, you can even send off complaints to the proper authorities on
14761 each unsolicited commercial email---at your leisure.
14762
14763 If you are also a lazy net citizen, you will probably prefer complaining
14764 automatically with the @file{gnus-junk.el} package, availiable FOR FREE
14765 at @file{<URL:http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html>}.
14766 Since most e-mail spam is sent automatically, this may reconcile the
14767 cosmic balance somewhat.
14768
14769 This works for me.  It allows people an easy way to contact me (they can
14770 just press @kbd{r} in the usual way), and I'm not bothered at all with
14771 spam.  It's a win-win situation.  Forging @code{From} headers to point
14772 to non-existant domains is yucky, in my opinion.
14773
14774
14775 @node Various Various
14776 @section Various Various
14777 @cindex mode lines
14778 @cindex highlights
14779
14780 @table @code
14781
14782 @item gnus-home-directory
14783 All Gnus path variables will be initialized from this variable, which
14784 defaults to @file{~/}.
14785
14786 @item gnus-directory
14787 @vindex gnus-directory
14788 Most Gnus storage path variables will be initialized from this variable,
14789 which defaults to the @samp{SAVEDIR} environment variable, or
14790 @file{~/News/} if that variable isn't set.
14791
14792 @item gnus-default-directory
14793 @vindex gnus-default-directory
14794 Not related to the above variable at all---this variable says what the
14795 default directory of all Gnus buffers should be.  If you issue commands
14796 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
14797 default directory.  If this variable is @code{nil} (which is the
14798 default), the default directory will be the default directory of the
14799 buffer you were in when you started Gnus.
14800
14801 @item gnus-verbose
14802 @vindex gnus-verbose
14803 This variable is an integer between zero and ten.  The higher the value,
14804 the more messages will be displayed.  If this variable is zero, Gnus
14805 will never flash any messages, if it is seven (which is the default),
14806 most important messages will be shown, and if it is ten, Gnus won't ever
14807 shut up, but will flash so many messages it will make your head swim.
14808
14809 @item gnus-verbose-backends
14810 @vindex gnus-verbose-backends
14811 This variable works the same way as @code{gnus-verbose}, but it applies
14812 to the Gnus backends instead of Gnus proper.
14813
14814 @item nnheader-max-head-length
14815 @vindex nnheader-max-head-length
14816 When the backends read straight heads of articles, they all try to read
14817 as little as possible.  This variable (default 4096) specifies
14818 the absolute max length the backends will try to read before giving up
14819 on finding a separator line between the head and the body.  If this
14820 variable is @code{nil}, there is no upper read bound.  If it is
14821 @code{t}, the backends won't try to read the articles piece by piece,
14822 but read the entire articles.  This makes sense with some versions of
14823 @code{ange-ftp} or @code{efs}. 
14824
14825 @item nnheader-head-chop-length
14826 @vindex nnheader-head-chop-length
14827 This variable (default 2048) says how big a piece of each article to
14828 read when doing the operation described above.
14829
14830 @item nnheader-file-name-translation-alist 
14831 @vindex nnheader-file-name-translation-alist 
14832 @cindex file names
14833 @cindex invalid characters in file names
14834 @cindex characters in file names
14835 This is an alist that says how to translate characters in file names.
14836 For instance, if @samp{:} is invalid as a file character in file names
14837 on your system (you OS/2 user you), you could say something like:
14838
14839 @lisp
14840 (setq nnheader-file-name-translation-alist 
14841       '((?: . ?_)))
14842 @end lisp
14843
14844 In fact, this is the default value for this variable on OS/2 and MS
14845 Windows (phooey) systems.
14846
14847 @item gnus-hidden-properties
14848 @vindex gnus-hidden-properties
14849 This is a list of properties to use to hide ``invisible'' text.  It is
14850 @code{(invisible t intangible t)} by default on most systems, which
14851 makes invisible text invisible and intangible.
14852
14853 @item gnus-parse-headers-hook
14854 @vindex gnus-parse-headers-hook
14855 A hook called before parsing headers.  It can be used, for instance, to
14856 gather statistics on the headers fetched, or perhaps you'd like to prune
14857 some headers.  I don't see why you'd want that, though.
14858
14859 @item gnus-shell-command-separator
14860 @vindex gnus-shell-command-separator
14861 String used to separate two shell commands.  The default is @samp{;}. 
14862
14863
14864 @end table
14865
14866
14867 @node The End
14868 @chapter The End
14869
14870 Well, that's the manual---you can get on with your life now.  Keep in
14871 touch.  Say hello to your cats from me.  
14872
14873 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
14874
14875 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
14876
14877 @quotation
14878 @strong{Te Deum}
14879
14880 @sp 1
14881 Not because of victories @*
14882 I sing,@*
14883 having none,@*
14884 but for the common sunshine,@*
14885 the breeze,@*
14886 the largess of the spring.
14887
14888 @sp 1
14889 Not for victory@*
14890 but for the day's work done@*
14891 as well as I was able;@*
14892 not for a seat upon the dais@*
14893 but at the common table.@*
14894 @end quotation
14895
14896
14897 @node Appendices
14898 @chapter Appendices
14899
14900 @menu
14901 * History::                        How Gnus got where it is today.
14902 * Terminology::                    We use really difficult, like, words here.
14903 * Customization::                  Tailoring Gnus to your needs.
14904 * Troubleshooting::                What you might try if things do not work.
14905 * A Programmers Guide to Gnus::    Rilly, rilly technical stuff.
14906 * Emacs for Heathens::             A short introduction to Emacsian terms.
14907 * Frequently Asked Questions::     A question-and-answer session.
14908 @end menu
14909
14910
14911 @node History
14912 @section History
14913
14914 @cindex history
14915 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
14916 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
14917
14918 If you want to investigate the person responsible for this outrage, you
14919 can point your (feh!) web browser to
14920 @file{http://www.ifi.uio.no/~larsi/}.  This is also the primary
14921 distribution point for the new and spiffy versions of Gnus, and is known
14922 as The Site That Destroys Newsrcs And Drives People Mad.
14923
14924 During the first extended alpha period of development, the new Gnus was
14925 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
14926 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
14927 (Besides, the ``Gnus'' in this abbreviation should probably be
14928 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
14929 appropriate name, don't you think?)
14930
14931 In any case, after spending all that energy on coming up with a new and
14932 spunky name, we decided that the name was @emph{too} spunky, so we
14933 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
14934 ``@sc{gnus}''.  New vs. old.
14935
14936 The first ``proper'' release of Gnus 5 was done in November 1995 when it
14937 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
14938 plus 15 Gnus 5.0 releases).
14939
14940 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
14941 releases)) was released under the name ``Gnus 5.2'' (40 releases).
14942
14943 On July 28th 1996 work on Red Gnus was begun, and it was released on
14944 January 25th 1997 (after 84 releases) as ``Gnus 5.4''.
14945
14946 If you happen upon a version of Gnus that has a prefixed name --
14947 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'' --
14948 don't panic.  Don't let it know that you're frightened.  Back away.
14949 Slowly.  Whatever you do, don't run.  Walk away, calmly, until you're
14950 out of its reach.  Find a proper released version of Gnus and snuggle up
14951 to that instead.
14952
14953 @menu
14954 * Why?::                What's the point of Gnus?
14955 * Compatibility::       Just how compatible is Gnus with @sc{gnus}?
14956 * Conformity::          Gnus tries to conform to all standards.
14957 * Emacsen::             Gnus can be run on a few modern Emacsen.
14958 * Contributors::        Oodles of people.  
14959 * New Features::        Pointers to some of the new stuff in Gnus.
14960 * Newest Features::     Features so new that they haven't been written yet.
14961 @end menu
14962
14963
14964 @node Why?
14965 @subsection Why?
14966
14967 What's the point of Gnus?  
14968
14969 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
14970 newsreader, that lets you do anything you can think of.  That was my
14971 original motivation, but while working on Gnus, it has become clear to
14972 me that this generation of newsreaders really belong in the stone age.
14973 Newsreaders haven't developed much since the infancy of the net.  If the
14974 volume continues to rise with the current rate of increase, all current
14975 newsreaders will be pretty much useless.  How do you deal with
14976 newsgroups that have thousands of new articles each day?  How do you
14977 keep track of millions of people who post?
14978
14979 Gnus offers no real solutions to these questions, but I would very much
14980 like to see Gnus being used as a testing ground for new methods of
14981 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
14982 to separate the newsreader from the backends, Gnus now offers a simple
14983 interface for anybody who wants to write new backends for fetching mail
14984 and news from different sources.  I have added hooks for customizations
14985 everywhere I could imagine it being useful.  By doing so, I'm inviting
14986 every one of you to explore and invent.
14987
14988 May Gnus never be complete. @kbd{C-u 100 M-x all-hail-emacs} and
14989 @kbd{C-u 100 M-x all-hail-xemacs}.
14990
14991
14992 @node Compatibility
14993 @subsection Compatibility
14994
14995 @cindex compatibility
14996 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
14997 bindings have been kept.  More key bindings have been added, of course,
14998 but only in one or two obscure cases have old bindings been changed.
14999
15000 Our motto is:
15001 @quotation
15002 @cartouche
15003 @center In a cloud bones of steel.
15004 @end cartouche
15005 @end quotation
15006
15007 All commands have kept their names.  Some internal functions have changed
15008 their names.
15009
15010 The @code{gnus-uu} package has changed drastically. @xref{Decoding
15011 Articles}. 
15012
15013 One major compatibility question is the presence of several summary
15014 buffers.  All variables relevant while reading a group are
15015 buffer-local to the summary buffer they belong in.  Although many
15016 important variables have their values copied into their global
15017 counterparts whenever a command is executed in the summary buffer, this
15018 change might lead to incorrect values being used unless you are careful.
15019
15020 All code that relies on knowledge of @sc{gnus} internals will probably
15021 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
15022 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
15023 maintains a hash table that points to the entries in this alist (which
15024 speeds up many functions), and changing the alist directly will lead to
15025 peculiar results.
15026
15027 @cindex hilit19
15028 @cindex highlighting
15029 Old hilit19 code does not work at all.  In fact, you should probably
15030 remove all hilit code from all Gnus hooks
15031 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
15032 Gnus provides various integrated functions for highlighting.  These are
15033 faster and more accurate.  To make life easier for everybody, Gnus will
15034 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
15035 Away!
15036
15037 Packages like @code{expire-kill} will no longer work.  As a matter of
15038 fact, you should probably remove all old @sc{gnus} packages (and other
15039 code) when you start using Gnus.  More likely than not, Gnus already
15040 does what you have written code to make @sc{gnus} do.  (Snicker.)
15041
15042 Even though old methods of doing things are still supported, only the
15043 new methods are documented in this manual.  If you detect a new method of
15044 doing something while reading this manual, that does not mean you have
15045 to stop doing it the old way.
15046
15047 Gnus understands all @sc{gnus} startup files.
15048
15049 @kindex M-x gnus-bug
15050 @findex gnus-bug
15051 @cindex reporting bugs
15052 @cindex bugs
15053 Overall, a casual user who hasn't written much code that depends on
15054 @sc{gnus} internals should suffer no problems.  If problems occur,
15055 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
15056
15057
15058 @node Conformity
15059 @subsection Conformity
15060
15061 No rebels without a clue here, ma'am.  We conform to all standards known
15062 to (wo)man.  Except for those standards and/or conventions we disagree
15063 with, of course.
15064
15065 @table @strong
15066
15067 @item RFC 822
15068 @cindex RFC 822
15069 There are no known breaches of this standard.
15070
15071 @item RFC 1036
15072 @cindex RFC 1036
15073 There are no known breaches of this standard, either.
15074
15075 @item Good Net-Keeping Seal of Approval
15076 @cindex Good Net-Keeping Seal of Approval
15077 Gnus has been through the Seal process and failed.  I think it'll pass
15078 the next inspection.
15079
15080 @item Son-of-RFC 1036
15081 @cindex Son-of-RFC 1036
15082 We do have some breaches to this one.
15083
15084 @table @emph
15085
15086 @item MIME
15087 Gnus does no MIME handling, and this standard-to-be seems to think that
15088 MIME is the bees' knees, so we have major breakage here.
15089
15090 @item X-Newsreader
15091 This is considered to be a ``vanity header'', while I consider it to be
15092 consumer information.  After seeing so many badly formatted articles
15093 coming from @code{tin} and @code{Netscape} I know not to use either of
15094 those for posting articles.  I would not have known that if it wasn't
15095 for the @code{X-Newsreader} header.
15096 @end table
15097
15098 @end table
15099
15100 If you ever notice Gnus acting non-compliant with regards to the texts
15101 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
15102 know.
15103
15104
15105 @node Emacsen
15106 @subsection Emacsen
15107 @cindex Emacsen
15108 @cindex XEmacs
15109 @cindex Mule
15110 @cindex Emacs
15111
15112 Gnus should work on :
15113
15114 @itemize @bullet 
15115
15116 @item
15117 Emacs 19.32 and up.
15118
15119 @item
15120 XEmacs 19.14 and up.
15121
15122 @item 
15123 Mule versions based on Emacs 19.32 and up.
15124
15125 @end itemize
15126
15127 Gnus will absolutely not work on any Emacsen older than that.  Not
15128 reliably, at least. 
15129
15130 There are some vague differences between Gnus on the various
15131 platforms---XEmacs features more graphics (a logo and a toolbar)---but
15132 other than that, things should look pretty much the same under all
15133 Emacsen. 
15134
15135
15136 @node Contributors
15137 @subsection Contributors
15138 @cindex contributors
15139
15140 The new Gnus version couldn't have been done without the help of all the
15141 people on the (ding) mailing list.  Every day for over a year I have
15142 gotten billions of nice bug reports from them, filling me with joy,
15143 every single one of them.  Smooches.  The people on the list have been
15144 tried beyond endurance, what with my ``oh, that's a neat idea <type
15145 type>, yup, I'll release it right away <ship off> no wait, that doesn't
15146 work at all <type type>, yup, I'll ship that one off right away <ship
15147 off> no, wait, that absolutely does not work'' policy for releases.
15148 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
15149 ``worser''? ``much worser''?  ``worsest''?)
15150
15151 I would like to take this opportunity to thank the Academy for...  oops,
15152 wrong show.
15153
15154 @itemize @bullet
15155
15156 @item 
15157 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
15158
15159 @item 
15160 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
15161 well as numerous other things).
15162
15163 @item 
15164 Luis Fernandes---design and graphics.
15165
15166 @item
15167 Erik Naggum---help, ideas, support, code and stuff.
15168
15169 @item 
15170 Wes Hardaker---@file{gnus-picon.el} and the manual section on
15171 @dfn{picons} (@pxref{Picons}).
15172
15173 @item
15174 Kim-Minh Kaplan---further work on the picon code.
15175
15176 @item 
15177 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
15178 (@pxref{GroupLens}).
15179
15180 @item 
15181 Sudish Joseph---innumerable bug fixes.
15182
15183 @item 
15184 Ilja Weis---@file{gnus-topic.el}.
15185
15186 @item 
15187 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
15188
15189 @item 
15190 Vladimir Alexiev---the refcard and reference booklets.
15191
15192 @item 
15193 Felix Lee & Jamie Zawinsky---I stole some pieces from the XGnus
15194 distribution by Felix Lee and JWZ.
15195
15196 @item 
15197 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
15198
15199 @item 
15200 Peter Mutsaers---orphan article scoring code.
15201
15202 @item 
15203 Ken Raeburn---POP mail support.
15204
15205 @item 
15206 Hallvard B Furuseth---various bits and pieces, especially dealing with
15207 .newsrc files.
15208
15209 @item 
15210 Brian Edmonds---@file{gnus-bbdb.el}.
15211
15212 @item
15213 David Moore---rewrite of @file{nnvirtual.el} and many other things. 
15214
15215 @item 
15216 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
15217
15218 @item
15219 François Pinard---many, many interesting and thorough bug reports.
15220
15221 @end itemize
15222
15223 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
15224 Borges, and Jost Krieger proof-reading parts of the manual.
15225
15226 The following people have contributed many patches and suggestions: 
15227
15228 Christopher Davis,
15229 Andrew Eskilsson,
15230 Kai Grossjohann,
15231 David KÃ¥gedal,
15232 Richard Pieri,
15233 Fabrice Popineau, 
15234 Daniel Quinlan, 
15235 Jason L. Tibbitts, III,
15236 and
15237 Jack Vinson.
15238
15239 Also thanks to the following for patches and stuff:
15240
15241 Jari Aalto,
15242 Adrian Aichner,
15243 Peter Arius, 
15244 Matt Armstrong,
15245 Marc Auslander,
15246 Robert Bihlmeyer,
15247 Chris Bone,
15248 Mark Borges,
15249 Mark Boyns,
15250 Lance A. Brown,
15251 Kees de Bruin,
15252 Martin Buchholz,
15253 Kevin Buhr,
15254 Alastair Burt,
15255 Joao Cachopo,
15256 Zlatko Calusic,
15257 Massimo Campostrini,
15258 Dan Christensen,
15259 Michael R. Cook,
15260 Glenn Coombs, 
15261 Frank D. Cringle, 
15262 Geoffrey T. Dairiki,
15263 Andre Deparade,
15264 Ulrik Dickow,
15265 Dave Disser,
15266 Joev Dubach,
15267 Michael Welsh Duggan,
15268 Paul Eggert,
15269 Michael Ernst,
15270 Luc Van Eycken,
15271 Sam Falkner,
15272 Nelson Jose dos Santos Ferreira,
15273 Sigbjorn Finne,
15274 Gary D. Foster,
15275 Paul Franklin, 
15276 Guy Geens,
15277 Arne Georg Gleditsch,
15278 David S. Goldberg,
15279 Michelangelo Grigni,
15280 D. Hall, 
15281 Magnus Hammerin,
15282 Kenichi Handa, @c ?
15283 Raja R. Harinath,
15284 Hisashige Kenji, @c Hisashige
15285 Marc Horowitz,
15286 Gunnar Horrigmo,
15287 Brad Howes,
15288 François Felix Ingrand,
15289 Ishikawa Ichiro, @c Ishikawa
15290 Lee Iverson, 
15291 Rajappa Iyer,
15292 Andreas Jaeger,
15293 Randell Jesup,
15294 Fred Johansen, 
15295 Greg Klanderman,
15296 Karl Kleinpaste,
15297 Peter Skov Knudsen,
15298 Shuhei Kobayashi, @c Kobayashi
15299 Thor Kristoffersen,
15300 Jens Lautenbacher,
15301 Seokchan Lee, @c ?
15302 Carsten Leonhardt,
15303 James LewisMoss,
15304 Christian Limpach,
15305 Markus Linnala,
15306 Dave Love,
15307 Tonny Madsen,
15308 Shlomo Mahlab,
15309 Nat Makarevitch,
15310 David Martin,
15311 Gordon Matzigkeit,
15312 Timo Metzemakers,
15313 Richard Mlynarik,
15314 Lantz Moore,
15315 Morioka Tomohiko, @c Morioka
15316 Erik Toubro Nielsen,
15317 Hrvoje Niksic,
15318 Andy Norman,
15319 C. R. Oldham,
15320 Alexandre Oliva,
15321 Ken Olstad,
15322 Masaharu Onishi, @c Onishi
15323 Hideki Ono, @c Ono
15324 William Perry,
15325 Stephen Peters,
15326 Ulrich Pfeifer,
15327 John McClary Prevost,
15328 Colin Rafferty,
15329 Lars Balker Rasmussen,
15330 Bart Robinson,
15331 Jason Rumney,
15332 Jay Sachs,
15333 Dewey M. Sasser,
15334 Loren Schall,
15335 Dan Schmidt,
15336 Ralph Schleicher,
15337 Philippe Schnoebelen,
15338 Randal L. Schwartz,
15339 Justin Sheehy,
15340 Danny Siu, 
15341 Matt Simmons,
15342 Paul D. Smith,
15343 Jeff Sparkes,
15344 Toby Speight,
15345 Michael Sperber,
15346 Darren Stalder,
15347 Richard Stallman,
15348 Greg Stark, 
15349 Paul Stodghill,
15350 Kurt Swanson,
15351 Samuel Tardieu, 
15352 Teddy,
15353 Chuck Thompson,
15354 Philippe Troin,
15355 James Troup,
15356 Enami Tsugutomo, @c ?
15357 Aaron M. Ucko, 
15358 Didier Verna,
15359 Jan Vroonhof,
15360 Stefan Waldherr,
15361 Barry A. Warsaw,
15362 Christoph Wedler,
15363 Joe Wells,
15364 and
15365 Katsumi Yamaoka. @c Yamaoka
15366
15367 For a full overview of what each person has done, the ChangeLogs
15368 included in the Gnus alpha distributions should give ample reading
15369 (550kB and counting).
15370
15371 Apologies to everybody that I've forgotten, of which there are many, I'm
15372 sure.  
15373
15374 Gee, that's quite a list of people.  I guess that must mean that there
15375 actually are people who are using Gnus.  Who'd'a thunk it!
15376
15377
15378 @node New Features
15379 @subsection New Features
15380 @cindex new features
15381
15382 @menu
15383 * ding Gnus::          New things in Gnus 5.0/5.1, the first new Gnus.
15384 * September Gnus::     The Thing Formally Known As Gnus 5.3/5.3.
15385 * Red Gnus::           Third time best---Gnus 5.4/5.5.
15386 @end menu
15387
15388 These lists are, of course, just @emph{short} overviews of the
15389 @emph{most} important new features.  No, really.  There are tons more.
15390 Yes, we have feeping creaturism in full effect.
15391
15392
15393 @node ding Gnus
15394 @subsubsection (ding) Gnus
15395
15396 New features in Gnus 5.0/5.1:
15397
15398 @itemize @bullet
15399
15400 @item
15401 The look of all buffers can be changed by setting format-like variables
15402 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}). 
15403  
15404 @item 
15405 Local spool and several @sc{nntp} servers can be used at once
15406 (@pxref{Select Methods}).  
15407
15408 @item 
15409 You can combine groups into virtual groups (@pxref{Virtual Groups}).
15410
15411 @item 
15412 You can read a number of different mail formats (@pxref{Getting Mail}).
15413 All the mail backends implement a convenient mail expiry scheme
15414 (@pxref{Expiring Mail}). 
15415
15416 @item
15417 Gnus can use various strategies for gathering threads that have lost
15418 their roots (thereby gathering loose sub-threads into one thread) or it
15419 can go back and retrieve enough headers to build a complete thread
15420 (@pxref{Customizing Threading}).
15421
15422 @item 
15423 Killed groups can be displayed in the group buffer, and you can read
15424 them as well (@pxref{Listing Groups}).
15425
15426 @item 
15427 Gnus can do partial group updates---you do not have to retrieve the
15428 entire active file just to check for new articles in a few groups
15429 (@pxref{The Active File}).
15430
15431 @item 
15432 Gnus implements a sliding scale of subscribedness to groups
15433 (@pxref{Group Levels}).
15434
15435 @item 
15436 You can score articles according to any number of criteria
15437 (@pxref{Scoring}).  You can even get Gnus to find out how to score
15438 articles for you (@pxref{Adaptive Scoring}).
15439
15440 @item 
15441 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
15442 manner, so it should be difficult to lose much data on what you have
15443 read if your machine should go down (@pxref{Auto Save}). 
15444
15445 @item 
15446 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
15447 the @file{.emacs} file.
15448
15449 @item 
15450 You can set the process mark on both groups and articles and perform
15451 operations on all the marked items (@pxref{Process/Prefix}).
15452
15453 @item 
15454 You can grep through a subset of groups and create a group from the
15455 results (@pxref{Kibozed Groups}). 
15456
15457 @item 
15458 You can list subsets of groups according to, well, anything
15459 (@pxref{Listing Groups}). 
15460
15461 @item 
15462 You can browse foreign servers and subscribe to groups from those
15463 servers (@pxref{Browse Foreign Server}). 
15464
15465 @item 
15466 Gnus can fetch articles, asynchronously, on a second connection to the
15467 server (@pxref{Asynchronous Fetching}).
15468
15469 @item 
15470 You can cache articles locally (@pxref{Article Caching}). 
15471
15472 @item 
15473 The uudecode functions have been expanded and generalized
15474 (@pxref{Decoding Articles}). 
15475
15476 @item
15477 You can still post uuencoded articles, which was a little-known feature
15478 of @sc{gnus}' past (@pxref{Uuencoding and Posting}). 
15479
15480 @item
15481 Fetching parents (and other articles) now actually works without
15482 glitches (@pxref{Finding the Parent}). 
15483
15484 @item
15485 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
15486
15487 @item
15488 Digests (and other files) can be used as the basis for groups
15489 (@pxref{Document Groups}).
15490
15491 @item 
15492 Articles can be highlighted and customized (@pxref{Customizing
15493 Articles}). 
15494
15495 @item 
15496 URLs and other external references can be buttonized (@pxref{Article
15497 Buttons}). 
15498
15499 @item
15500 You can do lots of strange stuff with the Gnus window & frame
15501 configuration (@pxref{Windows Configuration}).
15502
15503 @item
15504 You can click on buttons instead of using the keyboard
15505 (@pxref{Buttons}). 
15506
15507 @end itemize
15508
15509
15510 @node September Gnus
15511 @subsubsection September Gnus
15512
15513 @iftex
15514 @iflatex
15515 \gnusfig{-28cm}{0cm}{\epsfig{figure=tmp/september.ps,height=20cm}}
15516 @end iflatex
15517 @end iftex
15518
15519 New features in Gnus 5.2/5.3:
15520
15521 @itemize @bullet
15522
15523 @item
15524 A new message composition mode is used.  All old customization variables
15525 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
15526 now obsolete.
15527
15528 @item
15529 Gnus is now able to generate @dfn{sparse} threads---threads where
15530 missing articles are represented by empty nodes (@pxref{Customizing
15531 Threading}). 
15532
15533 @lisp
15534 (setq gnus-build-sparse-threads 'some)
15535 @end lisp
15536
15537 @item
15538 Outgoing articles are stored on a special archive server
15539 (@pxref{Archived Messages}). 
15540
15541 @item
15542 Partial thread regeneration now happens when articles are
15543 referred. 
15544
15545 @item
15546 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
15547
15548 @item
15549 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}). 
15550
15551 @item
15552 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
15553
15554 @lisp
15555 (setq gnus-use-trees t)
15556 @end lisp
15557
15558 @item
15559 An @code{nn}-like pick-and-read minor mode is available for the summary
15560 buffers (@pxref{Pick and Read}).
15561
15562 @lisp
15563 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
15564 @end lisp
15565
15566 @item
15567 In binary groups you can use a special binary minor mode (@pxref{Binary
15568 Groups}). 
15569
15570 @item
15571 Groups can be grouped in a folding topic hierarchy (@pxref{Group
15572 Topics}).
15573
15574 @lisp
15575 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
15576 @end lisp
15577
15578 @item
15579 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
15580
15581 @item
15582 Groups can now have a score, and bubbling based on entry frequency
15583 is possible (@pxref{Group Score}).
15584
15585 @lisp
15586 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
15587 @end lisp
15588
15589 @item
15590 Groups can be process-marked, and commands can be performed on
15591 groups of groups (@pxref{Marking Groups}).
15592
15593 @item
15594 Caching is possible in virtual groups.
15595
15596 @item
15597 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
15598 news batches, ClariNet briefs collections, and just about everything
15599 else (@pxref{Document Groups}).
15600
15601 @item
15602 Gnus has a new backend (@code{nnsoup}) to create/read SOUP packets
15603 (@pxref{SOUP}).
15604
15605 @item
15606 The Gnus cache is much faster.
15607
15608 @item
15609 Groups can be sorted according to many criteria (@pxref{Sorting
15610 Groups}).
15611
15612 @item
15613 New group parameters have been introduced to set list-addresses and
15614 expiry times (@pxref{Group Parameters}).
15615
15616 @item
15617 All formatting specs allow specifying faces to be used
15618 (@pxref{Formatting Fonts}).
15619
15620 @item
15621 There are several more commands for setting/removing/acting on process
15622 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
15623
15624 @item
15625 The summary buffer can be limited to show parts of the available
15626 articles based on a wide range of criteria.  These commands have been
15627 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
15628
15629 @item
15630 Articles can be made persistent with the @kbd{*} command
15631 (@pxref{Persistent Articles}).
15632
15633 @item
15634 All functions for hiding article elements are now toggles.
15635
15636 @item
15637 Article headers can be buttonized (@pxref{Article Washing}).
15638
15639 @lisp
15640 (add-hook 'gnus-article-display-hook 
15641           'gnus-article-add-buttons-to-head)
15642 @end lisp
15643
15644 @item
15645 All mail backends support fetching articles by @code{Message-ID}.
15646
15647 @item
15648 Duplicate mail can now be treated properly (@pxref{Duplicates}).
15649
15650 @item
15651 All summary mode commands are available directly from the article
15652 buffer (@pxref{Article Keymap}). 
15653
15654 @item
15655 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Windows
15656 Configuration}).
15657
15658 @item
15659 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
15660 @iftex
15661 @iflatex
15662 \marginpar[\mbox{}\hfill\epsfig{figure=tmp/fseptember.ps,height=5cm}]{\epsfig{figure=tmp/fseptember.ps,height=5cm}}
15663 @end iflatex
15664 @end iftex
15665
15666 @item
15667 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
15668
15669 @lisp
15670 (setq gnus-use-nocem t)
15671 @end lisp
15672
15673 @item
15674 Groups can be made permanently visible (@pxref{Listing Groups}).
15675
15676 @lisp
15677 (setq gnus-permanently-visible-groups "^nnml:")
15678 @end lisp
15679
15680 @item
15681 Many new hooks have been introduced to make customizing easier. 
15682
15683 @item
15684 Gnus respects the @code{Mail-Copies-To} header.
15685
15686 @item
15687 Threads can be gathered by looking at the @code{References} header
15688 (@pxref{Customizing Threading}).
15689
15690 @lisp
15691 (setq gnus-summary-thread-gathering-function 
15692       'gnus-gather-threads-by-references)
15693 @end lisp
15694
15695 @item
15696 Read articles can be stored in a special backlog buffer to avoid
15697 refetching (@pxref{Article Backlog}).  
15698
15699 @lisp
15700 (setq gnus-keep-backlog 50)
15701 @end lisp
15702
15703 @item
15704 A clean copy of the current article is always stored in a separate
15705 buffer to allow easier treatment.
15706
15707 @item
15708 Gnus can suggest where to save articles (@pxref{Saving Articles}).
15709
15710 @item
15711 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
15712 Articles}). 
15713
15714 @lisp
15715 (setq gnus-prompt-before-saving t)
15716 @end lisp
15717
15718 @item
15719 @code{gnus-uu} can view decoded files asynchronously while fetching
15720 articles (@pxref{Other Decode Variables}). 
15721
15722 @lisp
15723 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
15724 @end lisp
15725
15726 @item
15727 Filling in the article buffer now works properly on cited text
15728 (@pxref{Article Washing}).
15729
15730 @item
15731 Hiding cited text adds buttons to toggle hiding, and how much
15732 cited text to hide is now customizable (@pxref{Article Hiding}).
15733
15734 @lisp
15735 (setq gnus-cited-lines-visible 2)
15736 @end lisp
15737
15738 @item
15739 Boring headers can be hidden (@pxref{Article Hiding}).
15740
15741 @lisp
15742 (add-hook 'gnus-article-display-hook 
15743           'gnus-article-hide-boring-headers t)
15744 @end lisp
15745
15746 @item
15747 Default scoring values can now be set from the menu bar.
15748
15749 @item
15750 Further syntax checking of outgoing articles have been added.
15751
15752 @end itemize
15753
15754
15755 @node Red Gnus
15756 @subsubsection Red Gnus
15757
15758 New features in Gnus 5.4/5.5:
15759
15760 @iftex
15761 @iflatex
15762 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=tmp/red.ps,height=20cm}}
15763 @end iflatex
15764 @end iftex
15765
15766 @itemize @bullet
15767
15768 @item
15769 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
15770
15771 @item
15772 Article prefetching functionality has been moved up into 
15773 Gnus (@pxref{Asynchronous Fetching}).  
15774
15775 @item
15776 Scoring can now be performed with logical operators like @code{and},
15777 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
15778 Scoring}).
15779
15780 @item
15781 Article washing status can be displayed in the
15782 article mode line (@pxref{Misc Article}).
15783
15784 @item
15785 @file{gnus.el} has been split into many smaller files.
15786
15787 @item
15788 Suppression of duplicate articles based on Message-ID can be done
15789 (@pxref{Duplicate Suppression}).
15790
15791 @lisp
15792 (setq gnus-suppress-duplicates t)
15793 @end lisp
15794
15795 @item
15796 New variables for specifying what score and adapt files are to be
15797 considered home score and adapt files (@pxref{Home Score File}) have
15798 been added.
15799
15800 @item
15801 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
15802 Server Internals}). 
15803
15804 @item
15805 Groups can inherit group parameters from parent topics (@pxref{Topic
15806 Parameters}).
15807
15808 @item
15809 Article editing has been revamped and is now actually usable.
15810
15811 @item
15812 Signatures can be recognized in more intelligent fashions
15813 (@pxref{Article Signature}).
15814
15815 @item
15816 Summary pick mode has been made to look more @code{nn}-like.  Line
15817 numbers are displayed and the @kbd{.} command can be used to pick
15818 articles (@code{Pick and Read}).
15819
15820 @item
15821 Commands for moving the @file{.newsrc.eld} from one server to
15822 another have been added (@pxref{Changing Servers}).
15823
15824 @item
15825 There's a way now to specify that ``uninteresting'' fields be suppressed
15826 when generating lines in buffers (@pxref{Advanced Formatting}).
15827
15828 @item
15829 Several commands in the group buffer can be undone with @kbd{M-C-_}
15830 (@pxref{Undo}).
15831
15832 @item
15833 Scoring can be done on words using the new score type @code{w}
15834 (@pxref{Score File Format}).
15835
15836 @item
15837 Adaptive scoring can be done on a Subject word-by-word basis
15838 (@pxref{Adaptive Scoring}). 
15839
15840 @lisp
15841 (setq gnus-use-adaptive-scoring '(word))
15842 @end lisp
15843
15844 @item
15845 Scores can be decayed (@pxref{Score Decays}).
15846  
15847 @lisp
15848 (setq gnus-decay-scores t)
15849 @end lisp
15850
15851 @item
15852 Scoring can be performed using a regexp on the Date header.  The Date is
15853 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
15854
15855 @item
15856 A new command has been added to remove all data on articles from
15857 the native server (@pxref{Changing Servers}).
15858
15859 @item
15860 A new command for reading collections of documents
15861 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{M-C-d}
15862 (@pxref{Really Various Summary Commands}). 
15863
15864 @item
15865 Process mark sets can be pushed and popped (@pxref{Setting Process
15866 Marks}).
15867
15868 @item
15869 A new mail-to-news backend makes it possible to post even when the NNTP
15870 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
15871
15872 @item
15873 A new backend for reading searches from Web search engines
15874 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
15875 (@pxref{Web Searches}).
15876
15877 @item
15878 Groups inside topics can now be sorted using the standard sorting
15879 functions, and each topic can be sorted independently (@pxref{Topic
15880 Sorting}).
15881
15882 @item
15883 Subsets of the groups can be sorted independently (@code{Sorting
15884 Groups}).
15885
15886 @item
15887 Cached articles can be pulled into the groups (@pxref{Summary Generation
15888 Commands}).
15889 @iftex
15890 @iflatex
15891 \marginpar[\mbox{}\hfill\epsfig{figure=tmp/fred.ps,width=3cm}]{\epsfig{figure=tmp/fred.ps,width=3cm}}
15892 @end iflatex
15893 @end iftex
15894
15895 @item
15896 Score files are now applied in a more reliable order (@pxref{Score
15897 Variables}).
15898
15899 @item
15900 Reports on where mail messages end up can be generated (@pxref{Splitting
15901 Mail}).
15902
15903 @item
15904 More hooks and functions have been added to remove junk from incoming
15905 mail before saving the mail (@pxref{Washing Mail}).
15906
15907 @item
15908 Emphasized text can be properly fontisized:
15909
15910 @lisp
15911 (add-hook 'gnus-article-display-hook 'gnus-article-emphasize)
15912 @end lisp
15913  
15914 @end itemize
15915
15916
15917 @node Newest Features
15918 @subsection Newest Features
15919 @cindex todo
15920
15921 Also known as the @dfn{todo list}.  Sure to be implemented before the
15922 next millennium. 
15923
15924 Be afraid.  Be very afraid.
15925
15926 @itemize @bullet
15927 @item
15928 Native @sc{mime} support is something that should be done.  
15929 @item
15930 Really do unbinhexing.
15931 @end itemize
15932
15933 And much, much, much more.  There is more to come than has already been
15934 implemented.  (But that's always true, isn't it?)
15935
15936 @file{<URL:http://www.ifi.uio.no/~larsi/rgnus/todo>} is where the actual
15937 up-to-the-second todo list is located, so if you're really curious, you
15938 could point your Web browser over that-a-way.
15939
15940 @iftex
15941
15942 @page
15943 @node The Manual
15944 @section The Manual
15945 @cindex colophon
15946 @cindex manual
15947
15948 This manual was generated from a TeXinfo file and then run through
15949 either @code{texi2dvi}
15950 @iflatex
15951 or my own home-brewed TeXinfo to \LaTeX\ transformer,
15952 and then run through @code{latex} and @code{dvips} 
15953 @end iflatex
15954 to get what you hold in your hands now.
15955
15956 The following conventions have been used:
15957
15958 @enumerate
15959
15960 @item
15961 This is a @samp{string}
15962
15963 @item
15964 This is a @kbd{keystroke}
15965
15966 @item
15967 This is a @file{file}
15968
15969 @item 
15970 This is a @code{symbol}
15971
15972 @end enumerate
15973
15974 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
15975 mean:
15976
15977 @lisp
15978 (setq flargnoze "yes")
15979 @end lisp
15980
15981 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
15982
15983 @lisp
15984 (setq flumphel 'yes)
15985 @end lisp
15986
15987 @samp{yes} and @code{yes} are two @emph{very} different things---don't
15988 ever get them confused.
15989
15990 @iflatex
15991 @c @head
15992 Of course, everything in this manual is of vital interest, so you should
15993 read it all.  Several times.  However, if you feel like skimming the
15994 manual, look for that gnu head you should see in the margin over
15995 there---it means that what's being discussed is of more importance than
15996 the rest of the stuff.  (On the other hand, if everything is infinitely
15997 important, how can anything be more important than that?  Just one more
15998 of the mysteries of this world, I guess.)
15999 @end iflatex
16000
16001 @end iftex
16002
16003
16004 @page
16005 @node Terminology
16006 @section Terminology
16007
16008 @cindex terminology
16009 @table @dfn
16010
16011 @item news
16012 @cindex news
16013 This is what you are supposed to use this thing for---reading news.
16014 News is generally fetched from a nearby @sc{nntp} server, and is
16015 generally publicly available to everybody.  If you post news, the entire
16016 world is likely to read just what you have written, and they'll all
16017 snigger mischievously.  Behind your back.
16018
16019 @item mail
16020 @cindex mail
16021 Everything that's delivered to you personally is mail.  Some news/mail
16022 readers (like Gnus) blur the distinction between mail and news, but
16023 there is a difference.  Mail is private.  News is public.  Mailing is
16024 not posting, and replying is not following up.
16025
16026 @item reply
16027 @cindex reply
16028 Send a mail to the person who has written what you are reading.
16029
16030 @item follow up
16031 @cindex follow up
16032 Post an article to the current newsgroup responding to the article you
16033 are reading.
16034
16035 @item backend
16036 @cindex backend
16037 Gnus gets fed articles from a number of backends, both news and mail
16038 backends.  Gnus does not handle the underlying media, so to speak---this
16039 is all done by the backends.
16040
16041 @item native
16042 @cindex native
16043 Gnus will always use one method (and backend) as the @dfn{native}, or
16044 default, way of getting news.
16045
16046 @item foreign
16047 @cindex foreign
16048 You can also have any number of foreign groups active at the same time.
16049 These are groups that use non-native non-secondary backends for getting
16050 news.
16051
16052 @item secondary
16053 @cindex secondary
16054 Secondary backends are somewhere half-way between being native and being
16055 foreign, but they mostly act like they are native.
16056
16057 @item article
16058 @cindex article
16059 A message that has been posted as news.
16060
16061 @item mail message
16062 @cindex mail message
16063 A message that has been mailed.
16064
16065 @item message 
16066 @cindex message
16067 A mail message or news article
16068
16069 @item head
16070 @cindex head
16071 The top part of a message, where administrative information (etc.) is
16072 put.
16073
16074 @item body
16075 @cindex body
16076 The rest of an article.  Everything not in the head is in the
16077 body. 
16078
16079 @item header
16080 @cindex header
16081 A line from the head of an article. 
16082
16083 @item headers
16084 @cindex headers
16085 A collection of such lines, or a collection of heads.  Or even a
16086 collection of @sc{nov} lines.
16087
16088 @item @sc{nov}
16089 @cindex nov
16090 When Gnus enters a group, it asks the backend for the headers of all
16091 unread articles in the group.  Most servers support the News OverView
16092 format, which is more compact and much faster to read and parse than the
16093 normal @sc{head} format.
16094
16095 @item level
16096 @cindex levels
16097 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
16098 that have a lower level are ``more'' subscribed than the groups with a
16099 higher level.  In fact, groups on levels 1-5 are considered
16100 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
16101 are @dfn{killed}.  Commands for listing groups and scanning for new
16102 articles will all use the numeric prefix as @dfn{working level}.
16103
16104 @item killed groups
16105 @cindex killed groups
16106 No information on killed groups is stored or updated, which makes killed
16107 groups much easier to handle than subscribed groups.
16108
16109 @item zombie groups
16110 @cindex zombie groups
16111 Just like killed groups, only slightly less dead.
16112
16113 @item active file
16114 @cindex active file
16115 The news server has to keep track of what articles it carries, and what
16116 groups exist.  All this information in stored in the active file, which
16117 is rather large, as you might surmise.
16118
16119 @item bogus groups
16120 @cindex bogus groups
16121 A group that exists in the @file{.newsrc} file, but isn't known to the
16122 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
16123 This means that the group probably doesn't exist (any more).
16124
16125 @item server 
16126 @cindex server
16127 A machine one can connect to and get news (or mail) from.
16128
16129 @item select method
16130 @cindex select method
16131 A structure that specifies the backend, the server and the virtual
16132 server settings.
16133
16134 @item virtual server
16135 @cindex virtual server
16136 A named select method.  Since a select method defines all there is to
16137 know about connecting to a (physical) server, taking the thing as a
16138 whole is a virtual server.
16139
16140 @item washing
16141 @cindex washing
16142 Taking a buffer and running it through a filter of some sort.  The
16143 result will (more often than not) be cleaner and more pleasing than the
16144 original. 
16145
16146 @item ephemeral groups
16147 @cindex ephemeral groups
16148 Most groups store data on what articles you have read.  @dfn{Ephemeral}
16149 groups are groups that will have no data stored---when you exit the
16150 group, it'll disappear into the aether.  
16151
16152 @item solid groups
16153 @cindex solid groups
16154 This is the opposite of ephemeral groups.  All groups listed in the
16155 group buffer are solid groups.
16156
16157 @item sparse articles
16158 @cindex sparse articles
16159 These are article placeholders shown in the summary buffer when
16160 @code{gnus-build-sparse-threads} has been switched on.
16161
16162 @item threading
16163 @cindex threading
16164 To put responses to articles directly after the articles they respond
16165 to---in a hierarchical fashion.
16166
16167 @item root
16168 @cindex root
16169 @cindex thread root
16170 The first article in a thread is the root.  It is the ancestor of all
16171 articles in the thread.
16172
16173 @item parent
16174 @cindex parent
16175 An article that has responses.
16176
16177 @item child
16178 @cindex child
16179 An article that responds to a different article---its parent.
16180
16181 @item digest
16182 @cindex digest
16183 A collection of messages in one file.  The most common digest format is
16184 specified by RFC1153.
16185
16186 @end table
16187
16188
16189 @page
16190 @node Customization
16191 @section Customization
16192 @cindex general customization
16193
16194 All variables are properly documented elsewhere in this manual.  This
16195 section is designed to give general pointers on how to customize Gnus
16196 for some quite common situations.
16197
16198 @menu
16199 * Slow/Expensive Connection:: You run a local Emacs and get the news elsewhere.
16200 * Slow Terminal Connection::  You run a remote Emacs.
16201 * Little Disk Space::         You feel that having large setup files is icky.
16202 * Slow Machine::              You feel like buying a faster machine.
16203 @end menu
16204
16205
16206 @node Slow/Expensive Connection
16207 @subsection Slow/Expensive @sc{nntp} Connection
16208
16209 If you run Emacs on a machine locally, and get your news from a machine
16210 over some very thin strings, you want to cut down on the amount of data
16211 Gnus has to get from the @sc{nntp} server.
16212
16213 @table @code
16214
16215 @item gnus-read-active-file
16216 Set this to @code{nil}, which will inhibit Gnus from requesting the
16217 entire active file from the server.  This file is often v.  large.  You
16218 also have to set @code{gnus-check-new-newsgroups} and
16219 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
16220 doesn't suddenly decide to fetch the active file anyway.
16221
16222 @item gnus-nov-is-evil
16223 This one has to be @code{nil}.  If not, grabbing article headers from
16224 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
16225 support @sc{xover}; Gnus will detect this by itself.
16226 @end table
16227
16228
16229 @node Slow Terminal Connection
16230 @subsection Slow Terminal Connection
16231
16232 Let's say you use your home computer for dialing up the system that runs
16233 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
16234 possible) the amount of data sent over the wires.
16235
16236 @table @code
16237
16238 @item gnus-auto-center-summary
16239 Set this to @code{nil} to inhibit Gnus from re-centering the summary
16240 buffer all the time.  If it is @code{vertical}, do only vertical
16241 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
16242 horizontal and vertical recentering.
16243
16244 @item gnus-visible-headers
16245 Cut down on the headers included in the articles to the
16246 minimum.  You can, in fact, make do without them altogether---most of the
16247 useful data is in the summary buffer, anyway.  Set this variable to
16248 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
16249
16250 @item gnus-article-display-hook
16251 Set this hook to all the available hiding commands:
16252 @lisp
16253 (setq gnus-article-display-hook 
16254       '(gnus-article-hide-headers gnus-article-hide-signature
16255         gnus-article-hide-citation))
16256 @end lisp
16257
16258 @item gnus-use-full-window
16259 By setting this to @code{nil}, you can make all the windows smaller.
16260 While this doesn't really cut down much generally, it means that you
16261 have to see smaller portions of articles before deciding that you didn't
16262 want to read them anyway.
16263
16264 @item gnus-thread-hide-subtree
16265 If this is non-@code{nil}, all threads in the summary buffer will be
16266 hidden initially.
16267
16268 @item gnus-updated-mode-lines
16269 If this is @code{nil}, Gnus will not put information in the buffer mode
16270 lines, which might save some time.
16271 @end table
16272
16273
16274 @node Little Disk Space
16275 @subsection Little Disk Space
16276 @cindex disk space
16277
16278 The startup files can get rather large, so you may want to cut their
16279 sizes a bit if you are running out of space.
16280
16281 @table @code
16282
16283 @item gnus-save-newsrc-file
16284 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
16285 only save @file{.newsrc.eld}.  This means that you will not be able to
16286 use any other newsreaders than Gnus.  This variable is @code{t} by
16287 default. 
16288
16289 @item gnus-save-killed-list
16290 If this is @code{nil}, Gnus will not save the list of dead groups.  You
16291 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
16292 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
16293 variable to @code{nil}.  This variable is @code{t} by default.
16294
16295 @end table
16296
16297
16298 @node Slow Machine
16299 @subsection Slow Machine
16300 @cindex slow machine
16301
16302 If you have a slow machine, or are just really impatient, there are a
16303 few things you can do to make Gnus run faster.
16304
16305 Set @code{gnus-check-new-newsgroups} and
16306 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
16307
16308 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
16309 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
16310 summary buffer faster.
16311
16312 Set @code{gnus-article-display-hook} to @code{nil} to make article
16313 processing a bit faster.
16314
16315
16316 @page
16317 @node Troubleshooting
16318 @section Troubleshooting
16319 @cindex troubleshooting
16320
16321 Gnus works @emph{so} well straight out of the box---I can't imagine any
16322 problems, really.
16323
16324 Ahem.
16325
16326 @enumerate
16327
16328 @item
16329 Make sure your computer is switched on.
16330
16331 @item
16332 Make sure that you really load the current Gnus version.  If you have
16333 been running @sc{gnus}, you need to exit Emacs and start it up again before
16334 Gnus will work.
16335
16336 @item
16337 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
16338 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
16339 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
16340 flee}, you have some old @file{.el} files lying around.  Delete these.
16341
16342 @item
16343 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
16344 how-to. 
16345
16346 @item
16347 @vindex max-lisp-eval-depth
16348 Gnus works on many recursive structures, and in some extreme (and very
16349 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
16350 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
16351 something like that.
16352 @end enumerate
16353
16354 If all else fails, report the problem as a bug.
16355
16356 @cindex bugs
16357 @cindex reporting bugs
16358
16359 @kindex M-x gnus-bug
16360 @findex gnus-bug
16361 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
16362 command. @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
16363 me the backtrace.  I will fix bugs, but I can only fix them if you send
16364 me a precise description as to how to reproduce the bug.
16365
16366 You really can never be too detailed in a bug report.  Always use the
16367 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
16368 a 10Kb mail each time you use it, and even if you have sent me your
16369 environment 500 times before.  I don't care.  I want the full info each
16370 time.  
16371
16372 It is also important to remember that I have no memory whatsoever.  If
16373 you send a bug report, and I send you a reply, and then you just send
16374 back ``No, it's not! Moron!'', I will have no idea what you are
16375 insulting me about.  Always over-explain everything.  It's much easier
16376 for all of us---if I don't have all the information I need, I will just
16377 mail you and ask for more info, and everything takes more time.
16378
16379 If the problem you're seeing is very visual, and you can't quite explain
16380 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
16381 it somewhere it can be reached, and include the URL of the picture in
16382 the bug report.
16383
16384 If you just need help, you are better off asking on
16385 @samp{gnu.emacs.gnus}.  I'm not very helpful.
16386
16387 @cindex gnu.emacs.gnus
16388 @cindex ding mailing list
16389 You can also ask on the ding mailing list---@samp{ding@@gnus.org}.
16390 Write to @samp{ding-request@@gnus.org} to subscribe.
16391
16392
16393 @page
16394 @node A Programmers Guide to Gnus
16395 @section A Programmer@'s Guide to Gnus
16396
16397 It is my hope that other people will figure out smart stuff that Gnus
16398 can do, and that other people will write those smart things as well.  To
16399 facilitate that I thought it would be a good idea to describe the inner
16400 workings of Gnus.  And some of the not-so-inner workings, while I'm at
16401 it.
16402
16403 You can never expect the internals of a program not to change, but I
16404 will be defining (in some details) the interface between Gnus and its
16405 backends (this is written in stone), the format of the score files
16406 (ditto), data structures (some are less likely to change than others)
16407 and general methods of operation.
16408
16409 @menu 
16410 * Gnus Utility Functions::   Common functions and variable to use.
16411 * Backend Interface::        How Gnus communicates with the servers.
16412 * Score File Syntax::        A BNF definition of the score file standard.
16413 * Headers::                  How Gnus stores headers internally.
16414 * Ranges::                   A handy format for storing mucho numbers.
16415 * Group Info::               The group info format.
16416 * Extended Interactive::     Symbolic prefixes and stuff.
16417 * Emacs/XEmacs Code::        Gnus can be run under all modern Emacsen.
16418 * Various File Formats::     Formats of files that Gnus use.
16419 @end menu
16420
16421
16422 @node Gnus Utility Functions
16423 @subsection Gnus Utility Functions
16424 @cindex Gnus utility functions
16425 @cindex utility functions
16426 @cindex functions
16427 @cindex internal variables
16428
16429 When writing small functions to be run from hooks (and stuff), it's
16430 vital to have access to the Gnus internal functions and variables.
16431 Below is a list of the most common ones.
16432
16433 @table @code
16434
16435 @item gnus-newsgroup-name
16436 @vindex gnus-newsgroup-name
16437 This variable holds the name of the current newsgroup.
16438
16439 @item gnus-find-method-for-group
16440 @findex gnus-find-method-for-group
16441 A function that returns the select method for @var{group}.
16442
16443 @item gnus-group-real-name
16444 @findex gnus-group-real-name
16445 Takes a full (prefixed) Gnus group name, and returns the unprefixed
16446 name.
16447
16448 @item gnus-group-prefixed-name
16449 @findex gnus-group-prefixed-name
16450 Takes an unprefixed group name and a select method, and returns the full
16451 (prefixed) Gnus group name.
16452
16453 @item gnus-get-info
16454 @findex gnus-get-info
16455 Returns the group info list for @var{group}.
16456
16457 @item gnus-add-current-to-buffer-list
16458 @findex gnus-add-current-to-buffer-list
16459 Adds the current buffer to the list of buffers to be killed on Gnus
16460 exit.
16461
16462 @item gnus-continuum-version
16463 @findex gnus-continuum-version
16464 Takes a Gnus version string as a parameter and returns a floating point
16465 number.  Earlier versions will always get a lower number than later
16466 versions.
16467
16468 @item gnus-group-read-only-p
16469 @findex gnus-group-read-only-p
16470 Says whether @var{group} is read-only or not.
16471
16472 @item gnus-news-group-p
16473 @findex gnus-news-group-p
16474 Says whether @var{group} came from a news backend.
16475
16476 @item gnus-ephemeral-group-p
16477 @findex gnus-ephemeral-group-p
16478 Says whether @var{group} is ephemeral or not.
16479
16480 @item gnus-server-to-method
16481 @findex gnus-server-to-method
16482 Returns the select method corresponding to @var{server}.
16483
16484 @item gnus-server-equal
16485 @findex gnus-server-equal
16486 Says whether two virtual servers are equal.
16487
16488 @item gnus-group-native-p
16489 @findex gnus-group-native-p
16490 Says whether @var{group} is native or not.
16491
16492 @item gnus-group-secondary-p
16493 @findex gnus-group-secondary-p
16494 Says whether @var{group} is secondary or not.
16495
16496 @item gnus-group-foreign-p
16497 @findex gnus-group-foreign-p
16498 Says whether @var{group} is foreign or not.
16499
16500 @item group-group-find-parameter
16501 @findex group-group-find-parameter
16502 Returns the parameter list of @var{group}.  If given a second parameter,
16503 returns the value of that parameter for @var{group}.
16504
16505 @item gnus-group-set-parameter
16506 @findex gnus-group-set-parameter
16507 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
16508
16509 @item gnus-narrow-to-body
16510 @findex gnus-narrow-to-body
16511 Narrows the current buffer to the body of the article.
16512
16513 @item gnus-check-backend-function
16514 @findex gnus-check-backend-function
16515 Takes two parameters, @var{function} and @var{group}.  If the backend
16516 @var{group} comes from supports @var{function}, return non-@code{nil}.
16517
16518 @lisp
16519 (gnus-check-backend-function "request-scan" "nnml:misc")
16520 => t
16521 @end lisp
16522
16523 @item gnus-read-method
16524 @findex gnus-read-method
16525 Prompts the user for a select method.
16526
16527 @end table
16528
16529
16530 @node Backend Interface
16531 @subsection Backend Interface
16532
16533 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
16534 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
16535 server is a @dfn{backend} and some @dfn{backend variables}.  As examples
16536 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
16537 examples of the latter we have @code{nntp-port-number} and
16538 @code{nnmbox-directory}.
16539
16540 When Gnus asks for information from a backend---say @code{nntp}---on
16541 something, it will normally include a virtual server name in the
16542 function parameters.  (If not, the backend should use the ``current''
16543 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
16544 server as its only (optional) parameter.  If this virtual server hasn't
16545 been opened, the function should fail.
16546
16547 Note that a virtual server name has no relation to some physical server
16548 name.  Take this example:
16549
16550 @lisp
16551 (nntp "odd-one" 
16552       (nntp-address "ifi.uio.no") 
16553       (nntp-port-number 4324))
16554 @end lisp
16555
16556 Here the virtual server name is @samp{odd-one} while the name of
16557 the physical server is @samp{ifi.uio.no}. 
16558
16559 The backends should be able to switch between several virtual servers.
16560 The standard backends implement this by keeping an alist of virtual
16561 server environments that they pull down/push up when needed.  
16562
16563 There are two groups of interface functions: @dfn{required functions},
16564 which must be present, and @dfn{optional functions}, which Gnus will
16565 always check for presence before attempting to call 'em.
16566
16567 All these functions are expected to return data in the buffer
16568 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
16569 unfortunately named, but we'll have to live with it.  When I talk about
16570 @dfn{resulting data}, I always refer to the data in that buffer.  When I
16571 talk about @dfn{return value}, I talk about the function value returned by
16572 the function call.  Functions that fail should return @code{nil} as the
16573 return value.
16574
16575 Some backends could be said to be @dfn{server-forming} backends, and
16576 some might be said not to be.  The latter are backends that generally
16577 only operate on one group at a time, and have no concept of ``server''
16578 -- they have a group, and they deliver info on that group and nothing
16579 more.
16580
16581 In the examples and definitions I will refer to the imaginary backend
16582 @code{nnchoke}. 
16583
16584 @cindex @code{nnchoke}
16585
16586 @menu
16587 * Required Backend Functions::        Functions that must be implemented.
16588 * Optional Backend Functions::        Functions that need not be implemented.
16589 * Error Messaging::                   How to get messages and report errors.
16590 * Writing New Backends::              Extending old backends.
16591 * Hooking New Backends Into Gnus::    What has to be done on the Gnus end.
16592 * Mail-like Backends::                Some tips on mail backends.
16593 @end menu
16594
16595
16596 @node Required Backend Functions
16597 @subsubsection Required Backend Functions
16598
16599 @table @code
16600
16601 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
16602
16603 @var{articles} is either a range of article numbers or a list of
16604 @code{Message-ID}s.  Current backends do not fully support either---only
16605 sequences (lists) of article numbers, and most backends do not support
16606 retrieval of @code{Message-ID}s.  But they should try for both. 
16607
16608 The result data should either be HEADs or NOV lines, and the result
16609 value should either be @code{headers} or @code{nov} to reflect this.
16610 This might later be expanded to @code{various}, which will be a mixture
16611 of HEADs and NOV lines, but this is currently not supported by Gnus.  
16612
16613 If @var{fetch-old} is non-@code{nil} it says to try fetching "extra
16614 headers", in some meaning of the word.  This is generally done by
16615 fetching (at most) @var{fetch-old} extra headers less than the smallest
16616 article number in @code{articles}, and filling the gaps as well.  The
16617 presence of this parameter can be ignored if the backend finds it
16618 cumbersome to follow the request.  If this is non-@code{nil} and not a
16619 number, do maximum fetches.
16620
16621 Here's an example HEAD:
16622
16623 @example
16624 221 1056 Article retrieved.
16625 Path: ifi.uio.no!sturles
16626 From: sturles@@ifi.uio.no (Sturle Sunde)
16627 Newsgroups: ifi.discussion
16628 Subject: Re: Something very droll
16629 Date: 27 Oct 1994 14:02:57 +0100
16630 Organization: Dept. of Informatics, University of Oslo, Norway
16631 Lines: 26
16632 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
16633 References: <38jdmq$4qu@@visbur.ifi.uio.no>
16634 NNTP-Posting-Host: holmenkollen.ifi.uio.no
16635 .
16636 @end example
16637
16638 So a @code{headers} return value would imply that there's a number of
16639 these in the data buffer.
16640
16641 Here's a BNF definition of such a buffer:
16642
16643 @example
16644 headers        = *head
16645 head           = error / valid-head
16646 error-message  = [ "4" / "5" ] 2number " " <error message> eol
16647 valid-head     = valid-message *header "." eol
16648 valid-message  = "221 " <number> " Article retrieved." eol
16649 header         = <text> eol
16650 @end example
16651
16652 If the return value is @code{nov}, the data buffer should contain
16653 @dfn{network overview database} lines.  These are basically fields
16654 separated by tabs. 
16655
16656 @example
16657 nov-buffer = *nov-line
16658 nov-line   = 8*9 [ field <TAB> ] eol
16659 field      = <text except TAB>
16660 @end example
16661
16662 For a closer look at what should be in those fields,
16663 @pxref{Headers}. 
16664
16665
16666 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
16667
16668 @var{server} is here the virtual server name.  @var{definitions} is a
16669 list of @code{(VARIABLE VALUE)} pairs that define this virtual server. 
16670
16671 If the server can't be opened, no error should be signaled.  The backend
16672 may then choose to refuse further attempts at connecting to this
16673 server.  In fact, it should do so. 
16674
16675 If the server is opened already, this function should return a
16676 non-@code{nil} value.  There should be no data returned.
16677
16678
16679 @item (nnchoke-close-server &optional SERVER)
16680
16681 Close connection to @var{server} and free all resources connected
16682 to it.  Return @code{nil} if the server couldn't be closed for some
16683 reason.
16684
16685 There should be no data returned.
16686
16687
16688 @item (nnchoke-request-close)
16689
16690 Close connection to all servers and free all resources that the backend
16691 have reserved.  All buffers that have been created by that backend
16692 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
16693 function is generally only called when Gnus is shutting down.
16694
16695 There should be no data returned. 
16696
16697
16698 @item (nnchoke-server-opened &optional SERVER)
16699
16700 If @var{server} is the current virtual server, and the connection to the
16701 physical server is alive, then this function should return a
16702 non-@code{nil} vlue.  This function should under no circumstances
16703 attempt to reconnect to a server we have lost connection to.
16704
16705 There should be no data returned.
16706
16707
16708 @item (nnchoke-status-message &optional SERVER)
16709
16710 This function should return the last error message from @var{server}. 
16711
16712 There should be no data returned.
16713
16714
16715 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
16716
16717 The result data from this function should be the article specified by
16718 @var{article}.  This might either be a @code{Message-ID} or a number.
16719 It is optional whether to implement retrieval by @code{Message-ID}, but
16720 it would be nice if that were possible.
16721
16722 If @var{to-buffer} is non-@code{nil}, the result data should be returned
16723 in this buffer instead of the normal data buffer.  This is to make it
16724 possible to avoid copying large amounts of data from one buffer to
16725 another, while Gnus mainly requests articles to be inserted directly
16726 into its article buffer.
16727
16728 If it is at all possible, this function should return a cons cell where
16729 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
16730 the article number.  This will enable Gnus to find out what the real
16731 group and article numbers are when fetching articles by
16732 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
16733 on successful article retrieval.
16734
16735
16736 @item (nnchoke-request-group GROUP &optional SERVER FAST)
16737
16738 Get data on @var{group}.  This function also has the side effect of
16739 making @var{group} the current group. 
16740
16741 If @var{FAST}, don't bother to return useful data, just make @var{group}
16742 the current group.
16743
16744 Here's an example of some result data and a definition of the same:
16745
16746 @example
16747 211 56 1000 1059 ifi.discussion
16748 @end example
16749
16750 The first number is the status, which should be 211.  Next is the
16751 total number of articles in the group, the lowest article number, the
16752 highest article number, and finally the group name.  Note that the total
16753 number of articles may be less than one might think while just
16754 considering the highest and lowest article numbers, but some articles
16755 may have been canceled.  Gnus just discards the total-number, so
16756 whether one should take the bother to generate it properly (if that is a
16757 problem) is left as an exercise to the reader.
16758
16759 @example
16760 group-status = [ error / info ] eol
16761 error        = [ "4" / "5" ] 2<number> " " <Error message>
16762 info         = "211 " 3* [ <number> " " ] <string>
16763 @end example
16764
16765
16766 @item (nnchoke-close-group GROUP &optional SERVER)
16767
16768 Close @var{group} and free any resources connected to it.  This will be
16769 a no-op on most backends. 
16770
16771 There should be no data returned.
16772
16773
16774 @item (nnchoke-request-list &optional SERVER)
16775
16776 Return a list of all groups available on @var{server}.  And that means
16777 @emph{all}. 
16778
16779 Here's an example from a server that only carries two groups:
16780
16781 @example
16782 ifi.test 0000002200 0000002000 y
16783 ifi.discussion 3324 3300 n
16784 @end example
16785
16786 On each line we have a group name, then the highest article number in
16787 that group, the lowest article number, and finally a flag.
16788
16789 @example
16790 active-file = *active-line
16791 active-line = name " " <number> " " <number> " " flags eol
16792 name        = <string>
16793 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
16794 @end example
16795
16796 The flag says whether the group is read-only (@samp{n}), is moderated
16797 (@samp{m}), is dead (@samp{x}), is aliased to some other group
16798 (@samp{=other-group}) or none of the above (@samp{y}). 
16799
16800
16801 @item (nnchoke-request-post &optional SERVER)
16802
16803 This function should post the current buffer.  It might return whether
16804 the posting was successful or not, but that's not required.  If, for
16805 instance, the posting is done asynchronously, it has generally not been
16806 completed by the time this function concludes.  In that case, this
16807 function should set up some kind of sentinel to beep the user loud and
16808 clear if the posting could not be completed.
16809
16810 There should be no result data from this function. 
16811
16812 @end table
16813
16814
16815 @node Optional Backend Functions
16816 @subsubsection Optional Backend Functions
16817
16818 @table @code
16819
16820 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
16821
16822 @var{groups} is a list of groups, and this function should request data
16823 on all those groups.  How it does it is of no concern to Gnus, but it
16824 should attempt to do this in a speedy fashion.
16825
16826 The return value of this function can be either @code{active} or
16827 @code{group}, which says what the format of the result data is.  The
16828 former is in the same format as the data from
16829 @code{nnchoke-request-list}, while the latter is a buffer full of lines
16830 in the same format as @code{nnchoke-request-group} gives.
16831
16832 @example
16833 group-buffer = *active-line / *group-status
16834 @end example
16835
16836
16837 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
16838
16839 A Gnus group info (@pxref{Group Info}) is handed to the backend for
16840 alterations.  This comes in handy if the backend really carries all the
16841 information (as is the case with virtual and imap groups).  This
16842 function should destructively alter the info to suit its needs, and
16843 should return the (altered) group info.
16844
16845 There should be no result data from this function.
16846
16847
16848 @item (nnchoke-request-type GROUP &optional ARTICLE)
16849
16850 When the user issues commands for ``sending news'' (@kbd{F} in the
16851 summary buffer, for instance), Gnus has to know whether the article the
16852 user is following up on is news or mail.  This function should return
16853 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
16854 is mail and @code{unknown} if the type can't be decided.  (The
16855 @var{article} parameter is necessary in @code{nnvirtual} groups which
16856 might very well combine mail groups and news groups.)  Both @var{group}
16857 and @var{article} may be @code{nil}.
16858
16859 There should be no result data from this function.
16860
16861
16862 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
16863
16864 If the user tries to set a mark that the backend doesn't like, this
16865 function may change the mark.  Gnus will use whatever this function
16866 returns as the mark for @var{article} instead of the original
16867 @var{mark}.  If the backend doesn't care, it must return the original
16868 @var{mark}, and not @code{nil} or any other type of garbage.  
16869
16870 The only use for this I can see is what @code{nnvirtual} does with
16871 it---if a component group is auto-expirable, marking an article as read
16872 in the virtual group should result in the article being marked as
16873 expirable. 
16874
16875 There should be no result data from this function.
16876
16877
16878 @item (nnchoke-request-scan &optional GROUP SERVER)
16879
16880 This function may be called at any time (by Gnus or anything else) to
16881 request that the backend check for incoming articles, in one way or
16882 another.  A mail backend will typically read the spool file or query the
16883 POP server when this function is invoked.  The @var{group} doesn't have
16884 to be heeded---if the backend decides that it is too much work just
16885 scanning for a single group, it may do a total scan of all groups.  It
16886 would be nice, however, to keep things local if that's practical.
16887
16888 There should be no result data from this function.
16889
16890
16891 @item (nnchoke-request-group-description GROUP &optional SERVER)
16892
16893 The result data from this function should be a description of
16894 @var{group}. 
16895
16896 @example
16897 description-line = name <TAB> description eol
16898 name             = <string>
16899 description      = <text>
16900 @end example
16901
16902 @item (nnchoke-request-list-newsgroups &optional SERVER)
16903
16904 The result data from this function should be the description of all
16905 groups available on the server.
16906
16907 @example
16908 description-buffer = *description-line
16909 @end example
16910
16911
16912 @item (nnchoke-request-newgroups DATE &optional SERVER)
16913
16914 The result data from this function should be all groups that were
16915 created after @samp{date}, which is in normal human-readable date
16916 format.  The data should be in the active buffer format.
16917
16918
16919 @item (nnchoke-request-create-group GROUP &optional SERVER)
16920
16921 This function should create an empty group with name @var{group}.  
16922
16923 There should be no return data.
16924
16925
16926 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
16927
16928 This function should run the expiry process on all articles in the
16929 @var{articles} range (which is currently a simple list of article
16930 numbers.)  It is left up to the backend to decide how old articles
16931 should be before they are removed by this function.  If @var{force} is
16932 non-@code{nil}, all @var{articles} should be deleted, no matter how new
16933 they are. 
16934
16935 This function should return a list of articles that it did not/was not
16936 able to delete.
16937
16938 There should be no result data returned.
16939
16940
16941 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
16942 &optional LAST)
16943
16944 This function should move @var{article} (which is a number) from
16945 @var{group} by calling @var{accept-form}.  
16946
16947 This function should ready the article in question for moving by
16948 removing any header lines it has added to the article, and generally
16949 should ``tidy up'' the article.  Then it should @code{eval}
16950 @var{accept-form} in the buffer where the ``tidy'' article is.  This
16951 will do the actual copying.  If this @code{eval} returns a
16952 non-@code{nil} value, the article should be removed.
16953
16954 If @var{last} is @code{nil}, that means that there is a high likelihood
16955 that there will be more requests issued shortly, so that allows some
16956 optimizations. 
16957
16958 The function should return a cons where the @code{car} is the group name and
16959 the @code{cdr} is the article number that the article was entered as.
16960
16961 There should be no data returned. 
16962
16963
16964 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
16965
16966 This function takes the current buffer and inserts it into @var{group}.
16967 If @var{last} in @code{nil}, that means that there will be more calls to
16968 this function in short order.
16969
16970 The function should return a cons where the @code{car} is the group name and
16971 the @code{cdr} is the article number that the article was entered as.
16972
16973 There should be no data returned.
16974
16975
16976 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
16977
16978 This function should remove @var{article} (which is a number) from
16979 @var{group} and insert @var{buffer} there instead.
16980
16981 There should be no data returned.
16982
16983
16984 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
16985
16986 This function should delete @var{group}.  If @var{force}, it should
16987 really delete all the articles in the group, and then delete the group
16988 itself.  (If there is such a thing as ``the group itself''.)
16989
16990 There should be no data returned.
16991
16992
16993 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
16994
16995 This function should rename @var{group} into @var{new-name}.  All
16996 articles in @var{group} should move to @var{new-name}.
16997
16998 There should be no data returned.
16999
17000 @end table
17001
17002
17003 @node Error Messaging
17004 @subsubsection Error Messaging
17005
17006 @findex nnheader-report
17007 @findex nnheader-get-report
17008 The backends should use the function @code{nnheader-report} to report
17009 error conditions---they should not raise errors when they aren't able to
17010 perform a request.  The first argument to this function is the backend
17011 symbol, and the rest are interpreted as arguments to @code{format} if
17012 there are multiple of them, or just a string if there is one of them.
17013 This function must always returns @code{nil}.
17014
17015 @lisp
17016 (nnheader-report 'nnchoke "You did something totally bogus")
17017
17018 (nnheader-report 'nnchoke "Could not request group %s" group)
17019 @end lisp
17020
17021 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
17022 @code{nil} back from a server, and this function returns the most
17023 recently reported message for the backend in question.  This function
17024 takes one argument---the server symbol.
17025
17026 Internally, these functions access @var{backend}@code{-status-string},
17027 so the @code{nnchoke} backend will have its error message stored in
17028 @code{nnchoke-status-string}.
17029
17030
17031 @node Writing New Backends
17032 @subsubsection Writing New Backends
17033
17034 Many backends are quite similar.  @code{nnml} is just like
17035 @code{nnspool}, but it allows you to edit the articles on the server.
17036 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
17037 and it doesn't maintain overview databases.  @code{nndir} is just like
17038 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
17039 editing articles.
17040
17041 It would make sense if it were possible to ``inherit'' functions from
17042 backends when writing new backends.  And, indeed, you can do that if you
17043 want to.  (You don't have to if you don't want to, of course.)  
17044
17045 All the backends declare their public variables and functions by using a
17046 package called @code{nnoo}.  
17047
17048 To inherit functions from other backends (and allow other backends to
17049 inherit functions from the current backend), you should use the
17050 following macros:
17051
17052 @table @code
17053
17054 @item nnoo-declare
17055 This macro declares the first parameter to be a child of the subsequent
17056 parameters.  For instance:
17057
17058 @lisp
17059 (nnoo-declare nndir
17060   nnml nnmh)
17061 @end lisp
17062
17063 @code{nndir} has declared here that it intends to inherit functions from
17064 both @code{nnml} and @code{nnmh}.
17065
17066 @item defvoo
17067 This macro is equivalent to @code{defvar}, but registers the variable as
17068 a public server variable.  Most state-oriented variables should be
17069 declared with @code{defvoo} instead of @code{defvar}.  
17070
17071 In addition to the normal @code{defvar} parameters, it takes a list of
17072 variables in the parent backends to map the variable to when executing
17073 a function in those backends.
17074
17075 @lisp
17076 (defvoo nndir-directory nil
17077   "Where nndir will look for groups."
17078   nnml-current-directory nnmh-current-directory)
17079 @end lisp
17080
17081 This means that @code{nnml-current-directory} will be set to
17082 @code{nndir-directory} when an @code{nnml} function is called on behalf
17083 of @code{nndir}.  (The same with @code{nnmh}.)  
17084
17085 @item nnoo-define-basics
17086 This macro defines some common functions that almost all backends should
17087 have.
17088
17089 @example
17090 (nnoo-define-basics nndir)
17091 @end example
17092
17093 @item deffoo
17094 This macro is just like @code{defun} and takes the same parameters.  In
17095 addition to doing the normal @code{defun} things, it registers the
17096 function as being public so that other backends can inherit it.
17097
17098 @item nnoo-map-functions
17099 This macro allows mapping of functions from the current backend to
17100 functions from the parent backends.
17101
17102 @example
17103 (nnoo-map-functions nndir
17104   (nnml-retrieve-headers 0 nndir-current-group 0 0)
17105   (nnmh-request-article 0 nndir-current-group 0 0))
17106 @end example
17107
17108 This means that when @code{nndir-retrieve-headers} is called, the first,
17109 third, and fourth parameters will be passed on to
17110 @code{nnml-retrieve-headers}, while the second parameter is set to the
17111 value of @code{nndir-current-group}.
17112
17113 @item nnoo-import
17114 This macro allows importing functions from backends.  It should be the
17115 last thing in the source file, since it will only define functions that
17116 haven't already been defined.
17117
17118 @example
17119 (nnoo-import nndir
17120   (nnmh
17121    nnmh-request-list
17122    nnmh-request-newgroups)
17123   (nnml))
17124 @end example
17125
17126 This means that calls to @code{nndir-request-list} should just be passed
17127 on to @code{nnmh-request-list}, while all public functions from
17128 @code{nnml} that haven't been defined in @code{nndir} yet should be
17129 defined now.
17130
17131 @end table
17132
17133 Below is a slightly shortened version of the @code{nndir} backend.
17134
17135 @lisp
17136 ;;; nndir.el --- single directory newsgroup access for Gnus
17137 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
17138
17139 ;;; Code:
17140
17141 (require 'nnheader)
17142 (require 'nnmh)
17143 (require 'nnml)
17144 (require 'nnoo)
17145 (eval-when-compile (require 'cl))
17146
17147 (nnoo-declare nndir
17148   nnml nnmh)
17149
17150 (defvoo nndir-directory nil
17151   "Where nndir will look for groups."
17152   nnml-current-directory nnmh-current-directory)
17153
17154 (defvoo nndir-nov-is-evil nil
17155   "*Non-nil means that nndir will never retrieve NOV headers."
17156   nnml-nov-is-evil)
17157
17158 (defvoo nndir-current-group "" nil nnml-current-group nnmh-current-group)
17159 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
17160 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
17161
17162 (defvoo nndir-status-string "" nil nnmh-status-string)
17163 (defconst nndir-version "nndir 1.0")
17164
17165 ;;; Interface functions.
17166
17167 (nnoo-define-basics nndir)
17168
17169 (deffoo nndir-open-server (server &optional defs)
17170   (setq nndir-directory
17171         (or (cadr (assq 'nndir-directory defs))
17172             server))
17173   (unless (assq 'nndir-directory defs)
17174     (push `(nndir-directory ,server) defs))
17175   (push `(nndir-current-group
17176           ,(file-name-nondirectory (directory-file-name nndir-directory)))
17177         defs)
17178   (push `(nndir-top-directory
17179           ,(file-name-directory (directory-file-name nndir-directory)))
17180         defs)
17181   (nnoo-change-server 'nndir server defs))
17182
17183 (nnoo-map-functions nndir
17184   (nnml-retrieve-headers 0 nndir-current-group 0 0)
17185   (nnmh-request-article 0 nndir-current-group 0 0)
17186   (nnmh-request-group nndir-current-group 0 0)
17187   (nnmh-close-group nndir-current-group 0))
17188
17189 (nnoo-import nndir
17190   (nnmh
17191    nnmh-status-message
17192    nnmh-request-list
17193    nnmh-request-newgroups))
17194
17195 (provide 'nndir)
17196 @end lisp
17197
17198
17199 @node Hooking New Backends Into Gnus
17200 @subsubsection Hooking New Backends Into Gnus
17201
17202 @vindex gnus-valid-select-methods
17203 Having Gnus start using your new backend is rather easy---you just
17204 declare it with the @code{gnus-declare-backend} functions.  This will
17205 enter the backend into the @code{gnus-valid-select-methods} variable.
17206
17207 @code{gnus-declare-backend} takes two parameters---the backend name and
17208 an arbitrary number of @dfn{abilities}.
17209
17210 Here's an example:
17211
17212 @lisp
17213 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
17214 @end lisp
17215
17216 The abilities can be:
17217
17218 @table @code
17219 @item mail
17220 This is a mailish backend---followups should (probably) go via mail.
17221 @item post
17222 This is a newsish backend---followups should (probably) go via news. 
17223 @item post-mail
17224 This backend supports both mail and news.
17225 @item none
17226 This is neither a post nor mail backend---it's something completely
17227 different. 
17228 @item respool
17229 It supports respooling---or rather, it is able to modify its source
17230 articles and groups.
17231 @item address
17232 The name of the server should be in the virtual server name.  This is
17233 true for almost all backends.
17234 @item prompt-address
17235 The user should be prompted for an address when doing commands like
17236 @kbd{B} in the group buffer.  This is true for backends like
17237 @code{nntp}, but not @code{nnmbox}, for instance. 
17238 @end table
17239
17240
17241 @node Mail-like Backends
17242 @subsubsection Mail-like Backends
17243
17244 One of the things that separate the mail backends from the rest of the
17245 backends is the heavy dependence by the mail backends on common
17246 functions in @file{nnmail.el}.  For instance, here's the definition of
17247 @code{nnml-request-scan}: 
17248
17249 @lisp
17250 (deffoo nnml-request-scan (&optional group server)
17251   (setq nnml-article-file-alist nil)
17252   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
17253 @end lisp
17254
17255 It simply calls @code{nnmail-get-new-mail} with a few parameters,
17256 and @code{nnmail} takes care of all the moving and splitting of the
17257 mail.  
17258
17259 This function takes four parameters.
17260
17261 @table @var
17262 @item method
17263 This should be a symbol to designate which backend is responsible for
17264 the call.
17265
17266 @item exit-function
17267 This function should be called after the splitting has been performed.
17268
17269 @item temp-directory
17270 Where the temporary files should be stored.
17271
17272 @item group
17273 This optional argument should be a group name if the splitting is to be
17274 performed for one group only.
17275 @end table
17276
17277 @code{nnmail-get-new-mail} will call @var{backend}@code{-save-mail} to
17278 save each article.  @var{backend}@code{-active-number} will be called to
17279 find the article number assigned to this article.  
17280
17281 The function also uses the following variables:
17282 @var{backend}@code{-get-new-mail} (to see whether to get new mail for
17283 this backend); and @var{backend}@code{-group-alist} and
17284 @var{backend}@code{-active-file} to generate the new active file.
17285 @var{backend}@code{-group-alist} should be a group-active alist, like
17286 this:
17287
17288 @example
17289 (("a-group" (1 . 10))
17290  ("some-group" (34 . 39)))
17291 @end example
17292
17293
17294 @node Score File Syntax
17295 @subsection Score File Syntax
17296
17297 Score files are meant to be easily parsable, but yet extremely
17298 mallable.   It was decided that something that had the same read syntax
17299 as an Emacs Lisp list would fit that spec.
17300
17301 Here's a typical score file:
17302
17303 @lisp
17304 (("summary"
17305   ("win95" -10000 nil s)
17306   ("Gnus"))
17307  ("from"
17308   ("Lars" -1000))
17309  (mark -100))
17310 @end lisp
17311
17312 BNF definition of a score file:
17313
17314 @example
17315 score-file       = "" / "(" *element ")"
17316 element          = rule / atom
17317 rule             = string-rule / number-rule / date-rule
17318 string-rule      = "(" quote string-header quote space *string-match ")"
17319 number-rule      = "(" quote number-header quote space *number-match ")"
17320 date-rule        = "(" quote date-header quote space *date-match ")"
17321 quote            = <ascii 34>
17322 string-header    = "subject" / "from" / "references" / "message-id" / 
17323                    "xref" / "body" / "head" / "all" / "followup"
17324 number-header    = "lines" / "chars"
17325 date-header      = "date"
17326 string-match     = "(" quote <string> quote [ "" / [ space score [ "" / 
17327                    space date [ "" / [ space string-match-t ] ] ] ] ] ")"
17328 score            = "nil" / <integer>
17329 date             = "nil" / <natural number>
17330 string-match-t   = "nil" / "s" / "substring" / "S" / "Substring" / 
17331                    "r" / "regex" / "R" / "Regex" /
17332                    "e" / "exact" / "E" / "Exact" /
17333                    "f" / "fuzzy" / "F" / "Fuzzy"
17334 number-match     = "(" <integer> [ "" / [ space score [ "" / 
17335                    space date [ "" / [ space number-match-t ] ] ] ] ] ")"
17336 number-match-t   = "nil" / "=" / "<" / ">" / ">=" / "<="
17337 date-match       = "(" quote <string> quote [ "" / [ space score [ "" / 
17338                    space date [ "" / [ space date-match-t ] ] ] ] ")"
17339 date-match-t     = "nil" / "at" / "before" / "after"
17340 atom             = "(" [ required-atom / optional-atom ] ")"
17341 required-atom    = mark / expunge / mark-and-expunge / files /
17342                    exclude-files / read-only / touched
17343 optional-atom    = adapt / local / eval 
17344 mark             = "mark" space nil-or-number
17345 nil-or-number    = "nil" / <integer>
17346 expunge          = "expunge" space nil-or-number
17347 mark-and-expunge = "mark-and-expunge" space nil-or-number
17348 files            = "files" *[ space <string> ]
17349 exclude-files    = "exclude-files" *[ space <string> ]
17350 read-only        = "read-only" [ space "nil" / space "t" ]
17351 adapt            = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
17352 adapt-rule       = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
17353 local            = "local" *[ space "(" <string> space <form> ")" ]
17354 eval             = "eval" space <form>
17355 space            = *[ " " / <TAB> / <NEWLINE> ]
17356 @end example
17357
17358 Any unrecognized elements in a score file should be ignored, but not
17359 discarded.  
17360
17361 As you can see, white space is needed, but the type and amount of white
17362 space is irrelevant.  This means that formatting of the score file is
17363 left up to the programmer---if it's simpler to just spew it all out on
17364 one looong line, then that's ok.
17365
17366 The meaning of the various atoms are explained elsewhere in this
17367 manual (@pxref{Score File Format}).
17368
17369
17370 @node Headers
17371 @subsection Headers
17372
17373 Internally Gnus uses a format for storing article headers that
17374 corresponds to the @sc{nov} format in a mysterious fashion.  One could
17375 almost suspect that the author looked at the @sc{nov} specification and
17376 just shamelessly @emph{stole} the entire thing, and one would be right.
17377
17378 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
17379 RFC1036 to talk about lines in the head of an article (e.g.,
17380 @code{From}).  It is used by many people as a synonym for
17381 ``head''---``the header and the body''.  (That should be avoided, in my
17382 opinion.)  And Gnus uses a format internally that it calls ``header'',
17383 which is what I'm talking about here.  This is a 9-element vector,
17384 basically, with each header (ouch) having one slot.
17385
17386 These slots are, in order: @code{number}, @code{subject}, @code{from},
17387 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
17388 @code{xref}.  There are macros for accessing and setting these
17389 slots---they all have predictable names beginning with
17390 @code{mail-header-} and @code{mail-header-set-}, respectively.
17391
17392 The @code{xref} slot is really a @code{misc} slot.  Any extra info will
17393 be put in there.
17394
17395
17396 @node Ranges
17397 @subsection Ranges
17398
17399 @sc{gnus} introduced a concept that I found so useful that I've started
17400 using it a lot and have elaborated on it greatly. 
17401
17402 The question is simple: If you have a large amount of objects that are
17403 identified by numbers (say, articles, to take a @emph{wild} example)
17404 that you want to qualify as being ``included'', a normal sequence isn't
17405 very useful.  (A 200,000 length sequence is a bit long-winded.)
17406
17407 The solution is as simple as the question: You just collapse the
17408 sequence. 
17409
17410 @example
17411 (1 2 3 4 5 6 10 11 12)
17412 @end example
17413
17414 is transformed into
17415
17416 @example
17417 ((1 . 6) (10 . 12))
17418 @end example
17419
17420 To avoid having those nasty @samp{(13 . 13)} elements to denote a
17421 lonesome object, a @samp{13} is a valid element:
17422
17423 @example
17424 ((1 . 6) 7 (10 . 12))
17425 @end example
17426
17427 This means that comparing two ranges to find out whether they are equal
17428 is slightly tricky:
17429
17430 @example
17431 ((1 . 5) 7 8 (10 . 12))
17432 @end example
17433
17434 and
17435
17436 @example
17437 ((1 . 5) (7 . 8) (10 . 12))
17438 @end example
17439
17440 are equal.  In fact, any non-descending list is a range:
17441
17442 @example
17443 (1 2 3 4 5)
17444 @end example
17445
17446 is a perfectly valid range, although a pretty long-winded one.  This is
17447 also valid:
17448
17449 @example
17450 (1 . 5)
17451 @end example
17452
17453 and is equal to the previous range.
17454
17455 Here's a BNF definition of ranges.  Of course, one must remember the
17456 semantic requirement that the numbers are non-descending.  (Any number
17457 of repetition of the same number is allowed, but apt to disappear in
17458 range handling.)
17459
17460 @example
17461 range           = simple-range / normal-range
17462 simple-range    = "(" number " . " number ")"
17463 normal-range    = "(" start-contents ")"
17464 contents        = "" / simple-range *[ " " contents ] / 
17465                   number *[ " " contents ]
17466 @end example
17467
17468 Gnus currently uses ranges to keep track of read articles and article
17469 marks.  I plan on implementing a number of range operators in C if The
17470 Powers That Be are willing to let me.  (I haven't asked yet, because I
17471 need to do some more thinking on what operators I need to make life
17472 totally range-based without ever having to convert back to normal
17473 sequences.) 
17474
17475
17476 @node Group Info
17477 @subsection Group Info
17478
17479 Gnus stores all permanent info on groups in a @dfn{group info} list.
17480 This list is from three to six elements (or more) long and exhaustively
17481 describes the group.
17482
17483 Here are two example group infos; one is a very simple group while the
17484 second is a more complex one:
17485
17486 @example
17487 ("no.group" 5 (1 . 54324))
17488
17489 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
17490                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
17491                 (nnml "")
17492                 (auto-expire (to-address "ding@@gnus.org")))
17493 @end example
17494
17495 The first element is the @dfn{group name}---as Gnus knows the group,
17496 anyway.  The second element is the @dfn{subscription level}, which
17497 normally is a small integer.  The third element is a list of ranges of
17498 read articles.  The fourth element is a list of lists of article marks
17499 of various kinds.  The fifth element is the select method (or virtual
17500 server, if you like).  The sixth element is a list of @dfn{group
17501 parameters}, which is what this section is about.
17502
17503 Any of the last three elements may be missing if they are not required.
17504 In fact, the vast majority of groups will normally only have the first
17505 three elements, which saves quite a lot of cons cells.
17506
17507 Here's a BNF definition of the group info format:
17508
17509 @example
17510 info          = "(" group space level space read 
17511                 [ "" / [ space marks-list [ "" / [ space method [ "" /
17512                 space parameters ] ] ] ] ] ")" 
17513 group         = quote <string> quote
17514 level         = <integer in the range of 1 to inf>
17515 read          = range
17516 marks-lists   = nil / "(" *marks ")"
17517 marks         = "(" <string> range ")"
17518 method        = "(" <string> *elisp-forms ")"
17519 parameters    = "(" *elisp-forms ")"
17520 @end example
17521
17522 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
17523 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
17524 in pseudo-BNF.
17525
17526 If you have a Gnus info and want to access the elements, Gnus offers a
17527 series of macros for getting/setting these elements.
17528
17529 @table @code
17530 @item gnus-info-group
17531 @itemx gnus-info-set-group
17532 @findex gnus-info-group
17533 @findex gnus-info-set-group
17534 Get/set the group name.
17535
17536 @item gnus-info-rank
17537 @itemx gnus-info-set-rank
17538 @findex gnus-info-rank
17539 @findex gnus-info-set-rank
17540 Get/set the group rank.
17541
17542 @item gnus-info-level
17543 @itemx gnus-info-set-level
17544 @findex gnus-info-level
17545 @findex gnus-info-set-level
17546 Get/set the group level.
17547
17548 @item gnus-info-score
17549 @itemx gnus-info-set-score
17550 @findex gnus-info-score
17551 @findex gnus-info-set-score
17552 Get/set the group score.
17553
17554 @item gnus-info-read
17555 @itemx gnus-info-set-read
17556 @findex gnus-info-read
17557 @findex gnus-info-set-read
17558 Get/set the ranges of read articles.
17559
17560 @item gnus-info-marks
17561 @itemx gnus-info-set-marks
17562 @findex gnus-info-marks
17563 @findex gnus-info-set-marks
17564 Get/set the lists of ranges of marked articles.
17565
17566 @item gnus-info-method
17567 @itemx gnus-info-set-method
17568 @findex gnus-info-method
17569 @findex gnus-info-set-method
17570 Get/set the group select method.
17571
17572 @item gnus-info-params
17573 @itemx gnus-info-set-params
17574 @findex gnus-info-params
17575 @findex gnus-info-set-params
17576 Get/set the group parameters.
17577 @end table
17578
17579 All the getter functions take one parameter---the info list.  The setter
17580 functions take two parameters---the info list and the new value.
17581
17582 The last three elements in the group info aren't mandatory, so it may be
17583 necessary to extend the group info before setting the element.  If this
17584 is necessary, you can just pass on a non-@code{nil} third parameter to
17585 the three final setter functions to have this happen automatically.
17586
17587
17588 @node Extended Interactive
17589 @subsection Extended Interactive
17590 @cindex interactive
17591 @findex gnus-interactive
17592
17593 Gnus extends the standard Emacs @code{interactive} specification
17594 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
17595 Prefixes}).  Here's an example of how this is used:
17596
17597 @lisp
17598 (defun gnus-summary-increase-score (&optional score symp)
17599   (interactive (gnus-interactive "P\ny"))
17600   ...
17601   )
17602 @end lisp
17603
17604 The best thing to do would have been to implement
17605 @code{gnus-interactive} as a macro which would have returned an
17606 @code{interactive} form, but this isn't possible since Emacs checks
17607 whether a function is interactive or not by simply doing an @code{assq}
17608 on the lambda form.  So, instead we have @code{gnus-interactive}
17609 function that takes a string and returns values that are usable to
17610 @code{interactive}.
17611
17612 This function accepts (almost) all normal @code{interactive} specs, but
17613 adds a few more.
17614
17615 @table @samp
17616 @item y
17617 @vindex gnus-current-prefix-symbol
17618 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
17619 variable.
17620
17621 @item Y
17622 @vindex gnus-current-prefix-symbols
17623 A list of the current symbolic prefixes---the
17624 @code{gnus-current-prefix-symbol} variable.
17625
17626 @item A
17627 The current article number---the @code{gnus-summary-article-number}
17628 function. 
17629
17630 @item H
17631 The current article header---the @code{gnus-summary-article-header}
17632 function. 
17633
17634 @item g
17635 The current group name---the @code{gnus-group-group-name}
17636 function. 
17637
17638 @end table
17639
17640
17641 @node Emacs/XEmacs Code
17642 @subsection Emacs/XEmacs Code
17643 @cindex XEmacs
17644 @cindex Emacsen
17645
17646 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
17647 platforms must be the primary one.  I chose Emacs.  Not because I don't
17648 like XEmacs or Mule, but because it comes first alphabetically.
17649
17650 This means that Gnus will byte-compile under Emacs with nary a warning,
17651 while XEmacs will pump out gigabytes of warnings while byte-compiling.
17652 As I use byte-compilation warnings to help me root out trivial errors in
17653 Gnus, that's very useful.  
17654
17655 I've also consistently used Emacs function interfaces, but have used
17656 Gnusey aliases for the functions.  To take an example:  Emacs defines a
17657 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
17658 function.  I then define a function called @code{gnus-run-at-time} that
17659 takes the same parameters as the Emacs @code{run-at-time}.  When running
17660 Gnus under Emacs, the former function is just an alias for the latter.
17661 However, when running under XEmacs, the former is an alias for the
17662 following function:
17663
17664 @lisp
17665 (defun gnus-xmas-run-at-time (time repeat function &rest args)
17666   (start-itimer
17667    "gnus-run-at-time"
17668    `(lambda ()
17669       (,function ,@@args))
17670    time repeat))
17671 @end lisp
17672
17673 This sort of thing has been done for bunches of functions.  Gnus does
17674 not redefine any native Emacs functions while running under XEmacs---it
17675 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
17676 all over.
17677
17678 In the cases where the XEmacs function interface was obviously cleaner,
17679 I used it instead.  For example @code{gnus-region-active-p} is an alias
17680 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
17681
17682 Of course, I could have chosen XEmacs as my native platform and done
17683 mapping functions the other way around.  But I didn't.  The performance
17684 hit these indirections impose on Gnus under XEmacs should be slight.
17685
17686
17687 @node Various File Formats
17688 @subsection Various File Formats
17689
17690 @menu
17691 * Active File Format::      Information on articles and groups available.
17692 * Newsgroups File Format::  Group descriptions.
17693 @end menu
17694
17695
17696 @node Active File Format
17697 @subsubsection Active File Format
17698
17699 The active file lists all groups available on the server in
17700 question.  It also lists the highest and lowest current article numbers
17701 in each group.  
17702
17703 Here's an excerpt from a typical active file:
17704
17705 @example
17706 soc.motss 296030 293865 y
17707 alt.binaries.pictures.fractals 3922 3913 n
17708 comp.sources.unix 1605 1593 m
17709 comp.binaries.ibm.pc 5097 5089 y
17710 no.general 1000 900 y
17711 @end example
17712
17713 Here's a pseudo-BNF definition of this file:
17714
17715 @example
17716 active      = *group-line
17717 group-line  = group space high-number space low-number space flag <NEWLINE>
17718 group       = <non-white-space string>
17719 space       = " "
17720 high-number = <non-negative integer>
17721 low-number  = <positive integer>
17722 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
17723 @end example
17724
17725
17726 @node Newsgroups File Format
17727 @subsubsection Newsgroups File Format
17728
17729 The newsgroups file lists groups along with their descriptions.  Not all
17730 groups on the server have to be listed,  and not all groups in the file
17731 have to exist on the server.  The file is meant purely as information to
17732 the user.
17733
17734 The format is quite simple; a group name, a tab, and the description.
17735 Here's the definition:
17736
17737 @example
17738 newsgroups    = *line
17739 line          = group tab description <NEWLINE>
17740 group         = <non-white-space string>
17741 tab           = <TAB>
17742 description   = <string>
17743 @end example
17744
17745
17746 @page
17747 @node Emacs for Heathens
17748 @section Emacs for Heathens
17749
17750 Believe it or not, but some people who use Gnus haven't really used
17751 Emacs much before they embarked on their journey on the Gnus Love Boat.
17752 If you are one of those unfortunates whom ``@kbd{M-C-a}'', ``kill the
17753 region'', and ``set @code{gnus-flargblossen} to an alist where the key
17754 is a regexp that is used for matching on the group name'' are magical
17755 phrases with little or no meaning, then this appendix is for you.  If
17756 you are already familiar with Emacs, just ignore this and go fondle your
17757 cat instead.
17758
17759 @menu
17760 * Keystrokes::      Entering text and executing commands.
17761 * Emacs Lisp::      The built-in Emacs programming language.
17762 @end menu
17763
17764
17765 @node Keystrokes
17766 @subsection Keystrokes
17767
17768 @itemize @bullet
17769 @item
17770 Q: What is an experienced Emacs user?
17771
17772 @item 
17773 A: A person who wishes that the terminal had pedals.
17774 @end itemize
17775
17776 Yes, when you use Emacs, you are apt to use the control key, the shift
17777 key and the meta key a lot.  This is very annoying to some people
17778 (notably @code{vi}le users), and the rest of us just love the hell out
17779 of it.  Just give up and submit.  Emacs really does stand for
17780 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
17781 may have heard from other disreputable sources (like the Emacs author).
17782
17783 The shift keys are normally located near your pinky fingers, and are
17784 normally used to get capital letters and stuff.  You probably use it all
17785 the time.  The control key is normally marked ``CTRL'' or something like
17786 that.  The meta key is, funnily enough, never marked as such on any
17787 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
17788 which is the meta key on this keyboard.  It's usually located somewhere
17789 to the left hand side of the keyboard, usually on the bottom row.
17790
17791 Now, us Emacs people don't say ``press the meta-control-m key'',
17792 because that's just too inconvenient.  We say ``press the @kbd{M-C-m}
17793 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
17794 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
17795 down the control key, and hold it down while you press @kbd{k}''.
17796 ``Press @kbd{M-C-k}'' means ``press down and hold down the meta key and
17797 the control key and then press @kbd{k}''.  Simple, ay?
17798
17799 This is somewhat complicated by the fact that not all keyboards have a
17800 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
17801 means ``press escape, release escape, press @kbd{k}''.  That's much more
17802 work than if you have a meta key, so if that's the case, I respectfully
17803 suggest you get a real keyboard with a meta key.  You can't live without
17804 it.
17805
17806
17807
17808 @node Emacs Lisp
17809 @subsection Emacs Lisp
17810
17811 Emacs is the King of Editors because it's really a Lisp interpreter.
17812 Each and every key you tap runs some Emacs Lisp code snippet, and since
17813 Emacs Lisp is an interpreted language, that means that you can configure
17814 any key to run any arbitrary code.  You just, like, do it.
17815
17816 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
17817 functions.  (These are byte-compiled for speed, but it's still
17818 interpreted.)  If you decide that you don't like the way Gnus does
17819 certain things, it's trivial to have it do something a different way.
17820 (Well, at least if you know how to write Lisp code.)  However, that's
17821 beyond the scope of this manual, so we are simply going to talk about
17822 some common constructs that you normally use in your @file{.emacs} file
17823 to customize Gnus.
17824
17825 If you want to set the variable @code{gnus-florgbnize} to four (4), you
17826 write the following:
17827
17828 @lisp
17829 (setq gnus-florgbnize 4)
17830 @end lisp
17831
17832 This function (really ``special form'') @code{setq} is the one that can
17833 set a variable to some value.  This is really all you need to know.  Now
17834 you can go and fill your @code{.emacs} file with lots of these to change
17835 how Gnus works.
17836
17837 If you have put that thing in your @code{.emacs} file, it will be read
17838 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
17839 start Emacs.  If you want to change the variable right away, simply say
17840 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
17841 previous ``form'', which is a simple @code{setq} statement here.
17842
17843 Go ahead---just try it, if you're located at your Emacs.  After you
17844 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
17845 is the return value of the form you @code{eval}ed.
17846
17847 Some pitfalls:
17848
17849 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
17850 that means:
17851
17852 @lisp
17853 (setq gnus-read-active-file 'some)
17854 @end lisp
17855
17856 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
17857 @samp{nntp.ifi.uio.no}'', that means:
17858
17859 @lisp
17860 (setq gnus-nntp-server "nntp.ifi.uio.no")
17861 @end lisp
17862
17863 So be careful not to mix up strings (the latter) with symbols (the
17864 former).  The manual is unambiguous, but it can be confusing.
17865
17866 @page
17867 @include gnus-faq.texi
17868
17869 @node Index
17870 @chapter Index
17871 @printindex cp
17872
17873 @node Key Index
17874 @chapter Key Index
17875 @printindex ky
17876
17877 @summarycontents
17878 @contents
17879 @bye
17880
17881 @iftex
17882 @iflatex
17883 \end{document}
17884 @end iflatex
17885 @end iftex
17886
17887 @c End:
17888