*** empty log message ***
[gnus] / texi / gnus.texi
1 \input texinfo                  @c -*-texinfo-*-
2
3 @setfilename gnus
4 @settitle Red Gnus 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]{book}
16 \usepackage[latin1]{inputenc}
17 % \usepackage{fontenc}
18 % \usepackage{babel}
19 \usepackage{pagestyle}
20 \usepackage{epsfig}
21 % \usepackage{ifitricks}
22 \fontfamily{bembo}\selectfont
23
24 \makeindex
25 \begin{document}
26
27 \newcommand{\gnuschaptername}{}
28 \newcommand{\gnussectionname}{}
29
30 \newcommand{\gnusbackslash}{/}
31
32 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
33 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
34
35 \newcommand{\gnuskindex}[1]{\index{#1}}
36 \newcommand{\gnusindex}[1]{\index{#1}}
37
38 \newcommand{\gnustt}[1]{{\textbf{\textsf{#1}}}}
39 \newcommand{\gnuscode}[1]{\gnustt{#1}}
40 \newcommand{\gnussamp}[1]{``\gnustt{#1}''}
41 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
42 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
43 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
44 \newcommand{\gnusdfn}[1]{\textit{#1}}
45 \newcommand{\gnusi}[1]{\textit{#1}}
46 \newcommand{\gnusstrong}[1]{\textbf{#1}}
47 \newcommand{\gnusemph}[1]{\textit{#1}}
48 \newcommand{\gnusvar}[1]{\textsl{\textsf{#1}}}
49 \newcommand{\gnussc}[1]{\textsc{#1}}
50 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
51 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
52
53 \newcommand{\gnusbullet}{{${\bullet}$}}
54 \newcommand{\gnusdollar}{\$}
55 \newcommand{\gnusampersand}{\&}
56 \newcommand{\gnuspercent}{\%}
57 \newcommand{\gnushash}{\#}
58 \newcommand{\gnushat}{\symbol{"5E}}
59 \newcommand{\gnusunderline}{\symbol{"5F}}
60 \newcommand{\gnustilde}{\symbol{"7E}}
61 \newcommand{\gnusless}{{$<$}}
62 \newcommand{\gnusgreater}{{$>$}}
63
64 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=gnus-head.eps,height=1cm}}}
65 \newcommand{\gnusinteresting}{
66 \marginpar[\hspace{2.5cm}\gnushead]{\gnushead}
67 }
68
69 \newcommand{\gnuschapter}[1]{
70 \renewcommand{\gnussectionname}{}
71 \chapter{#1}
72 \renewcommand{\gnuschaptername}{#1}
73 \thispagestyle{empty}
74 % \epsfig{figure=gnus-herd-\arabic{chapter}.eps,height=15cm}
75 \clearpage
76 }
77
78 \newcommand{\gnusitemx}[1]{\vspace{-\itemsep}\item#1}
79
80 \newcommand{\gnussection}[1]{
81 \renewcommand{\gnussectionname}{#1}
82 \section{#1}
83 }
84
85 \newenvironment{codelist}%
86 {\begin{list}{}{
87 }
88 }{\end{list}}
89
90 \newenvironment{kbdlist}%
91 {\begin{list}{}{
92 \labelwidth=0cm
93 }
94 }{\end{list}}
95
96 \newenvironment{dfnlist}%
97 {\begin{list}{}{
98 }
99 }{\end{list}}
100
101 \newenvironment{stronglist}%
102 {\begin{list}{}{
103 }
104 }{\end{list}}
105
106 \newenvironment{samplist}%
107 {\begin{list}{}{
108 }
109 }{\end{list}}
110
111 \newenvironment{varlist}%
112 {\begin{list}{}{
113 }
114 }{\end{list}}
115
116 \newenvironment{emphlist}%
117 {\begin{list}{}{
118 }
119 }{\end{list}}
120
121 \newpagestyle{gnus}%
122 {
123 {
124 \ifodd\count0
125 {
126 \hspace*{-2ex}
127 \underline{
128 \makebox[\headtextwidth]{
129 \hspace*{-2.3ex}
130 \textbf{\arabic{chapter}.\arabic{section}}
131 \textbf{\gnussectionname\hfill\arabic{page}}
132 }}
133 }
134 \else
135 {
136 \hspace*{-2.25cm}
137 \underline{
138 \hspace*{-2.3ex}
139 \makebox[\headtextwidth]{
140 \textbf{\arabic{page}\hfill\gnuschaptername}
141 }}
142 }
143 \fi
144 }
145 }
146 {
147 \ifodd\count0
148 \mbox{} \hfill 
149 \raisebox{-0.5cm}{\epsfig{figure=gnus-big-logo.eps,height=1cm}}
150 \else
151 \raisebox{-0.5cm}{\epsfig{figure=gnus-big-logo.eps,height=1cm}}
152 \hfill \mbox{}
153 \fi
154 }
155 \pagestyle{gnus}
156
157 @end iflatex
158 @end iftex
159
160 @iftex
161 @iflatex
162 \begin{titlepage}
163 {
164
165 %\addtolength{\oddsidemargin}{-5cm}
166 %\addtolength{\evensidemargin}{-5cm}
167 \parindent=0cm
168 \addtolength{\textheight}{2cm}
169
170 \gnustitle{\gnustitlename}\\
171 \rule{15cm}{1mm}\\
172 \vfill
173 \hspace*{-1cm}\epsfig{figure=gnus-big-logo.eps,height=15cm}
174 \vfill
175 \rule{15cm}{1mm}\\
176 \gnusauthor{by Lars Magne Ingebrigtsen}
177 \newpage
178 }
179
180 \mbox{}
181 \vfill
182
183 \thispagestyle{empty}
184
185 Copyright \copyright{} 1995,96 Free Software Foundation, Inc. 
186
187 Permission is granted to make and distribute verbatim copies of
188 this manual provided the copyright notice and this permission notice
189 are preserved on all copies.
190
191 Permission is granted to copy and distribute modified versions of this
192 manual under the conditions for verbatim copying, provided that the
193 entire resulting derived work is distributed under the terms of a
194 permission notice identical to this one.
195
196 Permission is granted to copy and distribute translations of this manual
197 into another language, under the above conditions for modified versions.
198
199 \newpage
200 \end{titlepage}
201 @end iflatex
202 @end iftex
203
204 @ifinfo
205
206 This file documents Gnus, the GNU Emacs newsreader.
207
208 Copyright (C) 1995,96 Free Software Foundation, Inc.
209
210 Permission is granted to make and distribute verbatim copies of
211 this manual provided the copyright notice and this permission notice
212 are preserved on all copies.
213
214 @ignore
215 Permission is granted to process this file through Tex and print the
216 results, provided the printed document carries copying permission
217 notice identical to this one except for the removal of this paragraph
218 (this paragraph not being relevant to the printed manual).
219
220 @end ignore
221 Permission is granted to copy and distribute modified versions of this
222 manual under the conditions for verbatim copying, provided also that the
223 entire resulting derived work is distributed under the terms of a
224 permission notice identical to this one.
225
226 Permission is granted to copy and distribute translations of this manual
227 into another language, under the above conditions for modified versions.
228 @end ifinfo
229
230 @tex
231
232 @titlepage
233 @title Red Gnus Manual
234
235 @author by Lars Magne Ingebrigtsen
236 @page
237
238 @vskip 0pt plus 1filll
239 Copyright @copyright{} 1995,96 Free Software Foundation, Inc. 
240
241 Permission is granted to make and distribute verbatim copies of
242 this manual provided the copyright notice and this permission notice
243 are preserved on all copies.
244
245 Permission is granted to copy and distribute modified versions of this
246 manual under the conditions for verbatim copying, provided that the
247 entire resulting derived work is distributed under the terms of a
248 permission notice identical to this one.
249
250 Permission is granted to copy and distribute translations of this manual
251 into another language, under the above conditions for modified versions.
252
253 @end titlepage
254 @page
255
256 @end tex
257
258
259 @node Top
260 @top The Red Gnus Newsreader
261
262 @ifinfo
263
264 You can read news (and mail) from within Emacs by using Gnus.  The news
265 can be gotten by any nefarious means you can think of---@sc{nntp}, local
266 spool or your mbox file.  All at the same time, if you want to push your
267 luck.
268
269 @end ifinfo
270
271 @iftex
272
273 @iflatex
274 \thispagestyle{empty}
275 @end iflatex
276
277 Gnus is the advanced, self-documenting, customizable, extensible
278 unreal-time newsreader for GNU Emacs.  
279
280 Oops.  That sounds oddly familiar, so let's start over again to avoid
281 being accused of plagiarism:
282
283 Gnus is a message-reading laboratory.  It will let you look at just
284 about anything as if it were a newsgroup.  You can read mail with it,
285 you can browse directories with it, you can @code{ftp} with it---you can
286 even read news with it!
287
288 Gnus tries to empower people who read news the same way Emacs empowers
289 people who edit text.  Gnus sets no limits to what the user should be
290 allowed to do.  Users are encouraged to extend Gnus to make it behave
291 like they want it to behave.  A program should not control people;
292 people should be empowered to do what they want by using (or abusing)
293 the program.
294
295 @end iftex
296
297
298 @menu
299 * Starting Up::           Finding news can be a pain.
300 * The Group Buffer::      Selecting, subscribing and killing groups.
301 * The Summary Buffer::    Reading, saving and posting articles.
302 * The Article Buffer::    Displaying and handling articles.
303 * Composing Messages::    Information on sending mail and news.
304 * Select Methods::        Gnus reads all messages from various select methods.
305 * Scoring::               Assigning values to articles.
306 * Various::               General purpose settings.
307 * The End::               Farewell and goodbye.
308 * Appendices::            Terminology, Emacs intro, FAQ, History, Internals.
309 * Index::                 Variable, function and concept index.
310 * Key Index::             Key Index.
311 @end menu
312
313
314 @node Starting Up
315 @chapter Starting Gnus
316 @cindex starting up
317
318 @kindex M-x gnus
319 @findex gnus
320 If your system administrator has set things up properly, starting Gnus
321 and reading news is extremely easy---you just type @kbd{M-x gnus} in
322 your Emacs. 
323
324 @findex gnus-other-frame
325 @kindex M-x gnus-other-frame
326 If you want to start Gnus in a different frame, you can use the command
327 @kbd{M-x gnus-other-frame} instead.
328
329 If things do not go smoothly at startup, you have to twiddle some
330 variables. 
331
332 @menu
333 * Finding the News::    Choosing a method for getting news.
334 * The First Time::      What does Gnus do the first time you start it?
335 * The Server is Down::  How can I read my mail then?
336 * Slave Gnusii::        You can have more than one Gnus active at a time.
337 * Fetching a Group::    Starting Gnus just to read a group.
338 * New Groups::          What is Gnus supposed to do with new groups?
339 * Startup Files::       Those pesky startup files---@file{.newsrc}.
340 * Auto Save::           Recovering from a crash.
341 * The Active File::     Reading the active file over a slow line Takes Time.
342 * Changing Servers::    You may want to move from one server to another.
343 * Startup Variables::   Other variables you might change.
344 @end menu
345
346
347 @node Finding the News
348 @section Finding the News
349
350 @vindex gnus-select-method
351 @c @head
352 The @code{gnus-select-method} variable says where Gnus should look for
353 news.  This variable should be a list where the first element says
354 @dfn{how} and the second element says @dfn{where}.  This method is your
355 native method.  All groups that are not fetched with this method are
356 foreign groups.
357
358 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
359 you want to get your daily dosage of news from, you'd say:
360
361 @lisp
362 (setq gnus-select-method '(nntp "news.somewhere.edu"))
363 @end lisp
364
365 If you want to read directly from the local spool, say:
366
367 @lisp
368 (setq gnus-select-method '(nnspool ""))
369 @end lisp
370
371 If you can use a local spool, you probably should, as it will almost
372 certainly be much faster.
373
374 @vindex gnus-nntpserver-file
375 @cindex NNTPSERVER
376 @cindex @sc{nntp} server
377 If this variable is not set, Gnus will take a look at the
378 @code{NNTPSERVER} environment variable.  If that variable isn't set,
379 Gnus will see whether @code{gnus-nntpserver-file}
380 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
381 that fails as well, Gnus will will try to use the machine that is
382 running Emacs as an @sc{nntp} server.  That's a long-shot, though.
383
384 @vindex gnus-nntp-server
385 If @code{gnus-nntp-server} is set, this variable will override
386 @code{gnus-select-method}.  You should therefore set
387 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
388
389 @vindex gnus-secondary-servers
390 You can also make Gnus prompt you interactively for the name of an
391 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
392 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
393 in the @code{gnus-secondary-servers} list (if any).  You can also just
394 type in the name of any server you feel like visiting.
395
396 @findex gnus-group-browse-foreign-server
397 @kindex B (Group)
398 However, if you use one @sc{nntp} server regularly and are just
399 interested in a couple of groups from a different server, you would be
400 better served by using the @kbd{B} command in the group buffer.  It will
401 let you have a look at what groups are available, and you can subscribe
402 to any of the groups you want to.  This also makes @file{.newsrc}
403 maintenance much tidier.  @xref{Foreign Groups}.
404
405 @vindex gnus-secondary-select-methods
406 @c @head
407 A slightly different approach to foreign groups is to set the
408 @code{gnus-secondary-select-methods} variable.  The select methods
409 listed in this variable are in many ways just as native as the
410 @code{gnus-select-method} server.  They will also be queried for active
411 files during startup (if that's required), and new newsgroups that
412 appear on these servers will be subscribed (or not) just as native
413 groups are.
414
415 For instance, if you use the @code{nnmbox} backend to read your mail, you
416 would typically set this variable to
417
418 @lisp
419 (setq gnus-secondary-select-methods '((nnmbox "")))
420 @end lisp
421
422
423 @node The First Time
424 @section The First Time
425 @cindex first time usage
426
427 If no startup files exist, Gnus will try to determine what groups should
428 be subscribed by default.
429
430 @vindex gnus-default-subscribed-newsgroups
431 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
432 will subscribe you to just those groups in that list, leaving the rest
433 killed.  Your system administrator should have set this variable to
434 something useful.
435
436 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
437 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is here
438 defined as @dfn{whatever Lars thinks you should read}.)
439
440 You'll also be subscribed to the Gnus documentation group, which should
441 help you with most common problems.  
442
443 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
444 use the normal functions for handling new groups, and not do anything
445 special.
446
447
448 @node The Server is Down
449 @section The Server is Down
450 @cindex server errors
451
452 If the default server is down, Gnus will understandably have some
453 problems starting.  However, if you have some mail groups in addition to
454 the news groups, you may want to start Gnus anyway.
455
456 Gnus, being the trusting sort of program, will ask whether to proceed
457 without a native select method if that server can't be contacted.  This
458 will happen whether the server doesn't actually exist (i.e., you have
459 given the wrong address) or the server has just momentarily taken ill
460 for some reason or other.  If you decide to continue and have no foreign
461 groups, you'll find it difficult to actually do anything in the group
462 buffer.  But, hey, that's your problem.  Blllrph!
463
464 @findex gnus-no-server
465 @c @head
466 If you know that the server is definitely down, or you just want to read
467 your mail without bothering with the server at all, you can use the
468 @code{gnus-no-server} command to start Gnus.  That might come in handy
469 if you're in a hurry as well.
470
471
472 @node Slave Gnusii
473 @section Slave Gnusiï
474 @cindex slave
475
476 You might want to run more than one Emacs with more than one Gnus at the
477 same time.  If you are using different @file{.newsrc} files (eg., if you
478 are using the two different Gnusiï to read from two different servers),
479 that is no problem whatsoever.  You just do it.
480
481 The problem appears when you want to run two Gnusiï that use the same
482 @code{.newsrc} file.
483
484 To work around that problem some, we here at the Think-Tank at the Gnus
485 Towers have come up with a new concept: @dfn{Masters} and
486 @dfn{servants}.  (We have applied for a patent on this concept, and have
487 taken out a copyright on those words.  If you wish to use those words in
488 conjunction with each other, you have to send $1 per usage instance to
489 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
490 Applications}) will be much more expensive, of course.)
491
492 Anyways, you start one Gnus up the normal way with @kbd{M-x gnus} (or
493 however you do it).  Each subsequent slave Gnusiï should be started with
494 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
495 files, but instead save @dfn{slave files} that contains information only
496 on what groups have been read in the slave session.  When a master Gnus
497 starts, it will read (and delete) these slave files, incorporating all
498 information from them.  (The slave files will be read in the sequence
499 they were created, so the latest changes will have precedence.)
500
501 Information from the slave files has, of course, precedence over the
502 information in the normal (i. e., master) @code{.newsrc} file.
503
504
505 @node Fetching a Group
506 @section Fetching a Group
507
508 @findex gnus-fetch-group
509 It it sometime convenient to be able to just say ``I want to read this
510 group and I don't care whether Gnus has been started or not''.  This is
511 perhaps more useful for people who write code than for users, but the
512 command @code{gnus-fetch-group} provides this functionality in any case.
513 It takes the group name as a parameter.
514
515
516 @node New Groups
517 @section New Groups
518 @cindex new groups
519
520 @vindex gnus-subscribe-newsgroup-method
521 What Gnus does when it encounters a new group is determined by the
522 @code{gnus-subscribe-newsgroup-method} variable.
523
524 This variable should contain a function.  Some handy pre-fab values
525 are:
526
527 @table @code
528
529 @item gnus-subscribe-zombies
530 @vindex gnus-subscribe-zombies
531 Make all new groups zombies.  You can browse the zombies later (with
532 @kbd{A z}) and either kill them all off properly, or subscribe to them.
533 This is the default.
534
535 @item gnus-subscribe-randomly
536 @vindex gnus-subscribe-randomly
537 Subscribe all new groups randomly.
538
539 @item gnus-subscribe-alphabetically
540 @vindex gnus-subscribe-alphabetically
541 Subscribe all new groups alphabetically.
542
543 @item gnus-subscribe-hierarchically
544 @vindex gnus-subscribe-hierarchically
545 Subscribe all new groups hierarchically.  The difference between this
546 function and @code{gnus-subscribe-alphabetically} is slight.
547 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
548 alphabetical fashion, while this function will enter groups into it's
549 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
550 @samp{comp} hierarchy, this function will not mess that configuration
551 up.  Or something like that.
552
553 @item gnus-subscribe-interactively
554 @vindex gnus-subscribe-interactively
555 Subscribe new groups interactively.  This means that Gnus will ask
556 you about @strong{all} new groups.
557
558 @item gnus-subscribe-killed
559 @vindex gnus-subscribe-killed
560 Kill all new groups.
561
562 @end table
563
564 @vindex gnus-subscribe-hierarchical-interactive
565 A closely related variable is
566 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
567 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
568 hierarchical fashion whether to subscribe to new groups or not.  Gnus
569 will ask you for each sub-hierarchy whether you want to descend the
570 hierarchy or not.  
571
572 One common mistake is to set the variable a few paragraphs above to
573 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
574 will not work.  This is ga-ga.  So don't do it.
575
576 A nice and portable way to control which new newsgroups should be
577 subscribed (or ignored) is to put an @dfn{options} line at the start of
578 the @file{.newsrc} file.  Here's an example:
579
580 @example
581 options -n !alt.all !rec.all sci.all
582 @end example
583
584 @vindex gnus-subscribe-options-newsgroup-method
585 This line obviously belongs to a serious-minded intellectual scientific
586 person (or she may just be plain old boring), because it says that all
587 groups that have names beginning with @samp{alt} and @samp{rec} should
588 be ignored, and all groups with names beginning with @samp{sci} should
589 be subscribed.  Gnus will not use the normal subscription method for
590 subscribing these groups.
591 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
592 variable defaults to @code{gnus-subscribe-alphabetically}.
593
594 @vindex gnus-options-not-subscribe
595 @vindex gnus-options-subscribe
596 If you don't want to mess with your @file{.newsrc} file, you can just
597 set the two variables @code{gnus-options-subscribe} and
598 @code{gnus-options-not-subscribe}.  These two variables do exactly the
599 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
600 and if the the new group matches the former, it will be unconditionally
601 subscribed, and if it matches the latter, it will be ignored.
602
603 @vindex gnus-auto-subscribed-groups
604 Yet another variable that meddles here is
605 @code{gnus-auto-subscribed-groups}.  It works exactly like
606 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
607 thought it would be nice to have two of these.  This variable is more
608 meant for setting some ground rules, while the other variable is used
609 more for user fiddling.  By default this variable makes all new groups
610 that come from mail backends (@code{nnml}, @code{nnbabyl},
611 @code{nnfolder}, @code{nnmbox}, and @code{nnmh}) subscribed.  If you
612 don't like that, just set this variable to @code{nil}.
613
614 @vindex gnus-check-new-newsgroups
615 If you are satisfied that you really never want to see any new groups,
616 you could set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
617 also save you some time at startup.  Even if this variable is
618 @code{nil}, you can always subscribe to the new groups just by pressing
619 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
620 is @code{t} by default.
621
622 Gnus normally determines whether a group is new or not by comparing the
623 list of groups from the active file(s) with the lists of subscribed and
624 dead groups.  This isn't a particularly fast method.  If
625 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
626 server for new groups since the last time.  This is both faster &
627 cheaper.  This also means that you can get rid of the list of killed
628 groups altogether, so you may set @code{gnus-save-killed-list} to
629 @code{nil}, which will save time both at startup, at exit, and all over.
630 Saves disk space, too.  Why isn't this the default, then?
631 Unfortunately, not all servers support this command. 
632
633 I bet I know what you're thinking now: How do I find out whether my
634 server supports @code{ask-server}?  No?  Good, because I don't have a
635 fail-safe answer.  I would suggest just setting this variable to
636 @code{ask-server} and see whether any new groups appear within the next
637 few days.  If any do, then it works.  If any don't, then it doesn't
638 work.  I could write a function to make Gnus guess whether the server
639 supports @code{ask-server}, but it would just be a guess.  So I won't.
640 You could @code{telnet} to the server and say @code{HELP} and see
641 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
642 it does, then it might work.  (But there are servers that lists
643 @samp{NEWGROUPS} without supporting the function properly.)
644
645 This variable can also be a list of select methods.  If so, Gnus will
646 issue an @code{ask-server} command to each of the select methods, and
647 subscribe them (or not) using the normal methods.  This might be handy
648 if you are monitoring a few servers for new groups.  A side effect is
649 that startup will take much longer, so you can meditate while waiting.
650 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
651
652
653 @node Changing Servers
654 @section Changing Servers
655
656 Sometimes it is necessary to move from one @sc{nntp} server to another.
657 This happens very rarely, but perhaps you change jobs, or one server is
658 very flake and you want to use another.  
659
660 Changing the server is pretty easy, right?  You just change
661 @code{gnus-select-method} to point to the new server?  
662
663 @emph{Wrong!}
664
665 Article numbers are not (in any way) kept synchronized between different
666 @sc{nntp} servers, and the only way Gnus keeps track of what articles
667 you have read is by keeping track of article numbers.  So when you
668 change @code{gnus-select-method}, your @file{.newsrc} file becomes
669 worthless.  
670
671 Gnus provides a few functions to attempt to translate a @file{.newsrc}
672 file from one server to another.  They all have one thing in
673 common---they take a looong time to run.  You don't want to use these
674 functions more than absolutely necessary.
675
676 @kindex M-x gnus-change-server
677 @findex gnus-change-server
678 If you have access to both servers, Gnus can request the headers for all
679 the articles you have read and compare @code{Message-ID}s and map
680 reads and article marks.  The @kbd{M-x gnus-change-server} command will
681 do this for all your native groups.  It will prompt for the method you
682 want to move to.
683
684 @kindex M-x gnus-group-move-group-to-server
685 @findex gnus-group-move-group-to-server
686 You can also move individual groups with the @kbd{M-x
687 gnus-group-move-group-to-server} command.  This is useful if you want to
688 move a (foreign) group from one server to another.
689
690 @kindex M-x gnus-group-clear-data-on-native-groups
691 @findex gnus-group-clear-data-on-native-groups
692 If you don't have access to both the old and new server, all your marks
693 and read ranges have become worthless.  You can use the @kbd{M-x
694 gnus-group-clear-data-on-native-groups} command to clear out all data
695 that you have on your native groups.  Use with caution.
696
697
698 @node Startup Files
699 @section Startup Files
700 @cindex startup files
701 @cindex .newsrc
702
703 Now, you all know about the @file{.newsrc} file.  All subscription
704 information is traditionally stored in this file.
705
706 Things got a bit more complicated with @sc{gnus}.  In addition to
707 keeping the @file{.newsrc} file updated, it also used a file called
708 @file{.newsrc.el} for storing all the information that didn't fit into
709 the @file{.newsrc} file.  (Actually, it also duplicated everything in
710 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
711 files was the most recently saved, which enabled people to swap between
712 @sc{gnus} and other newsreaders.
713
714 That was kinda silly, so Gnus went one better: In addition to the
715 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
716 @file{.newsrc.eld}.  It will read whichever of these files that are most
717 recent, but it will never write a @file{.newsrc.el} file.
718
719 @vindex gnus-save-newsrc-file
720 You can turn off writing the @file{.newsrc} file by setting
721 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
722 the file and save some space, as well as making exit from Gnus faster.
723 However, this will make it impossible to use other newsreaders than
724 Gnus.  But hey, who would want to, right?
725
726 @vindex gnus-save-killed-list
727 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
728 will not save the list of killed groups to the startup file.  This will
729 save both time (when starting and quitting) and space (on disk).  It
730 will also means that Gnus has no record of what groups are new or old,
731 so the automatic new groups subscription methods become meaningless.
732 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
733 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
734 Groups}).
735
736 @vindex gnus-startup-file
737 The @code{gnus-startup-file} variable says where the startup files are.
738 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
739 file being whatever that one is with a @samp{.eld} appended.
740
741 @vindex gnus-save-newsrc-hook
742 @vindex gnus-save-quick-newsrc-hook
743 @vindex gnus-save-standard-newsrc-hook
744 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
745 files, while @code{gnus-save-quick-newsrc-hook} is called just before
746 saving the @file{.newsrc.eld} file, and
747 @code{gnus-save-standard-newsrc-hook} is called just before saving the
748 @file{.newsrc} file.  The latter two are commonly used to turn version
749 control on or off.  Version control is off by default when saving the
750 startup files.
751
752 @vindex gnus-init-file
753 When Gnus starts, it will read the @code{gnus-init-file} file, which is
754 @file{~/.gnus.el} by default.  This is a normal Emacs Lisp file and can
755 be used to avoid cluttering your @file{.emacs} file with Gnus stuff.
756
757
758 @node Auto Save
759 @section Auto Save
760 @cindex dribble file
761 @cindex auto-save
762
763 Whenever you do something that changes the Gnus data (reading articles,
764 catching up, killing/subscribing groups), the change is added to a
765 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
766 Emacs way.  If your Emacs should crash before you have saved the
767 @file{.newsrc} files, all changes you have made can be recovered from
768 this file.
769
770 If Gnus detects this file at startup, it will ask the user whether to
771 read it.  The auto save file is deleted whenever the real startup file is
772 saved.
773
774 @vindex gnus-use-dribble-file
775 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
776 maintain a dribble buffer.  The default is @code{t}.
777
778 @vindex gnus-dribble-directory
779 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
780 this variable is @code{nil}, which it is by default, Gnus will dribble
781 into the directory where the @file{.newsrc} file is located.  (This is
782 normally the user's home directory.)  The dribble file will get the same
783 file permissions as the @code{.newsrc} file.
784
785
786 @node The Active File
787 @section The Active File
788 @cindex active file
789 @cindex ignored groups
790
791 When Gnus starts, or indeed whenever it tries to determine whether new
792 articles have arrived, it reads the active file.  This is a very large
793 file that lists all the active groups and articles on the server.
794
795 @vindex gnus-ignored-newsgroups
796 Before examining the active file, Gnus deletes all lines that match the
797 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
798 any groups with bogus names, but you can use this variable to make Gnus
799 ignore hierarchies you aren't ever interested in.  However, this is not
800 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
801 Groups} for an overview of other variables that can be used instead.
802
803 @c This variable is
804 @c @code{nil} by default, and will slow down active file handling somewhat
805 @c if you set it to anything else.
806
807 @vindex gnus-read-active-file
808 @c @head
809 The active file can be rather Huge, so if you have a slow network, you
810 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
811 reading the active file.  This variable is @code{t} by default.
812
813 Gnus will try to make do by getting information just on the groups that
814 you actually subscribe to.
815
816 Note that if you subscribe to lots and lots of groups, setting this
817 variable to @code{nil} will probably make Gnus slower, not faster.  At
818 present, having this variable @code{nil} will slow Gnus down
819 considerably, unless you read news over a 2400 baud modem.  
820
821 This variable can also have the value @code{some}.  Gnus will then
822 attempt to read active info only on the subscribed groups.  On some
823 servers this is quite fast (on sparkling, brand new INN servers that
824 support the @code{LIST ACTIVE group} command), on others this isn't fast
825 at all.  In any case, @code{some} should be faster than @code{nil}, and
826 is certainly faster than @code{t} over slow lines.
827
828 If this variable is @code{nil}, Gnus will ask for group info in total
829 lock-step, which isn't very fast.  If it is @code{some} and you use an
830 @sc{nntp} server, Gnus will pump out commands as fast as it can, and
831 read all the replies in one swoop.  This will normally result in better
832 performance, but if the server does not support the aforementioned
833 @code{LIST ACTIVE group} command, this isn't very nice to the server.
834
835 In any case, if you use @code{some} or @code{nil}, you should definitely
836 kill all groups that you aren't interested in to speed things up.
837
838
839 @node Startup Variables
840 @section Startup Variables
841
842 @table @code
843
844 @item gnus-load-hook
845 @vindex gnus-load-hook
846 A hook that is run while Gnus is being loaded.  Note that this hook will
847 normally be run just once in each Emacs session, no matter how many
848 times you start Gnus.
849
850 @item gnus-startup-hook
851 @vindex gnus-startup-hook
852 A hook that is run after starting up Gnus successfully.
853
854 @item gnus-check-bogus-newsgroups
855 @vindex gnus-check-bogus-newsgroups
856 If non-@code{nil}, Gnus will check for and delete all bogus groups at
857 startup.  A @dfn{bogus group} is a group that you have in your
858 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
859 bogus groups can take quite a while, so to save time and resources it's
860 best to leave this option off, and do the checking for bogus groups once
861 in a while from the group buffer instead (@pxref{Group Maintenance}).
862
863 @item gnus-inhibit-startup-message
864 @vindex gnus-inhibit-startup-message
865 If non-@code{nil}, the startup message won't be displayed.  That way,
866 your boss might not notice that you are reading news instead of doing
867 your job as easily.
868
869 @item gnus-no-groups-message
870 @vindex gnus-no-groups-message
871 Message displayed by Gnus when no groups are available.
872 @end table
873
874
875 @node The Group Buffer
876 @chapter The Group Buffer
877 @cindex group buffer
878
879 The @dfn{group buffer} lists all (or parts) of the available groups.  It
880 is the first buffer shown when Gnus starts, and will never be killed as
881 long as Gnus is active.
882
883 @menu
884 * Group Buffer Format::    Information listed and how you can change it.
885 * Group Maneuvering::      Commands for moving in the group buffer.
886 * Selecting a Group::      Actually reading news.
887 * Subscription Commands::  Unsubscribing, killing, subscribing.
888 * Group Levels::           Levels? What are those, then?
889 * Group Score::            A mechanism for finding out what groups you like.
890 * Marking Groups::         You can mark groups for later processing.
891 * Foreign Groups::         Creating and editing groups.
892 * Group Parameters::       Each group may have different parameters set.
893 * Listing Groups::         Gnus can list various subsets of the groups.
894 * Sorting Groups::         Re-arrange the group order.
895 * Group Maintenance::      Maintaining a tidy @file{.newsrc} file.
896 * Browse Foreign Server::  You can browse a server.  See what it has to offer.
897 * Exiting Gnus::           Stop reading news and get some work done.
898 * Group Topics::           A folding group mode divided into topics.
899 * Misc Group Stuff::       Other stuff that you can to do.
900 @end menu
901
902
903 @node Group Buffer Format
904 @section Group Buffer Format
905 @cindex group buffer format
906
907 @menu 
908 * Group Line Specification::       Deciding how the group buffer is to look.
909 * Group Modeline Specification::   The group buffer modeline.
910 * Group Highlighting::             Having nice colors in the group buffer.
911 @end menu
912
913
914 @node Group Line Specification
915 @subsection Group Line Specification
916
917 The default format of the group buffer is nice and dull, but you can
918 make it as exciting and ugly as you feel like.
919
920 Here's a couple of example group lines:
921
922 @example
923      25: news.announce.newusers
924  *    0: alt.fan.andrea-dworkin
925 @end example
926
927 Quite simple, huh?
928
929 You can see that there are 25 unread articles in
930 @samp{news.announce.newusers}.  There are no unread articles, but some
931 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
932 asterisk at the beginning of the line?)
933
934 @vindex gnus-group-line-format
935 You can change that format to whatever you want by fiddling with the
936 @code{gnus-group-line-format} variable.  This variable works along the
937 lines of a @code{format} specification, which is pretty much the same as
938 a @code{printf} specifications, for those of you who use (feh!) C.
939 @xref{Formatting Variables}. 
940
941 The default value that produced those lines above is 
942 @samp{%M%S%5y: %(%g%)\n}.
943
944 There should always be a colon on the line; the cursor always moves to
945 the colon after performing an operation.  Nothing else is required---not
946 even the group name.  All displayed text is just window dressing, and is
947 never examined by Gnus.  Gnus stores all real information it needs using
948 text properties.
949
950 (Note that if you make a really strange, wonderful, spreadsheet-like
951 layout, everybody will believe you are hard at work with the accounting
952 instead of wasting time reading news.)
953
954 Here's a list of all available format characters:
955
956 @table @samp
957
958 @item M    
959 Only marked articles.
960
961 @item S
962 Whether the group is subscribed.
963
964 @item L    
965 Level of subscribedness.
966
967 @item N
968 Number of unread articles.
969
970 @item I
971 Number of dormant articles.
972
973 @item T
974 Number of ticked articles.
975
976 @item R
977 Number of read articles.
978
979 @item t
980 Estimated total number of articles.  (This is really @var{max-number}
981 minus @var{min-number} plus 1.)
982
983 @item y
984 Number of unread, unticked, non-dormant articles.
985
986 @item i
987 Number of ticked and dormant articles.
988
989 @item g
990 Full group name.
991
992 @item G
993 Group name.
994
995 @item D
996 Newsgroup description.
997
998 @item o
999 @samp{m} if moderated.
1000
1001 @item O
1002 @samp{(m)} if moderated.
1003
1004 @item s
1005 Select method.
1006
1007 @item n
1008 Select from where.
1009
1010 @item z
1011 A string that looks like @samp{<%s:%n>} if a foreign select method is
1012 used.
1013
1014 @item P
1015 Indentation based on the level of the topic (@pxref{Group Topics}). 
1016
1017 @item c
1018 @vindex gnus-group-uncollapsed-levels
1019 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1020 variable says how many levels to leave at the end of the group name.
1021 The default is @code{1}.
1022
1023 @item u
1024 User defined specifier.  The next character in the format string should
1025 be a letter.  @sc{gnus} will call the function
1026 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1027 following @samp{%u}.  The function will be passed the current headers as
1028 argument.  The function should return a string, which will be inserted
1029 into the buffer just like information from any other specifier.
1030 @end table
1031
1032 @cindex *
1033 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1034 if no info is available---for instance, if it is a non-activated foreign
1035 group, or a bogus (or semi-bogus) native group.
1036
1037
1038 @node Group Modeline Specification
1039 @subsection Group Modeline Specification
1040
1041 @vindex gnus-group-mode-line-format
1042 The mode line can be changed by setting
1043 @code{gnus-group-mode-line-format} (@pxref{Formatting Variables}).  It
1044 doesn't understand that many format specifiers:
1045
1046 @table @samp
1047 @item S
1048 The native news server.
1049 @item M
1050 The native select method.
1051 @end table
1052
1053
1054 @node Group Highlighting
1055 @subsection Group Highlighting
1056
1057 @vindex gnus-group-highlight
1058 Highlighting in the group buffer is controlled by the
1059 @code{gnus-group-highlight} variable.  This is an alist with elements
1060 that look like @var{(form . face)}.  If @var{form} evaluates to
1061 something non-@code{nil}, the @var{face} will be used on the line.
1062
1063 Here's an example value for this variable that might look nice if the
1064 background is dark:
1065
1066 @lisp
1067 (setq gnus-group-highlight
1068     `(((> unread 200) . 
1069        ,(custom-face-lookup "Red" nil nil t nil nil))
1070       ((and (< level 3) (zerop unread)) . 
1071        ,(custom-face-lookup "SeaGreen" nil nil t nil nil))
1072       ((< level 3) . 
1073        ,(custom-face-lookup "SpringGreen" nil nil t nil nil))
1074       ((zerop unread) . 
1075        ,(custom-face-lookup "SteelBlue" nil nil t nil nil))
1076       (t . 
1077        ,(custom-face-lookup "SkyBlue" nil nil t nil nil))
1078       ))
1079 @end lisp
1080
1081 Variables that are dynamically bound when the forms are evaluated
1082 include:
1083
1084 @table @code
1085 @item group
1086 The group name.
1087 @item unread
1088 The number of unread articles in the group.
1089 @item method
1090 The select method.
1091 @item mailp
1092 Whether the group is a mail group.
1093 @item level
1094 The level of the group.
1095 @item score
1096 The score of the group.
1097 @item ticked 
1098 The number of ticked articles in the group.
1099 @item topic
1100 When using the topic minor mode, this variable is bound to the current
1101 topic being inserted.
1102 @end table
1103
1104 When the forms are @code{eval}ed, point is at the beginning of the line
1105 of the group in question, so you can use many of the normal Gnus
1106 functions for snarfing info on the group.
1107
1108 @vindex gnus-group-update-hook
1109 @findex gnus-group-highlight-line
1110 @code{gnus-group-update-hook} is called when a group line is changed.
1111 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1112 calls @code{gnus-group-highlight-line} by default.
1113
1114
1115 @node Group Maneuvering
1116 @section Group Maneuvering
1117 @cindex group movement
1118
1119 All movement commands understand the numeric prefix and will behave as
1120 expected, hopefully. 
1121
1122 @table @kbd
1123
1124 @item n
1125 @kindex n (Group)
1126 @findex gnus-group-next-unread-group
1127 Go to the next group that has unread articles
1128 (@code{gnus-group-next-unread-group}).
1129
1130 @item p
1131
1132 @itemx DEL
1133 @kindex DEL (Group)
1134 @kindex p (Group)
1135 @findex gnus-group-prev-unread-group
1136 Go to the previous group group that has unread articles
1137 (@code{gnus-group-prev-unread-group}).
1138
1139 @item N
1140 @kindex N (Group)
1141 @findex gnus-group-next-group
1142 Go to the next group (@code{gnus-group-next-group}).
1143
1144 @item P
1145 @kindex P (Group)
1146 @findex gnus-group-prev-group
1147 Go to the previous group (@code{gnus-group-prev-group}).
1148
1149 @item M-p
1150 @kindex M-p (Group)
1151 @findex gnus-group-next-unread-group-same-level
1152 Go to the next unread group on the same level (or lower)
1153 (@code{gnus-group-next-unread-group-same-level}). 
1154
1155 @item M-n
1156 @kindex M-n (Group)
1157 @findex gnus-group-prev-unread-group-same-level
1158 Go to the previous unread group on the same level (or lower)
1159 (@code{gnus-group-prev-unread-group-same-level}). 
1160 @end table
1161
1162 Three commands for jumping to groups:
1163
1164 @table @kbd
1165
1166 @item j
1167 @kindex j (Group)
1168 @findex gnus-group-jump-to-group
1169 Jump to a group (and make it visible if it isn't already)
1170 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
1171 like living groups.
1172
1173 @item ,
1174 @kindex , (Group)
1175 @findex gnus-group-best-unread-group
1176 Jump to the unread group with the lowest level
1177 (@code{gnus-group-best-unread-group}). 
1178
1179 @item .
1180 @kindex . (Group)
1181 @findex gnus-group-first-unread-group
1182 Jump to the first group with unread articles
1183 (@code{gnus-group-first-unread-group}).  
1184 @end table
1185
1186 @vindex gnus-group-goto-unread
1187 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
1188 commands will move to the next group, not the next unread group.  Even
1189 the commands that say they move to the next unread group.  The default
1190 is @code{t}.
1191
1192
1193 @node Selecting a Group
1194 @section Selecting a Group
1195 @cindex group selection
1196
1197 @table @kbd
1198
1199 @item SPACE
1200 @kindex SPACE (Group)
1201 @findex gnus-group-read-group
1202 Select the current group, switch to the summary buffer and display the
1203 first unread article (@code{gnus-group-read-group}).  If there are no
1204 unread articles in the group, or if you give a non-numerical prefix to
1205 this command, Gnus will offer to fetch all the old articles in this
1206 group from the server.  If you give a numerical prefix @var{N}, Gnus
1207 will fetch @var{N} number of articles.  If @var{N} is positive, fetch
1208 the @var{N} newest articles, if @var{N} is negative, fetch the
1209 @var{abs(N)} oldest articles.
1210
1211 @item RET
1212 @kindex RET (Group)
1213 @findex gnus-group-select-group
1214 Select the current group and switch to the summary buffer
1215 (@code{gnus-group-select-group}).  Takes the same arguments as
1216 @code{gnus-group-read-group}---the only difference is that this command
1217 does not display the first unread article automatically upon group
1218 entry. 
1219
1220 @item M-RET
1221 @kindex M-RET (Group)
1222 @findex gnus-group-quick-select-group
1223 This does the same as the command above, but tries to do it with the
1224 minimum amount off fuzz (@code{gnus-group-quick-select-group}).  No
1225 scoring/killing will be performed, there will be no highlights and no
1226 expunging.  This might be useful if you're in a real hurry and have to
1227 enter some humongous group.
1228
1229 @item M-SPACE
1230 @kindex M-RET (Group)
1231 @findex gnus-group-visible-select-group
1232 This is yet one more command that does the same as the one above, but
1233 this one does it without expunging and hiding dormants
1234 (@code{gnus-group-visible-select-group}).  
1235
1236 @item c
1237 @kindex c (Group)
1238 @findex gnus-group-catchup-current
1239 @vindex gnus-group-catchup-group-hook
1240 Mark all unticked articles in this group as read
1241 (@code{gnus-group-catchup-current}).
1242 @code{gnus-group-catchup-group-hook} is when catching up a group from
1243 the group buffer.
1244
1245 @item C
1246 @kindex C (Group)
1247 @findex gnus-group-catchup-current-all
1248 Mark all articles in this group, even the ticked ones, as read
1249 (@code{gnus-group-catchup-current-all}).   
1250
1251 @item M-c
1252 @kindex M-c (Group)
1253 @findex gnus-group-clear-data
1254 Clear the data from the current group---nix out marks and the list of
1255 read articles (@code{gnus-group-clear-data}).
1256
1257 @item M-x gnus-group-clear-data-on-native-groups
1258 @kindex M-x gnus-group-clear-data-on-native-groups
1259 @findex gnus-group-clear-data-on-native-groups
1260 If you have switced from one @sc{nntp} server to another, all your marks
1261 and read ranges have become worthless.  You can use this command to
1262 clear out all data that you have on your native groups.  Use with
1263 caution. 
1264
1265 @end table
1266
1267 @vindex gnus-large-newsgroup
1268 The @code{gnus-large-newsgroup} variable says what Gnus should consider
1269 to be a big group.  This is 200 by default.  If the group has more
1270 unread articles than this, Gnus will query the user before entering the
1271 group.  The user can then specify how many articles should be fetched
1272 from the server.  If the user specifies a negative number (@code{-n}),
1273 the @code{n} oldest articles will be fetched.  If it is positive, the
1274 @code{n} articles that have arrived most recently will be fetched.
1275
1276 @vindex gnus-select-group-hook
1277 @vindex gnus-auto-select-first
1278 @code{gnus-auto-select-first} control whether any articles are selected
1279 automatically when entering a group.  
1280
1281 @table @code
1282
1283 @item nil
1284 Don't select any articles when entering the group.  Just display the
1285 full summary buffer.
1286
1287 @item t
1288 Select the first unread article when entering the group.  
1289
1290 @item best
1291 Select the most high-scored article in the group when entering the
1292 group. 
1293 @end table
1294         
1295 If you want to prevent automatic selection in some group (say, in a
1296 binary group with Huge articles) you can set this variable to @code{nil}
1297 in @code{gnus-select-group-hook}, which is called when a group is
1298 selected.
1299
1300
1301 @node Subscription Commands
1302 @section Subscription Commands
1303 @cindex subscribing
1304
1305 @table @kbd
1306
1307 @item S t
1308 @itemx u
1309 @kindex S t (Group)
1310 @kindex u (Group)
1311 @findex gnus-group-unsubscribe-current-group
1312 Toggle subscription to the current group
1313 (@code{gnus-group-unsubscribe-current-group}).  
1314
1315 @item S s
1316 @itemx U
1317 @kindex S s (Group)
1318 @kindex U (Group)
1319 @findex gnus-group-unsubscribe-group
1320 Prompt for a group to subscribe, and then subscribe it.  If it was
1321 subscribed already, unsubscribe it instead
1322 (@code{gnus-group-unsubscribe-group}).
1323
1324 @item S k
1325 @itemx C-k
1326 @kindex S k (Group)
1327 @kindex C-k (Group)
1328 @findex gnus-group-kill-group
1329 Kill the current group (@code{gnus-group-kill-group}).
1330
1331 @item S y
1332 @itemx C-y
1333 @kindex S y (Group)
1334 @kindex C-y (Group)
1335 @findex gnus-group-yank-group
1336 Yank the last killed group (@code{gnus-group-yank-group}).
1337
1338 @item C-x C-t
1339 @kindex C-x C-t (Group)
1340 @findex gnus-group-transpose-groups
1341 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
1342 really a subscription command, but you can use it instead of a
1343 kill-and-yank sequence sometimes.
1344
1345 @item S w
1346 @itemx C-w
1347 @kindex S w (Group)
1348 @kindex C-w (Group)
1349 @findex gnus-group-kill-region
1350 Kill all groups in the region (@code{gnus-group-kill-region}). 
1351
1352 @item S z
1353 @kindex S z (Group)
1354 @findex gnus-group-kill-all-zombies
1355 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
1356
1357 @item S C-k
1358 @kindex S C-k (Group)
1359 @findex gnus-group-kill-level
1360 Kill all groups on a certain level (@code{gnus-group-kill-level}).
1361 These groups can't be yanked back after killing, so this command should
1362 be used with some caution.  The only thing where this command comes in
1363 really handy is when you have a @file{.newsrc} with lots of unsubscribed
1364 groups that you want to get rid off.  @kbd{S C-k} on level @code{7} will
1365 kill off all unsubscribed groups that do not have message numbers in the
1366 @file{.newsrc} file.  
1367
1368 @end table
1369
1370 Also @pxref{Group Levels}.
1371
1372
1373 @node Group Levels
1374 @section Group Levels
1375 @cindex group level
1376
1377 All groups have a level of @dfn{subscribedness}.  For instance, if a
1378 group is on level 2, it is more subscribed than a group on level 5.  You
1379 can ask Gnus to just list groups on a given level or lower
1380 (@pxref{Listing Groups}), or to just check for new articles in groups on
1381 a given level or lower (@pxref{Scanning New Messages}).
1382
1383 Remember:  The higher the level of the group, the less important it is. 
1384
1385 @table @kbd
1386
1387 @item S l
1388 @kindex S l (Group)
1389 @findex gnus-group-set-current-level
1390 Set the level of the current group.  If a numeric prefix is given, the
1391 next @var{n} groups will have their levels set.  The user will be
1392 prompted for a level.
1393 @end table
1394
1395 @vindex gnus-level-killed
1396 @vindex gnus-level-zombie
1397 @vindex gnus-level-unsubscribed
1398 @vindex gnus-level-subscribed
1399 Gnus considers groups on between levels 1 and
1400 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
1401 @code{gnus-level-subscribed} (exclusive) and
1402 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
1403 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
1404 (default 8) and @code{gnus-level-killed} to be killed (default 9),
1405 completely dead.  Gnus treats subscribed and unsubscribed groups exactly
1406 the same, but zombie and killed groups have no information on what
1407 articles you have read, etc, stored.  This distinction between dead and
1408 living groups isn't done because it is nice or clever, it is done purely
1409 for reasons of efficiency.
1410
1411 It is recommended that you keep all your mail groups (if any) on quite
1412 low levels (eg. 1 or 2).
1413
1414 If you want to play with the level variables, you should show some care.
1415 Set them once, and don't touch them ever again.  Better yet, don't touch
1416 them at all unless you know exactly what you're doing.
1417
1418 @vindex gnus-level-default-unsubscribed
1419 @vindex gnus-level-default-subscribed
1420 Two closely related variables are @code{gnus-level-default-subscribed}
1421 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
1422 which are the levels that new groups will be put on if they are
1423 (un)subscribed.  These two variables should, of course, be inside the
1424 relevant legal ranges.
1425
1426 @vindex gnus-keep-same-level
1427 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
1428 will only move to groups that are of the same level (or lower).  In
1429 particular, going from the last article in one group to the next group
1430 will go to the next group of the same level (or lower).  This might be
1431 handy if you want to read the most important groups before you read the
1432 rest.
1433
1434 @vindex gnus-group-default-list-level
1435 All groups with a level less than or equal to
1436 @code{gnus-group-default-list-level} will be listed in the group buffer
1437 by default.
1438
1439 @vindex gnus-group-list-inactive-groups
1440 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
1441 groups will be listed along with the unread groups.  This variable is
1442 @code{t} by default.  If it is @code{nil}, inactive groups won't be
1443 listed. 
1444
1445 @vindex gnus-group-use-permanent-levels
1446 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
1447 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
1448 use this level as the ``work'' level.
1449
1450 @vindex gnus-activate-level
1451 Gnus will normally just activate groups that are on level
1452 @code{gnus-activate-level} or less.  If you don't want to activate
1453 unsubscribed groups, for instance, you might set this variable to
1454 @code{5}. 
1455
1456
1457 @node Group Score
1458 @section Group Score
1459 @cindex group score
1460
1461 You would normally keep important groups on high levels, but that scheme
1462 is somewhat restrictive.  Don't you wish you could have Gnus sort the
1463 group buffer according to how often you read groups, perhaps?  Within
1464 reason?  
1465
1466 This is what @dfn{group score} is for.  You can assign a score to each
1467 group.  You can then sort the group buffer based on this score.
1468 Alternatively, you can sort on score and then level.  (Taken together,
1469 the level and the score is called the @dfn{rank} of the group.  A group
1470 that is on level 4 and has a score of 1 has a higher rank than a group
1471 on level 5 that has a score of 300.  (The level is the most significant
1472 part and the score is the least significant part.)
1473
1474 @findex gnus-summary-bubble-group
1475 If you want groups you read often to get higher scores than groups you
1476 read seldom you can add the @code{gnus-summary-bubble-group} function to
1477 the @code{gnus-summary-exit-hook} hook.  This will result (after
1478 sorting) in a bubbling sort of action.  If you want to see that in
1479 action after each summary exit, you can add
1480 @code{gnus-group-sort-groups-by-rank} or
1481 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
1482 slow things down somewhat.
1483
1484
1485 @node Marking Groups
1486 @section Marking Groups
1487 @cindex marking groups
1488
1489 If you want to perform some command on several groups, and they appear
1490 subsequently in the group buffer, you would normally just give a
1491 numerical prefix to the command.  Most group commands will then do your
1492 bidding on those groups.
1493
1494 However, if the groups are not in sequential order, you can still
1495 perform a command on several groups.  You simply mark the groups first
1496 with the process mark and then execute the command.
1497
1498 @table @kbd
1499
1500 @item #
1501 @kindex # (Group)
1502 @itemx M m
1503 @kindex M m (Group)
1504 @findex gnus-group-mark-group
1505 Set the mark on the current group (@code{gnus-group-mark-group}). 
1506
1507 @item M-#
1508 @kindex M-# (Group)
1509 @itemx M u
1510 @kindex M u (Group)
1511 @findex gnus-group-unmark-group
1512 Remove the mark from the current group
1513 (@code{gnus-group-unmark-group}). 
1514
1515 @item M U
1516 @kindex M U (Group)
1517 @findex gnus-group-unmark-all-groups
1518 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}). 
1519
1520 @item M w
1521 @kindex M w (Group)
1522 @findex gnus-group-mark-region
1523 Mark all groups between point and mark (@code{gnus-group-mark-region}). 
1524
1525 @item M b
1526 @kindex M b (Group)
1527 @findex gnus-group-mark-buffer
1528 Mark all groups in the buffer (@code{gnus-group-mark-buffer}). 
1529
1530 @item M r
1531 @kindex M r (Group)
1532 @findex gnus-group-mark-regexp
1533 Mark all groups that match some regular expression
1534 (@code{gnus-group-mark-regexp}).  
1535 @end table
1536
1537 Also @pxref{Process/Prefix}.
1538
1539 @findex gnus-group-universal-argument
1540 If you want to execute some command on all groups that have been marked
1541 with the process mark, you can use the @kbd{M-&}
1542 (@code{gnus-group-universal-argument}) command.  It will prompt you for
1543 the command to be executed.
1544
1545
1546 @node Foreign Groups
1547 @section Foreign Groups
1548
1549 Below are some group mode commands for making and editing general foreign
1550 groups, as well as commands to ease the creation of a few
1551 special-purpose groups.  All these commands insert the newly created
1552 groups under point---@code{gnus-subscribe-newsgroup-method} is not
1553 consulted.
1554
1555 @table @kbd
1556
1557 @item G m
1558 @kindex G m (Group)
1559 @findex gnus-group-make-group
1560 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
1561 for a name, a method and possibly an @dfn{address}.  For an easier way
1562 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
1563
1564 @item G r
1565 @kindex G r (Group)
1566 @findex gnus-group-rename-group
1567 Rename the current group to something else
1568 (@code{gnus-group-rename-group}).  This is legal only on some
1569 groups---mail groups mostly.  This command might very well be quite slow
1570 on some backends.
1571
1572 @item G e
1573 @kindex G e (Group)
1574 @findex gnus-group-edit-group-method
1575 Enter a buffer where you can edit the select method of the current
1576 group (@code{gnus-group-edit-group-method}).
1577
1578 @item G p
1579 @kindex G p (Group)
1580 @findex gnus-group-edit-group-parameters
1581 Enter a buffer where you can edit the group parameters
1582 (@code{gnus-group-edit-group-parameters}). 
1583
1584 @item G E
1585 @kindex G E (Group)
1586 @findex gnus-group-edit-group
1587 Enter a buffer where you can edit the group info
1588 (@code{gnus-group-edit-group}).
1589
1590 @item G d
1591 @kindex G d (Group)
1592 @findex gnus-group-make-directory-group
1593 Make a directory group.  You will be prompted for a directory name
1594 (@code{gnus-group-make-directory-group}).  
1595
1596 @item G h 
1597 @kindex G h (Group)
1598 @findex gnus-group-make-help-group
1599 Make the Gnus help group (@code{gnus-group-make-help-group}).
1600
1601 @item G a
1602 @kindex G a (Group)
1603 @findex gnus-group-make-archive-group
1604 @vindex gnus-group-archive-directory
1605 @vindex gnus-group-recent-archive-directory
1606 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
1607 default a group pointing to the most recent articles will be created
1608 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
1609 group will be created from @code{gnus-group-archive-directory}.
1610
1611 @item G k
1612 @kindex G k (Group)
1613 @findex gnus-group-make-kiboze-group
1614 Make a kiboze group.  You will be prompted for a name, for a regexp to
1615 match groups to be ``included'' in the kiboze group, and a series of
1616 strings to match on headers (@code{gnus-group-make-kiboze-group}).
1617 @xref{Kibozed Groups}
1618
1619 @item G D
1620 @kindex G D (Group)
1621 @findex gnus-group-enter-directory
1622 Read an arbitrary directory as if with were a newsgroup with the
1623 @code{nneething} backend (@code{gnus-group-enter-directory}).
1624
1625 @item G f
1626 @kindex G f (Group)
1627 @findex gnus-group-make-doc-group
1628 @cindex ClariNet Briefs
1629 Make a group based on some file or other
1630 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
1631 command, you will be prompted for a file name and a file type.
1632 Currently supported types are @code{babyl}, @code{mbox}, @code{digest},
1633 @code{mmdf}, @code{news}, @code{rnews}, @code{clari-briefs}, and
1634 @code{forward}.  If you run this command without a prefix, Gnus will
1635 guess at the file type.
1636
1637 @item G DEL
1638 @kindex G DEL (Group)
1639 @findex gnus-group-delete-group
1640 This function will delete the current group
1641 (@code{gnus-group-delete-group}).  If given a prefix, this function will
1642 actually delete all the articles in the group, and forcibly remove the
1643 group itself from the face of the Earth.  Use a prefix only if you are
1644 absolutely sure of what you are doing.
1645
1646 @item G V
1647 @kindex G V (Group)
1648 @findex gnus-group-make-empty-virtual
1649 Make a new, fresh, empty @code{nnvirtual} group
1650 (@code{gnus-group-make-empty-virtual}).
1651
1652 @item G v
1653 @kindex G v (Group)
1654 @findex gnus-group-add-to-virtual
1655 Add the current group to an @code{nnvirtual} group
1656 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
1657 @end table
1658
1659 @xref{Select Methods} for more information on the various select
1660 methods. 
1661
1662 @vindex gnus-activate-foreign-newsgroups
1663 If the @code{gnus-activate-foreign-newsgroups} is a positive number,
1664 Gnus will check all foreign groups with this level or lower at startup.
1665 This might take quite a while, especially if you subscribe to lots of
1666 groups from different @sc{nntp} servers.
1667
1668
1669 @node Group Parameters
1670 @section Group Parameters
1671 @cindex group parameters
1672
1673 Gnus stores all information on a group in a list that is usually known
1674 as the @dfn{group info}.  This list has from three to six elements.
1675 Here's an example info.
1676
1677 @lisp
1678 ("nnml:mail.ding" 3 ((1 . 232) 244 (256 . 270)) ((tick 246 249))
1679                   (nnml "private") ((to-address . "ding@@ifi.uio.no")))
1680 @end lisp
1681
1682 The first element is the @dfn{group name}, as Gnus knows the group,
1683 anyway.  The second element is the @dfn{subscription level}, which
1684 normally is a small integer.  The third element is a list of ranges of
1685 read articles.  The fourth element is a list of lists of article marks
1686 of various kinds.  The fifth element is the select method (or virtual
1687 server, if you like).  The sixth element is a list of @dfn{group
1688 parameters}, which is what this section is about.
1689
1690 Any of the last three elements may be missing if they are not required.
1691 In fact, the vast majority of groups will normally only have the first
1692 three elements, which saves quite a lot of cons cells.
1693
1694 The group parameters store information local to a particular group:
1695
1696 @table @code
1697 @item to-address
1698 @cindex to-address
1699 If the group parameter list contains an element that looks like
1700 @code{(to-address .  "some@@where.com")}, that address will be used by
1701 the backend when doing followups and posts.  This is primarily useful in
1702 mail groups that represent closed mailing lists---mailing lists where
1703 it's expected that everybody that writes to the mailing list is
1704 subscribed to it.  Since using this parameter ensures that the mail only
1705 goes to the mailing list itself, it means that members won't receive two
1706 copies of your followups.
1707
1708 Using @code{to-address} will actually work whether the group is foreign
1709 or not.  Let's say there's a group on the server that is called
1710 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
1711 the articles from a mail-to-news gateway.  Posting directly to this
1712 group is therefore impossible---you have to send mail to the mailing
1713 list address instead. 
1714
1715 @item to-list
1716 @cindex to-list
1717 If the group parameter list has an element that looks like
1718 @code{(to-list . "some@@where.com")}, that address will be used when
1719 doing a @kbd{a} in any group.  It is totally ignored when doing a
1720 followup---except that if it is present in a news group, you'll get mail
1721 group semantics when doing @kbd{f}.
1722
1723 @item broken-reply-to
1724 @cindex broken-reply-to
1725 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
1726 headers in this group are to be ignored.  This can be useful if you're
1727 reading a mailing list group where the listserv has inserted
1728 @code{Reply-To} headers that point back to the listserv itself.  This is
1729 broken behavior.  So there!
1730
1731 @item to-group
1732 @cindex to-group
1733 If the group parameter list contains an element like @code{(to-group
1734 . "some.group.name")}, all posts will be sent to that group.
1735
1736 @item gcc-self
1737 @cindex gcc-self
1738 If this symbol is present in the group parameter list, new composed
1739 messages will be @code{Gcc}'d to the current group.  
1740
1741 @item auto-expire
1742 @cindex auto-expire
1743 If this symbol is present in the group parameter list, all articles that
1744 are read will be marked as expirable.  For an alternative approach,
1745 @pxref{Expiring Mail}.
1746
1747 @item total-expire
1748 @cindex total-expire
1749 If this symbol is present, all read articles will be put through the
1750 expiry process, even if they are not marked as expirable.  Use with
1751 caution. 
1752
1753 @item expiry-wait
1754 @cindex expiry-wait
1755 @vindex nnmail-expiry-wait-function
1756 If the group parameter has an element that looks like @code{(expiry-wait
1757 . 10)}, this value will override any @code{nnmail-expiry-wait} and
1758 @code{nnmail-expiry-wait-function} when expiring expirable messages.
1759 The value can either be a number of days (not necessarily an integer) or
1760 the symbols @code{never} or @code{immediate}.
1761
1762 @item score-file
1763 @cindex score file group parameter
1764 Elements that look like @code{(score-file . "file")} will make
1765 @file{file} into the current score file for the group in question.  This
1766 means that all score commands you issue will end up in that file. 
1767
1768 @item adapt-file
1769 @cindex adapt file group parameter
1770 Elements that look like @code{(adapt-file . "file")} will make
1771 @file{file} into the current adaptive file for the group in question.
1772 All adaptive score entries will be put into this file.
1773
1774 @item admin-address
1775 When unsubscribing to a mailing list you should never send the
1776 unsubscription notice to the mailing list itself.  Instead, you'd send
1777 messages to the administrative address.  This parameter allows you to
1778 put the admin address somewhere convenient.
1779
1780 @item comment
1781 This parameter allows you to enter a arbitrary comment on the group.
1782
1783 @item @var{(variable form)}
1784 You can use the group parameters to set variables local to the group you
1785 are entering.  Say you want to turn threading off in
1786 @samp{news.answers}.  You'd then put @code{(gnus-show-threads nil)} in
1787 the group parameters of that group.  @code{gnus-show-threads} will be
1788 made into a local variable in the summary buffer you enter, and the form
1789 @code{nil} will be @code{eval}ed there.  
1790
1791 This can also be used as a group-specific hook function, if you'd like.
1792 If you want to hear a beep when you enter the group
1793 @samp{alt.binaries.pictures.furniture}, you could put something like
1794 @code{(dummy-variable (ding))} in the parameters of that group.
1795 @code{dummy-variable} will be set to the result of the @code{(ding)}
1796 form, but who cares?
1797
1798 @end table
1799
1800 Use the @kbd{G p} command to edit group parameters of a group.
1801
1802 Also @xref{Topic Parameters}.
1803
1804
1805 @node Listing Groups
1806 @section Listing Groups
1807 @cindex group listing
1808
1809 These commands all list various slices of the groups that are available.
1810
1811 @table @kbd
1812
1813 @item l
1814 @itemx A s
1815 @kindex A s (Group)
1816 @kindex l (Group)
1817 @findex gnus-group-list-groups
1818 List all groups that have unread articles
1819 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
1820 command will list only groups of level ARG and lower.  By default, it
1821 only lists groups of level five or lower (i.e., just subscribed groups).
1822
1823 @item L
1824 @itemx A u
1825 @kindex A u (Group)
1826 @kindex L (Group)
1827 @findex gnus-group-list-all-groups
1828 List all groups, whether they have unread articles or not
1829 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
1830 this command will list only groups of level ARG and lower.  By default,
1831 it lists groups of level seven or lower (i.e., just subscribed and
1832 unsubscribed groups).
1833
1834 @item A l
1835 @kindex A l (Group)
1836 @findex gnus-group-list-level
1837 List all unread groups on a specific level
1838 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
1839 with no unread articles.
1840
1841 @item A k
1842 @kindex A k (Group)
1843 @findex gnus-group-list-killed
1844 List all killed groups (@code{gnus-group-list-killed}).  If given a
1845 prefix argument, really list all groups that are available, but aren't
1846 currently (un)subscribed.  This could entail reading the active file
1847 from the server.
1848
1849 @item A z
1850 @kindex A z (Group)
1851 @findex gnus-group-list-zombies
1852 List all zombie groups (@code{gnus-group-list-zombies}).
1853
1854 @item A m
1855 @kindex A m (Group)
1856 @findex gnus-group-list-matching
1857 List all unread, subscribed groups with names that match a regexp
1858 (@code{gnus-group-list-matching}). 
1859
1860 @item A M
1861 @kindex A M (Group)
1862 @findex gnus-group-list-all-matching
1863 List groups that match a regexp (@code{gnus-group-list-all-matching}).
1864
1865 @item A A
1866 @kindex A A (Group)
1867 @findex gnus-group-list-active
1868 List absolutely all groups that are in the active file(s) of the
1869 server(s) you are connected to (@code{gnus-group-list-active}).  This
1870 might very well take quite a while.  It might actually be a better idea
1871 to do a @kbd{A m} to list all matching, and just give @samp{.} as the
1872 thing to match on.  Also note that this command may list group that
1873 don't exist (yet)---these will be listed as if they are killed groups.
1874 Take the output with some grains of salt.
1875
1876 @item A a
1877 @kindex A a (Group)
1878 @findex gnus-group-apropos
1879 List all groups that have names that match a regexp
1880 (@code{gnus-group-apropos}).
1881
1882 @item A d
1883 @kindex A d (Group)
1884 @findex gnus-group-description-apropos
1885 List all groups that have names or descriptions that match a regexp
1886 (@code{gnus-group-description-apropos}).
1887
1888 @end table
1889
1890 @vindex gnus-permanently-visible-groups
1891 @cindex visible group parameter
1892 Groups that match the @code{gnus-permanently-visible-groups} regexp will
1893 always be shown, whether they have unread articles or not.  You can also
1894 add the @code{visible} element to the group parameters in question to
1895 get the same effect.
1896
1897 @vindex gnus-list-groups-with-ticked-articles
1898 Groups that have just ticked articles in it are normally listed in the
1899 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
1900 @code{nil}, these groups will be treated just like totally empty
1901 groups.  It is @code{t} by default.
1902
1903
1904 @node Sorting Groups
1905 @section Sorting Groups
1906 @cindex sorting groups
1907
1908 @kindex C-c C-s (Group)
1909 @findex gnus-group-sort-groups
1910 @vindex gnus-group-sort-function
1911 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
1912 group buffer according to the function(s) given by the
1913 @code{gnus-group-sort-function} variable.  Available sorting functions
1914 include: 
1915
1916 @table @code
1917
1918 @item gnus-group-sort-by-alphabet
1919 @findex gnus-group-sort-by-alphabet
1920 Sort the group names alphabetically.  This is the default.
1921
1922 @item gnus-group-sort-by-level
1923 @findex gnus-group-sort-by-level
1924 Sort by group level.
1925
1926 @item gnus-group-sort-by-score
1927 @findex gnus-group-sort-by-score
1928 Sort by group score.
1929
1930 @item gnus-group-sort-by-rank
1931 @findex gnus-group-sort-by-rank
1932 Sort by group score and then the group level.  The level and the score
1933 are, when taken together, the group's @dfn{rank}. 
1934
1935 @item gnus-group-sort-by-unread
1936 @findex gnus-group-sort-by-unread
1937 Sort by number of unread articles.
1938
1939 @item gnus-group-sort-by-method
1940 @findex gnus-group-sort-by-method
1941 Sort by alphabetically on the select method.
1942
1943
1944 @end table
1945
1946 @code{gnus-group-sort-function} can also be a list of sorting
1947 functions.  In that case, the most significant sort key function must be
1948 the last one.
1949
1950
1951 There are also a number of commands for sorting directly according to
1952 some sorting criteria:
1953
1954 @table @kbd
1955 @item G S a
1956 @kindex G S a (Group)
1957 @findex gnus-group-sort-groups-by-alphabet
1958 Sort the group buffer alphabetically by group name
1959 (@code{gnus-group-sort-groups-by-alphabet}). 
1960
1961 @item G S u
1962 @kindex G S u (Group)
1963 @findex gnus-group-sort-groups-by-unread
1964 Sort the group buffer by the number of unread articles
1965 (@code{gnus-group-sort-groups-by-unread}).
1966
1967 @item G S l
1968 @kindex G S l (Group)
1969 @findex gnus-group-sort-groups-by-level
1970 Sort the group buffer by group level
1971 (@code{gnus-group-sort-groups-by-level}). 
1972
1973 @item G S v
1974 @kindex G S v (Group)
1975 @findex gnus-group-sort-groups-by-score
1976 Sort the group buffer by group score
1977 (@code{gnus-group-sort-groups-by-score}). 
1978
1979 @item G S r
1980 @kindex G S r (Group)
1981 @findex gnus-group-sort-groups-by-rank
1982 Sort the group buffer by group level
1983 (@code{gnus-group-sort-groups-by-rank}). 
1984
1985 @item G S m
1986 @kindex G S m (Group)
1987 @findex gnus-group-sort-groups-by-method
1988 Sort the group buffer alphabetically by backend name
1989 (@code{gnus-group-sort-groups-by-method}). 
1990
1991 @end table
1992
1993 When given a prefix, all these commands will sort in reverse order. 
1994
1995
1996 @node Group Maintenance
1997 @section Group Maintenance
1998 @cindex bogus groups
1999
2000 @table @kbd
2001 @item b
2002 @kindex b (Group)
2003 @findex gnus-group-check-bogus-groups
2004 Find bogus groups and delete them
2005 (@code{gnus-group-check-bogus-groups}).
2006
2007 @item F
2008 @kindex F (Group)
2009 @findex gnus-find-new-newsgroups
2010 Find new groups and process them (@code{gnus-find-new-newsgroups}).  If
2011 given a prefix, use the @code{ask-server} method to query the server for
2012 new groups.
2013
2014 @item C-c C-x
2015 @kindex C-c C-x (Group)
2016 @findex gnus-group-expire-articles
2017 Run all expirable articles in the current group through the expiry
2018 process (if any) (@code{gnus-group-expire-articles}).
2019
2020 @item C-c M-C-x
2021 @kindex C-c M-C-x (Group)
2022 @findex gnus-group-expire-all-groups
2023 Run all articles in all groups through the expiry process
2024 (@code{gnus-group-expire-all-groups}).
2025
2026 @end table
2027
2028
2029 @node Browse Foreign Server
2030 @section Browse Foreign Server
2031 @cindex foreign servers
2032 @cindex browsing servers
2033
2034 @table @kbd
2035 @item B
2036 @kindex B (Group)
2037 @findex gnus-group-browse-foreign-server
2038 You will be queried for a select method and a server name.  Gnus will
2039 then attempt to contact this server and let you browse the groups there
2040 (@code{gnus-group-browse-foreign-server}).
2041 @end table
2042
2043 @findex gnus-browse-mode
2044 A new buffer with a list of available groups will appear.  This buffer
2045 will be use the @code{gnus-browse-mode}.  This buffer looks a bit
2046 (well, a lot) like a normal group buffer, but with one major difference
2047 - you can't enter any of the groups.  If you want to read any of the
2048 news available on that server, you have to subscribe to the groups you
2049 think may be interesting, and then you have to exit this buffer.  The
2050 new groups will be added to the group buffer, and then you can read them
2051 as you would any other group.
2052
2053 Future versions of Gnus may possibly permit reading groups straight from
2054 the browse buffer.
2055
2056 Here's a list of keystrokes available in the browse mode:
2057
2058 @table @kbd
2059 @item n
2060 @kindex n (Browse)
2061 @findex gnus-group-next-group
2062 Go to the next group (@code{gnus-group-next-group}).
2063
2064 @item p
2065 @kindex p (Browse)
2066 @findex gnus-group-prev-group
2067 Go to the previous group (@code{gnus-group-prev-group}).
2068
2069 @item SPACE
2070 @kindex SPACE (Browse)
2071 @findex gnus-browse-read-group
2072 Enter the current group and display the first article
2073 (@code{gnus-browse-read-group}). 
2074
2075 @item RET
2076 @kindex RET (Browse)
2077 @findex gnus-browse-select-group
2078 Enter the current group (@code{gnus-browse-select-group}). 
2079
2080 @item u
2081 @kindex u (Browse)
2082 @findex gnus-browse-unsubscribe-current-group
2083 Unsubscribe to the current group, or, as will be the case here,
2084 subscribe to it (@code{gnus-browse-unsubscribe-current-group}). 
2085
2086 @item l
2087 @itemx q
2088 @kindex q (Browse)
2089 @kindex l (Browse)
2090 @findex gnus-browse-exit
2091 Exit browse mode (@code{gnus-browse-exit}).
2092
2093 @item ?
2094 @kindex ? (Browse)
2095 @findex gnus-browse-describe-briefly
2096 Describe browse mode briefly (well, there's not much to describe, is
2097 there) (@code{gnus-browse-describe-briefly}).
2098 @end table
2099
2100
2101 @node Exiting Gnus
2102 @section Exiting Gnus
2103 @cindex exiting Gnus
2104
2105 Yes, Gnus is ex(c)iting.
2106
2107 @table @kbd
2108 @item z
2109 @kindex z (Group)
2110 @findex gnus-group-suspend
2111 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
2112 but it kills all buffers except the Group buffer.  I'm not sure why this
2113 is a gain, but then who am I to judge?
2114
2115 @item q
2116 @kindex q (Group)
2117 @findex gnus-group-exit
2118 Quit Gnus (@code{gnus-group-exit}).
2119
2120 @item Q
2121 @kindex Q (Group)
2122 @findex gnus-group-quit
2123 Quit Gnus without saving any startup files (@code{gnus-group-quit}).
2124 @end table
2125
2126 @vindex gnus-exit-gnus-hook
2127 @vindex gnus-suspend-gnus-hook
2128 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
2129 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
2130 @code{gnus-after-exiting-gnus-hook} is called as the final item when
2131 exiting Gnus.
2132
2133 @findex gnus-unload
2134 @cindex unloading
2135 If you wish to completely unload Gnus and all its adherents, you can use
2136 the @code{gnus-unload} command.  This command is also very handy when
2137 trying to customize meta-variables.
2138
2139 Note:
2140
2141 @quotation
2142 Miss Lisa Cannifax, while sitting in English class, feels her feet go
2143 numbly heavy and herself fall into a hazy trance as the boy sitting
2144 behind her drew repeated lines with his pencil across the back of her
2145 plastic chair.
2146 @end quotation
2147
2148
2149 @node Group Topics
2150 @section Group Topics
2151 @cindex topics
2152
2153 If you read lots and lots of groups, it might be convenient to group
2154 them hierarchically according to topics.  You put your Emacs groups over
2155 here, your sex groups over there, and the rest (what, two groups or so?)
2156 you put in some misc section that you never bother with anyway.  You can
2157 even group the Emacs sex groups as a sub-topic to either the Emacs
2158 groups or the sex groups---or both!  Go wild!
2159
2160 @findex gnus-topic-mode
2161 @kindex t (Group)
2162 To get this @emph{fab} functionality you simply turn on (ooh!) the
2163 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
2164 is a toggling command.)
2165
2166 Go ahead, just try it.  I'll still be here when you get back.  La de
2167 dum...  Nice tune, that...  la la la...  What, you're back? Yes, and now
2168 press @kbd{l}.  There.  All your groups are now listed under
2169 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
2170 bothered?
2171
2172 If you want this permanently enabled, you should add that minor mode to
2173 the hook for the group mode:
2174
2175 @lisp
2176 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
2177 @end lisp
2178
2179 @menu 
2180 * Topic Variables::    How to customize the topics the Lisp Way.
2181 * Topic Commands::     Interactive E-Z commands.
2182 * Topic Topology::     A map of the world.
2183 * Topic Parameters::   Parameters that apply to all groups in a topic.
2184 @end menu
2185
2186
2187 @node Topic Variables
2188 @subsection Topic Variables
2189 @cindex topic variables
2190
2191 Now, if you select a topic, if will fold/unfold that topic, which is
2192 really neat, I think.
2193
2194 @vindex gnus-topic-line-format
2195 The topic lines themselves are created according to the
2196 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
2197 Legal elements are:
2198
2199 @table @samp
2200 @item i
2201 Indentation.
2202 @item n
2203 Topic name.
2204 @item v
2205 Visibility.
2206 @item l
2207 Level.
2208 @item g
2209 Number of groups in the topic.
2210 @item a
2211 Number of unread articles in the topic.
2212 @item A 
2213 Number of unread articles in the topic and all its subtopics. 
2214 @end table
2215
2216 @vindex gnus-topic-indent-level
2217 Each sub-topic (and the groups in the sub-topics) will be indented with
2218 @code{gnus-topic-indent-level} times the topic level number of spaces.
2219 The default is @code{2}.
2220
2221 @vindex gnus-topic-mode-hook
2222 @code{gnus-topic-mode-hook} is called in topic minor mode buffers. 
2223
2224
2225 @node Topic Commands
2226 @subsection Topic Commands
2227 @cindex topic commands
2228
2229 When the topic minor mode is turned on, a new @kbd{T} submap will be
2230 available.  In addition, a few of the standard keys change their
2231 definitions slightly.
2232
2233 @table @kbd
2234
2235 @item T n
2236 @kindex T n (Topic)
2237 @findex gnus-topic-create-topic
2238 Prompt for a new topic name and create it 
2239 (@code{gnus-topic-create-topic}). 
2240
2241 @item T m
2242 @kindex T m (Topic)
2243 @findex gnus-topic-move-group
2244 Move the current group to some other topic
2245 (@code{gnus-topic-move-group}).  This command understands the
2246 process/prefix convention (@pxref{Process/Prefix}).
2247
2248 @item T c
2249 @kindex T c (Topic)
2250 @findex gnus-topic-copy-group
2251 Copy the current group to some other topic
2252 (@code{gnus-topic-copy-group}).  This command understands the
2253 process/prefix convention (@pxref{Process/Prefix}).
2254
2255 @item T D
2256 @kindex T D (Topic)
2257 @findex gnus-topic-remove-group
2258 Remove a group from the current topic (@code{gnus-topic-remove-group}).
2259 This command understands the process/prefix convention
2260 (@pxref{Process/Prefix}).
2261
2262 @item T M
2263 @kindex T M (Topic)
2264 @findex gnus-topic-move-matching
2265 Move all groups that match some regular expression to a topic
2266 (@code{gnus-topic-move-matching}). 
2267
2268 @item T C
2269 @kindex T C (Topic)
2270 @findex gnus-topic-copy-matching
2271 Copy all groups that match some regular expression to a topic
2272 (@code{gnus-topic-copy-matching}). 
2273
2274 @item T #
2275 @kindex T # (Topic)
2276 @findex gnus-topic-mark-topic
2277 Mark all groups in the current topic with the process mark
2278 (@code{gnus-topic-mark-topic}). 
2279
2280 @item T M-#
2281 @kindex T M-# (Topic)
2282 @findex gnus-topic-unmark-topic
2283 Remove the process mark from all groups in the current topic
2284 (@code{gnus-topic-unmark-topic}). 
2285
2286 @item RET
2287 @kindex RET (Topic)
2288 @findex gnus-topic-select-group
2289 @itemx SPACE
2290 Either select a group or fold a topic (@code{gnus-topic-select-group}).
2291 When you perform this command on a group, you'll enter the group, as
2292 usual.  When done on a topic line, the topic will be folded (if it was
2293 visible) or unfolded (if it was folded already).  So it's basically a
2294 toggling command on topics.  In addition, if you give a numerical
2295 prefix, group on that level (and lower) will be displayed.
2296
2297 @item T TAB
2298 @kindex T TAB (Topic)
2299 @findex gnus-topic-indent
2300 ``Indent'' the current topic so that it becomes a sub-topic of the
2301 previous topic (@code{gnus-topic-indent}).  If given a prefix,
2302 ``un-indent'' the topic instead.
2303
2304 @item C-k
2305 @kindex C-k (Topic)
2306 @findex gnus-topic-kill-group
2307 Kill a group or topic (@code{gnus-topic-kill-group}).  
2308
2309 @item C-y
2310 @kindex C-y (Topic)
2311 @findex gnus-topic-yank-group
2312 Yank the previously killed group or topic (@code{gnus-topic-yank-group}).
2313 Note that all topics will be yanked before all groups.
2314
2315 @item T r
2316 @kindex T r (Topic)
2317 @findex gnus-topic-rename
2318 Rename a topic (@code{gnus-topic-rename}). 
2319
2320 @item T DEL
2321 @kindex T DEL (Topic)
2322 @findex gnus-topic-delete
2323 Delete an empty topic (@code{gnus-topic-delete}). 
2324
2325 @item A T
2326 @kindex A T (Topic)
2327 @findex gnus-topic-list-active
2328 List all groups that Gnus knows about in a topics-ified way
2329 (@code{gnus-topic-list-active}).
2330
2331 @item G p
2332 @kindex G p (Topic)
2333 @findex gnus-topic-edit-parameters
2334 @cindex group parameters
2335 @cindex topic parameters
2336 @cindex parameters
2337 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
2338 @xref{Topic Parameters}.
2339
2340 @end table
2341
2342
2343 @node Topic Topology
2344 @subsection Topic Topology
2345 @cindex topic topology
2346 @cindex topology
2347
2348 So, let's have a look at an example group buffer:
2349
2350 @example
2351 Gnus
2352   Emacs -- I wuw it!
2353      3: comp.emacs
2354      2: alt.religion.emacs
2355     Naughty Emacs
2356      452: alt.sex.emacs
2357        0: comp.talk.emacs.recovery
2358   Misc
2359      8: comp.binaries.fractals
2360     13: comp.sources.unix
2361 @end example
2362
2363 So, here we have one top-level topic, two topics under that, and one
2364 sub-topic under one of the sub-topics.  (There is always just one (1)
2365 top-level topic).  This topology can be expressed as follows:
2366
2367 @lisp
2368 (("Gnus" visible)
2369  (("Emacs -- I wuw it!" visible) 
2370   (("Naughty Emacs" visible)))
2371  (("Misc" visible)))
2372 @end lisp
2373
2374 @vindex gnus-topic-topology
2375 This is in fact how the variable @code{gnus-topic-topology} would look
2376 for the display above.  That variable is saved in the @file{.newsrc.eld}
2377 file, and shouldn't be messed with manually---unless you really want
2378 to.  Since this variable is read from the @file{.newsrc.eld} file,
2379 setting it in any other startup files will have no effect.  
2380
2381 This topology shows what topics are sub-topics of what topics (right),
2382 and which topics are visible.  Two settings are currently
2383 allowed---@code{visible} and @code{invisible}.
2384
2385
2386 @node Topic Parameters
2387 @subsection Topic Parameters
2388
2389 All groups in a topic will inherit group parameters from the parent (and
2390 ancestor) topic parameters.  All legal group parameters are legal topic
2391 parameters (@pxref{Group Parameters}).  
2392
2393 Group parameters (of course) override topic parameters, and topic
2394 parameters in sub-topics override topic parameters in super-topics.  You
2395 know.  Normal inheretance rules.  (@dfn{Rules} is here a noun, not a
2396 verb, although you may feel free to disagree with me here.)
2397
2398 @example
2399 Gnus
2400   Emacs
2401      3: comp.emacs
2402      2: alt.religion.emacs
2403    452: alt.sex.emacs
2404     Relief
2405      452: alt.sex.emacs
2406        0: comp.talk.emacs.recovery
2407   Misc
2408      8: comp.binaries.fractals
2409     13: comp.sources.unix
2410    452: alt.sex.emacs
2411 @end example
2412
2413 Now, the @samp{Emacs} topic has the topic parameter 
2414 @code{(score-file . "emacs.SCORE")}; the @samp{Relief} topic has the topic
2415 parameter @code{(score-file . "relief.SCORE")}; and the @samp{Misc}
2416 topic has the topic parameter @code{(score-file . "emacs.SCORE")}.  In
2417 addition, @samp{alt.religion.emacs} has the group parameter
2418 @code{(score-file . "religion.SCORE")}.
2419
2420 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
2421 will get the @file{relief.SCORE} home score file.  If you enter the same
2422 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
2423 score file.  If you enter @samp{alt.religion.emacs}, you'll get the
2424 @file{religion.SCORE} home score file.  
2425
2426 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
2427 there are some problems, especially with the @code{total-expiry}
2428 parameter.  Say you have a mail group in two topics; one with
2429 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
2430 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
2431 of these topics you mean to expire articles from, so anything may
2432 happen.  In fact, I hereby declare that it is @dfn{undefined} what
2433 happens.  You just have to be careful if you do stuff like that.
2434
2435
2436 @node Misc Group Stuff
2437 @section Misc Group Stuff
2438
2439 @menu
2440 * Scanning New Messages:: Asking Gnus to see whether new messages have arrived.
2441 * Group Information::     Information and help on groups and Gnus.
2442 * File Commands::         Reading and writing the Gnus files.
2443 @end menu
2444
2445 @table @kbd
2446
2447 @item ^
2448 @kindex ^ (Group)
2449 @findex gnus-group-enter-server-mode
2450 Enter the server buffer (@code{gnus-group-enter-server-mode}). @xref{The
2451 Server Buffer}.
2452
2453 @item a
2454 @kindex a (Group)
2455 @findex gnus-group-post-news
2456 Post an article to a group (@code{gnus-group-post-news}).  The current
2457 group name will be used as the default.
2458
2459 @item m
2460 @kindex m (Group)
2461 @findex gnus-group-mail
2462 Mail a message somewhere (@code{gnus-group-mail}).
2463
2464 @end table
2465
2466 Variables for the group buffer:
2467
2468 @table @code
2469
2470 @item gnus-group-mode-hook
2471 @vindex gnus-group-mode-hook
2472 @code{gnus-group-mode-hook} is called after the group buffer has been
2473 created. 
2474
2475 @item gnus-group-prepare-hook
2476 @vindex gnus-group-prepare-hook
2477 @code{gnus-group-prepare-hook} is called after the group buffer is
2478 generated.  It may be used to modify the buffer in some strange,
2479 unnatural way.
2480
2481 @item gnus-permanently-visible-groups
2482 @vindex gnus-permanently-visible-groups
2483 Groups matching this regexp will always be listed in the group buffer,
2484 whether they are empty or not.
2485
2486 @end table
2487
2488
2489 @node Scanning New Messages
2490 @subsection Scanning New Messages
2491 @cindex new messages
2492 @cindex scanning new news
2493
2494 @table @kbd
2495
2496 @item g
2497 @kindex g (Group)
2498 @findex gnus-group-get-new-news
2499 Check the server(s) for new articles.  If the numerical prefix is used,
2500 this command will check only groups of level @var{arg} and lower
2501 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
2502 command will force a total rereading of the active file(s) from the
2503 backend(s).
2504
2505 @item M-g
2506 @kindex M-g (Group)
2507 @findex gnus-group-get-new-news-this-group
2508 @vindex gnus-goto-next-group-when-activating
2509 Check whether new articles have arrived in the current group
2510 (@code{gnus-group-get-new-news-this-group}).  The
2511 @code{gnus-goto-next-group-when-activating} variable controls whether
2512 this command is to move point to the next group or not.  It is @code{t}
2513 by default.
2514
2515 @findex gnus-activate-all-groups
2516 @cindex activating groups
2517 @item C-c M-g
2518 @kindex C-c M-g (Group)
2519 Activate absolutely all groups (@code{gnus-activate-all-groups}). 
2520
2521 @item R
2522 @kindex R (Group)
2523 @cindex restarting
2524 @findex gnus-group-restart
2525 Restart Gnus (@code{gnus-group-restart}).
2526
2527 @end table
2528
2529 @vindex gnus-get-new-news-hook
2530 @code{gnus-get-new-news-hook} is run just before checking for new news. 
2531
2532 @vindex gnus-after-getting-new-news-hook
2533 @code{gnus-after-getting-new-news-hook} is run after checking for new
2534 news.
2535
2536
2537 @node Group Information
2538 @subsection Group Information
2539 @cindex group information
2540 @cindex information on groups
2541
2542 @table @kbd
2543
2544 @item M-f
2545 @kindex M-f (Group)
2546 @findex gnus-group-fetch-faq
2547 @cindex FAQ
2548 @cindex ange-ftp
2549 Try to fetch the FAQ for the current group
2550 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
2551 @code{gnus-group-faq-directory}, which is usually a directory on a
2552 remote machine.  @code{ange-ftp} will be used for fetching the file.
2553
2554 @item D
2555 @kindex D (Group)
2556 @cindex describing groups
2557 @cindex group description
2558 @findex gnus-group-describe-group
2559 Describe the current group (@code{gnus-group-describe-group}).  If given
2560 a prefix, force Gnus to re-read the description from the server.
2561
2562 @item M-d
2563 @kindex M-d (Group)
2564 @findex gnus-group-describe-all-groups
2565 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
2566 prefix, force Gnus to re-read the description file from the server.
2567
2568 @item V
2569 @kindex V (Group)
2570 @cindex version
2571 @findex gnus-version
2572 Display current Gnus version numbers (@code{gnus-version}).
2573
2574 @item ?
2575 @kindex ? (Group)
2576 @findex gnus-group-describe-briefly
2577 Give a very short help message (@code{gnus-group-describe-briefly}).
2578
2579 @item C-c C-i
2580 @kindex C-c C-i (Group)
2581 @cindex info
2582 @cindex manual
2583 @findex gnus-info-find-node
2584 Go to the Gnus info node (@code{gnus-info-find-node}).
2585 @end table
2586
2587
2588 @node File Commands
2589 @subsection File Commands
2590 @cindex file commands
2591
2592 @table @kbd
2593
2594 @item r
2595 @kindex r (Group)
2596 @findex gnus-group-read-init-file
2597 @vindex gnus-init-file
2598 @cindex reading init file
2599 Read the init file (@code{gnus-init-file}, which defaults to
2600 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
2601
2602 @item s
2603 @kindex s (Group)
2604 @findex gnus-group-save-newsrc
2605 @cindex saving .newsrc
2606 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
2607 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
2608 file(s) whether Gnus thinks it is necessary or not.
2609
2610 @c @item Z
2611 @c @kindex Z (Group)
2612 @c @findex gnus-group-clear-dribble
2613 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
2614
2615 @end table
2616
2617
2618 @node The Summary Buffer
2619 @chapter The Summary Buffer
2620 @cindex summary buffer
2621
2622 A line for each article is displayed in the summary buffer.  You can
2623 move around, read articles, post articles and reply to articles.
2624
2625 @menu
2626 * Summary Buffer Format::       Deciding how the summary buffer is to look.
2627 * Summary Maneuvering::         Moving around the summary buffer.
2628 * Choosing Articles::           Reading articles.
2629 * Paging the Article::          Scrolling the current article.
2630 * Reply Followup and Post::     Posting articles.
2631 * Canceling and Superseding::   ``Whoops, I shouldn't have called him that.''
2632 * Marking Articles::            Marking articles as read, expirable, etc.
2633 * Limiting::                    You can limit the summary buffer.
2634 * Threading::                   How threads are made.
2635 * Sorting::                     How articles and threads are sorted.
2636 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
2637 * Article Caching::             You may store articles in a cache.
2638 * Persistent Articles::         Making articles expiry-resistant.
2639 * Article Backlog::             Having already read articles hang around.
2640 * Saving Articles::             Ways of customizing article saving.
2641 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
2642 * Article Treatment::           The article buffer can be mangled at will.
2643 * Summary Sorting::             Sorting the summary buffer in various ways.
2644 * Finding the Parent::          No child support? Get the parent.
2645 * Alternative Approaches::      Reading using non-default summaries.
2646 * Tree Display::                A more visual display of threads.
2647 * Mail Group Commands::         Some commands can only be used in mail groups.
2648 * Various Summary Stuff::       What didn't fit anywhere else.
2649 * Exiting the Summary Buffer::  Returning to the Group buffer.
2650 * Crosspost Handling::          How crossposted articles are dealt with.
2651 * Duplicate Suppression::       An alternative when crosspost handling fails.
2652 @end menu
2653
2654
2655 @node Summary Buffer Format
2656 @section Summary Buffer Format
2657 @cindex summary buffer format
2658
2659 @menu
2660 * Summary Buffer Lines::     You can specify how summary lines should look.
2661 * Summary Buffer Mode Line:: You can say how the mode line should look.
2662 * Summary Highlighting::     Making the summary buffer all pretty and nice.
2663 @end menu
2664
2665 @findex mail-extract-address-components
2666 @findex gnus-extract-address-components
2667 @vindex gnus-extract-address-components
2668 Gnus will use the value of the @code{gnus-extract-address-components}
2669 variable as a function for getting the name and address parts of a
2670 @code{From} header.  Two pre-defined function exist:
2671 @code{gnus-extract-address-components}, which is the default, quite
2672 fast, and too simplistic solution; and
2673 @code{mail-extract-address-components}, which works very nicely, but is
2674 slower.  The default function will return the wrong answer in 5% of the
2675 cases.  If this is unacceptable to you, use the other function instead.
2676
2677 @vindex gnus-summary-same-subject
2678 @code{gnus-summary-same-subject} is a string indicating that the current
2679 article has the same subject as the previous.  This string will be used
2680 with those specs that require it.  The default is @samp{}.
2681
2682
2683 @node Summary Buffer Lines
2684 @subsection Summary Buffer Lines
2685
2686 @vindex gnus-summary-line-format
2687 You can change the format of the lines in the summary buffer by changing
2688 the @code{gnus-summary-line-format} variable.  It works along the same
2689 lines a a normal @code{format} string, with some extensions
2690 (@pxref{Formatting Variables}).
2691
2692 The default string is @samp{%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n}.
2693
2694 The following format specification characters are understood:
2695
2696 @table @samp
2697 @item N 
2698 Article number.
2699 @item S
2700 Subject string.
2701 @item s
2702 Subject if the article is the root or the previous article had a
2703 different subject, @code{gnus-summary-same-subject} otherwise.
2704 (@code{gnus-summary-same-subject} defaults to @samp{}.)
2705 @item F
2706 Full @code{From} header.
2707 @item n
2708 The name (from the @code{From} header).
2709 @item a
2710 The name (from the @code{From} header).  This differs from the @code{n}
2711 spec in that it uses @code{gnus-extract-address-components}, which is
2712 slower, but may be more thorough.
2713 @item A
2714 The address (from the @code{From} header).  This works the same way as
2715 the @code{a} spec.
2716 @item L
2717 Number of lines in the article.
2718 @item c
2719 Number of characters in the article.
2720 @item I
2721 Indentation based on thread level (@pxref{Customizing Threading}).
2722 @item T
2723 Nothing if the article is a root and lots of spaces if it isn't (it
2724 pushes everything after it off the screen).
2725 @item \[
2726 Opening bracket, which is normally @samp{\[}, but can also be @samp{<}
2727 for adopted articles (@pxref{Customizing Threading}).
2728 @item \]
2729 Closing bracket, which is normally @samp{\]}, but can also be @samp{>}
2730 for adopted articles.
2731 @item >
2732 One space for each thread level.
2733 @item <
2734 Twenty minus thread level spaces.
2735 @item U
2736 Unread.
2737 @item R
2738 Replied.
2739 @item i
2740 Score as a number.
2741 @item z
2742 @vindex gnus-summary-zcore-fuzz
2743 Zcore, @samp{+} if above the default level and @samp{-} if below the
2744 default level.  If the difference between
2745 @code{gnus-summary-default-level} and the score is less than
2746 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
2747 @item V
2748 Total thread score.
2749 @item x
2750 @code{Xref}.
2751 @item D
2752 @code{Date}.
2753 @item d
2754 The @code{Date} in @code{YY-MMM} format.
2755 @item o
2756 The @code{Date} in @code{YYYYMMDDTHHMMSS} format.
2757 @item M
2758 @code{Message-ID}.
2759 @item r
2760 @code{References}.
2761 @item t
2762 Number of articles in the current sub-thread.  Using this spec will slow
2763 down summary buffer generation somewhat.
2764 @item e
2765 A single character will be displayed if the article has any children. 
2766 @item P
2767 The line number.
2768 @item u
2769 User defined specifier.  The next character in the format string should
2770 be a letter.  @sc{gnus} will call the function
2771 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
2772 following @samp{%u}.  The function will be passed the current header as
2773 argument.  The function should return a string, which will be inserted
2774 into the summary just like information from any other summary specifier.
2775 @end table
2776
2777 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
2778 have to be handled with care.  For reasons of efficiency, Gnus will
2779 compute what column these characters will end up in, and ``hard-code''
2780 that.  This means that it is illegal to have these specs after a
2781 variable-length spec.  Well, you might not be arrested, but your summary
2782 buffer will look strange, which is bad enough.
2783
2784 The smart choice is to have these specs as far to the left as possible.
2785 (Isn't that the case with everything, though?  But I digress.)
2786
2787 This restriction may disappear in later versions of Gnus.
2788
2789
2790 @node Summary Buffer Mode Line
2791 @subsection Summary Buffer Mode Line
2792
2793 @vindex gnus-summary-mode-line-format
2794 You can also change the format of the summary mode bar.  Set
2795 @code{gnus-summary-mode-line-format} to whatever you like.  Here are the
2796 elements you can play with:
2797
2798 @table @samp
2799 @item G
2800 Group name.
2801 @item p
2802 Unprefixed group name.
2803 @item A
2804 Current article number.
2805 @item V
2806 Gnus version.
2807 @item U
2808 Number of unread articles in this group.
2809 @item e
2810 Number of unselected articles in this group.
2811 @item Z
2812 A string with the number of unread and unselected articles represented
2813 either as @samp{<%U(+%u) more>} if there are both unread and unselected
2814 articles, and just as @samp{<%U more>} if there are just unread articles
2815 and no unselected ones.
2816 @item g
2817 Shortish group name.  For instance, @samp{rec.arts.anime} will be
2818 shortened to @samp{r.a.anime}. 
2819 @item S
2820 Subject of the current article.
2821 @item u
2822 Used-defined spec.
2823 @item s
2824 Name of the current score file.
2825 @item d
2826 Number of dormant articles.
2827 @item t
2828 Number of ticked articles.
2829 @item r
2830 Number of articles that have been marked as read in this session. 
2831 @item E
2832 Number of articles expunged by the score files.
2833 @end table
2834
2835
2836 @node Summary Highlighting
2837 @subsection Summary Highlighting
2838
2839 @table @code
2840
2841 @item gnus-visual-mark-article-hook
2842 @vindex gnus-visual-mark-article-hook
2843 This hook is run after selecting an article.  It is meant to be used for
2844 highlighting the article in some way.  It is not run if
2845 @code{gnus-visual} is @code{nil}.
2846
2847 @item gnus-summary-update-hook
2848 @vindex gnus-summary-update-hook
2849 This hook is called when a summary line is changed.  It is not run if
2850 @code{gnus-visual} is @code{nil}.
2851
2852 @item gnus-summary-selected-face
2853 @vindex gnus-summary-selected-face
2854 This is the face (or @dfn{font} as some people call it) that is used to
2855 highlight the current article in the summary buffer.
2856
2857 @item gnus-summary-highlight
2858 @vindex gnus-summary-highlight
2859 Summary lines are highlighted according to this variable, which is a
2860 list where the elements are on the format @code{(FORM . FACE)}.  If you
2861 would, for instance, like ticked articles to be italic and high-scored
2862 articles to be bold, you could set this variable to something like
2863 @lisp
2864 (((eq mark gnus-ticked-mark) . italic)
2865  ((> score default) . bold))
2866 @end lisp
2867 As you may have guessed, if @var{FORM} returns a non-@code{nil} value,
2868 @var{FACE} will be applied to the line.
2869 @end table
2870
2871
2872 @node Summary Maneuvering
2873 @section Summary Maneuvering
2874 @cindex summary movement
2875
2876 All the straight movement commands understand the numeric prefix and
2877 behave pretty much as you'd expect. 
2878
2879 None of these commands select articles.
2880
2881 @table @kbd
2882 @item G M-n
2883 @itemx M-n
2884 @kindex M-n (Summary)
2885 @kindex G M-n (Summary)
2886 @findex gnus-summary-next-unread-subject
2887 Go to the next summary line of an unread article
2888 (@code{gnus-summary-next-unread-subject}). 
2889
2890 @item G M-p
2891 @itemx M-p
2892 @kindex M-p (Summary)
2893 @kindex G M-p (Summary)
2894 @findex gnus-summary-prev-unread-subject
2895 Go to the previous summary line of an unread article
2896 (@code{gnus-summary-prev-unread-subject}). 
2897
2898 @item G j
2899 @itemx j
2900 @kindex j (Summary)
2901 @kindex G j (Summary)
2902 @findex gnus-summary-goto-article
2903 Ask for an article number and then go that article
2904 (@code{gnus-summary-goto-article}). 
2905
2906 @item G g
2907 @kindex G g (Summary)
2908 @findex gnus-summary-goto-subject
2909 Ask for an article number and then go the summary line of that article
2910 (@code{gnus-summary-goto-subject}).
2911 @end table
2912
2913 If Gnus asks you to press a key to confirm going to the next group, you
2914 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
2915 buffer, searching for the next group to read without actually returning
2916 to the group buffer.
2917
2918 Variables related to summary movement:
2919
2920 @table @code
2921
2922 @vindex gnus-auto-select-next
2923 @item gnus-auto-select-next
2924 If you are at the end of the group and issue one of the movement
2925 commands, Gnus will offer to go to the next group.  If this variable is
2926 @code{t} and the next group is empty, Gnus will exit summary mode and
2927 return to the group buffer.  If this variable is neither @code{t} nor
2928 @code{nil}, Gnus will select the next group, no matter whether it has
2929 any unread articles or not.  As a special case, if this variable is
2930 @code{quietly}, Gnus will select the next group without asking for
2931 confirmation.  If this variable is @code{almost-quietly}, the same will
2932 happen only if you are located on the last article in the group.
2933 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
2934 command will go to the next group without confirmation.  Also
2935 @pxref{Group Levels}.
2936
2937 @item gnus-auto-select-same
2938 @vindex gnus-auto-select-same
2939 If non-@code{nil}, all the movement commands will try to go to the next
2940 article with the same subject as the current.  (@dfn{Same} here might
2941 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
2942 for details (@pxref{Customizing Threading}).)  This variable is not
2943 particularly useful if you use a threaded display.
2944
2945 @item gnus-summary-check-current
2946 @vindex gnus-summary-check-current
2947 If non-@code{nil}, all the ``unread'' movement commands will not proceed
2948 to the next (or previous) article if the current article is unread.
2949 Instead, they will choose the current article.
2950
2951 @item gnus-auto-center-summary
2952 @vindex gnus-auto-center-summary
2953 If non-@code{nil}, Gnus will keep the point in the summary buffer
2954 centered at all times.  This makes things quite tidy, but if you have a
2955 slow network connection, or simply do not like this un-Emacsism, you can
2956 set this variable to @code{nil} to get the normal Emacs scrolling
2957 action.  This will also inhibit horizontal re-centering of the summary
2958 buffer, which might make it more inconvenient to read extremely long
2959 threads.
2960
2961 @end table
2962
2963
2964 @node Choosing Articles
2965 @section Choosing Articles
2966 @cindex selecting articles
2967
2968 None of the following movement commands understand the numeric prefix,
2969 and they all select and display an article.
2970
2971 @table @kbd
2972 @item SPACE
2973 @kindex SPACE (Summary)
2974 @findex gnus-summary-next-page
2975 Select the current article, or, if that one's read already, the next
2976 unread article (@code{gnus-summary-next-page}).
2977
2978 @item G n
2979 @itemx n
2980 @kindex n (Summary)
2981 @kindex G n (Summary)
2982 @findex gnus-summary-next-unread-article
2983 Go to next unread article (@code{gnus-summary-next-unread-article}).
2984
2985 @item G p
2986 @itemx p
2987 @kindex p (Summary)
2988 @findex gnus-summary-prev-unread-article
2989 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
2990
2991 @item G N
2992 @itemx N
2993 @kindex N (Summary)
2994 @kindex G N (Summary)
2995 @findex gnus-summary-next-article
2996 Go to the next article (@code{gnus-summary-next-article}).
2997
2998 @item G P
2999 @itemx P
3000 @kindex P (Summary)
3001 @kindex G P (Summary)
3002 @findex gnus-summary-prev-article
3003 Go to the previous article (@code{gnus-summary-prev-article}).
3004
3005 @item G C-n
3006 @kindex G C-n (Summary)
3007 @findex gnus-summary-next-same-subject
3008 Go to the next article with the same subject
3009 (@code{gnus-summary-next-same-subject}). 
3010
3011 @item G C-p
3012 @kindex G C-p (Summary)
3013 @findex gnus-summary-prev-same-subject
3014 Go to the previous article with the same subject
3015 (@code{gnus-summary-prev-same-subject}). 
3016
3017 @item G f
3018 @itemx .
3019 @kindex G f  (Summary)
3020 @kindex .  (Summary)
3021 @findex gnus-summary-first-unread-article
3022 Go to the first unread article
3023 (@code{gnus-summary-first-unread-article}).
3024
3025 @item G b
3026 @itemx ,
3027 @kindex G b (Summary)
3028 @kindex , (Summary)
3029 @findex gnus-summary-best-unread-article
3030 Go to the article with the highest score
3031 (@code{gnus-summary-best-unread-article}). 
3032
3033 @item G l
3034 @itemx l
3035 @kindex l (Summary)
3036 @kindex G l (Summary)
3037 @findex gnus-summary-goto-last-article
3038 Go to the previous article read (@code{gnus-summary-goto-last-article}).
3039
3040 @item G p
3041 @kindex G p (Summary)
3042 @findex gnus-summary-pop-article
3043 Pop an article off the summary history and go to this article
3044 (@code{gnus-summary-pop-article}).  This command differs from the
3045 command above in that you can pop as many previous articles off the
3046 history as you like.
3047 @end table
3048
3049 Some variables that are relevant for moving and selecting articles:
3050
3051 @table @code
3052 @item gnus-auto-extend-newsgroup
3053 @vindex gnus-auto-extend-newsgroup
3054 All the movement commands will try to go to the previous (or next)
3055 article, even if that article isn't displayed in the Summary buffer if
3056 this variable is non-@code{nil}.  Gnus will then fetch the article from
3057 the server and display it in the article buffer.
3058
3059 @item gnus-select-article-hook
3060 @vindex gnus-select-article-hook
3061 This hook is called whenever an article is selected.  By default it
3062 exposes any threads hidden under the selected article.
3063
3064 @item gnus-mark-article-hook
3065 @vindex gnus-mark-article-hook
3066 @findex gnus-summary-mark-unread-as-read
3067 @findex gnus-summary-mark-read-and-unread-as-read
3068 @findex gnus-unread-mark
3069 This hook is called whenever an article is selected.  It is intended to
3070 be used for marking articles as read.  The default value is
3071 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
3072 mark of almost any article you read to @code{gnus-unread-mark}.  The
3073 only articles not affected by this function are ticked, dormant, and
3074 expirable articles.  If you'd instead like to just have unread articles
3075 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
3076 instead.  It will leave marks like @code{gnus-low-score-mark},
3077 @code{gnus-del-mark} (and so on) alone.
3078
3079 @end table
3080
3081
3082 @node Paging the Article
3083 @section Scrolling the Article
3084 @cindex article scrolling
3085
3086 @table @kbd
3087
3088 @item SPACE
3089 @kindex SPACE (Summary)
3090 @findex gnus-summary-next-page
3091 Pressing @kbd{SPACE} will scroll the current article forward one page,
3092 or, if you have come to the end of the current article, will choose the
3093 next article (@code{gnus-summary-next-page}).
3094
3095 @item DEL
3096 @kindex DEL (Summary)
3097 @findex gnus-summary-prev-page
3098 Scroll the current article back one page (@code{gnus-summary-prev-page}). 
3099
3100 @item RET
3101 @kindex RET (Summary)
3102 @findex gnus-summary-scroll-up
3103 Scroll the current article one line forward
3104 (@code{gnus-summary-scroll-up}).
3105
3106 @item A g
3107 @itemx g
3108 @kindex A g (Summary)
3109 @kindex g (Summary)
3110 @findex gnus-summary-show-article
3111 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
3112 given a prefix, fetch the current article, but don't run any of the
3113 article treatment functions.  This will give you a ``raw'' article, just
3114 the way it came from the server.
3115
3116 @item A <
3117 @itemx <
3118 @kindex < (Summary)
3119 @kindex A < (Summary)
3120 @findex gnus-summary-beginning-of-article
3121 Scroll to the beginning of the article
3122 (@code{gnus-summary-beginning-of-article}).
3123
3124 @item A >
3125 @itemx >
3126 @kindex > (Summary)
3127 @kindex A > (Summary)
3128 @findex gnus-summary-end-of-article
3129 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
3130
3131 @item A s 
3132 @kindex A s (Summary)
3133 @findex gnus-summary-isearch-article
3134 Perform an isearch in the article buffer
3135 (@code{gnus-summary-isearch-article}). 
3136
3137 @end table
3138
3139
3140 @node Reply Followup and Post
3141 @section Reply, Followup and Post
3142
3143 @menu
3144 * Summary Mail Commands::            Sending mail.
3145 * Summary Post Commands::            Sending news.
3146 @end menu
3147
3148
3149 @node Summary Mail Commands
3150 @subsection Summary Mail Commands
3151 @cindex mail
3152 @cindex composing mail
3153
3154 Commands for composing a mail message:
3155
3156 @table @kbd
3157
3158 @item S r
3159 @itemx r
3160 @kindex S r (Summary)
3161 @kindex r (Summary)
3162 @findex gnus-summary-reply
3163 Mail a reply to the author of the current article
3164 (@code{gnus-summary-reply}). 
3165
3166 @item S R
3167 @itemx R
3168 @kindex R (Summary)
3169 @kindex S R (Summary)
3170 @findex gnus-summary-reply-with-original
3171 Mail a reply to the author of the current article and include the
3172 original message (@code{gnus-summary-reply-with-original}).  This
3173 command uses the process/prefix convention.
3174
3175 @item S o m
3176 @kindex S o m (Summary)
3177 @findex gnus-summary-mail-forward
3178 Forward the current article to some other person
3179 (@code{gnus-summary-mail-forward}). 
3180
3181 @item S o p
3182 @kindex S o p (Summary)
3183 @findex gnus-summary-post-forward
3184 Forward the current article to a newsgroup
3185 (@code{gnus-summary-post-forward}).
3186
3187 @item S m
3188 @itemx m
3189 @kindex m (Summary)
3190 @kindex S m (Summary)
3191 @findex gnus-summary-mail-other-window
3192 Send a mail to some other person
3193 (@code{gnus-summary-mail-other-window}).
3194
3195 @item S D b
3196 @kindex S D b (Summary)
3197 @findex gnus-summary-resend-bounced-mail
3198 @cindex bouncing mail
3199 If you have sent a mail, but the mail was bounced back to you for some
3200 reason (wrong address, transient failure), you can use this command to
3201 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
3202 will be popped into a mail buffer where you can edit the headers before
3203 sending the mail off again.  If you give a prefix to this command, and
3204 the bounced mail is a reply to some other mail, Gnus will try to fetch
3205 that mail and display it for easy perusal of its headers.  This might
3206 very well fail, though.
3207
3208 @item S D r
3209 @kindex S D r (Summary)
3210 @findex gnus-summary-resend-message
3211 Not to be confused with the previous command,
3212 @code{gnus-summary-resend-message} will prompt you for an address to
3213 send the current message off to, and then send it to that place.  The
3214 headers of the message won't be altered---but lots of headers that say
3215 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
3216 means that you actually send a mail to someone that has a @code{To}
3217 header that (probably) points to yourself.  This will confuse people.
3218 So, natcherly you'll only do that if you're really eVIl.  
3219
3220 This command is mainly used if you have several accounts and want to
3221 ship a mail to a different account of yours.  (If you're both
3222 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
3223 to the @code{root} account, you may want to resend it to
3224 @code{postmaster}.  Ordnung muss sein!
3225
3226 @item S O m
3227 @kindex S O m (Summary)
3228 @findex gnus-uu-digest-mail-forward
3229 Digest the current series and forward the result using mail
3230 (@code{gnus-uu-digest-mail-forward}).  This command uses the
3231 process/prefix convention (@pxref{Process/Prefix}). 
3232
3233 @item S O p
3234 @kindex S O p (Summary)
3235 @findex gnus-uu-digest-post-forward
3236 Digest the current series and forward the result to a newsgroup
3237 (@code{gnus-uu-digest-mail-forward}).  
3238 @end table
3239
3240
3241 @node Summary Post Commands
3242 @subsection Summary Post Commands
3243 @cindex post
3244 @cindex composing news
3245
3246 Commands for posting an article:
3247
3248 @table @kbd
3249 @item S p
3250 @itemx a
3251 @kindex a (Summary)
3252 @kindex S p (Summary)
3253 @findex gnus-summary-post-news
3254 Post an article to the current group
3255 (@code{gnus-summary-post-news}).
3256
3257 @item S f
3258 @itemx f
3259 @kindex f (Summary)
3260 @kindex S f (Summary)
3261 @findex gnus-summary-followup
3262 Post a followup to the current article (@code{gnus-summary-followup}).
3263
3264 @item S F
3265 @itemx F
3266 @kindex S F (Summary)
3267 @kindex F (Summary)
3268 @findex gnus-summary-followup-with-original
3269 Post a followup to the current article and include the original message
3270 (@code{gnus-summary-followup-with-original}).   This command uses the
3271 process/prefix convention.
3272
3273 @item S u
3274 @kindex S u (Summary)
3275 @findex gnus-uu-post-news
3276 Uuencode a file, split it into parts, and post it as a series
3277 (@code{gnus-uu-post-news}). (@pxref{Uuencoding and Posting}). 
3278 @end table
3279
3280
3281 @node Canceling and Superseding
3282 @section Canceling Articles
3283 @cindex canceling articles
3284 @cindex superseding articles
3285
3286 Have you ever written something, and then decided that you really,
3287 really, really wish you hadn't posted that?
3288
3289 Well, you can't cancel mail, but you can cancel posts.
3290
3291 @findex gnus-summary-cancel-article
3292 @kindex C (Summary)
3293 Find the article you wish to cancel (you can only cancel your own
3294 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
3295 c} (@code{gnus-summary-cancel-article}).  Your article will be
3296 canceled---machines all over the world will be deleting your article. 
3297
3298 Be aware, however, that not all sites honor cancels, so your article may
3299 live on here and there, while most sites will delete the article in
3300 question.
3301
3302 If you discover that you have made some mistakes and want to do some
3303 corrections, you can post a @dfn{superseding} article that will replace
3304 your original article.
3305
3306 @findex gnus-summary-supersede-article
3307 @kindex S (Summary)
3308 Go to the original article and press @kbd{S s}
3309 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
3310 where you can edit the article all you want before sending it off the
3311 usual way.
3312
3313 The same goes for superseding as for canceling, only more so: Some
3314 sites do not honor superseding.  On those sites, it will appear that you
3315 have posted almost the same article twice.
3316
3317 If you have just posted the article, and change your mind right away,
3318 there is a trick you can use to cancel/supersede the article without
3319 waiting for the article to appear on your site first.  You simply return
3320 to the post buffer (which is called @code{*post-buf*}).  There you will
3321 find the article you just posted, with all the headers intact.  Change
3322 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
3323 header by substituting one of those words for @code{Message-ID}.  Then
3324 just press @kbd{C-c C-c} to send the article as you would do normally.
3325 The previous article will be canceled/superseded.
3326
3327 Just remember, kids: There is no 'c' in 'supersede'.
3328
3329
3330 @node Marking Articles
3331 @section Marking Articles
3332 @cindex article marking
3333 @cindex article ticking
3334 @cindex marks
3335
3336 There are several marks you can set on an article. 
3337
3338 You have marks that decide the @dfn{readedness} (whoo, neato-keano
3339 neologism ohoy!) of the article.  Alphabetic marks generally mean
3340 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
3341
3342 In addition, you also have marks that do not affect readedness.
3343
3344 @menu
3345 * Unread Articles::      Marks for unread articles.
3346 * Read Articles::        Marks for read articles.
3347 * Other Marks::          Marks that do not affect readedness.
3348 @end menu
3349
3350 @ifinfo
3351 There's a plethora of commands for manipulating these marks:
3352 @end ifinfo
3353
3354 @menu
3355 * Setting Marks::           How to set and remove marks.
3356 * Setting Process Marks::   How to mark articles for later processing.
3357 @end menu
3358
3359
3360 @node Unread Articles
3361 @subsection Unread Articles
3362
3363 The following marks mark articles as unread, in one form or other.
3364
3365 @vindex gnus-dormant-mark
3366 @vindex gnus-ticked-mark
3367 @table @samp
3368 @item !
3369 @dfn{Ticked articles} are articles that will remain visible always.  If
3370 you see an article that you find interesting, or you want to put off
3371 reading it, or replying to it, until sometime later, you'd typically
3372 tick it.  However, articles can be expired, so if you want to keep an
3373 article forever, you'll have to save it.  Ticked articles have a
3374 @samp{!} (@code{gnus-ticked-mark}) in the first column.
3375
3376 @item ?
3377 @vindex gnus-dormant-mark
3378 A @dfn{dormant} article is marked with a @samp{?}
3379 (@code{gnus-dormant-mark}), and will only appear in the summary buffer
3380 if there are followups to it.
3381
3382 @item SPACE
3383 @vindex gnus-unread-mark
3384 An @dfn{unread} article is marked with a @samp{SPACE}
3385 (@code{gnus-unread-mark}).  These are articles that haven't been read at
3386 all yet.
3387 @end table
3388
3389
3390 @node Read Articles
3391 @subsection Read Articles
3392 @cindex expirable mark
3393
3394 All the following marks mark articles as read.
3395
3396 @table @samp
3397
3398 @item r
3399 @vindex gnus-del-mark
3400 Articles that are marked as read.  They have a @samp{r}
3401 (@code{gnus-del-mark}) in the first column.  These are articles that the
3402 user has marked as read more or less manually.
3403
3404 @item R
3405 @vindex gnus-read-mark
3406 Articles that are actually read are marked with @samp{R}
3407 (@code{gnus-read-mark}). 
3408
3409 @item O
3410 @vindex gnus-ancient-mark
3411 Articles that were marked as read in previous sessions are now
3412 @dfn{old} and marked with @samp{O} (@code{gnus-ancient-mark}). 
3413
3414 @item K
3415 @vindex gnus-killed-mark
3416 Marked as killed (@code{gnus-killed-mark}).
3417
3418 @item X
3419 @vindex gnus-kill-file-mark
3420 Marked as killed by kill files (@code{gnus-kill-file-mark}).
3421
3422 @item Y
3423 @vindex gnus-low-score-mark
3424 Marked as read by having a too low score (@code{gnus-low-score-mark}).
3425
3426 @item C
3427 @vindex gnus-catchup-mark
3428 Marked as read by a catchup (@code{gnus-catchup-mark}).
3429
3430 @item G
3431 @vindex gnus-canceled-mark
3432 Canceled article (@code{gnus-canceled-mark})
3433
3434 @item F
3435 @vindex gnus-souped-mark
3436 @sc{SOUP}ed article (@code{gnus-souped-mark}).  @xref{SOUP}
3437
3438 @item Q
3439 @vindex gnus-sparse-mark
3440 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
3441 Threading} 
3442
3443 @item M
3444 @vindex gnus-duplicate-mark
3445 Article marked as read by duplicate suppression
3446 (@code{gnus-duplicated-mark}).  @xref{Duplicate Suppression}
3447
3448 @end table
3449
3450 All these marks just mean that the article is marked as read, really.
3451 They are interpreted differently by the adaptive scoring scheme,
3452 however.
3453
3454 One more special mark, though:
3455
3456 @table @samp
3457 @item E
3458 @vindex gnus-expirable-mark
3459 You can also mark articles as @dfn{expirable} (or have them marked as
3460 such automatically).  That doesn't make much sense in normal groups,
3461 because a user does not control the expiring of news articles, but in
3462 mail groups, for instance, articles that are marked as @dfn{expirable}
3463 can be deleted by Gnus at any time.  Expirable articles are marked with
3464 @samp{E} (@code{gnus-expirable-mark}).
3465 @end table
3466
3467
3468 @node Other Marks
3469 @subsection Other Marks
3470 @cindex process mark
3471 @cindex bookmarks
3472
3473 There are some marks that have nothing to do with whether the article is
3474 read or not.
3475
3476 @itemize @bullet
3477
3478 @item 
3479 You can set a bookmark in the current article.  Say you are reading a
3480 long thesis on cats' urinary tracts, and have to go home for dinner
3481 before you've finished reading the thesis.  You can then set a bookmark
3482 in the article, and Gnus will jump to this bookmark the next time it
3483 encounters the article.
3484
3485 @item
3486 @vindex gnus-replied-mark
3487 All articles that you have replied to or made a followup to (i.e., have
3488 answered) will be marked with an @samp{A} in the second column
3489 (@code{gnus-replied-mark}).
3490
3491 @item 
3492 @vindex gnus-cached-mark
3493 Articles that are stored in the article cache will be marked with an
3494 @samp{*} in the second column (@code{gnus-cached-mark}).
3495
3496 @item 
3497 @vindex gnus-saved-mark
3498 Articles that are ``saved'' (in some manner or other; not necessarily
3499 religiously) are marked with an @samp{S} in the second column
3500 (@code{gnus-saved-mark}.
3501
3502 @item 
3503 @vindex gnus-not-empty-thread-mark
3504 @vindex gnus-empty-thread-mark
3505 It the @samp{%e} spec is used, the presence of threads or not will be
3506 marked with @code{gnus-not-empty-thread-mark} and
3507 @code{gnus-empty-thread-mark} in the third column, respectively.
3508
3509 @item 
3510 @vindex gnus-process-mark
3511 Finally we have the @dfn{process mark} (@code{gnus-process-mark}.  A
3512 variety of commands react to the presence of the process mark.  For
3513 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
3514 all articles that have been marked with the process mark.  Articles
3515 marked with the process mark have a @samp{#} in the second column.
3516
3517 @end itemize
3518
3519 You might have noticed that most of these ``non-readedness'' marks
3520 appear in the second column by default.  So if you have a cached, saved,
3521 replied article that you have process-marked, what will that look like?
3522
3523 Nothing much.  The precedence rules go as follows: process -> cache ->
3524 replied -> saved.  So if the article is in the cache and is replied,
3525 you'll only see the cache mark and not the replied mark.
3526
3527
3528 @node Setting Marks
3529 @subsection Setting Marks
3530 @cindex setting marks
3531
3532 All the marking commands understand the numeric prefix.
3533
3534 @table @kbd
3535 @item M t
3536 @itemx !
3537 @kindex ! (Summary)
3538 @kindex M t (Summary)
3539 @findex gnus-summary-tick-article-forward
3540 Tick the current article (@code{gnus-summary-tick-article-forward}).
3541
3542 @item M ?
3543 @itemx ?
3544 @kindex ? (Summary)
3545 @kindex M ? (Summary)
3546 @findex gnus-summary-mark-as-dormant
3547 Mark the current article as dormant
3548 (@code{gnus-summary-mark-as-dormant}).
3549
3550 @item M d
3551 @itemx d
3552 @kindex M d (Summary)
3553 @kindex d (Summary)
3554 @findex gnus-summary-mark-as-read-forward
3555 Mark the current article as read
3556 (@code{gnus-summary-mark-as-read-forward}).
3557
3558 @item D
3559 @kindex D (Summary)
3560 @findex gnus-summary-mark-as-read-backward
3561 Mark the current article as read and move point to the previous line
3562 (@code{gnus-summary-mark-as-read-backward}).
3563
3564 @item M k
3565 @itemx k
3566 @kindex k (Summary)
3567 @kindex M k (Summary)
3568 @findex gnus-summary-kill-same-subject-and-select
3569 Mark all articles that have the same subject as the current one as read,
3570 and then select the next unread article
3571 (@code{gnus-summary-kill-same-subject-and-select}).
3572
3573 @item M K
3574 @itemx C-k
3575 @kindex M K (Summary)
3576 @kindex C-k (Summary)
3577 @findex gnus-summary-kill-same-subject
3578 Mark all articles that have the same subject as the current one as read
3579 (@code{gnus-summary-kill-same-subject}).  
3580
3581 @item M C
3582 @kindex M C (Summary)
3583 @findex gnus-summary-catchup
3584 Mark all unread articles in the group as read
3585 (@code{gnus-summary-catchup}).
3586
3587 @item M C-c
3588 @kindex M C-c (Summary)
3589 @findex gnus-summary-catchup-all
3590 Mark all articles in the group as read---even the ticked and dormant
3591 articles (@code{gnus-summary-catchup-all}).
3592
3593 @item M H
3594 @kindex M H (Summary)
3595 @findex gnus-summary-catchup-to-here
3596 Catchup the current group to point
3597 (@code{gnus-summary-catchup-to-here}). 
3598
3599 @item C-w
3600 @kindex C-w (Summary)
3601 @findex gnus-summary-mark-region-as-read
3602 Mark all articles between point and mark as read
3603 (@code{gnus-summary-mark-region-as-read}). 
3604
3605 @item M V k
3606 @kindex M V k (Summary)
3607 @findex gnus-summary-kill-below
3608 Kill all articles with scores below the default score (or below the
3609 numeric prefix) (@code{gnus-summary-kill-below}).
3610
3611 @item M c
3612 @itemx M-u
3613 @kindex M c (Summary)
3614 @kindex M-u (Summary)
3615 @findex gnus-summary-clear-mark-forward
3616 Clear all readedness-marks from the current article
3617 (@code{gnus-summary-clear-mark-forward}).
3618
3619 @item M e
3620 @itemx E
3621 @kindex M e (Summary)
3622 @kindex E (Summary)
3623 @findex gnus-summary-mark-as-expirable
3624 Mark the current article as expirable
3625 (@code{gnus-summary-mark-as-expirable}).
3626
3627 @item M b
3628 @kindex M b (Summary)
3629 @findex gnus-summary-set-bookmark
3630 Set a bookmark in the current article
3631 (@code{gnus-summary-set-bookmark}).
3632
3633 @item M B
3634 @kindex M B (Summary)
3635 @findex gnus-summary-remove-bookmark
3636 Remove the bookmark from the current article
3637 (@code{gnus-summary-remove-bookmark}).
3638
3639 @item M V c
3640 @kindex M V c (Summary)
3641 @findex gnus-summary-clear-above
3642 Clear all marks from articles with scores over the default score (or
3643 over the numeric prefix) (@code{gnus-summary-clear-above}).
3644
3645 @item M V u
3646 @kindex M V u (Summary)
3647 @findex gnus-summary-tick-above
3648 Tick all articles with scores over the default score (or over the
3649 numeric prefix) (@code{gnus-summary-tick-above}).
3650
3651 @item M V m
3652 @kindex M V m (Summary)
3653 @findex gnus-summary-mark-above
3654 Prompt for a mark, and mark all articles with scores over the default
3655 score (or over the numeric prefix) with this mark
3656 (@code{gnus-summary-clear-above}).
3657 @end table
3658
3659 @vindex gnus-summary-goto-unread
3660 The @code{gnus-summary-goto-unread} variable controls what action should
3661 be taken after setting a mark.  If non-@code{nil}, point will move to
3662 the next/previous unread article.  If @code{nil}, point will just move
3663 one line up or down.  As a special case, if this variable is
3664 @code{never}, all the marking commands as well as other commands (like
3665 @kbd{SPACE}) will move to the next article, whether it is unread or not.
3666 The default is @code{t}.
3667
3668
3669 @node Setting Process Marks
3670 @subsection Setting Process Marks
3671 @cindex setting process marks
3672
3673 @table @kbd
3674
3675 @item M P p
3676 @itemx #
3677 @kindex # (Summary)
3678 @kindex M P p (Summary)
3679 @findex gnus-summary-mark-as-processable
3680 Mark the current article with the process mark
3681 (@code{gnus-summary-mark-as-processable}). 
3682 @findex gnus-summary-unmark-as-processable
3683
3684 @item M P u 
3685 @itemx M-#
3686 @kindex M P u (Summary)
3687 @kindex M-# (Summary)
3688 Remove the process mark, if any, from the current article
3689 (@code{gnus-summary-unmark-as-processable}).
3690
3691 @item M P U
3692 @kindex M P U (Summary)
3693 @findex gnus-summary-unmark-all-processable
3694 Remove the process mark from all articles
3695 (@code{gnus-summary-unmark-all-processable}). 
3696
3697 @item M P R
3698 @kindex M P R (Summary)
3699 @findex gnus-uu-mark-by-regexp
3700 Mark articles by a regular expression (@code{gnus-uu-mark-by-regexp}). 
3701
3702 @item M P r
3703 @kindex M P r (Summary)
3704 @findex gnus-uu-mark-region
3705 Mark articles in region (@code{gnus-uu-mark-region}).
3706
3707 @item M P t
3708 @kindex M P t (Summary)
3709 @findex gnus-uu-mark-thread
3710 Mark all articles in the current (sub)thread
3711 (@code{gnus-uu-mark-thread}).
3712
3713 @item M P T
3714 @kindex M P T (Summary)
3715 @findex gnus-uu-unmark-thread
3716 Unmark all articles in the current (sub)thread
3717 (@code{gnus-uu-unmark-thread}).
3718
3719 @item M P v
3720 @kindex M P v (Summary)
3721 @findex gnus-uu-mark-over
3722 Mark all articles that have a score above the prefix argument
3723 (@code{gnus-uu-mark-over}).
3724
3725 @item M P s
3726 @kindex M P s (Summary)
3727 @findex gnus-uu-mark-series
3728 Mark all articles in the current series (@code{gnus-uu-mark-series}).
3729
3730 @item M P S
3731 @kindex M P S (Summary)
3732 @findex gnus-uu-mark-sparse
3733 Mark all series that have already had some articles marked
3734 (@code{gnus-uu-mark-sparse}).
3735
3736 @item M P a
3737 @kindex M P a (Summary)
3738 @findex gnus-uu-mark-all
3739 Mark all articles in series order (@code{gnus-uu-mark-series}).
3740
3741 @item M P b
3742 @kindex M P b (Summary)
3743 @findex gnus-uu-mark-buffer
3744 Mark all articles in the buffer in the order they appear
3745 (@code{gnus-uu-mark-buffer}). 
3746 @end table
3747
3748
3749 @node Limiting
3750 @section Limiting
3751 @cindex limiting
3752
3753 It can be convenient to limit the summary buffer to just show some
3754 subset of the articles currently in the group.  The effect most limit
3755 commands have is to remove a few (or many) articles from the summary
3756 buffer. 
3757
3758 @table @kbd
3759
3760 @item / /
3761 @itemx / s
3762 @kindex / / (Summary)
3763 @findex gnus-summary-limit-to-subject
3764 Limit the summary buffer to articles that match some subject
3765 (@code{gnus-summary-limit-to-subject}). 
3766
3767 @item / a
3768 @kindex / a (Summary)
3769 @findex gnus-summary-limit-to-author
3770 Limit the summary buffer to articles that match some author
3771 (@code{gnus-summary-limit-to-author}).
3772
3773 @item / u
3774 @itemx x
3775 @kindex / u (Summary)
3776 @kindex x (Summary)
3777 @findex gnus-summary-limit-to-unread
3778 Limit the summary buffer to articles that are not marked as read
3779 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
3780 buffer to articles that are strictly unread.  This means that ticked and
3781 dormant articles will also be excluded.
3782
3783 @item / m
3784 @kindex / m (Summary)
3785 @findex gnus-summary-limit-to-marks
3786 Ask for a mark and then limit to all articles that have not been marked
3787 with that mark (@code{gnus-summary-limit-to-marks}).
3788
3789 @item / n
3790 @kindex / n (Summary)
3791 @findex gnus-summary-limit-to-articles
3792 Limit the summary buffer to the current article
3793 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
3794 convention (@pxref{Process/Prefix}).
3795
3796 @item / w
3797 @kindex / w (Summary)
3798 @findex gnus-summary-pop-limit
3799 Pop the previous limit off the stack and restore it
3800 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
3801 the stack.
3802
3803 @item / v
3804 @kindex / v (Summary)
3805 @findex gnus-summary-limit-to-score
3806 Limit the summary buffer to articles that have a score at or above some
3807 score (@code{gnus-summary-limit-to-score}).
3808
3809 @item / E
3810 @itemx M S
3811 @kindex M S (Summary)
3812 @kindex / E (Summary)
3813 @findex gnus-summary-limit-include-expunged
3814 Display all expunged articles
3815 (@code{gnus-summary-limit-include-expunged}). 
3816
3817 @item / D
3818 @kindex / D (Summary)
3819 @findex gnus-summary-limit-include-dormant
3820 Display all dormant articles (@code{gnus-summary-limit-include-dormant}).
3821
3822 @item / d
3823 @kindex / d (Summary)
3824 @findex gnus-summary-limit-exclude-dormant
3825 Hide all dormant articles (@code{gnus-summary-limit-exclude-dormant}).
3826
3827 @item / c
3828 @kindex / c (Summary)
3829 @findex gnus-summary-limit-exclude-childless-dormant
3830 Hide all dormant articles that have no children
3831 (@code{gnus-summary-limit-exclude-childless-dormant}). 
3832
3833 @item / C
3834 @kindex / C (Summary)
3835 @findex gnus-summary-limit-mark-excluded-as-read
3836 Mark all excluded unread articles as read
3837 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
3838 also mark excluded ticked and dormant articles as read.
3839
3840 @end table
3841
3842
3843 @node Threading
3844 @section Threading
3845 @cindex threading
3846 @cindex article threading
3847
3848 Gnus threads articles by default.  @dfn{To thread} is to put replies to
3849 articles directly after the articles they reply to---in a hierarchical
3850 fashion.
3851
3852 @menu
3853 * Customizing Threading::     Variables you can change to affect the threading.
3854 * Thread Commands::           Thread based commands in the summary buffer.
3855 @end menu
3856
3857
3858 @node Customizing Threading
3859 @subsection Customizing Threading
3860 @cindex customizing threading
3861 @cindex <
3862 @cindex >
3863
3864 @table @code
3865
3866 @item gnus-show-threads
3867 @vindex gnus-show-threads
3868 If this variable is @code{nil}, no threading will be done, and all of
3869 the rest of the variables here will have no effect.  Turning threading
3870 off will speed group selection up a bit, but it is sure to make reading
3871 slower and more awkward.
3872
3873 @item gnus-fetch-old-headers
3874 @vindex gnus-fetch-old-headers
3875 If non-@code{nil}, Gnus will attempt to build old threads by fetching
3876 more old headers---headers to articles that are marked as read.  If you
3877 would like to display as few summary lines as possible, but still
3878 connect as many loose threads as possible, you should set this variable
3879 to @code{some} or a number.  If you set it to a number, no more than
3880 that number of extra old headers will be fetched.  In either case,
3881 fetching old headers only works if the backend you are using carries
3882 overview files---this would normally be @code{nntp}, @code{nnspool} and
3883 @code{nnml}.  Also remember that if the root of the thread has been
3884 expired by the server, there's not much Gnus can do about that.
3885
3886 @item gnus-build-sparse-threads
3887 @vindex gnus-build-sparse-threads
3888 Fetching old headers can be slow.  A low-rent similar effect can be
3889 gotten by setting this variable to @code{some}.  Gnus will then look at
3890 the complete @code{References} headers of all articles and try to string
3891 articles that belong in the same thread together.  This will leave
3892 @dfn{gaps} in the threading display where Gnus guesses that an article
3893 is missing from the thread.  (These gaps appear like normal summary
3894 lines.  If you select a gap, Gnus will try to fetch the article in
3895 question.)  If this variable is @code{t}, Gnus will display all these
3896 ``gaps'' without regard for whether they are useful for completing the
3897 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
3898 off sparse leaf nodes that don't lead anywhere.  This variable is
3899 @code{nil} by default.
3900
3901 @item gnus-summary-gather-subject-limit
3902 @vindex gnus-summary-gather-subject-limit
3903 Loose threads are gathered by comparing subjects of articles.  If this
3904 variable is @code{nil}, Gnus requires an exact match between the
3905 subjects of the loose threads before gathering them into one big
3906 super-thread.  This might be too strict a requirement, what with the
3907 presence of stupid newsreaders that chop off long subjects lines.  If
3908 you think so, set this variable to, say, 20 to require that only the
3909 first 20 characters of the subjects have to match.  If you set this
3910 variable to a really low number, you'll find that Gnus will gather
3911 everything in sight into one thread, which isn't very helpful.
3912
3913 @cindex fuzzy article gathering
3914 If you set this variable to the special value @code{fuzzy}, Gnus will
3915 use a fuzzy string comparison algorithm on the subjects.
3916
3917 @item gnus-simplify-subject-fuzzy-regexp
3918 @vindex gnus-simplify-subject-fuzzy-regexp
3919 This can either be a regular expression or list of regular expressions
3920 that match strings that will be removed from subjects if fuzzy subject
3921 simplification is used.
3922
3923 @item gnus-simplify-ignored-prefixes
3924 @vindex gnus-simplify-ignored-prefixes
3925 If you set @code{gnus-summary-gather-subject-limit} to something as low
3926 as 10, you might consider setting this variable to something sensible:
3927
3928 @c Written by Michael Ernst <mernst@cs.rice.edu>
3929 @lisp
3930 (setq gnus-simplify-ignored-prefixes
3931       (concat 
3932        "\\`\\[?\\("
3933        (mapconcat 'identity
3934                   '("looking"
3935                      "wanted" "followup" "summary\\( of\\)?"
3936                      "help" "query" "problem" "question" 
3937                      "answer" "reference" "announce"
3938                      "How can I" "How to" "Comparison of"
3939                      ;; ...
3940                      )
3941                   "\\|")
3942                   "\\)\\s *\\("
3943                   (mapconcat 'identity
3944                              '("for" "for reference" "with" "about")
3945                              "\\|")
3946                   "\\)?\\]?:?[ \t]*"))
3947 @end lisp
3948
3949 All words that match this regexp will be removed before comparing two
3950 subjects. 
3951
3952 @item gnus-summary-gather-exclude-subject
3953 @vindex gnus-summary-gather-exclude-subject
3954 Since loose thread gathering is done on subjects only, that might lead
3955 to many false hits, especially with certain common subjects like
3956 @samp{} and @samp{(none)}.  To make the situation slightly better,
3957 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
3958 what subjects should be excluded from the gathering process.  The
3959 default is @samp{^ *$\\|^(none)$}.  
3960
3961 @item gnus-summary-thread-gathering-function
3962 @vindex gnus-summary-thread-gathering-function
3963 Gnus gathers threads by looking at @code{Subject} headers.  This means
3964 that totally unrelated articles may end up in the same ``thread'', which
3965 is confusing.  An alternate approach is to look at all the
3966 @code{Message-ID}s in all the @code{References} headers to find matches.
3967 This will ensure that no gathered threads ever includes unrelated
3968 articles, but it's also means that people who have posted with broken
3969 newsreaders won't be gathered properly.  The choice is yours---plague or
3970 cholera:
3971
3972 @table @code
3973 @item gnus-gather-threads-by-subject
3974 @findex gnus-gather-threads-by-subject
3975 This function is the default gathering function and looks at
3976 @code{Subject}s exclusively.
3977
3978 @item gnus-gather-threads-by-references
3979 @findex gnus-gather-threads-by-references
3980 This function looks at @code{References} headers exclusively.
3981 @end table
3982
3983 If you want to test gathering by @code{References}, you could say
3984 something like:
3985
3986 @lisp
3987 (setq gnus-summary-thread-gathering-function
3988       'gnus-gather-threads-by-references)
3989 @end lisp
3990
3991 @item gnus-summary-make-false-root
3992 @vindex gnus-summary-make-false-root
3993 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
3994 and create a dummy root at the top.  (Wait a minute.  Root at the top?
3995 Yup.)  Loose subtrees occur when the real root has expired, or you've
3996 read or killed the root in a previous session.
3997
3998 When there is no real root of a thread, Gnus will have to fudge
3999 something.  This variable says what fudging method Gnus should use.
4000 There are four possible values:
4001
4002 @cindex adopting articles
4003
4004 @table @code
4005
4006 @item adopt
4007 Gnus will make the first of the orphaned articles the parent.  This
4008 parent will adopt all the other articles.  The adopted articles will be
4009 marked as such by pointy brackets (@samp{<>}) instead of the standard
4010 square brackets (@samp{[]}).  This is the default method.
4011
4012 @item dummy
4013 @vindex gnus-summary-dummy-line-format
4014 Gnus will create a dummy summary line that will pretend to be the
4015 parent.  This dummy line does not correspond to any real article, so
4016 selecting it will just select the first real article after the dummy
4017 article.  @code{gnus-summary-dummy-line-format} is used to specify the
4018 format of the dummy roots.  It accepts only one format spec:  @samp{S},
4019 which is the subject of the article.  @xref{Formatting Variables}.
4020
4021 @item empty
4022 Gnus won't actually make any article the parent, but simply leave the
4023 subject field of all orphans except the first empty.  (Actually, it will
4024 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
4025 Buffer Format}).)
4026
4027 @item none
4028 Don't make any article parent at all.  Just gather the threads and
4029 display them after one another.
4030
4031 @item nil
4032 Don't gather loose threads.
4033 @end table
4034
4035 @item gnus-thread-hide-subtree
4036 @vindex gnus-thread-hide-subtree
4037 If non-@code{nil}, all threads will be hidden when the summary buffer is
4038 generated.
4039
4040 @item gnus-thread-hide-killed
4041 @vindex gnus-thread-hide-killed
4042 if you kill a thread and this variable is non-@code{nil}, the subtree
4043 will be hidden.
4044
4045 @item gnus-thread-ignore-subject
4046 @vindex gnus-thread-ignore-subject
4047 Sometimes somebody changes the subject in the middle of a thread.  If
4048 this variable is non-@code{nil}, the subject change is ignored.  If it
4049 is @code{nil}, which is the default, a change in the subject will result
4050 in a new thread.
4051
4052 @item gnus-thread-indent-level
4053 @vindex gnus-thread-indent-level
4054 This is a number that says how much each sub-thread should be indented.
4055 The default is @code{4}.
4056 @end table
4057
4058
4059 @node Thread Commands
4060 @subsection Thread Commands
4061 @cindex thread commands
4062
4063 @table @kbd
4064
4065 @item T k
4066 @itemx M-C-k
4067 @kindex T k (Summary)
4068 @kindex M-C-k (Summary)
4069 @findex gnus-summary-kill-thread
4070 Mark all articles in the current sub-thread as read
4071 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
4072 remove all marks instead.  If the prefix argument is negative, tick
4073 articles instead.
4074
4075 @item T l
4076 @itemx M-C-l
4077 @kindex T l (Summary)
4078 @kindex M-C-l (Summary)
4079 @findex gnus-summary-lower-thread
4080 Lower the score of the current thread
4081 (@code{gnus-summary-lower-thread}). 
4082
4083 @item T i
4084 @kindex T i (Summary)
4085 @findex gnus-summary-raise-thread
4086 Increase the score of the current thread
4087 (@code{gnus-summary-raise-thread}).
4088
4089 @item T #
4090 @kindex T # (Summary)
4091 @findex gnus-uu-mark-thread
4092 Set the process mark on the current thread
4093 (@code{gnus-uu-mark-thread}).
4094
4095 @item T M-#
4096 @kindex T M-# (Summary)
4097 @findex gnus-uu-unmark-thread
4098 Remove the process mark from the current thread
4099 (@code{gnus-uu-unmark-thread}).
4100
4101 @item T T
4102 @kindex T T (Summary)
4103 @findex gnus-summary-toggle-threads
4104 Toggle threading (@code{gnus-summary-toggle-threads}).
4105
4106 @item T s
4107 @kindex T s (Summary)
4108 @findex gnus-summary-show-thread
4109 Expose the thread hidden under the current article, if any
4110 (@code{gnus-summary-show-thread}).
4111
4112 @item T h
4113 @kindex T h (Summary)
4114 @findex gnus-summary-hide-thread
4115 Hide the current (sub)thread (@code{gnus-summary-hide-thread}).
4116
4117 @item T S
4118 @kindex T S (Summary)
4119 @findex gnus-summary-show-all-threads
4120 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
4121
4122 @item T H
4123 @kindex T H (Summary)
4124 @findex gnus-summary-hide-all-threads
4125 Hide all threads (@code{gnus-summary-hide-all-threads}).
4126
4127 @item T t
4128 @kindex T t (Summary)
4129 @findex gnus-summary-rethread-current
4130 Re-thread the thread the current article is part of
4131 (@code{gnus-summary-rethread-current}).  This works even when the
4132 summary buffer is otherwise unthreaded.
4133
4134 @item T ^
4135 @kindex T ^ (Summary)
4136 @findex gnus-summary-reparent-thread
4137 Make the current article the child of the marked (or previous) article
4138 (@code{gnus-summary-reparent-thread}.
4139
4140 @end table
4141
4142 The following commands are thread movement commands.  They all
4143 understand the numeric prefix.
4144
4145 @table @kbd
4146
4147 @item T n
4148 @kindex T n (Summary)
4149 @findex gnus-summary-next-thread
4150 Go to the next thread (@code{gnus-summary-next-thread}).
4151
4152 @item T p
4153 @kindex T p (Summary)
4154 @findex gnus-summary-prev-thread
4155 Go to the previous thread (@code{gnus-summary-prev-thread}).
4156
4157 @item T d
4158 @kindex T d (Summary)
4159 @findex gnus-summary-down-thread
4160 Descend the thread (@code{gnus-summary-down-thread}).
4161
4162 @item T u
4163 @kindex T u (Summary)
4164 @findex gnus-summary-up-thread
4165 Ascend the thread (@code{gnus-summary-up-thread}).
4166
4167 @item T o
4168 @kindex T o (Summary)
4169 @findex gnus-summary-top-thread
4170 Go to the top of the thread (@code{gnus-summary-top-thread}).
4171 @end table
4172
4173 @vindex gnus-thread-operation-ignore-subject 
4174 If you ignore subject while threading, you'll naturally end up with
4175 threads that have several different subjects in them.  If you then issue
4176 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
4177 wish to kill the entire thread, but just those parts of the thread that
4178 have the same subject as the current article.  If you like this idea,
4179 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If is
4180 is non-@code{nil} (which it is by default), subjects will be ignored
4181 when doing thread commands.  If this variable is @code{nil}, articles in
4182 the same thread with different subjects will not be included in the
4183 operation in question.  If this variable is @code{fuzzy}, only articles
4184 that have subjects that are fuzzily equal will be included.
4185
4186
4187 @node Sorting
4188 @section Sorting
4189
4190 @findex gnus-thread-sort-by-total-score
4191 @findex gnus-thread-sort-by-date
4192 @findex gnus-thread-sort-by-score
4193 @findex gnus-thread-sort-by-subject
4194 @findex gnus-thread-sort-by-author
4195 @findex gnus-thread-sort-by-number
4196 @vindex gnus-thread-sort-functions
4197 If you are using a threaded summary display, you can sort the threads by
4198 setting @code{gnus-thread-sort-functions}, which is a list of functions.
4199 By default, sorting is done on article numbers.  Ready-made sorting
4200 predicate functions include @code{gnus-thread-sort-by-number},
4201 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
4202 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score}, and
4203 @code{gnus-thread-sort-by-total-score}.
4204
4205 Each function takes two threads and return non-@code{nil} if the first
4206 thread should be sorted before the other.  Note that sorting really is
4207 normally done by looking only at the roots of each thread.  If you use
4208 more than one function, the primary sort key should be the last function
4209 in the list.  You should probably always include
4210 @code{gnus-thread-sort-by-number} in the list of sorting
4211 functions---preferably first.  This will ensure that threads that are
4212 equal with respect to the other sort criteria will be displayed in
4213 ascending article order.
4214
4215 If you would like to sort by score, then by subject, and finally by
4216 number, you could do something like:
4217
4218 @lisp
4219 (setq gnus-thread-sort-functions 
4220       '(gnus-thread-sort-by-number
4221         gnus-thread-sort-by-subject
4222         gnus-thread-sort-by-score))
4223 @end lisp
4224
4225 The threads that have highest score will be displayed first in the
4226 summary buffer.  When threads have the same score, they will be sorted
4227 alphabetically.  The threads that have the same score and the same
4228 subject will be sorted by number, which is (normally) the sequence in
4229 which the articles arrived.
4230
4231 If you want to sort by score and then reverse arrival order, you could
4232 say something like:
4233
4234 @lisp
4235 (setq gnus-thread-sort-functions
4236       '((lambda (t1 t2) 
4237           (not (gnus-thread-sort-by-number t1 t2)))
4238         gnus-thread-sort-by-score))
4239 @end lisp
4240
4241 @vindex gnus-thread-score-function
4242 The function in the @code{gnus-thread-score-function} variable (default
4243 @code{+}) is used for calculating the total score of a thread.  Useful
4244 functions might be @code{max}, @code{min}, or squared means, or whatever
4245 tickles your fancy.
4246
4247 @findex gnus-article-sort-functions
4248 @findex gnus-article-sort-by-date
4249 @findex gnus-article-sort-by-score
4250 @findex gnus-article-sort-by-subject
4251 @findex gnus-article-sort-by-author
4252 @findex gnus-article-sort-by-number
4253 If you are using an unthreaded display for some strange reason or other,
4254 you have to fiddle with the @code{gnus-article-sort-functions} variable.
4255 It is very similar to the @code{gnus-thread-sort-functions}, except that
4256 is uses slightly different functions for article comparison.  Available
4257 sorting predicate functions are @code{gnus-article-sort-by-number},
4258 @code{gnus-article-sort-by-author}, @code{gnus-article-sort-by-subject},
4259 @code{gnus-article-sort-by-date}, and @code{gnus-article-sort-by-score}.
4260
4261 If you want to sort an unthreaded summary display by subject, you could
4262 say something like:
4263
4264 @lisp
4265 (setq gnus-article-sort-functions 
4266       '(gnus-article-sort-by-number
4267         gnus-article-sort-by-subject))
4268 @end lisp
4269
4270
4271
4272 @node Asynchronous Fetching
4273 @section Asynchronous Article Fetching
4274 @cindex asynchronous article fetching
4275
4276 If you read your news from an @sc{nntp} server that's far away, the
4277 network latencies may make reading articles a chore.  You have to wait
4278 for a while after pressing @kbd{n} to go to the next article before the
4279 article appears.  Why can't Gnus just go ahead and fetch the article
4280 while you are reading the previous one? Why not, indeed.
4281
4282 First, some caveats.  There are some pitfalls to using asynchronous
4283 article fetching, especially the way Gnus does it.  
4284
4285 Let's say you are reading article 1, which is short, and article 2 is
4286 quite long, and you are not interested in reading that.  Gnus does not
4287 know this, so it goes ahead and fetches article 2.  You decide to read
4288 article 3, but since Gnus is in the process of fetching article 2, the
4289 connection is blocked.
4290
4291 To avoid these situations, Gnus will open two (count 'em two)
4292 connections to the server.  Some people may think this isn't a very nice
4293 thing to do, but I don't see any real alternatives.  Setting up that
4294 extra connection takes some time, so Gnus startup will be slower.
4295
4296 Gnus will fetch more articles than you will read.  This will mean that
4297 the link between your machine and the @sc{nntp} server will become more
4298 loaded than if you didn't use article pre-fetch.  The server itself will
4299 also become more loaded---both with the extra article requests, and the
4300 extra connection.
4301
4302 Ok, so now you know that you shouldn't really use this thing...  unless
4303 you really want to.
4304
4305 @vindex gnus-asynchronous
4306 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
4307 happen automatically.
4308
4309 @vindex nntp-async-number
4310 You can control how many articles that are to be pre-fetched by setting
4311 @code{nntp-async-number}.  This is five by default, which means that when
4312 you read an article in the group, @code{nntp} will pre-fetch the next
4313 five articles.  If this variable is @code{t}, @code{nntp} will pre-fetch
4314 all the articles that it can without bound.  If it is @code{nil}, no
4315 pre-fetching will be made.
4316
4317 @vindex gnus-asynchronous-article-function
4318 You may wish to create some sort of scheme for choosing which articles
4319 that @code{nntp} should consider as candidates for pre-fetching.  For
4320 instance, you may wish to pre-fetch all articles with high scores, and
4321 not pre-fetch low-scored articles.  You can do that by setting the
4322 @code{gnus-asynchronous-article-function}, which will be called with an
4323 alist where the keys are the article numbers.  Your function should
4324 return an alist where the articles you are not interested in have been
4325 removed.  You could also do sorting on article score and the like. 
4326
4327
4328 @node Article Caching
4329 @section Article Caching
4330 @cindex article caching
4331 @cindex caching
4332
4333 If you have an @emph{extremely} slow @sc{nntp} connection, you may
4334 consider turning article caching on.  Each article will then be stored
4335 locally under your home directory.  As you may surmise, this could
4336 potentially use @emph{huge} amounts of disk space, as well as eat up all
4337 your inodes so fast it will make your head swim.  In vodka.
4338
4339 Used carefully, though, it could be just an easier way to save articles.
4340
4341 @vindex gnus-use-long-file-name
4342 @vindex gnus-cache-directory
4343 @vindex gnus-use-cache
4344 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
4345 all articles that are ticked or marked as dormant will then be copied
4346 over to your local cache (@code{gnus-cache-directory}).  Whether this
4347 cache is flat or hierarchal is controlled by the
4348 @code{gnus-use-long-file-name} variable, as usual.
4349
4350 When re-select a ticked or dormant article, it will be fetched from the
4351 cache instead of from the server.  As articles in your cache will never
4352 expire, this might serve as a method of saving articles while still
4353 keeping them where they belong.  Just mark all articles you want to save
4354 as dormant, and don't worry.
4355
4356 When an article is marked as read, is it removed from the cache.
4357
4358 @vindex gnus-cache-remove-articles
4359 @vindex gnus-cache-enter-articles
4360 The entering/removal of articles from the cache is controlled by the
4361 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
4362 variables.  Both are lists of symbols.  The first is @code{(ticked
4363 dormant)} by default, meaning that ticked and dormant articles will be
4364 put in the cache.  The latter is @code{(read)} by default, meaning that
4365 articles that are marked as read are removed from the cache.  Possibly
4366 symbols in these two lists are @code{ticked}, @code{dormant},
4367 @code{unread} and @code{read}.
4368
4369 @findex gnus-jog-cache
4370 So where does the massive article-fetching and storing come into the
4371 picture?  The @code{gnus-jog-cache} command will go through all
4372 subscribed newsgroups, request all unread articles, and store them in
4373 the cache.  You should only ever, ever ever ever, use this command if 1)
4374 your connection to the @sc{nntp} server is really, really, really slow
4375 and 2) you have a really, really, really huge disk.  Seriously.
4376
4377 @vindex gnus-uncacheable-groups
4378 It is likely that you do not want caching on some groups.  For instance,
4379 if your @code{nnml} mail is located under your home directory, it makes no
4380 sense to cache it somewhere else under your home directory.  Unless you
4381 feel that it's neat to use twice as much space.  To limit the caching,
4382 you could set the @code{gnus-uncacheable-groups} regexp to
4383 @samp{^nnml}, for instance.  This variable is @code{nil} by
4384 default.
4385
4386 @findex gnus-cache-generate-nov-databases
4387 @findex gnus-cache-generate-active
4388 @vindex gnus-cache-active-file
4389 The cache stores information on what articles it contains in its active
4390 file (@code{gnus-cache-active-file}).  If this file (or any other parts
4391 of the cache) becomes all messed up for some reason or other, Gnus
4392 offers two functions that will try to set things right.  @kbd{M-x
4393 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
4394 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
4395 file.
4396
4397
4398 @node Persistent Articles
4399 @section Persistent Articles
4400 @cindex persistent articles
4401
4402 Closely related to article caching, we have @dfn{persistent articles}.
4403 In fact, it's just a different way of looking at caching, and much more
4404 useful in my opinion.
4405
4406 Say you're reading a newsgroup, and you happen on to some valuable gem
4407 that you want to keep and treasure forever.  You'd normally just save it
4408 (using one of the many saving commands) in some file.  The problem with
4409 that is that it's just, well, yucky.  Ideally you'd prefer just having
4410 the article remain in the group where you found it forever; untouched by
4411 the expiry going on at the news server.
4412
4413 This is what a @dfn{persistent article} is---an article that just won't
4414 be deleted.  It's implemented using the normal cache functions, but
4415 you use two explicit commands for managing persistent articles:
4416
4417 @table @kbd
4418
4419 @item *
4420 @kindex * (Summary)
4421 @findex gnus-cache-enter-article
4422 Make the current article persistent (@code{gnus-cache-enter-article}). 
4423
4424 @item M-*
4425 @kindex M-* (Summary)
4426 @findex gnus-cache-remove-article
4427 Remove the current article from the persistent articles
4428 (@code{gnus-cache-remove-article}).  This will normally delete the
4429 article. 
4430 @end table
4431
4432 Both these commands understand the process/prefix convention. 
4433
4434 To avoid having all ticked articles (and stuff) entered into the cache,
4435 you should set @code{gnus-use-cache} to @code{passive} if you're just
4436 interested in persistent articles:
4437
4438 @lisp
4439 (setq gnus-use-cache 'passive)
4440 @end lisp
4441
4442
4443 @node Article Backlog
4444 @section Article Backlog
4445 @cindex backlog
4446 @cindex article backlog
4447
4448 If you have a slow connection, but the idea of using caching seems
4449 unappealing to you (and it is, really), you can help the situation some
4450 by switching on the @dfn{backlog}.  This is where Gnus will buffer
4451 already read articles so that it doesn't have to re-fetch articles
4452 you've already read.  This only helps if you are in the habit of
4453 re-selecting articles you've recently read, of course.  If you never do
4454 that, turning the backlog on will slow Gnus down a little bit, and
4455 increase memory usage some.
4456
4457 @vindex gnus-keep-backlog
4458 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
4459 at most @var{n} old articles in a buffer for later re-fetching.  If this
4460 variable is non-@code{nil} and is not a number, Gnus will store
4461 @emph{all} read articles, which means that your Emacs will grow without
4462 bound before exploding and taking your machine down with you.  I put
4463 that in there just to keep y'all on your toes.  
4464
4465 This variable is @code{nil} by default.
4466
4467
4468 @node Saving Articles
4469 @section Saving Articles
4470 @cindex saving articles
4471
4472 Gnus can save articles in a number of ways.  Below is the documentation
4473 for saving articles in a fairly straight-forward fashion (i.e., little
4474 processing of the article is done before it is saved).  For a different
4475 approach (uudecoding, unsharing) you should use @code{gnus-uu}
4476 (@pxref{Decoding Articles}).
4477
4478 @vindex gnus-save-all-headers
4479 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
4480 unwanted headers before saving the article.
4481
4482 @vindex gnus-saved-headers
4483 If the preceding variable is @code{nil}, all headers that match the
4484 @code{gnus-saved-headers} regexp will be kept, while the rest will be
4485 deleted before saving.
4486
4487 @table @kbd
4488
4489 @item O o
4490 @itemx o
4491 @kindex O o (Summary)
4492 @kindex o (Summary)
4493 @findex gnus-summary-save-article
4494 Save the current article using the default article saver
4495 (@code{gnus-summary-save-article}). 
4496
4497 @item O m
4498 @kindex O m (Summary)
4499 @findex gnus-summary-save-article-mail
4500 Save the current article in mail format
4501 (@code{gnus-summary-save-article-mail}). 
4502
4503 @item O r
4504 @kindex O r (Summary)
4505 @findex gnus-summary-save-article-rmail
4506 Save the current article in rmail format
4507 (@code{gnus-summary-save-article-rmail}). 
4508
4509 @item O f
4510 @kindex O f (Summary)
4511 @findex gnus-summary-save-article-file
4512 Save the current article in plain file format
4513 (@code{gnus-summary-save-article-file}). 
4514
4515 @item O b
4516 @kindex O b (Summary)
4517 @findex gnus-summary-save-article-body-file
4518 Save the current article body in plain file format
4519 (@code{gnus-summary-save-article-body-file}). 
4520
4521 @item O h
4522 @kindex O h (Summary)
4523 @findex gnus-summary-save-article-folder
4524 Save the current article in mh folder format
4525 (@code{gnus-summary-save-article-folder}). 
4526
4527 @item O v
4528 @kindex O v (Summary)
4529 @findex gnus-summary-save-article-vm
4530 Save the current article in a VM folder
4531 (@code{gnus-summary-save-article-vm}).
4532
4533 @item O p
4534 @kindex O p (Summary)
4535 @findex gnus-summary-pipe-output
4536 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
4537 the current article to a process (@code{gnus-summary-pipe-output}).
4538 @end table
4539
4540 @vindex gnus-prompt-before-saving
4541 All these commands use the process/prefix convention
4542 (@pxref{Process/Prefix}).  If you save bunches of articles using these
4543 functions, you might get tired of being prompted for files to save each
4544 and every article in.  The prompting action is controlled by
4545 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
4546 default, giving you that excessive prompting action you know and
4547 loathe.  If you set this variable to @code{t} instead, you'll be prompted
4548 just once for each series of articles you save.  If you like to really
4549 have Gnus do all your thinking for you, you can even set this variable
4550 to @code{nil}, which means that you will never be prompted for files to
4551 save articles in.  Gnus will simply save all the articles in the default
4552 files. 
4553
4554
4555 @vindex gnus-default-article-saver
4556 You can customize the @code{gnus-default-article-saver} variable to make
4557 Gnus do what you want it to.  You can use any of the four ready-made
4558 functions below, or you can create your own.
4559
4560 @table @code
4561
4562 @item gnus-summary-save-in-rmail
4563 @findex gnus-summary-save-in-rmail
4564 @vindex gnus-rmail-save-name
4565 @findex gnus-plain-save-name
4566 This is the default format, @dfn{babyl}.  Uses the function in the
4567 @code{gnus-rmail-save-name} variable to get a file name to save the
4568 article in.  The default is @code{gnus-plain-save-name}.
4569
4570 @item gnus-summary-save-in-mail
4571 @findex gnus-summary-save-in-mail
4572 @vindex gnus-mail-save-name
4573 Save in a Unix mail (mbox) file.  Uses the function in the
4574 @code{gnus-mail-save-name} variable to get a file name to save the
4575 article in.  The default is @code{gnus-plain-save-name}.
4576
4577 @item gnus-summary-save-in-file
4578 @findex gnus-summary-save-in-file
4579 @vindex gnus-file-save-name
4580 @findex gnus-numeric-save-name
4581 Append the article straight to an ordinary file.  Uses the function in
4582 the @code{gnus-file-save-name} variable to get a file name to save the
4583 article in.  The default is @code{gnus-numeric-save-name}.
4584
4585 @item gnus-summary-save-body-in-file
4586 @findex gnus-summary-save-body-in-file
4587 Append the article body to an ordinary file.  Uses the function in the
4588 @code{gnus-file-save-name} variable to get a file name to save the
4589 article in.  The default is @code{gnus-numeric-save-name}.
4590
4591 @item gnus-summary-save-in-folder
4592 @findex gnus-summary-save-in-folder
4593 @findex gnus-folder-save-name
4594 @findex gnus-Folder-save-name
4595 @vindex gnus-folder-save-name
4596 @cindex rcvstore
4597 @cindex MH folders
4598 Save the article to an MH folder using @code{rcvstore} from the MH
4599 library.  Uses the function in the @code{gnus-folder-save-name} variable
4600 to get a file name to save the article in.  The default is
4601 @code{gnus-folder-save-name}, but you can also use
4602 @code{gnus-Folder-save-name}.  The former creates capitalized names, and
4603 the latter does not.
4604
4605 @item gnus-summary-save-in-vm
4606 @findex gnus-summary-save-in-vm
4607 Save the article in a VM folder.  You have to have the VM mail
4608 reader to use this setting.
4609 @end table
4610
4611 @vindex gnus-article-save-directory
4612 All of these functions, except for the last one, will save the article
4613 in the @code{gnus-article-save-directory}, which is initialized from the
4614 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
4615 default. 
4616
4617 As you can see above, the functions use different functions to find a
4618 suitable name of a file to save the article in.  Below is a list of
4619 available functions that generate names:
4620
4621 @table @code
4622
4623 @item gnus-Numeric-save-name
4624 @findex gnus-Numeric-save-name
4625 Generates file names that look like @file{~/News/Alt.andrea-dworkin/45}.
4626
4627 @item gnus-numeric-save-name
4628 @findex gnus-numeric-save-name
4629 Generates file names that look like @file{~/News/alt.andrea-dworkin/45}.
4630
4631 @item gnus-Plain-save-name
4632 @findex gnus-Plain-save-name
4633 Generates file names that look like @file{~/News/Alt.andrea-dworkin}.
4634
4635 @item gnus-plain-save-name
4636 @findex gnus-plain-save-name
4637 Generates file names that look like @file{~/News/alt.andrea-dworkin}.
4638 @end table
4639
4640 @vindex gnus-split-methods
4641 You can have Gnus suggest where to save articles by plonking a regexp into
4642 the @code{gnus-split-methods} alist.  For instance, if you would like to
4643 save articles related to Gnus in the file @file{gnus-stuff}, and articles
4644 related to VM in @code{vm-stuff}, you could set this variable to something
4645 like:
4646
4647 @lisp
4648 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
4649  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
4650  (my-choosing-function "../other-dir/my-stuff")
4651  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
4652 @end lisp
4653
4654 We see that this is a list where each element is a list that has two
4655 elements---the @dfn{match} and the @dfn{file}.  The match can either be
4656 a string (in which case it is used as a regexp to match on the article
4657 head); it can be a symbol (which will be called as a function with the
4658 group name as a parameter); or it can be a list (which will be
4659 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
4660 the @dfn{file} will be used as a default prompt.  In addition, the
4661 result of the operation itself will be used if the function or form
4662 called returns a string or a list of strings.
4663
4664 You basically end up with a list of file names that might be used when
4665 saving the current article.  (All ``matches'' will be used.)  You will
4666 then be prompted for what you really want to use as a name, with file
4667 name completion over the results from applying this variable.
4668
4669 This variable is @code{((gnus-article-archive-name))} by default, which
4670 means that Gnus will look at the articles it saves for an
4671 @code{Archive-name} line and use that as a suggestion for the file
4672 name. 
4673
4674 @vindex gnus-use-long-file-name
4675 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
4676 @code{nil}, all the preceding functions will replace all periods
4677 (@samp{.}) in the group names with slashes (@samp{/})---which means that
4678 the functions will generate hierarchies of directories instead of having
4679 all the files in the toplevel directory
4680 (@file{~/News/alt/andrea-dworkin} instead of
4681 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
4682 on most systems.  However, for historical reasons, this is @code{nil} on
4683 Xenix and usg-unix-v machines by default.
4684
4685 This function also affects kill and score file names.  If this variable
4686 is a list, and the list contains the element @code{not-score}, long file
4687 names will not be used for score files, if it contains the element
4688 @code{not-save}, long file names will not be used for saving, and if it
4689 contains the element @code{not-kill}, long file names will not be used
4690 for kill files.
4691
4692 If you'd like to save articles in a hierarchy that looks something like
4693 a spool, you could
4694
4695 @lisp
4696 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
4697 (setq gnus-default-article-save 'gnus-summary-save-in-file) ; no encoding
4698 @end lisp
4699
4700 Then just save with @kbd{o}.  You'd then read this hierarchy with
4701 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
4702 the toplevel directory as the argument (@file{~/News/}).  Then just walk
4703 around to the groups/directories with @code{nneething}.
4704
4705
4706 @node Decoding Articles
4707 @section Decoding Articles
4708 @cindex decoding articles
4709
4710 Sometime users post articles (or series of articles) that have been
4711 encoded in some way or other.  Gnus can decode them for you.
4712
4713 @menu 
4714 * Uuencoded Articles::    Uudecode articles.
4715 * Shared Articles::       Unshar articles.
4716 * PostScript Files::      Split PostScript.
4717 * Decoding Variables::    Variables for a happy decoding.
4718 * Viewing Files::         You want to look at the result of the decoding?
4719 @end menu
4720
4721 All these functions use the process/prefix convention
4722 (@pxref{Process/Prefix}) for finding out what articles to work on, with
4723 the extension that a ``single article'' means ``a single series''.  Gnus
4724 can find out by itself what articles belong to a series, decode all the
4725 articles and unpack/view/save the resulting file(s).
4726
4727 Gnus guesses what articles are in the series according to the following
4728 simplish rule: The subjects must be (nearly) identical, except for the
4729 last two numbers of the line.  (Spaces are largely ignored, however.)
4730
4731 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
4732 will find all the articles that match the regexp @samp{^cat.gif
4733 ([0-9]+/[0-9]+).*$}.  
4734
4735 Subjects that are nonstandard, like @samp{cat.gif (2/3) Part 6 of a
4736 series}, will not be properly recognized by any of the automatic viewing
4737 commands, and you have to mark the articles manually with @kbd{#}.
4738
4739
4740 @node Uuencoded Articles
4741 @subsection Uuencoded Articles
4742 @cindex uudecode
4743 @cindex uuencoded articles
4744
4745 @table @kbd
4746
4747 @item X u
4748 @kindex X u (Summary)
4749 @findex gnus-uu-decode-uu
4750 Uudecodes the current series (@code{gnus-uu-decode-uu}).
4751
4752 @item X U
4753 @kindex X U (Summary)
4754 @findex gnus-uu-decode-uu-and-save
4755 Uudecodes and saves the current series
4756 (@code{gnus-uu-decode-uu-and-save}).
4757
4758 @item X v u
4759 @kindex X v u (Summary)
4760 @findex gnus-uu-decode-uu-view
4761 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
4762
4763 @item X v U
4764 @kindex X v U (Summary)
4765 @findex gnus-uu-decode-uu-and-save-view
4766 Uudecodes, views and saves the current series
4767 (@code{gnus-uu-decode-uu-and-save-view}). 
4768 @end table
4769
4770 Remember that these all react to the presence of articles marked with
4771 the process mark.  If, for instance, you'd like to decode and save an
4772 entire newsgroup, you'd typically do @kbd{M P a}
4773 (@code{gnus-uu-mark-all}) and then @kbd{X U}
4774 (@code{gnus-uu-decode-uu-and-save}).
4775
4776 All this is very much different from how @code{gnus-uu} worked with
4777 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
4778 the sun.  This version of @code{gnus-uu} generally assumes that you mark
4779 articles in some way (@pxref{Setting Process Marks}) and then press
4780 @kbd{X u}.
4781
4782 @vindex gnus-uu-notify-files
4783 Note: When trying to decode articles that have names matching
4784 @code{gnus-uu-notify-files}, which is hard-coded to
4785 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
4786 automatically post an article on @samp{comp.unix.wizards} saying that
4787 you have just viewed the file in question.  This feature can't be turned
4788 off.
4789
4790
4791 @node Shared Articles
4792 @subsection Shared Articles
4793 @cindex unshar
4794 @cindex shared articles
4795
4796 @table @kbd
4797
4798 @item X s
4799 @kindex X s (Summary)
4800 @findex gnus-uu-decode-unshar
4801 Unshars the current series (@code{gnus-uu-decode-unshar}).
4802
4803 @item X S
4804 @kindex X S (Summary)
4805 @findex gnus-uu-decode-unshar-and-save
4806 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
4807
4808 @item X v s
4809 @kindex X v s (Summary)
4810 @findex gnus-uu-decode-unshar-view
4811 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
4812
4813 @item X v S
4814 @kindex X v S (Summary)
4815 @findex gnus-uu-decode-unshar-and-save-view
4816 Unshars, views and saves the current series
4817 (@code{gnus-uu-decode-unshar-and-save-view}). 
4818 @end table
4819
4820
4821 @node PostScript Files
4822 @subsection PostScript Files
4823 @cindex PostScript
4824
4825 @table @kbd
4826
4827 @item X p
4828 @kindex X p (Summary)
4829 @findex gnus-uu-decode-postscript
4830 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
4831
4832 @item X P
4833 @kindex X P (Summary)
4834 @findex gnus-uu-decode-postscript-and-save
4835 Unpack and save the current PostScript series
4836 (@code{gnus-uu-decode-postscript-and-save}).
4837
4838 @item X v p
4839 @kindex X v p (Summary)
4840 @findex gnus-uu-decode-postscript-view
4841 View the current PostScript series
4842 (@code{gnus-uu-decode-postscript-view}).
4843
4844 @item X v P
4845 @kindex X v P (Summary)
4846 @findex gnus-uu-decode-postscript-and-save-view
4847 View and save the current PostScript series
4848 (@code{gnus-uu-decode-postscript-and-save-view}). 
4849 @end table
4850
4851
4852 @node Decoding Variables
4853 @subsection Decoding Variables
4854
4855 Adjective, not verb.
4856
4857 @menu 
4858 * Rule Variables::          Variables that say how a file is to be viewed.
4859 * Other Decode Variables::  Other decode variables.
4860 * Uuencoding and Posting::  Variables for customizing uuencoding.
4861 @end menu
4862
4863
4864 @node Rule Variables
4865 @subsubsection Rule Variables
4866 @cindex rule variables
4867
4868 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
4869 variables are on the form
4870   
4871 @lisp
4872       (list '(regexp1 command2)
4873             '(regexp2 command2)
4874             ...)
4875 @end lisp
4876
4877 @table @code
4878
4879 @item gnus-uu-user-view-rules
4880 @vindex gnus-uu-user-view-rules
4881 @cindex sox
4882 This variable is consulted first when viewing files.  If you wish to use,
4883 for instance, @code{sox} to convert an @samp{.au} sound file, you could
4884 say something like:
4885 @lisp
4886        (setq gnus-uu-user-view-rules
4887          (list '(\"\\\\.au$\" \"sox %s -t .aiff > /dev/audio\")))
4888 @end lisp
4889
4890 @item gnus-uu-user-view-rules-end
4891 @vindex gnus-uu-user-view-rules-end
4892 This variable is consulted if Gnus couldn't make any matches from the
4893 user and default view rules.
4894
4895 @item gnus-uu-user-archive-rules
4896 @vindex gnus-uu-user-archive-rules
4897 This variable can be used to say what commands should be used to unpack
4898 archives.
4899 @end table
4900
4901
4902 @node Other Decode Variables
4903 @subsubsection Other Decode Variables
4904
4905 @table @code
4906 @vindex gnus-uu-grabbed-file-functions
4907
4908 @item gnus-uu-grabbed-file-functions
4909 All functions in this list will be called right each file has been
4910 successfully decoded---so that you can move or view files right away,
4911 and don't have to wait for all files to be decoded before you can do
4912 anything.  Ready-made functions you can put in this list are:
4913
4914 @table @code
4915
4916 @item gnus-uu-grab-view
4917 @findex gnus-uu-grab-view
4918 View the file.
4919
4920 @item gnus-uu-grab-move
4921 @findex gnus-uu-grab-move
4922 Move the file (if you're using a saving function.)
4923 @end table
4924
4925 @item gnus-uu-ignore-files-by-name
4926 @vindex gnus-uu-ignore-files-by-name
4927 Files with name matching this regular expression won't be viewed.
4928
4929 @item gnus-uu-ignore-files-by-type
4930 @vindex gnus-uu-ignore-files-by-type
4931 Files with a @sc{mime} type matching this variable won't be viewed.
4932 Note that Gnus tries to guess what type the file is based on the name.
4933 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
4934 kludgey.
4935
4936 @item gnus-uu-tmp-dir
4937 @vindex gnus-uu-tmp-dir
4938 Where @code{gnus-uu} does its work.
4939
4940 @item gnus-uu-do-not-unpack-archives
4941 @vindex gnus-uu-do-not-unpack-archives
4942 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
4943 looking for files to display.
4944
4945 @item gnus-uu-view-and-save
4946 @vindex gnus-uu-view-and-save
4947 Non-@code{nil} means that the user will always be asked to save a file
4948 after viewing it.
4949
4950 @item gnus-uu-ignore-default-view-rules
4951 @vindex gnus-uu-ignore-default-view-rules
4952 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
4953 rules.
4954
4955 @item gnus-uu-ignore-default-archive-rules
4956 @vindex gnus-uu-ignore-default-archive-rules
4957 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
4958 unpacking commands.
4959
4960 @item gnus-uu-kill-carriage-return
4961 @vindex gnus-uu-kill-carriage-return
4962 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
4963 from articles.
4964
4965 @item gnus-uu-unmark-articles-not-decoded
4966 @vindex gnus-uu-unmark-articles-not-decoded
4967 Non-@code{nil} means that @code{gnus-uu} will mark articles that were
4968 unsuccessfully decoded as unread.
4969
4970 @item gnus-uu-correct-stripped-uucode
4971 @vindex gnus-uu-correct-stripped-uucode
4972 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
4973 uuencoded files that have had trailing spaces deleted.
4974
4975 @item gnus-uu-view-with-metamail
4976 @vindex gnus-uu-view-with-metamail
4977 @cindex metamail
4978 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
4979 commands defined by the rule variables and just fudge a @sc{mime}
4980 content type based on the file name.  The result will be fed to
4981 @code{metamail} for viewing.
4982
4983 @item gnus-uu-save-in-digest
4984 @vindex gnus-uu-save-in-digest
4985 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
4986 decoding, will save in digests.  If this variable is @code{nil},
4987 @code{gnus-uu} will just save everything in a file without any
4988 embellishments.  The digesting almost conforms to RFC1153---no easy way
4989 to specify any meaningful volume and issue numbers were found, so I
4990 simply dropped them.
4991
4992 @end table
4993
4994
4995 @node Uuencoding and Posting
4996 @subsubsection Uuencoding and Posting
4997
4998 @table @code
4999
5000 @item gnus-uu-post-include-before-composing
5001 @vindex gnus-uu-post-include-before-composing
5002 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
5003 before you compose the article.  If this variable is @code{t}, you can
5004 either include an encoded file with @kbd{C-c C-i} or have one included
5005 for you when you post the article.
5006
5007 @item gnus-uu-post-length
5008 @vindex gnus-uu-post-length
5009 Maximum length of an article.  The encoded file will be split into how
5010 many articles it takes to post the entire file.
5011
5012 @item gnus-uu-post-threaded
5013 @vindex gnus-uu-post-threaded
5014 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
5015 thread.  This may not be smart, as no other decoder I have seen are able
5016 to follow threads when collecting uuencoded articles.  (Well, I have
5017 seen one package that does that---@code{gnus-uu}, but somehow, I don't
5018 think that counts...) Default is @code{nil}.
5019
5020 @item gnus-uu-post-separate-description
5021 @vindex gnus-uu-post-separate-description
5022 Non-@code{nil} means that the description will be posted in a separate
5023 article.  The first article will typically be numbered (0/x).  If this
5024 variable is @code{nil}, the description the user enters will be included
5025 at the beginning of the first article, which will be numbered (1/x).
5026 Default is @code{t}.
5027
5028 @end table
5029
5030
5031 @node Viewing Files
5032 @subsection Viewing Files
5033 @cindex viewing files
5034 @cindex pseudo-articles
5035
5036 After decoding, if the file is some sort of archive, Gnus will attempt
5037 to unpack the archive and see if any of the files in the archive can be
5038 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
5039 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
5040 uncompress and de-tar the main file, and then view the two pictures.
5041 This unpacking process is recursive, so if the archive contains archives
5042 of archives, it'll all be unpacked.
5043
5044 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
5045 extracted file into the summary buffer.  If you go to these
5046 ``articles'', you will be prompted for a command to run (usually Gnus
5047 will make a suggestion), and then the command will be run.
5048
5049 @vindex gnus-view-pseudo-asynchronously
5050 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
5051 until the viewing is done before proceeding.
5052
5053 @vindex gnus-view-pseudos
5054 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
5055 the pseudo-articles into the summary buffer, but view them
5056 immediately.  If this variable is @code{not-confirm}, the user won't even
5057 be asked for a confirmation before viewing is done.
5058
5059 @vindex gnus-view-pseudos-separately 
5060 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
5061 pseudo-article will be created for each file to be viewed.  If
5062 @code{nil}, all files that use the same viewing command will be given as
5063 a list of parameters to that command.
5064
5065 @vindex gnus-insert-pseudo-articles
5066 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
5067 pseudo-articles when decoding.  It is @code{t} by default.
5068
5069 So; there you are, reading your @emph{pseudo-articles} in your
5070 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
5071 Why isn't anything real anymore? How did we get here?
5072
5073
5074 @node Article Treatment
5075 @section Article Treatment
5076
5077 Reading through this huge manual, you may have quite forgotten that the
5078 object of newsreaders are to actually, like, read what people have
5079 written.  Reading articles.  Unfortunately, people are quite bad at
5080 writing, so there are tons of functions and variables to make reading
5081 these articles easier.
5082
5083 @menu
5084 * Article Highlighting::    You want to make the article look like fruit salad.
5085 * Article Hiding::          You also want to make certain info go away.
5086 * Article Washing::         Lots of way-neat functions to make life better.
5087 * Article Buttons::         Click on URLs, Message-IDs, addresses and the like.
5088 * Article Date::            Grumble, UT!
5089 * Article Signature::       What is a signature?
5090 @end menu
5091
5092
5093 @node Article Highlighting
5094 @subsection Article Highlighting
5095 @cindex highlight
5096
5097 Not only do you want your article buffer to look like fruit salad, but
5098 you want it to look like technicolor fruit salad.
5099
5100 @table @kbd
5101
5102 @item W H a
5103 @kindex W H a (Summary)
5104 @findex gnus-article-highlight
5105 Highlight the current article (@code{gnus-article-highlight}).
5106
5107 @item W H h
5108 @kindex W H h (Summary)
5109 @findex gnus-article-highlight-headers
5110 @vindex gnus-header-face-alist
5111 Highlight the headers (@code{gnus-article-highlight-headers}).  The
5112 highlighting will be done according to the @code{gnus-header-face-alist}
5113 variable, which is a list where each element has the form @var{(regexp
5114 name content)}.  @var{regexp} is a regular expression for matching the
5115 header, @var{name} is the face used for highlighting the header name and
5116 @var{content} is the face for highlighting the header value.  The first
5117 match made will be used.  Note that @var{regexp} shouldn't have @samp{^}
5118 prepended---Gnus will add one.
5119
5120 @item W H c
5121 @kindex W H c (Summary)
5122 @findex gnus-article-highlight-citation
5123 Highlight cited text (@code{gnus-article-highlight-citation}). 
5124
5125 Some variables to customize the citation highlights:
5126
5127 @table @code
5128 @vindex gnus-cite-parse-max-size
5129
5130 @item gnus-cite-parse-max-size
5131 If the article size if bigger than this variable (which is 25000 by
5132 default), no citation highlighting will be performed.  
5133
5134 @item gnus-cite-prefix-regexp
5135 @vindex gnus-cite-prefix-regexp
5136 Regexp matching the longest possible citation prefix on a line. 
5137
5138 @item gnus-cite-max-prefix
5139 @vindex gnus-cite-max-prefix
5140 Maximum possible length for a citation prefix (default 20).
5141
5142 @item gnus-cite-face-list
5143 @vindex gnus-cite-face-list
5144 List of faces used for highlighting citations.  When there are citations
5145 from multiple articles in the same message, Gnus will try to give each
5146 citation from each article its own face.  This should make it easier to
5147 see who wrote what.
5148
5149 @item gnus-supercite-regexp
5150 @vindex gnus-supercite-regexp
5151 Regexp matching normal Supercite attribution lines.  
5152
5153 @item gnus-supercite-secondary-regexp
5154 @vindex gnus-supercite-secondary-regexp
5155 Regexp matching mangled Supercite attribution lines.
5156
5157 @item gnus-cite-minimum-match-count
5158 @vindex gnus-cite-minimum-match-count
5159 Minimum number of identical prefixes we have to see before we believe
5160 that it's a citation.
5161
5162 @item gnus-cite-attribution-prefix
5163 @vindex gnus-cite-attribution-prefix
5164 Regexp matching the beginning of an attribution line.
5165
5166 @item gnus-cite-attribution-suffix
5167 @vindex gnus-cite-attribution-suffix
5168 Regexp matching the end of an attribution line.
5169
5170 @item gnus-cite-attribution-face
5171 @vindex gnus-cite-attribution-face
5172 Face used for attribution lines.  It is merged with the face for the
5173 cited text belonging to the attribution.
5174
5175 @end table
5176
5177
5178 @item W H s
5179 @kindex W H s (Summary)
5180 @vindex gnus-signature-separator
5181 @vindex gnus-signature-face
5182 @findex gnus-article-highlight-signature
5183 Highlight the signature (@code{gnus-article-highlight-signature}).
5184 Everything after @code{gnus-signature-separator} (@pxref{Article
5185 Signature}) in an article will be considered a signature and will be
5186 highlighted with @code{gnus-signature-face}, which is @code{italic} by
5187 default.
5188
5189 @end table
5190
5191
5192 @node Article Hiding
5193 @subsection Article Hiding
5194 @cindex article hiding
5195
5196 Or rather, hiding certain things in each article.  There usually is much
5197 too much cruft in most articles.  
5198
5199 @table @kbd
5200
5201 @item W W a
5202 @kindex W W a (Summary)
5203 @findex gnus-article-hide
5204 Do maximum hiding on the summary buffer (@kbd{gnus-article-hide}). 
5205
5206 @item W W h
5207 @kindex W W h (Summary)
5208 @findex gnus-article-hide-headers
5209 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
5210 Headers}. 
5211
5212 @item W W b
5213 @kindex W W b (Summary)
5214 @findex gnus-article-hide-boring-headers
5215 Hide headers that aren't particularly interesting
5216 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
5217
5218 @item W W s
5219 @kindex W W s (Summary)
5220 @findex gnus-article-hide-signature
5221 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
5222 Signature}. 
5223
5224 @item W W p
5225 @kindex W W p (Summary)
5226 @findex gnus-article-hide-pgp
5227 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}). 
5228
5229 @item W W P
5230 @kindex W W P (Summary)
5231 @findex gnus-article-hide-pem
5232 Hide @sc{pem} (privacy enhavnced hessages) gruft
5233 (@code{gnus-article-hide-pem}).
5234
5235 @item W W c
5236 @kindex W W c (Summary)
5237 @findex gnus-article-hide-citation
5238 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
5239 customizing the hiding:
5240
5241 @table @code
5242
5243 @item gnus-cite-hide-percentage
5244 @vindex gnus-cite-hide-percentage
5245 If the cited text is of a bigger percentage than this variable (default
5246 50), hide the cited text.
5247
5248 @item gnus-cite-hide-absolute
5249 @vindex gnus-cite-hide-absolute
5250 The cited text must be have at least this length (default 10) before it
5251 is hidden.
5252
5253 @item gnus-cited-text-button-line-format
5254 @vindex gnus-cited-text-button-line-format
5255 Gnus adds buttons show where the cited text has been hidden, and to
5256 allow toggle hiding the text.  The format of the variable is specified
5257 by this format-like variable (@pxref{Formatting Variables}).  These
5258 specs are legal:
5259
5260 @table @samp
5261 @item b
5262 Start point of the hidden text.
5263 @item e
5264 End point of the hidden text.
5265 @item l
5266 Length of the hidden text.
5267 @end table
5268
5269 @item gnus-cited-lines-visible
5270 @vindex gnus-cited-lines-visible
5271 The number of lines at the beginning of the cited text to leave shown. 
5272
5273 @end table
5274
5275 @item W W C
5276 @kindex W W C (Summary)
5277 @findex gnus-article-hide-citation-in-followups
5278 Hide cited text in articles that aren't roots
5279 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
5280 useful as an interactive command, but might be a handy function to stick
5281 in @code{gnus-article-display-hook} (@pxref{Customizing Articles}). 
5282
5283 @end table
5284
5285 All these ``hiding'' commands are toggles, but if you give a negative
5286 prefix to these commands, they will show what they have previously
5287 hidden.  If you give a positive prefix, they will always hide.
5288
5289 Also @pxref{Article Highlighting} for further variables for
5290 citation customization.
5291
5292
5293 @node Article Washing
5294 @subsection Article Washing
5295 @cindex washing
5296 @cindex article washing
5297
5298 We call this ``article washing'' for a really good reason.  Namely, the
5299 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
5300
5301 @dfn{Washing} is defined by us as ``changing something from something to
5302 something else'', but normally results in something looking better.
5303 Cleaner, perhaps.
5304
5305 @table @kbd
5306
5307 @item W l
5308 @kindex W l (Summary)
5309 @findex gnus-summary-stop-page-breaking
5310 Remove page breaks from the current article
5311 (@code{gnus-summary-stop-page-breaking}).
5312
5313 @item W r
5314 @kindex W r (Summary)
5315 @findex gnus-summary-caesar-message
5316 Do a Caesar rotate (rot13) on the article buffer
5317 (@code{gnus-summary-caesar-message}). 
5318
5319 @item W t
5320 @kindex W t (Summary)
5321 @findex gnus-summary-toggle-header
5322 Toggle whether to display all headers in the article buffer
5323 (@code{gnus-summary-toggle-header}). 
5324
5325 @item W v
5326 @kindex W v (Summary)
5327 @findex gnus-summary-verbose-header
5328 Toggle whether to display all headers in the article buffer permanently
5329 (@code{gnus-summary-verbose-header}).
5330
5331 @item W m
5332 @kindex W m (Summary)
5333 @findex gnus-summary-toggle-mime
5334 Toggle whether to run the article through @sc{mime} before displaying
5335 (@code{gnus-summary-toggle-mime}).
5336
5337 @item W o
5338 @kindex W o (Summary)
5339 @findex gnus-article-treat-overstrike
5340 Treat overstrike (@code{gnus-article-treat-overstrike}).
5341
5342 @item W w
5343 @kindex W w (Summary)
5344 @findex gnus-article-fill-cited-article
5345 Do word wrap (@code{gnus-article-fill-cited-article}).  If you use this
5346 function in @code{gnus-article-display-hook}, it should be run fairly
5347 late and certainly after any highlighting.
5348
5349 @item W c
5350 @kindex W c (Summary)
5351 @findex gnus-article-remove-cr
5352 Remove CR (@code{gnus-article-remove-cr}).
5353
5354 @item W L
5355 @kindex W L (Summary)
5356 @findex gnus-article-remove-trailing-blank-lines
5357 Remove all blank lines at the end of the article
5358 (@code{gnus-article-remove-trailing-blank-lines}).
5359
5360 @item W q
5361 @kindex W q (Summary)
5362 @findex gnus-article-de-quoted-unreadable
5363 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
5364
5365 @item W f
5366 @kindex W f (Summary)
5367 @cindex x-face
5368 @findex gnus-article-display-x-face
5369 @findex gnus-article-x-face-command
5370 @vindex gnus-article-x-face-command
5371 @vindex gnus-article-x-face-too-ugly
5372 Look for and display any X-Face headers
5373 (@code{gnus-article-display-x-face}).  The command executed by this
5374 function is given by the @code{gnus-article-x-face-command} variable.
5375 If this variable is a string, this string will be executed in a
5376 sub-shell.  If it is a function, this function will be called with the
5377 face as the argument.  If the @code{gnus-article-x-face-too-ugly} (which
5378 is a regexp) matches the @code{From} header, the face will not be shown.
5379 The default action under Emacs is to fork off an @code{xv} to view the
5380 face; under XEmacs the default action is to display the face before the
5381 @code{From} header.  (It's nicer if XEmacs has been compiled with X-Face
5382 support---that will make display somewhat faster.  If there's no native
5383 X-Face support, Gnus will try to convert the @code{X-Face} header using
5384 external programs from the @code{pbmplus} package and friends.)  If you
5385 want to have this function in the display hook, it should probably come
5386 last.
5387
5388 @item W b
5389 @kindex W b (Summary)
5390 @findex gnus-article-add-buttons
5391 Add clickable buttons to the article (@code{gnus-article-add-buttons}). 
5392
5393 @item W B
5394 @kindex W B (Summary)
5395 @findex gnus-article-add-buttons-to-head
5396 Add clickable buttons to the article headers
5397 (@code{gnus-article-add-buttons-to-head}).  
5398
5399 @end table
5400
5401
5402 @node Article Buttons
5403 @subsection Article Buttons
5404 @cindex buttons
5405
5406 People often include references to other stuff in articles, and it would
5407 be nice if Gnus could just fetch whatever it is that people talk about
5408 with the minimum of fuzz.
5409
5410 Gnus adds @dfn{buttons} to certain standard references by default:
5411 Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
5412 two variables, one that handles article bodies and one that handles
5413 article heads:
5414
5415 @table @code
5416
5417 @item gnus-button-alist
5418 @vindex gnus-button-alist
5419 This is an alist where each entry has this form:
5420
5421 @lisp
5422 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
5423 @end lisp
5424
5425 @table @var
5426
5427 @item regexp
5428 All text that match this regular expression will be considered an
5429 external reference.  Here's a typical regexp that match embedded URLs:
5430 @samp{<URL:\\([^\n\r>]*\\)>}. 
5431
5432 @item button-par
5433 Gnus has to know which parts of the match is to be highlighted.  This is
5434 a number that says what sub-expression of the regexp that is to be
5435 highlighted.  If you want it all highlighted, you use @code{0} here.
5436
5437 @item use-p
5438 This form will be @code{eval}ed, and if the result is non-@code{nil},
5439 this is considered a match.  This is useful if you want extra sifting to
5440 avoid false matches.
5441
5442 @item function
5443 This function will be called when you click on this button.
5444
5445 @item data-par
5446 As with @var{button-par}, this is a sub-expression number, but this one
5447 says which part of the match is to be sent as data to @var{function}. 
5448
5449 @end table
5450
5451 So the full entry for buttonizing URLs is then
5452
5453 @lisp
5454 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
5455 @end lisp
5456
5457 @item gnus-header-button-alist
5458 @vindex gnus-header-button-alist
5459 This is just like the other alist, except that it is applied to the
5460 article head only, and that each entry has an additional element that is
5461 used to say what headers to apply the buttonize coding to:
5462
5463 @lisp
5464 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
5465 @end lisp
5466
5467 @var{header} is a regular expression.
5468
5469 @item gnus-button-url-regexp
5470 @vindex gnus-button-url-regexp
5471 A regular expression that matches embedded URLs.  It is used in the
5472 default values of the variables above.
5473
5474 @item gnus-article-button-face
5475 @vindex gnus-article-button-face
5476 Face used on bottons.
5477
5478 @item gnus-article-mouse-face
5479 @vindex gnus-article-mouse-face
5480 Face is used when the mouse cursor is over a button.
5481
5482 @end table
5483
5484
5485 @node Article Date
5486 @subsection Article Date
5487
5488 The date is most likely generated in some obscure timezone you've never
5489 heard of, so it's quite nice to be able to find out what the time was
5490 when the article was sent.
5491
5492 @table @kbd
5493
5494 @item W T u
5495 @kindex W T u (Summary)
5496 @findex gnus-article-date-ut
5497 Display the date in UT (aka. GMT, aka ZULU)
5498 (@code{gnus-article-date-ut}). 
5499
5500 @item W T l
5501 @kindex W T l (Summary)
5502 @findex gnus-article-date-local
5503 Display the date in the local timezone (@code{gnus-article-date-local}).
5504
5505 @item W T e
5506 @kindex W T e (Summary)
5507 @findex gnus-article-date-lapsed
5508 Say how much time has (e)lapsed between the article was posted and now
5509 (@code{gnus-article-date-lapsed}).
5510
5511 @item W T o
5512 @kindex W T o (Summary)
5513 @findex gnus-article-date-original
5514 Display the original date (@code{gnus-article-date-original}).  This can
5515 be useful if you normally use some other conversion function and is
5516 worried that it might be doing something totally wrong.  Say, claiming
5517 that the article was posted in 1854.  Although something like that is
5518 @emph{totally} impossible.  Don't you trust me? *titter*
5519
5520 @end table
5521
5522
5523 @node Article Signature
5524 @subsection Article Signature
5525 @cindex signatures
5526 @cindex article signature
5527
5528 @vindex gnus-signature-separator
5529 Each article is divided into two parts---the head and the body.  The
5530 body can be divided into a signature part and a text part.  The variable
5531 that says what is to be considered a signature is
5532 @code{gnus-signature-separator}.  This is normally the standard
5533 @samp{"^-- $"} as mandated by son-of-RFC 1036.  However, many people use
5534 non-standard signature separators, so this variable can also be a list
5535 of regular expressions to be tested, one by one.  (Searches are done
5536 from the end of the body towards the beginning.)  One likely value is:
5537
5538 @lisp
5539 (setq gnus-signature-separator
5540       '("^-- $"         ; The standard
5541         "^-- *$"        ; A common mangling
5542         "^-------*$"    ; Many people just use a looong 
5543                         ; line of dashes.  Shame!
5544         "^ *--------*$" ; Double-shame!
5545         "^________*$"   ; Underscores are also popular
5546         "^========*$")) ; Pervert!
5547 @end lisp
5548
5549 The more permissive you are, the more likely it is that you'll get false
5550 positives.
5551
5552 @vindex gnus-signature-limit
5553 @code{gnus-signature-limit} provides a limit to what is considered a
5554 signature. 
5555
5556 @enumerate
5557 @item 
5558 If it is an integer, no signature may be longer (in characters) than
5559 that integer.
5560 @item 
5561 If it is a floating point number, no signature may be longer (in lines)
5562 than that number.
5563 @item 
5564 If it is a function, the function will be called without any parameters,
5565 and if it returns @code{nil}, there is no signature in the buffer.
5566 @item
5567 If it is a string, it will be used as a regexp.  If it matches, the text
5568 in question is not a signature.
5569 @end enumerate
5570
5571 This variable can also be a list where the elements may be of the types
5572 listed above.  
5573
5574
5575 @node Summary Sorting
5576 @section Summary Sorting
5577 @cindex summary sorting
5578
5579 You can have the summary buffer sorted in various ways, even though I
5580 can't really see why you'd want that.
5581
5582 @table @kbd
5583
5584 @item C-c C-s C-n
5585 @kindex C-c C-s C-n (Summary)
5586 @findex gnus-summary-sort-by-number
5587 Sort by article number (@code{gnus-summary-sort-by-number}).
5588
5589 @item C-c C-s C-a
5590 @kindex C-c C-s C-a (Summary)
5591 @findex gnus-summary-sort-by-author
5592 Sort by author (@code{gnus-summary-sort-by-author}).
5593
5594 @item C-c C-s C-s
5595 @kindex C-c C-s C-s (Summary)
5596 @findex gnus-summary-sort-by-subject
5597 Sort by subject (@code{gnus-summary-sort-by-subject}).
5598
5599 @item C-c C-s C-d
5600 @kindex C-c C-s C-d (Summary)
5601 @findex gnus-summary-sort-by-date
5602 Sort by date (@code{gnus-summary-sort-by-date}).
5603
5604 @item C-c C-s C-i
5605 @kindex C-c C-s C-i (Summary)
5606 @findex gnus-summary-sort-by-score
5607 Sort by score (@code{gnus-summary-sort-by-score}).
5608 @end table
5609
5610 These functions will work both when you use threading and when you don't
5611 use threading.  In the latter case, all summary lines will be sorted,
5612 line by line.  In the former case, sorting will be done on a
5613 root-by-root basis, which might not be what you were looking for.  To
5614 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
5615 Commands}).
5616
5617
5618 @node Finding the Parent
5619 @section Finding the Parent
5620 @cindex parent articles
5621 @cindex referring articles
5622
5623 @findex gnus-summary-refer-parent-article
5624 @kindex ^ (Summary)
5625 If you'd like to read the parent of the current article, and it is not
5626 displayed in the summary buffer, you might still be able to.  That is,
5627 if the current group is fetched by @sc{nntp}, the parent hasn't expired
5628 and the @code{References} in the current article are not mangled, you
5629 can just press @kbd{^} or @kbd{A r}
5630 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
5631 you'll get the parent.  If the parent is already displayed in the
5632 summary buffer, point will just move to this article.
5633
5634 @findex gnus-summary-refer-references
5635 @kindex A R (Summary)
5636 You can have Gnus fetch all articles mentioned in the @code{References}
5637 header of the article by pushing @kbd{A R}
5638 (@code{gnus-summary-refer-references}). 
5639
5640 @findex gnus-summary-refer-article
5641 @kindex M-^ (Summary)
5642 You can also ask the @sc{nntp} server for an arbitrary article, no
5643 matter what group it belongs to.  @kbd{M-^}
5644 (@code{gnus-summary-refer-article}) will ask you for a
5645 @code{Message-ID}, which is one of those long thingies that look
5646 something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You have to get
5647 it all exactly right.  No fuzzy searches, I'm afraid.
5648
5649 @vindex gnus-refer-article-method
5650 If the group you are reading is located on a backend that does not
5651 support fetching by @code{Message-ID} very well (like @code{nnspool}),
5652 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
5653 would, perhaps, be best if the @sc{nntp} server you consult is the same
5654 as the one that keeps the spool you are reading from updated, but that's
5655 not really necessary.
5656
5657 Most of the mail backends support fetching by @code{Message-ID}, but do
5658 not do a particularly excellent job of it.  That is, @code{nnmbox} and
5659 @code{nnbabyl} are able to locate articles from any groups, while
5660 @code{nnml} and @code{nnfolder} are only able to locate articles that
5661 have been posted to the current group.  (Anything else would be too time
5662 consuming.)  @code{nnmh} does not support this at all.
5663
5664
5665 @node Alternative Approaches
5666 @section Alternative Approaches
5667
5668 Different people like to read news using different methods.  This being
5669 Gnus, we offer a small selection of minor modes for the summary buffers.
5670
5671 @menu
5672 * Pick and Read::               First mark articles and then read them.
5673 * Binary Groups::               Auto-decode all articles.
5674 @end menu
5675
5676
5677 @node Pick and Read
5678 @subsection Pick and Read
5679 @cindex pick and read
5680
5681 Some newsreaders (like @code{nn} and, uhm, @code{nn}) use a two-phased
5682 reading interface.  The user first marks the articles she wants to read
5683 from a summary buffer.  Then she starts reading the articles with just
5684 an article buffer displayed.
5685
5686 @findex gnus-pick-mode
5687 @kindex M-x gnus-pick-mode
5688 Gnus provides a summary buffer minor mode that allows
5689 this---@code{gnus-pick-mode}.  This basically means that a few process
5690 mark commands become one-keystroke commands to allow easy marking, and
5691 it makes one additional command for switching to the summary buffer
5692 available. 
5693
5694 Here are the available keystrokes when using pick mode:
5695
5696 @table @kbd
5697 @item .
5698 @kindex . (Pick)
5699 @findex gnus-summary-mark-as-processable
5700 Pick the article on the current line
5701 (@code{gnus-summary-mark-as-processable}).  If given a numerical prefix,
5702 go to the article on that line and pick that article.  (The line number
5703 is normally displayed on the beginning of the summary pick lines.)
5704
5705 @item SPACE
5706 @kindex SPACE (Pick)
5707 @findex gnus-pick-next-page
5708 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
5709 at the end of the buffer, start reading the picked articles.
5710
5711 @item u
5712 @kindex u (Pick)
5713 @findex gnus-summary-unmark-as-processable
5714 Unpick the article (@code{gnus-summary-unmark-as-processable}). 
5715
5716 @item U
5717 @kindex U (Pick)
5718 @findex gnus-summary-unmark-all-processable
5719 Unpick all articles (@code{gnus-summary-unmark-all-processable}). 
5720
5721 @item t
5722 @kindex t (Pick)
5723 @findex gnus-uu-mark-thread
5724 Pick the thread (@code{gnus-uu-mark-thread}). 
5725
5726 @item T
5727 @kindex T (Pick)
5728 @findex gnus-uu-unmark-thread
5729 Unpick the thread (@code{gnus-uu-unmark-thread}). 
5730
5731 @item r
5732 @kindex r (Pick)
5733 @findex gnus-uu-mark-region
5734 Pick the region (@code{gnus-uu-mark-region}). 
5735
5736 @item R
5737 @kindex R (Pick)
5738 @findex gnus-uu-unmark-region
5739 Unpick the region (@code{gnus-uu-unmark-region}). 
5740
5741 @item e
5742 @kindex e (Pick)
5743 @findex gnus-uu-mark-by-regexp
5744 Pick articles that match a regexp (@code{gnus-uu-mark-by-regexp}). 
5745
5746 @item E
5747 @kindex E (Pick)
5748 @findex gnus-uu-unmark-by-regexp
5749 Unpick articles that match a regexp (@code{gnus-uu-unmark-by-regexp}). 
5750
5751 @item b
5752 @kindex b (Pick)
5753 @findex gnus-uu-mark-buffer
5754 Pick the buffer (@code{gnus-uu-mark-buffer}). 
5755
5756 @item B
5757 @kindex B (Pick)
5758 @findex gnus-uu-unmark-buffer
5759 Unpick the buffer (@code{gnus-uu-unmark-buffer}). 
5760
5761 @item RET
5762 @kindex RET (Pick)
5763 @findex gnus-pick-start-reading
5764 @vindex gnus-pick-display-summary
5765 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
5766 given a prefix, mark all unpicked articles as read first.  If
5767 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
5768 will still be visible when you are reading.
5769
5770 @end table
5771
5772 If this sounds like a good idea to you, you could say:
5773
5774 @lisp
5775 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
5776 @end lisp
5777
5778 @vindex gnus-pick-mode-hook
5779 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
5780
5781 @vindex gnus-mark-unpicked-articles-as-read
5782 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
5783 all unpicked articles as read.  The default is @code{nil}.
5784
5785 @vindex gnus-summary-pick-line-format
5786 The summary line format in pick mode is slightly different than the
5787 standard format.  At the beginning of each line the line number is
5788 displayed.  The pick mode line format is controlled by the
5789 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
5790 Variables}).  It accepts the same format specs that
5791 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}). 
5792
5793
5794 @node Binary Groups
5795 @subsection Binary Groups
5796 @cindex binary groups
5797
5798 @findex gnus-binary-mode
5799 @kindex M-x gnus-binary-mode
5800 If you spend much time in binary groups, you may grow tired of hitting
5801 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
5802 is a minor mode for summary buffers that makes all ordinary Gnus article
5803 selection functions uudecode series of articles and display the result
5804 instead of just displaying the articles the normal way.  
5805
5806 @kindex g (Binary)
5807 @findex gnus-binary-show-article
5808 In fact, the only way to see the actual articles if you have turned this
5809 mode on is the @kbd{g} command (@code{gnus-binary-show-article}). 
5810
5811 @vindex gnus-binary-mode-hook
5812 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
5813
5814
5815 @node Tree Display
5816 @section Tree Display
5817 @cindex trees
5818
5819 @vindex gnus-use-trees
5820 If you don't like the normal Gnus summary display, you might try setting
5821 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
5822 additional @dfn{tree buffer}.  You can execute all summary mode commands
5823 in the tree buffer.  
5824
5825 There are a few variables to customize the tree display, of course:
5826
5827 @table @code
5828 @item gnus-tree-mode-hook
5829 @vindex gnus-tree-mode-hook
5830 A hook called in all tree mode buffers.
5831
5832 @item gnus-tree-mode-line-format
5833 @vindex gnus-tree-mode-line-format
5834 A format string for the mode bar in the tree mode buffers.  The default
5835 is @samp{Gnus: %%b [%A] %Z}.  For a list of legal specs, @pxref{Summary
5836 Buffer Mode Line}. 
5837
5838 @item gnus-selected-tree-face
5839 @vindex gnus-selected-tree-face
5840 Face used for highlighting the selected article in the tree buffer.  The
5841 default is @code{modeline}.
5842
5843 @item gnus-tree-line-format
5844 @vindex gnus-tree-line-format
5845 A format string for the tree nodes.  The name is a bit of a misnomer,
5846 though---it doesn't define a line, but just the node.  The default value
5847 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
5848 the name of the poster.  It is vital that all nodes are of the same
5849 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
5850
5851 Legal specs are:
5852
5853 @table @samp
5854 @item n
5855 The name of the poster.
5856 @item f
5857 The @code{From} header.
5858 @item N
5859 The number of the article.
5860 @item [
5861 The opening bracket.
5862 @item ] 
5863 The closing bracket.
5864 @item s
5865 The subject.
5866 @end table
5867
5868 @xref{Formatting Variables}.
5869
5870 Variables related to the display are:
5871
5872 @table @code
5873 @item gnus-tree-brackets
5874 @vindex gnus-tree-brackets
5875 This is used for differentiating between ``real'' articles and
5876 ``sparse'' articles.  The format is @var{((real-open . real-close)
5877 (sparse-open . sparse-close) (dummy-open . dummy-close))}, and the
5878 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}))}.
5879
5880 @item gnus-tree-parent-child-edges
5881 @vindex gnus-tree-parent-child-edges
5882 This is a list that contains the characters used for connecting parent
5883 nodes to their children.  The default is @code{(?- ?\\ ?|)}. 
5884
5885 @end table
5886
5887 @item gnus-tree-minimize-window
5888 @vindex gnus-tree-minimize-window
5889 If this variable is non-@code{nil}, Gnus will try to keep the tree
5890 buffer as small as possible to allow more room for the other Gnus
5891 windows.  If this variable is a number, the tree buffer will never be
5892 higher than that number.  The default is @code{t}.
5893
5894 @item gnus-generate-tree-function
5895 @vindex gnus-generate-tree-function
5896 @findex gnus-generate-horizontal-tree
5897 @findex gnus-generate-vertical-tree
5898 The function that actually generates the thread tree.  Two predefined
5899 functions are available: @code{gnus-generate-horizontal-tree} and
5900 @code{gnus-generate-vertical-tree} (which is the default).
5901
5902 @end table
5903
5904 Here's and example from a horizontal tree buffer:
5905
5906 @example
5907 @{***@}-(***)-[odd]-[Gun]
5908      |     \[Jan]
5909      |     \[odd]-[Eri]
5910      |     \(***)-[Eri]
5911      |           \[odd]-[Paa]
5912      \[Bjo]
5913      \[Gun]
5914      \[Gun]-[Jor]
5915 @end example
5916
5917 Here's the same thread displayed in a vertical tree buffer:
5918
5919 @example
5920 @{***@}
5921   |--------------------------\-----\-----\
5922 (***)                         [Bjo] [Gun] [Gun]
5923   |--\-----\-----\                          |
5924 [odd] [Jan] [odd] (***)                   [Jor]
5925   |           |     |--\
5926 [Gun]       [Eri] [Eri] [odd]
5927                           |
5928                         [Paa]
5929 @end example
5930
5931
5932 @node Mail Group Commands
5933 @section Mail Group Commands
5934 @cindex mail group commands
5935
5936 Some commands only make sense in mail groups.  If these commands are
5937 illegal in the current group, they will raise a hell and let you know.
5938
5939 All these commands (except the expiry and edit commands) use the
5940 process/prefix convention (@pxref{Process/Prefix}).
5941
5942 @table @kbd
5943
5944 @item B e
5945 @kindex B e (Summary)
5946 @findex gnus-summary-expire-articles
5947 Expire all expirable articles in the group
5948 (@code{gnus-summary-expire-articles}).
5949
5950 @item B M-C-e
5951 @kindex B M-C-e (Summary)
5952 @findex gnus-summary-expire-articles-now
5953 Expunge all the expirable articles in the group
5954 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
5955 articles that are eligible for expiry in the current group will
5956 disappear forever into that big @file{/dev/null} in the sky.
5957
5958 @item B DEL
5959 @kindex B DEL (Summary)
5960 @findex gnus-summary-delete-article
5961 Delete the mail article.  This is ``delete'' as in ``delete it from your
5962 disk forever and ever, never to return again.'' Use with caution.
5963 (@code{gnus-summary-delete-article}).
5964
5965 @item B m
5966 @kindex B m (Summary)
5967 @cindex move mail
5968 @findex gnus-summary-move-article
5969 Move the article from one mail group to another
5970 (@code{gnus-summary-move-article}). 
5971
5972 @item B c
5973 @kindex B c (Summary)
5974 @cindex copy mail
5975 @findex gnus-summary-copy-article
5976 Copy the article from one group (mail group or not) to a mail group
5977 (@code{gnus-summary-copy-article}).
5978
5979 @item B C
5980 @kindex B C (Summary)
5981 @cindex crosspost mail
5982 @findex gnus-summary-crosspost-article
5983 Crosspost the current article to some other group
5984 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
5985 the article in the other group, and the Xref headers of the article will
5986 be properly updated.
5987
5988 @item B i
5989 @kindex B i (Summary)
5990 @findex gnus-summary-import-article
5991 Import an arbitrary file into the current mail newsgroup
5992 (@code{gnus-summary-import-article}).  You will be prompted for a file
5993 name, a @code{From} header and a @code{Subject} header.
5994
5995 @item B r
5996 @kindex B r (Summary)
5997 @findex gnus-summary-respool-article
5998 Respool the mail article (@code{gnus-summary-move-article}).
5999
6000 @item B w
6001 @itemx e
6002 @kindex B w (Summary)
6003 @kindex e (Summary)
6004 @findex gnus-summary-edit-article
6005 @kindex C-c C-c (Article)
6006 Edit the current article (@code{gnus-summary-edit-article}).  To finish
6007 editing and make the changes permanent, type @kbd{C-c C-c}
6008 (@kbd{gnus-summary-edit-article-done}).
6009
6010 @item B q
6011 @kindex B q (Summary)
6012 @findex gnus-summary-respool-query
6013 If you want to re-spool an article, you might be curious as to what group
6014 the article will end up in before you do the re-spooling.  This command
6015 will tell you (@code{gnus-summary-respool-query}). 
6016 @end table
6017
6018 @vindex gnus-move-split-methods
6019 @cindex moving articles
6020 If you move (or copy) articles regularly, you might wish to have Gnus
6021 suggest where to put the articles.  @code{gnus-move-split-methods} is a
6022 variable that uses the same syntax as @code{gnus-split-methods}
6023 (@pxref{Saving Articles}).  You may customize that variable to create
6024 suggestions you find reasonable.
6025
6026
6027 @node Various Summary Stuff
6028 @section Various Summary Stuff
6029
6030 @menu
6031 * Summary Group Information::         Information oriented commands.
6032 * Searching for Articles::            Multiple article commands.
6033 * Really Various Summary Commands::   Those pesky non-conformant commands.
6034 @end menu
6035
6036 @table @code
6037 @vindex gnus-summary-mode-hook
6038 @item gnus-summary-mode-hook
6039 This hook is called when creating a summary mode buffer.
6040
6041 @vindex gnus-summary-generate-hook
6042 @item gnus-summary-generate-hook
6043 This is called as the last thing before doing the threading and the
6044 generation of the summary buffer.  It's quite convenient for customizing
6045 the threading variables based on what data the newsgroup has.  This hook
6046 is called from the summary buffer after most summary buffer variables
6047 has been set.
6048
6049 @vindex gnus-summary-prepare-hook
6050 @item gnus-summary-prepare-hook
6051 Is is called after the summary buffer has been generated.  You might use
6052 it to, for instance, highlight lines or modify the look of the buffer in
6053 some other ungodly manner.  I don't care.
6054
6055 @end table
6056
6057
6058 @node Summary Group Information
6059 @subsection Summary Group Information
6060
6061 @table @kbd
6062
6063 @item H f
6064 @kindex H f (Summary)
6065 @findex gnus-summary-fetch-faq
6066 @vindex gnus-group-faq-directory
6067 Try to fetch the FAQ (list of frequently asked questions) for the
6068 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
6069 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
6070 on a remote machine.  This variable can also be a list of directories.
6071 In that case, giving a prefix to this command will allow you to choose
6072 between the various sites.  @code{ange-ftp} probably will be used for
6073 fetching the file.
6074
6075 @item H d
6076 @kindex H d (Summary)
6077 @findex gnus-summary-describe-group
6078 Give a brief description of the current group
6079 (@code{gnus-summary-describe-group}).  If given a prefix, force
6080 rereading the description from the server.
6081
6082 @item H h
6083 @kindex H h (Summary)
6084 @findex gnus-summary-describe-briefly
6085 Give a very brief description of the most important summary keystrokes
6086 (@code{gnus-summary-describe-briefly}). 
6087
6088 @item H i
6089 @kindex H i (Summary)
6090 @findex gnus-info-find-node
6091 Go to the Gnus info node (@code{gnus-info-find-node}).
6092 @end table
6093
6094
6095 @node Searching for Articles
6096 @subsection Searching for Articles
6097
6098 @table @kbd
6099
6100 @item M-s
6101 @kindex M-s (Summary)
6102 @findex gnus-summary-search-article-forward
6103 Search through all subsequent articles for a regexp
6104 (@code{gnus-summary-search-article-forward}). 
6105
6106 @item M-r
6107 @kindex M-r (Summary)
6108 @findex gnus-summary-search-article-backward
6109 Search through all previous articles for a regexp
6110 (@code{gnus-summary-search-article-backward}). 
6111
6112 @item &
6113 @kindex & (Summary)
6114 @findex gnus-summary-execute-command
6115 This command will prompt you for a header field, a regular expression to
6116 match on this field, and a command to be executed if the match is made
6117 (@code{gnus-summary-execute-command}).
6118
6119 @item M-&
6120 @kindex M-& (Summary)
6121 @findex gnus-summary-universal-argument
6122 Perform any operation on all articles that have been marked with
6123 the process mark (@code{gnus-summary-universal-argument}).
6124 @end table
6125
6126
6127 @node Really Various Summary Commands
6128 @subsection Really Various Summary Commands
6129
6130 @table @kbd
6131
6132 @item C-d
6133 @kindex C-d (Summary)
6134 @findex gnus-summary-enter-digest-group
6135 If the current article is a collection of other articles (for instance,
6136 a digest), you might use this command to enter a group based on the that
6137 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
6138 guess what article type is currently displayed unless you give a prefix
6139 to this command, which forces a ``digest'' interpretation.  Basically,
6140 whenever you see a message that is a collection of other messages on
6141 some format, you @kbd{C-d} and read these messages in a more convenient
6142 fashion.
6143
6144 @item M-C-d
6145 @kindex M-C-d (Summary)
6146 @findex gnus-summary-read-document
6147 This command is very similar to the one above, but lets you gather
6148 several documents into one biiig group
6149 (@code{gnus-summary-read-document}).  It does this by opening several
6150 @code{nndoc} groups for each document, and then opening an
6151 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
6152 command understands the process/prefix convention
6153 (@pxref{Process/Prefix}). 
6154
6155 @item C-t
6156 @kindex C-t (Summary)
6157 @findex gnus-summary-toggle-truncation
6158 Toggle truncation of summary lines (@code{gnus-summary-toggle-truncation}).
6159
6160 @item =
6161 @kindex = (Summary)
6162 @findex gnus-summary-expand-window
6163 Expand the summary buffer window (@code{gnus-summary-expand-window}).
6164 If given a prefix, force an @code{article} window configuration. 
6165 @end table
6166
6167
6168 @node Exiting the Summary Buffer
6169 @section Exiting the Summary Buffer
6170 @cindex summary exit
6171 @cindex exiting groups
6172
6173 Exiting from the summary buffer will normally update all info on the
6174 group and return you to the group buffer. 
6175
6176 @table @kbd
6177
6178 @item Z Z
6179 @itemx q
6180 @kindex Z Z (Summary)
6181 @kindex q (Summary)
6182 @findex gnus-summary-exit
6183 @vindex gnus-summary-exit-hook
6184 @vindex gnus-summary-prepare-exit-hook
6185 Exit the current group and update all information on the group
6186 (@code{gnus-summary-exit}). @code{gnus-summary-prepare-exit-hook} is
6187 called before doing much of the exiting, and calls
6188 @code{gnus-summary-expire-articles} by default.
6189 @code{gnus-summary-exit-hook} is called after finishing the exiting
6190 process. 
6191
6192 @item Z E
6193 @itemx Q
6194 @kindex Z E (Summary)
6195 @kindex Q (Summary)
6196 @findex gnus-summary-exit-no-update
6197 Exit the current group without updating any information on the group
6198 (@code{gnus-summary-exit-no-update}).
6199
6200 @item Z c
6201 @itemx c
6202 @kindex Z c (Summary)
6203 @kindex c (Summary)
6204 @findex gnus-summary-catchup-and-exit
6205 Mark all unticked articles in the group as read and then exit
6206 (@code{gnus-summary-catchup-and-exit}).
6207
6208 @item Z C
6209 @kindex Z C (Summary)
6210 @findex gnus-summary-catchup-all-and-exit
6211 Mark all articles, even the ticked ones, as read and then exit
6212 (@code{gnus-summary-catchup-all-and-exit}).
6213
6214 @item Z n
6215 @kindex Z n (Summary)
6216 @findex gnus-summary-catchup-and-goto-next-group
6217 Mark all articles as read and go to the next group
6218 (@code{gnus-summary-catchup-and-goto-next-group}). 
6219
6220 @item Z R
6221 @kindex Z R (Summary)
6222 @findex gnus-summary-reselect-current-group
6223 Exit this group, and then enter it again
6224 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
6225 all articles, both read and unread.
6226
6227 @item Z G
6228 @itemx M-g
6229 @kindex Z G (Summary)
6230 @kindex M-g (Summary)
6231 @findex gnus-summary-rescan-group
6232 Exit the group, check for new articles in the group, and select the
6233 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
6234 articles, both read and unread.
6235
6236 @item Z N
6237 @kindex Z N (Summary)
6238 @findex gnus-summary-next-group
6239 Exit the group and go to the next group
6240 (@code{gnus-summary-next-group}). 
6241
6242 @item Z P
6243 @kindex Z P (Summary)
6244 @findex gnus-summary-prev-group
6245 Exit the group and go to the previous group
6246 (@code{gnus-summary-prev-group}). 
6247 @end table
6248
6249 @vindex gnus-exit-group-hook
6250 @code{gnus-exit-group-hook} is called when you exit the current
6251 group.  
6252
6253 @findex gnus-summary-wake-up-the-dead
6254 @findex gnus-dead-summary-mode
6255 @vindex gnus-kill-summary-on-exit
6256 If you're in the habit of exiting groups, and then changing your mind
6257 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
6258 If you do that, Gnus won't kill the summary buffer when you exit it.
6259 (Quelle surprise!)  Instead it will change the name of the buffer to
6260 something like @samp{*Dead Summary ... *} and install a minor mode
6261 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
6262 buffer, you'll find that all keys are mapped to a function called
6263 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
6264 summary buffer will result in a live, normal summary buffer.  
6265
6266 There will never be more than one dead summary buffer at any one time. 
6267
6268 @vindex gnus-use-cross-reference
6269 The data on the current group will be updated (which articles you have
6270 read, which articles you have replied to, etc.) when you exit the
6271 summary buffer.  If the @code{gnus-use-cross-reference} variable is
6272 @code{t} (which is the default), articles that are cross-referenced to
6273 this group and are marked as read, will also be marked as read in the
6274 other subscribed groups they were cross-posted to.  If this variable is
6275 neither @code{nil} nor @code{t}, the article will be marked as read in
6276 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
6277
6278
6279 @node Crosspost Handling
6280 @section Crosspost Handling
6281
6282 @cindex velveeta
6283 @cindex spamming
6284 Marking cross-posted articles as read ensures that you'll never have to
6285 read the same article more than once.  Unless, of course, somebody has
6286 posted it to several groups separately.  Posting the same article to
6287 several groups (not cross-posting) is called @dfn{spamming}, and you are
6288 by law required to send nasty-grams to anyone who perpetrates such a
6289 heinous crime.  You may want to try NoCeM handling to filter out spam
6290 (@pxref{NoCeM}). 
6291
6292 Remember: Cross-posting is kinda ok, but posting the same article
6293 separately to several groups is not.  Massive cross-posting (aka.
6294 @dfn{velveeta}) is to be avoided at all costs.
6295
6296 @cindex cross-posting
6297 @cindex Xref
6298 @cindex @sc{nov}
6299 One thing that may cause Gnus to not do the cross-posting thing
6300 correctly is if you use an @sc{nntp} server that supports @sc{xover}
6301 (which is very nice, because it speeds things up considerably) which
6302 does not include the @code{Xref} header in its @sc{nov} lines.  This is
6303 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
6304 even with @sc{xover} by registering the @code{Xref} lines of all
6305 articles you actually read, but if you kill the articles, or just mark
6306 them as read without reading them, Gnus will not get a chance to snoop
6307 the @code{Xref} lines out of these articles, and will be unable to use
6308 the cross reference mechanism.
6309
6310 @cindex LIST overview.fmt
6311 @cindex overview.fmt
6312 To check whether your @sc{nntp} server includes the @code{Xref} header
6313 in its overview files, try @samp{telnet your.nntp.server nntp},
6314 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
6315 overview.fmt}.  This may not work, but if it does, and the last line you
6316 get does not read @samp{Xref:full}, then you should shout and whine at
6317 your news admin until she includes the @code{Xref} header in the
6318 overview files.
6319
6320 @vindex gnus-nov-is-evil
6321 If you want Gnus to get the @code{Xref}s right all the time, you have to
6322 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
6323 considerably.
6324
6325 C'est la vie.
6326
6327 For an alternative approach, @xref{Duplicate Suppression}.
6328
6329
6330 @node Duplicate Suppression
6331 @section Duplicate Suppression
6332
6333 By default, Gnus tries to make sure that you don't have to read the same
6334 article more than once by utilizing the crossposing mechanism
6335 (@pxref{Crosspost Handling}).  However, that simple and efficient
6336 approach may not work satisfactorily for some users for various
6337 reasons.  
6338
6339 @enumerate
6340 @item 
6341 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
6342 is evil and not very common.
6343
6344 @item 
6345 The @sc{nntp} server may fail to include the @code{Xref} header in the
6346 @file{.overview} data bases.  This is evil and all too common, alas.
6347
6348 @item
6349 You may be reading the same group (or several related groups) from
6350 different @sc{nntp} servers.
6351
6352 @item
6353 You may be getting mail that duplicates articles posted to groups.
6354 @end enumerate
6355
6356 I'm sure there are other situations that @code{Xref} handling fails as
6357 well, but these four are the most common situations.
6358
6359 If, and only if, @code{Xref} handling fails for you, then you may
6360 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
6361 will remember the @code{Message-ID}s of all articles you have read or
6362 otherwise marked as read, and then, as if by magic, mark them as read
6363 all subsequent times you see them---in @emph{all} groups.  Using this
6364 mechanism is quite likely to be somewhat inefficient, but not overly
6365 so.  It's certainly preferrable to reading the same articles more than
6366 once.
6367
6368 @table @code
6369 @item gnus-suppress-duplicates
6370 @vindex gnus-suppress-duplicates
6371 If non-@code{nil}, suppress duplicates.
6372
6373 @item gnus-save-duplicate-list
6374 @vindex gnus-save-duplicate-list
6375 If non-@code{nil}, save the list of duplicates to a file.  This will
6376 make startup and shutdown take longer, so the default is @code{nil}.
6377 However, this means that only duplicate articles that is read in a
6378 single Gnus session are suppressed.  
6379
6380 @item gnus-duplicate-list-length
6381 @vindex gnus-duplicate-list-length
6382 This variables says how many @code{Message-ID}s to keep in the duplicate
6383 suppression list.  The default is 10000.  
6384
6385 @item gnus-duplicate-file
6386 @vindex gnus-duplicate-file
6387 The name of the file to store the duplicate suppression list.  The
6388 default is @file{~/News/suppression}.
6389 @end table
6390
6391 If you have a tendency to stop and start Gnus often, setting
6392 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
6393 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
6394 the other hand, saving the list makes startup and shutdown much slower,
6395 so that means that if you stop and start Gnus often, you should set
6396 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
6397 to you to figure out, I think.
6398
6399
6400 @node The Article Buffer
6401 @chapter The Article Buffer
6402 @cindex article buffer
6403
6404 The articles are displayed in the article buffer, of which there is only
6405 one.  All the summary buffers share the same article buffer unless you
6406 tell Gnus otherwise.
6407
6408 @menu
6409 * Hiding Headers::        Deciding what headers should be displayed.
6410 * Using MIME::            Pushing articles through @sc{mime} before reading them.
6411 * Customizing Articles::  Tailoring the look of the articles.
6412 * Article Keymap::        Keystrokes available in the article buffer
6413 * Misc Article::          Other stuff.
6414 @end menu
6415
6416
6417 @node Hiding Headers
6418 @section Hiding Headers
6419 @cindex hiding headers
6420 @cindex deleting headers
6421
6422 The top section of each article is the @dfn{head}.  (The rest is the
6423 @dfn{body}, but you may have guessed that already.)
6424
6425 @vindex gnus-show-all-headers
6426 There is a lot of useful information in the head: the name of the person
6427 who wrote the article, the date it was written and the subject of the
6428 article.  That's well and nice, but there's also lots of information
6429 most people do not want to see---what systems the article has passed
6430 through before reaching you, the @code{Message-ID}, the
6431 @code{References}, etc. ad nauseum---and you'll probably want to get rid
6432 of some of those lines.  If you want to keep all those lines in the
6433 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
6434
6435 Gnus provides you with two variables for sifting headers:
6436
6437 @table @code
6438
6439 @item gnus-visible-headers
6440 @vindex gnus-visible-headers
6441 If this variable is non-@code{nil}, it should be a regular expression
6442 that says what headers you wish to keep in the article buffer.  All
6443 headers that do not match this variable will be hidden.
6444
6445 For instance, if you only want to see the name of the person who wrote
6446 the article and the subject, you'd say:
6447
6448 @lisp
6449 (setq gnus-visible-headers "^From:\\|^Subject:")
6450 @end lisp
6451
6452 This variable can also be a list of regexps to match headers that are to
6453 remain visible.
6454
6455 @item gnus-ignored-headers
6456 @vindex gnus-ignored-headers
6457 This variable is the reverse of @code{gnus-visible-headers}.  If this
6458 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
6459 should be a regular expression that matches all lines that you want to
6460 hide.  All lines that do not match this variable will remain visible.
6461
6462 For instance, if you just want to get rid of the @code{References} line
6463 and the @code{Xref} line, you might say:
6464
6465 @lisp
6466 (setq gnus-ignored-headers "^References:\\|^Xref:")
6467 @end lisp
6468
6469 This variable can also be a list of regexps to match headers that are to
6470 be removed.
6471
6472 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
6473 variable will have no effect.
6474
6475 @end table
6476
6477 @vindex gnus-sorted-header-list
6478 Gnus can also sort the headers for you.  (It does this by default.)  You
6479 can control the sorting by setting the @code{gnus-sorted-header-list}
6480 variable.  It is a list of regular expressions that says in what order
6481 the headers are to be displayed.
6482
6483 For instance, if you want the name of the author of the article first,
6484 and then the subject, you might say something like:
6485
6486 @lisp
6487 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
6488 @end lisp
6489
6490 Any headers that are to remain visible, but are not listed in this
6491 variable, will be displayed in random order after all the headers that
6492 are listed in this variable.
6493
6494 @findex gnus-article-hide-boring-headers
6495 @vindex gnus-article-display-hook
6496 @vindex gnus-boring-article-headers
6497 You can hide further boring headers by entering
6498 @code{gnus-article-hide-boring-headers} into
6499 @code{gnus-article-display-hook}.  What this function does depends on
6500 the @code{gnus-boring-article-headers} variable.  It's a list, but this
6501 list doesn't actually contain header names.  Instead is lists various
6502 @dfn{boring conditions} that Gnus can check and remove from sight.
6503
6504 These conditions are:
6505 @table @code
6506 @item empty
6507 Remove all empty headers.
6508 @item newsgroups
6509 Remove the @code{Newsgroups} header if it only contains the current group
6510 name. 
6511 @item followup-to
6512 Remove the @code{Followup-To} header if it is identical to the
6513 @code{Newsgroups} header.
6514 @item reply-to
6515 Remove the @code{Reply-To} header if it lists the same address as the
6516 @code{From} header.
6517 @item date
6518 Remove the @code{Date} header if the article is less than three days
6519 old. 
6520 @end table
6521
6522 To include the four first elements, you could say something like;
6523
6524 @lisp
6525 (setq gnus-boring-article-headers 
6526       '(empty newsgroups followup-to reply-to))
6527 @end lisp
6528
6529 This is also the default value for this variable.
6530
6531
6532 @node Using MIME
6533 @section Using @sc{mime}
6534 @cindex @sc{mime}
6535
6536 Mime is a standard for waving your hands through the air, aimlessly,
6537 while people stand around yawning.
6538
6539 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
6540 while all newsreaders die of fear.
6541
6542 @sc{mime} may specify what character set the article uses, the encoding
6543 of the characters, and it also makes it possible to embed pictures and
6544 other naughty stuff in innocent-looking articles.
6545
6546 @vindex gnus-show-mime
6547 @vindex gnus-show-mime-method
6548 @vindex gnus-strict-mime
6549 @findex metamail-buffer
6550 Gnus handles @sc{mime} by shoving the articles through
6551 @code{gnus-show-mime-method}, which is @code{metamail-buffer} by
6552 default.  Set @code{gnus-show-mime} to @code{t} if you want to use
6553 @sc{mime} all the time.  However, if @code{gnus-strict-mime} is
6554 non-@code{nil}, the @sc{mime} method will only be used if there are
6555 @sc{mime} headers in the article.
6556
6557 It might be best to just use the toggling functions from the summary
6558 buffer to avoid getting nasty surprises. (For instance, you enter the
6559 group @samp{alt.sing-a-long} and, before you know it, @sc{mime} has
6560 decoded the sound file in the article and some horrible sing-a-long song
6561 comes streaming out out your speakers, and you can't find the volume
6562 button, because there isn't one, and people are starting to look at you,
6563 and you try to stop the program, but you can't, and you can't find the
6564 program to control the volume, and everybody else in the room suddenly
6565 decides to look at you disdainfully, and you'll feel rather stupid.)
6566
6567 Any similarity to real events and people is purely coincidental.  Ahem.
6568
6569
6570 @node Customizing Articles
6571 @section Customizing Articles
6572 @cindex article customization
6573
6574 @vindex gnus-article-display-hook
6575 The @code{gnus-article-display-hook} is called after the article has
6576 been inserted into the article buffer.  It is meant to handle all
6577 treatment of the article before it is displayed. 
6578
6579 @findex gnus-article-maybe-highlight
6580 By default it contains @code{gnus-article-hide-headers},
6581 @code{gnus-article-treat-overstrike}, and
6582 @code{gnus-article-maybe-highlight}, but there are thousands, nay
6583 millions, of functions you can put in this hook.  For an overview of
6584 functions @pxref{Article Highlighting}, @pxref{Article Hiding},
6585 @pxref{Article Washing}, @pxref{Article Buttons} and @pxref{Article
6586 Date}.
6587
6588 You can, of course, write your own functions.  The functions are called
6589 from the article buffer, and you can do anything you like, pretty much.
6590 There is no information that you have to keep in the buffer---you can
6591 change everything.  However, you shouldn't delete any headers.  Instead
6592 make them invisible if you want to make them go away.
6593
6594
6595 @node Article Keymap
6596 @section Article Keymap
6597
6598 Most of the keystrokes in the summary buffer can also be used in the
6599 article buffer.  They should behave as if you typed them in the summary
6600 buffer, which means that you don't actually have to have a summary
6601 buffer displayed while reading.  You can do it all from the article
6602 buffer.
6603
6604 A few additional keystrokes are available:
6605
6606 @table @kbd
6607
6608 @item SPACE
6609 @kindex SPACE (Article)
6610 @findex gnus-article-next-page
6611 Scroll forwards one page (@code{gnus-article-next-page}).
6612
6613 @item DEL
6614 @kindex DEL (Article)
6615 @findex gnus-article-prev-page
6616 Scroll backwards one page (@code{gnus-article-prev-page}).
6617
6618 @item C-c ^
6619 @kindex C-c ^ (Article)
6620 @findex gnus-article-refer-article
6621 If point is in the neighborhood of a @code{Message-ID} and you press
6622 @kbd{r}, Gnus will try to get that article from the server
6623 (@code{gnus-article-refer-article}).
6624
6625 @item C-c C-m
6626 @kindex C-c C-m (Article)
6627 @findex gnus-article-mail
6628 Send a reply to the address near point (@code{gnus-article-mail}).  If
6629 given a prefix, include the mail.
6630
6631 @item s
6632 @kindex s (Article)
6633 @findex gnus-article-show-summary
6634 Reconfigure the buffers so that the summary buffer becomes visible
6635 (@code{gnus-article-show-summary}).
6636
6637 @item ?
6638 @kindex ? (Article)
6639 @findex gnus-article-describe-briefly
6640 Give a very brief description of the available keystrokes
6641 (@code{gnus-article-describe-briefly}). 
6642
6643 @item TAB
6644 @kindex TAB (Article)
6645 @findex gnus-article-next-button
6646 Go to the next button, if any (@code{gnus-article-next-button}.  This
6647 only makes sense if you have buttonizing turned on.
6648
6649 @item M-TAB
6650 @kindex M-TAB (Article)
6651 @findex gnus-article-prev-button
6652 Go to the previous button, if any (@code{gnus-article-prev-button}.  
6653
6654 @end table
6655
6656
6657 @node Misc Article
6658 @section Misc Article
6659
6660 @table @code
6661
6662 @item gnus-single-article-buffer
6663 @vindex gnus-single-article-buffer
6664 If non-@code{nil}, use the same article buffer for all the groups.
6665 (This is the default.)  If @code{nil}, each group will have its own
6666 article buffer.
6667
6668 @vindex gnus-article-prepare-hook
6669 @item gnus-article-prepare-hook
6670 This hook is called right after the article has been inserted into the
6671 article buffer.  It is mainly intended for functions that do something
6672 depending on the contents; it should probably not be used for changing
6673 the contents of the article buffer.
6674
6675 @vindex gnus-article-display-hook
6676 @item gnus-article-display-hook
6677 This hook is called as the last thing when displaying an article, and is
6678 intended for modifying the contents of the buffer, doing highlights,
6679 hiding headers, and the like.
6680
6681 @item gnus-article-mode-hook
6682 @vindex gnus-article-mode-hook
6683 Hook called in article mode buffers.
6684
6685 @vindex gnus-article-mode-line-format
6686 @item gnus-article-mode-line-format
6687 This variable is a format string along the same lines as
6688 @code{gnus-summary-mode-line-format}.  It accepts the same
6689 format specifications as that variable, with one extension:
6690
6691 @table @samp
6692 @item w
6693 The @dfn{wash status} of the article.  This is a short string with one
6694 character for each possible article wash operation that may have been
6695 performed. 
6696 @end table
6697
6698 @vindex gnus-break-pages
6699
6700 @item gnus-break-pages
6701 Controls whether @dfn{page breaking} is to take place.  If this variable
6702 is non-@code{nil}, the articles will be divided into pages whenever a
6703 page delimiter appears in the article.  If this variable is @code{nil},
6704 paging will not be done.
6705
6706 @item gnus-page-delimiter
6707 @vindex gnus-page-delimiter
6708 This is the delimiter mentioned above.  By default, it is @samp{^L}
6709 (form linefeed).
6710 @end table
6711
6712
6713 @node Composing Messages
6714 @chapter Composing Messages
6715 @cindex reply
6716 @cindex followup
6717 @cindex post
6718
6719 @kindex C-c C-c (Post)
6720 All commands for posting and mailing will put you in a message buffer
6721 where you can edit the article all you like, before you send the article
6722 by pressing @kbd{C-c C-c}.  @xref{Top, , Top, message, The Message
6723 Manual}.  If you are in a foreign news group, and you wish to post the
6724 article using the foreign server, you can give a prefix to @kbd{C-c C-c}
6725 to make Gnus try to post using the foreign server.
6726
6727 @menu 
6728 * Mail::                 Mailing and replying.
6729 * Post::                 Posting and following up.
6730 * Posting Server::       What server should you post via?
6731 * Mail and Post::        Mailing and posting at the same time.
6732 * Archived Messages::    Where Gnus stores the messages you've sent.
6733 @c * Posting Styles::       An easier way to configure some key elements.
6734 @c * Drafts::               Postponing messages and rejected messages.
6735 @c * Rejected Articles::    What happens if the server doesn't like your article?
6736 @end menu
6737
6738 Also see @pxref{Canceling and Superseding} for information on how to
6739 remove articles you shouldn't have posted.
6740
6741
6742 @node Mail
6743 @section Mail
6744
6745 Variables for customizing outgoing mail:
6746
6747 @table @code
6748 @item gnus-uu-digest-headers
6749 @vindex gnus-uu-digest-headers
6750 List of regexps to match headers included in digested messages.  The
6751 headers will be included in the sequence they are matched.
6752
6753 @end table
6754
6755
6756 @node Post
6757 @section Post
6758
6759 Variables for composing news articles:
6760
6761 @table @code
6762 @item gnus-sent-message-ids-file
6763 @vindex gnus-sent-message-ids-file
6764 Gnus will keep a @code{Message-ID} history file of all the mails it has
6765 sent.  If it discovers that it has already sent a mail, it will ask the
6766 user whether to re-send the mail.  (This is primarily useful when
6767 dealing with @sc{soup} packets and the like where one is apt to sent the
6768 same packet multiple times.)  This variable says what the name of this
6769 history file is.  It is @file{~/News/Sent-Message-IDs} by default.  Set
6770 this variable to @code{nil} if you don't want Gnus to keep a history
6771 file.
6772
6773 @item gnus-sent-message-ids-length
6774 @vindex gnus-sent-message-ids-length
6775 This variable says how many @code{Message-ID}s to keep in the history
6776 file.  It is 1000 by default.
6777
6778 @end table
6779
6780
6781 @node Posting Server
6782 @section Posting Server
6783
6784 When you press those magical @kbd{C-c C-c} keys to ship off your latest
6785 (extremely intelligent, of course) article, where does it go?
6786
6787 Thank you for asking.  I hate you.
6788
6789 @vindex gnus-post-method
6790
6791 It can be quite complicated.  Normally, Gnus will use the same native
6792 server.  However.  If your native server doesn't allow posting, just
6793 reading, you probably want to use some other server to post your
6794 (extremely intelligent and fabulously interesting) articles.  You can
6795 then set the @code{gnus-post-method} to some other method:
6796
6797 @lisp
6798 (setq gnus-post-method '(nnspool ""))
6799 @end lisp
6800
6801 Now, if you've done this, and then this server rejects your article, or
6802 this server is down, what do you do then?  To override this variable you
6803 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
6804 the ``current'' server for posting.
6805
6806 If you give a zero prefix (i. e., @kbd{C-u 0 C-c C-c}) to that command,
6807 Gnus will prompt you for what method to use for posting.  
6808
6809 You can also set @code{gnus-post-method} to a list of select methods.
6810 If that's the case, Gnus will always prompt you for what method to use
6811 for posting. 
6812
6813
6814 @node Mail and Post
6815 @section Mail and Post
6816
6817 Here's a list of variables that are relevant to both mailing and
6818 posting:
6819
6820 @table @code
6821 @item gnus-mailing-list-groups
6822 @findex gnus-mailing-list-groups
6823 @cindex mailing lists
6824
6825 If your news server offers groups that are really mailing lists that are
6826 gatewayed to the @sc{nntp} server, you can read those groups without
6827 problems, but you can't post/followup to them without some difficulty.
6828 One solution is to add a @code{to-address} to the group parameters
6829 (@pxref{Group Parameters}).  An easier thing to do is set the
6830 @code{gnus-mailing-list-groups} to a regexp that match the groups that
6831 really are mailing lists.  Then, at least, followups to the mailing
6832 lists will work most of the time.  Posting to these groups (@kbd{a}) is
6833 still a pain, though.
6834
6835 @end table
6836
6837 You may want to do spell-checking on messages that you send out.  Or, if
6838 you don't want to spell-check by hand, you could add automatic
6839 spell-checking via the @code{ispell} package:
6840
6841 @cindex ispell
6842 @findex ispell-message
6843 @lisp
6844 (add-hook 'message-send-hook 'ispell-message) 
6845 @end lisp
6846
6847
6848 @node Archived Messages
6849 @section Archived Messages
6850 @cindex archived messages
6851 @cindex sent messages
6852
6853 Gnus provides a few different methods for storing the mail you send.
6854 The default method is to use the @dfn{archive virtual server} to store
6855 the mail.  If you want to disable this completely, you should set
6856 @code{gnus-message-archive-group} to @code{nil}.
6857
6858 @vindex gnus-message-archive-method
6859 @code{gnus-message-archive-method} says what virtual server Gnus is to
6860 use to store sent messages.  It is @code{(nnfolder "archive"
6861 (nnfolder-directory "~/Mail/archive/"))} by default, but you can use any
6862 mail select method (@code{nnml}, @code{nnmbox}, etc.).  However,
6863 @code{nnfolder} is a quite likeable select method for doing this sort of
6864 thing.  If you don't like the default directory chosen, you could say
6865 something like:
6866
6867 @lisp
6868 (setq gnus-message-archive-method
6869       '(nnfolder "archive" 
6870                  (nnfolder-inhibit-expiry t)
6871                  (nnfolder-active-file "~/News/sent-mail/active")
6872                  (nnfolder-directory "~/News/sent-mail/")))
6873 @end lisp
6874
6875 @vindex gnus-message-archive-group
6876 @cindex Gcc
6877 Gnus will insert @code{Gcc} headers in all outgoing messages that point
6878 to one or more group(s) on that server.  Which group to use is
6879 determined by the @code{gnus-message-archive-group} variable.  
6880
6881 This variable can be:
6882
6883 @itemize @bullet
6884 @item a string
6885 Messages will be saved in that group.
6886 @item a list of strings
6887 Messages will be saved in all those groups.
6888 @item an alist of regexps, functions and forms
6889 When a key ``matches'', the result is used.
6890 @item @code{nil}
6891 No message archiving will take place.  This is the default.
6892 @end itemize
6893
6894 Let's illustrate:
6895
6896 Just saving to a single group called @samp{MisK}:
6897 @lisp
6898 (setq gnus-message-archive-group "MisK")
6899 @end lisp
6900
6901 Saving to two groups, @samp{MisK} and @samp{safe}:
6902 @lisp
6903 (setq gnus-message-archive-group '("MisK" "safe"))
6904 @end lisp
6905
6906 Save to different groups based on what group you are in:
6907 @lisp
6908 (setq gnus-message-archive-group 
6909       '(("^alt" "sent-to-alt")
6910         ("mail" "sent-to-mail")
6911         (".*" "sent-to-misc")))
6912 @end lisp
6913
6914 More complex stuff:
6915 @lisp
6916 (setq gnus-message-archive-group 
6917       '((if (message-news-p)
6918             "misc-news" 
6919           "misc-mail")))
6920 @end lisp       
6921
6922 How about storing all news messages in one file, but storing all mail
6923 messages in one file per month:
6924
6925 @lisp
6926 (setq gnus-message-archive-group
6927       '((if (message-news-p)
6928             "misc-news" 
6929           (concat "mail." (format-time-string 
6930                            "%Y-%m" (current-time))))))
6931 @end lisp
6932
6933 Now, when you send a message off, it will be stored in the appropriate
6934 group.  (If you want to disable storing for just one particular message,
6935 you can just remove the @code{Gcc} header that has been inserted.)  The
6936 archive group will appear in the group buffer the next time you start
6937 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
6938 enter it and read the articles in it just like you'd read any other
6939 group.  If the group gets really big and annoying, you can simply rename
6940 if (using @kbd{G r} in the group buffer) to something
6941 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
6942 continue to be stored in the old (now empty) group.
6943
6944 That's the default method of archiving sent mail.  Gnus also offers two
6945 other variables for the people who don't like the default method.  In
6946 that case you should set @code{gnus-message-archive-group} to
6947 @code{nil}; this will disable archiving.
6948
6949 XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
6950 use a different value for @code{gnus-message-archive-group} there.
6951
6952
6953 @table @code
6954 @item gnus-outgoing-message-group 
6955 @vindex gnus-outgoing-message-group 
6956 All outgoing messages will be put in this group.  If you want to store
6957 all your outgoing mail and articles in the group @samp{nnml:archive},
6958 you set this variable to that value.  This variable can also be a list of
6959 group names.
6960
6961 If you want to have greater control over what group to put each
6962 message in, you can set this variable to a function that checks the
6963 current newsgroup name and then returns a suitable group name (or list
6964 of names).
6965 @end table
6966
6967
6968 @c @node Posting Styles
6969 @c @section Posting Styles
6970 @c @cindex posting styles
6971 @c @cindex styles
6972 @c 
6973 @c All them variables, they make my head swim.  
6974 @c 
6975 @c So what if you want a different @code{Organization} and signature based
6976 @c on what groups you post to?  And you post both from your home machine
6977 @c and your work machine, and you want different @code{From} lines, and so
6978 @c on? 
6979 @c 
6980 @c @vindex gnus-posting-styles
6981 @c One way to do stuff like that is to write clever hooks that change the
6982 @c variables you need to have changed.  That's a bit boring, so somebody
6983 @c came up with the bright idea of letting the user specify these things in
6984 @c a handy alist.  Here's an example of a @code{gnus-posting-styles}
6985 @c variable: 
6986 @c 
6987 @c @lisp
6988 @c ((".*" 
6989 @c   (signature . "Peace and happiness")
6990 @c   (organization . "What me?"))
6991 @c  ("^comp" 
6992 @c   (signature . "Death to everybody"))
6993 @c  ("comp.emacs.i-love-it" 
6994 @c   (organization . "Emacs is it")))
6995 @c @end lisp
6996 @c 
6997 @c As you might surmise from this example, this alist consists of several
6998 @c @dfn{styles}.  Each style will be applicable if the first element
6999 @c ``matches'', in some form or other.  The entire alist will be iterated
7000 @c over, from the beginning towards the end, and each match will be
7001 @c applied, which means that attributes in later styles that match override
7002 @c the same attributes in earlier matching styles.  So
7003 @c @samp{comp.programming.literate} will have the @samp{Death to everybody}
7004 @c signature and the @samp{What me?} @code{Organization} header.
7005 @c 
7006 @c The first element in each style is called the @code{match}.  If it's a
7007 @c string, then Gnus will try to regexp match it against the group name.
7008 @c If it's a function symbol, that function will be called with no
7009 @c arguments.  If it's a variable symbol, then the variable will be
7010 @c referenced.  If it's a list, then that list will be @code{eval}ed.  In
7011 @c any case, if this returns a non-@code{nil} value, then the style is said
7012 @c to @dfn{match}.
7013 @c 
7014 @c Each style may contain a arbitrary amount of @dfn{attributes}.  Each
7015 @c attribute consists of a @var{(name . value)} pair.  The attribute name
7016 @c can be one of @code{signature}, @code{organization} or @code{from}.  The
7017 @c attribute name can also be a string.  In that case, this will be used as
7018 @c a header name, and the value will be inserted in the headers of the
7019 @c article.
7020 @c 
7021 @c The attribute value can be a string (used verbatim), a function (the
7022 @c return value will be used), a variable (its value will be used) or a
7023 @c list (it will be @code{eval}ed and the return value will be used).
7024 @c 
7025 @c So here's a new example:
7026 @c 
7027 @c @lisp
7028 @c (setq gnus-posting-styles
7029 @c       '((".*" 
7030 @c           (signature . "~/.signature") 
7031 @c           (from . "user@@foo (user)")
7032 @c           ("X-Home-Page" . (getenv "WWW_HOME"))
7033 @c           (organization . "People's Front Against MWM"))
7034 @c         ("^rec.humor" 
7035 @c           (signature . my-funny-signature-randomizer))
7036 @c         ((equal (system-name) "gnarly")
7037 @c           (signature . my-quote-randomizer))
7038 @c         (posting-from-work-p
7039 @c           (signature . "~/.work-signature")
7040 @c           (from . "user@@bar.foo (user)")
7041 @c           (organization . "Important Work, Inc"))
7042 @c         ("^nn.+:" 
7043 @c           (signature . "~/.mail-signature"))))
7044 @c @end lisp
7045
7046 @c @node Drafts
7047 @c @section Drafts
7048 @c @cindex drafts
7049 @c 
7050 @c If you are writing a message (mail or news) and suddenly remember that
7051 @c you have a steak in the oven (or some pesto in the food processor, you
7052 @c craazy vegetarians), you'll probably wish there was a method to save the
7053 @c message you are writing so that you can continue editing it some other
7054 @c day, and send it when you feel its finished.
7055 @c 
7056 @c Well, don't worry about it.  Whenever you start composing a message of
7057 @c some sort using the Gnus mail and post commands, the buffer you get will
7058 @c automatically associate to an article in a special @dfn{draft} group.
7059 @c If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
7060 @c article will be saved there.  (Auto-save files also go to the draft
7061 @c group.) 
7062 @c 
7063 @c @cindex nndraft
7064 @c @vindex gnus-draft-group-directory
7065 @c The draft group is a special group (which is implemented as an
7066 @c @code{nndraft} group, if you absolutely have to know) called
7067 @c @samp{nndraft:drafts}.  The variable @code{gnus-draft-group-directory}
7068 @c controls both the name of the group and the location---the leaf element
7069 @c in the path will be used as the name of the group.  What makes this
7070 @c group special is that you can't tick any articles in it or mark any
7071 @c articles as read---all articles in the group are permanently unread.
7072 @c 
7073 @c If the group doesn't exist, it will be created and you'll be subscribed
7074 @c to it.
7075 @c 
7076 @c @findex gnus-dissociate-buffer-from-draft
7077 @c @kindex C-c M-d (Mail)
7078 @c @kindex C-c M-d (Post)
7079 @c @findex gnus-associate-buffer-with-draft
7080 @c @kindex C-c C-d (Mail)
7081 @c @kindex C-c C-d (Post)
7082 @c If you're writing some super-secret message that you later want to
7083 @c encode with PGP before sending, you may wish to turn the auto-saving
7084 @c (and association with the draft group) off.  You never know who might be
7085 @c interested in reading all your extremely valuable and terribly horrible
7086 @c and interesting secrets.  The @kbd{C-c M-d}
7087 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
7088 @c If you change your mind and want to turn the auto-saving back on again,
7089 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
7090 @c 
7091 @c @vindex gnus-use-draft
7092 @c To leave association with the draft group off by default, set
7093 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default. 
7094 @c 
7095 @c @findex gnus-summary-send-draft
7096 @c @kindex S D c (Summary)
7097 @c When you want to continue editing the article, you simply enter the
7098 @c draft group and push @kbd{S D c} (@code{gnus-summary-send-draft}) to do
7099 @c that.  You will be placed in a buffer where you left off.
7100 @c 
7101 @c Rejected articles will also be put in this draft group (@pxref{Rejected
7102 @c Articles}).
7103 @c 
7104 @c @findex gnus-summary-send-all-drafts
7105 @c If you have lots of rejected messages you want to post (or mail) without
7106 @c doing further editing, you can use the @kbd{S D a} command
7107 @c (@code{gnus-summary-send-all-drafts}).  This command understands the
7108 @c process/prefix convention (@pxref{Process/Prefix}).  
7109 @c 
7110 @c 
7111 @c @node Rejected Articles
7112 @c @section Rejected Articles
7113 @c @cindex rejected articles
7114 @c 
7115 @c Sometimes a news server will reject an article.  Perhaps the server
7116 @c doesn't like your face.  Perhaps it just feels miserable.  Perhaps
7117 @c @emph{there be demons}.  Perhaps you have included too much cited text.
7118 @c Perhaps the disk is full.  Perhaps the server is down.
7119 @c 
7120 @c These situations are, of course, totally beyond the control of Gnus.
7121 @c (Gnus, of course, loves the way you look, always feels great, has angels
7122 @c fluttering around inside of it, doesn't care about how much cited text
7123 @c you include, never runs full and never goes down.)  So Gnus saves these
7124 @c articles until some later time when the server feels better.
7125 @c 
7126 @c The rejected articles will automatically be put in a special draft group
7127 @c (@pxref{Drafts}).  When the server comes back up again, you'd then
7128 @c typically enter that group and send all the articles off.
7129 @c 
7130
7131 @node Select Methods
7132 @chapter Select Methods
7133 @cindex foreign groups
7134 @cindex select methods
7135
7136 A @dfn{foreign group} is a group that is not read by the usual (or
7137 default) means.  It could be, for instance, a group from a different
7138 @sc{nntp} server, it could be a virtual group, or it could be your own
7139 personal mail group.
7140
7141 A foreign group (or any group, really) is specified by a @dfn{name} and
7142 a @dfn{select method}.  To take the latter first, a select method is a
7143 list where the first element says what backend to use (eg. @code{nntp},
7144 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
7145 name}.  There may be additional elements in the select method, where the
7146 value may have special meaning for the backend in question.
7147
7148 One could say that a select method defines a @dfn{virtual server}---so
7149 we do just that (@pxref{The Server Buffer}).
7150
7151 The @dfn{name} of the group is the name the backend will recognize the
7152 group as.
7153
7154 For instance, the group @samp{soc.motss} on the @sc{nntp} server
7155 @samp{some.where.edu} will have the name @samp{soc.motss} and select
7156 method @code{(nntp "some.where.edu")}.  Gnus will call this group, in
7157 all circumstances, @samp{nntp+some.where.edu:soc.motss}, even though the
7158 @code{nntp} backend just knows this group as @samp{soc.motss}.
7159
7160 The different methods all have their peculiarities, of course.
7161
7162 @menu
7163 * The Server Buffer::     Making and editing virtual servers.
7164 * Getting News::          Reading USENET news with Gnus.
7165 * Getting Mail::          Reading your personal mail with Gnus.
7166 * Other Sources::         Reading directories, files, SOUP packets.
7167 * Combined Groups::       Combining groups into one group.
7168 @end menu
7169
7170
7171 @node The Server Buffer
7172 @section The Server Buffer
7173
7174 Traditionally, a @dfn{server} is a machine or a piece of software that
7175 one connects to, and then requests information from.  Gnus does not
7176 connect directly to any real servers, but does all transactions through
7177 one backend or other.  But that's just putting one layer more between
7178 the actual media and Gnus, so we might just as well say that each
7179 backend represents a virtual server.
7180
7181 For instance, the @code{nntp} backend may be used to connect to several
7182 different actual @sc{nntp} servers, or, perhaps, to many different ports
7183 on the same actual @sc{nntp} server.  You tell Gnus which backend to
7184 use, and what parameters to set by specifying a @dfn{select method}.
7185
7186 These select methods specifications can sometimes become quite
7187 complicated---say, for instance, that you want to read from the
7188 @sc{nntp} server @samp{news.funet.fi} on port number @code{13}, which
7189 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
7190 Anyways, if you had to specify that for each group that used this
7191 server, that would be too much work, so Gnus offers a way of naming
7192 select methods, which is what you do in the server buffer.
7193
7194 To enter the server buffer, user the @kbd{^}
7195 (@code{gnus-group-enter-server-mode}) command in the group buffer.
7196
7197 @menu
7198 * Server Buffer Format::      You can customize the look of this buffer.
7199 * Server Commands::           Commands to manipulate servers.
7200 * Example Methods::           Examples server specifications.
7201 * Creating a Virtual Server:: An example session.
7202 * Servers and Methods::       You can use server names as select methods.
7203 * Unavailable Servers::       Some servers you try to contact may be down.
7204 @end menu
7205
7206 @vindex gnus-server-mode-hook
7207 @code{gnus-server-mode-hook} is run when creating the server buffer.
7208
7209
7210 @node Server Buffer Format
7211 @subsection Server Buffer Format
7212 @cindex server buffer format
7213
7214 @vindex gnus-server-line-format
7215 You can change the look of the server buffer lines by changing the
7216 @code{gnus-server-line-format} variable.  This is a @code{format}-like
7217 variable, with some simple extensions:
7218
7219 @table @samp
7220
7221 @item h 
7222 How the news is fetched---the backend name.
7223
7224 @item n
7225 The name of this server.
7226
7227 @item w
7228 Where the news is to be fetched from---the address.
7229
7230 @item s
7231 The opened/closed/denied status of the server.
7232 @end table
7233
7234 @vindex gnus-server-mode-line-format
7235 The mode line can also be customized by using the
7236 @code{gnus-server-mode-line-format} variable.  The following specs are
7237 understood: 
7238
7239 @table @samp
7240 @item S
7241 Server name.
7242
7243 @item M
7244 Server method.
7245 @end table
7246
7247 Also @pxref{Formatting Variables}.
7248
7249
7250 @node Server Commands
7251 @subsection Server Commands
7252 @cindex server commands
7253
7254 @table @kbd
7255
7256 @item a
7257 @kindex a (Server)
7258 @findex gnus-server-add-server
7259 Add a new server (@code{gnus-server-add-server}).
7260
7261 @item e
7262 @kindex e (Server)
7263 @findex gnus-server-edit-server
7264 Edit a server (@code{gnus-server-edit-server}).
7265
7266 @item SPACE
7267 @kindex SPACE (Server)
7268 @findex gnus-server-read-server
7269 Browse the current server (@code{gnus-server-read-server}).
7270
7271 @item q
7272 @kindex q (Server)
7273 @findex gnus-server-exit
7274 Return to the group buffer (@code{gnus-server-exit}).
7275
7276 @item k
7277 @kindex k (Server)
7278 @findex gnus-server-kill-server
7279 Kill the current server (@code{gnus-server-kill-server}).
7280
7281 @item y
7282 @kindex y (Server)
7283 @findex gnus-server-yank-server
7284 Yank the previously killed server (@code{gnus-server-yank-server}).
7285
7286 @item c
7287 @kindex c (Server)
7288 @findex gnus-server-copy-server
7289 Copy the current server (@code{gnus-server-copy-server}).
7290
7291 @item l
7292 @kindex l (Server)
7293 @findex gnus-server-list-servers
7294 List all servers (@code{gnus-server-list-servers}).
7295
7296 @end table
7297
7298
7299 @node Example Methods
7300 @subsection Example Methods
7301
7302 Most select methods are pretty simple and self-explanatory: 
7303
7304 @lisp
7305 (nntp "news.funet.fi")
7306 @end lisp
7307
7308 Reading directly from the spool is even simpler:
7309
7310 @lisp
7311 (nnspool "")
7312 @end lisp
7313
7314 As you can see, the first element in a select method is the name of the
7315 backend, and the second is the @dfn{address}, or @dfn{name}, if you
7316 will. 
7317
7318 After these two elements, there may be a arbitrary number of
7319 @var{(variable form)} pairs.
7320
7321 To go back to the first example---imagine that you want to read from
7322 port @code{15} from that machine.  This is what the select method should
7323 look like then:
7324
7325 @lisp
7326 (nntp "news.funet.fi" (nntp-port-number 15))
7327 @end lisp
7328
7329 You should read the documentation to each backend to find out what
7330 variables are relevant, but here's an @code{nnmh} example. 
7331
7332 @code{nnmh} is a mail backend that reads a spool-like structure.  Say
7333 you have two structures that you wish to access: One is your private
7334 mail spool, and the other is a public one.  Here's the possible spec for
7335 you private mail:
7336
7337 @lisp
7338 (nnmh "private" (nnmh-directory "~/private/mail/"))
7339 @end lisp
7340
7341 (This server is then called @samp{private}, but you may have guessed
7342 that.)
7343
7344 Here's the method for a public spool:
7345
7346 @lisp
7347 (nnmh "public" 
7348       (nnmh-directory "/usr/information/spool/") 
7349       (nnmh-get-new-mail nil))
7350 @end lisp
7351
7352
7353 @node Creating a Virtual Server
7354 @subsection Creating a Virtual Server
7355
7356 If you're saving lots of articles in the cache by using persistent
7357 articles, you may want to create a virtual server to read the cache.
7358
7359 First you need to add a new server.  The @kbd{a} command does that.  It
7360 would probably be best to use @code{nnspool} to read the cache.  You
7361 could also use @code{nnml} or @code{nnmh}, though.
7362
7363 Type @kbd{a nnspool RET cache RET}.
7364
7365 You should now have a brand new @code{nnspool} virtual server called
7366 @samp{cache}.  You now need to edit it to have the right definitions.
7367 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
7368 will contain the following:
7369
7370 @lisp
7371 (nnspool "cache")
7372 @end lisp
7373
7374 Change that to:
7375
7376 @lisp
7377 (nnspool "cache"
7378          (nnspool-spool-directory "~/News/cache/")
7379          (nnspool-nov-directory "~/News/cache/")
7380          (nnspool-active-file "~/News/cache/active"))
7381 @end lisp
7382
7383 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
7384 @kbd{RET} over this virtual server, you should be entered into a browse
7385 buffer, and you should be able to enter any of the groups displayed.
7386
7387
7388 @node Servers and Methods
7389 @subsection Servers and Methods
7390
7391 Wherever you would normally use a select method
7392 (eg. @code{gnus-secondary-select-method}, in the group select method,
7393 when browsing a foreign server) you can use a virtual server name
7394 instead.  This could potentially save lots of typing.  And it's nice all
7395 over.
7396
7397
7398 @node Unavailable Servers
7399 @subsection Unavailable Servers
7400
7401 If a server seems to be unreachable, Gnus will mark that server as
7402 @code{denied}.  That means that any subsequent attempt to make contact
7403 with that server will just be ignored.  ``It can't be opened,'' Gnus
7404 will tell you, without making the least effort to see whether that is
7405 actually the case or not.
7406
7407 That might seem quite naughty, but it does make sense most of the time.
7408 Let's say you have 10 groups subscribed to the server
7409 @samp{nepholococcygia.com}.  This server is located somewhere quite far
7410 away from you, the machine is quite, so it takes 1 minute just to find
7411 out that it refuses connection from you today.  If Gnus were to attempt
7412 to do that 10 times, you'd be quite annoyed, so Gnus won't attempt to do
7413 that.  Once it has gotten a single ``connection refused'', it will
7414 regard that server as ``down''.
7415
7416 So, what happens if the machine was only feeling unwell temporarily?
7417 How do you test to see whether the machine has come up again?
7418
7419 You jump to the server buffer (@pxref{The Server Buffer}) and poke it
7420 with the following commands:
7421
7422 @table @kbd
7423
7424 @item O
7425 @kindex O (Server)
7426 @findex gnus-server-open-server
7427 Try to establish connection to the server on the current line
7428 (@code{gnus-server-open-server}).
7429
7430 @item C
7431 @kindex C (Server)
7432 @findex gnus-server-close-server
7433 Close the connection (if any) to the server
7434 (@code{gnus-server-close-server}).
7435
7436 @item D
7437 @kindex D (Server)
7438 @findex gnus-server-deny-server
7439 Mark the current server as unreachable
7440 (@code{gnus-server-deny-server}). 
7441
7442 @item R
7443 @kindex R (Server)
7444 @findex gnus-server-remove-denials
7445 Remove all marks to whether Gnus was denied connection from all servers
7446 (@code{gnus-server-remove-denials}). 
7447
7448 @end table
7449
7450
7451 @node Getting News
7452 @section Getting News
7453 @cindex reading news
7454 @cindex news backends
7455
7456 A newsreader is normally used for reading news.  Gnus currently provides
7457 only two methods of getting news---it can read from an @sc{nntp} server,
7458 or it can read from a local spool.
7459
7460 @menu
7461 * NNTP::               Reading news from an @sc{nntp} server.
7462 * News Spool::         Reading news from the local spool.
7463 @end menu
7464
7465
7466 @node NNTP
7467 @subsection @sc{nntp}
7468 @cindex nntp
7469
7470 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
7471 You just specify @code{nntp} as method and the address of the @sc{nntp}
7472 server as the, uhm, address.
7473
7474 If the @sc{nntp} server is located at a non-standard port, setting the
7475 third element of the select method to this port number should allow you
7476 to connect to the right port.  You'll have to edit the group info for
7477 that (@pxref{Foreign Groups}).
7478
7479 The name of the foreign group can be the same as a native group.  In
7480 fact, you can subscribe to the same group from as many different servers
7481 you feel like.  There will be no name collisions.
7482
7483 The following variables can be used to create a virtual @code{nntp}
7484 server: 
7485
7486 @table @code
7487
7488 @item nntp-server-opened-hook
7489 @vindex nntp-server-opened-hook
7490 @cindex @sc{mode reader}
7491 @cindex authinfo
7492 @cindex authentification
7493 @cindex nntp authentification
7494 @findex nntp-send-authinfo
7495 @findex nntp-send-mode-reader
7496 @code{nntp-server-opened-hook} is run after a connection has been made.
7497 It can be used to send commands to the @sc{nntp} server after it has
7498 been contacted.  By default is sends the command @code{MODE READER} to
7499 the server with the @code{nntp-send-mode-reader} function.  Another
7500 popular function is @code{nntp-send-authinfo}, which will prompt you for
7501 an @sc{nntp} password and stuff.
7502
7503 @item nntp-server-action-alist 
7504 @vindex nntp-server-action-alist 
7505 This is an list of regexps to match on server types and actions to be
7506 taken when matches are made.  For instance, if you want Gnus to beep
7507 every time you connect to innd, you could say something like:
7508
7509 @lisp
7510 (setq nntp-server-action-alist
7511       '(("innd" (ding))))
7512 @end lisp
7513
7514 You probably don't want to do that, though.
7515
7516 The default value is
7517
7518 @lisp
7519   '(("nntpd 1\\.5\\.11t" 
7520      (remove-hook 'nntp-server-opened-hook nntp-send-mode-reader)))
7521 @end lisp
7522
7523 This ensures that Gnus doesn't send the @code{MODE READER} command to
7524 nntpd 1.5.11t, since that command chokes that server, I've been told. 
7525
7526 @item nntp-maximum-request
7527 @vindex nntp-maximum-request
7528 If the @sc{nntp} server doesn't support @sc{nov} headers, this backend
7529 will collect headers by sending a series of @code{head} commands.  To
7530 speed things up, the backend sends lots of these commands without
7531 waiting for reply, and then reads all the replies.  This is controlled
7532 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
7533 your network is buggy, you should set this to 1.
7534
7535 @item nntp-connection-timeout
7536 @vindex nntp-connection-timeout
7537 If you have lots of foreign @code{nntp} groups that you connect to
7538 regularly, you're sure to have problems with @sc{nntp} servers not
7539 responding properly, or being too loaded to reply within reasonable
7540 time.  This is can lead to awkward problems, which can be helped
7541 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
7542 that says how many seconds the @code{nntp} backend should wait for a
7543 connection before giving up.  If it is @code{nil}, which is the default,
7544 no timeouts are done.
7545
7546 @item nntp-command-timeout
7547 @vindex nntp-command-timeout
7548 @cindex PPP connections
7549 @cindex dynamic IP addresses
7550 If you're running Gnus on a machine that has a dynamically assigned
7551 address, Gnus may become confused.  If the address of your machine
7552 changes after connecting to the @sc{nntp} server, Gnus will simply sit
7553 waiting forever for replies from the server.  To help with this
7554 unfortunate problem, you can set this command to a number.  Gnus will
7555 then, if it sits waiting longer than that number of seconds for a reply
7556 from the server, shut down the connection, start a new one, and resend
7557 the command.  This should hopefully be transparent to the user.  A
7558 likely number is 30 seconds. 
7559
7560 @item nntp-retry-on-break
7561 @vindex nntp-retry-on-break
7562 If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
7563 hangs.  This will have much the same effect as the command timeout
7564 described above.
7565
7566 @item nntp-server-hook
7567 @vindex nntp-server-hook
7568 This hook is run as the last step when connecting to an @sc{nntp}
7569 server.
7570
7571 @findex nntp-open-rlogin
7572 @findex nntp-open-network-stream
7573 @item nntp-open-server-function
7574 @vindex nntp-open-server-function
7575 This function is used to connect to the remote system.  Two pre-made
7576 functions are @code{nntp-open-network-stream}, which is the default, and
7577 simply connects to some port or other on the remote system.  The other
7578 is @code{nntp-open-rlogin}, which does an rlogin on the remote system,
7579 and then does a telnet to the @sc{nntp} server available there.
7580
7581 @item nntp-rlogin-parameters
7582 @vindex nntp-rlogin-parameters
7583 If you use @code{nntp-open-rlogin} as the
7584 @code{nntp-open-server-function}, this list will be used as the
7585 parameter list given to @code{rsh}.
7586
7587 @item nntp-end-of-line
7588 @vindex nntp-end-of-line
7589 String to use as end-of-line markers when talking to the @sc{nntp}
7590 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
7591 using @code{rlogin} to talk to the server.
7592
7593 @item nntp-rlogin-user-name
7594 @vindex nntp-rlogin-user-name
7595 User name on the remote system when using the @code{rlogin} connect
7596 function. 
7597
7598 @item nntp-address
7599 @vindex nntp-address
7600 The address of the remote system running the @sc{nntp} server.
7601
7602 @item nntp-port-number
7603 @vindex nntp-port-number
7604 Port number to connect to when using the @code{nntp-open-network-stream}
7605 connect function.
7606
7607 @item nntp-buggy-select
7608 @vindex nntp-buggy-select
7609 Set this to non-@code{nil} if your select routine is buggy.
7610
7611 @item nntp-nov-is-evil 
7612 @vindex nntp-nov-is-evil 
7613 If the @sc{nntp} server does not support @sc{nov}, you could set this
7614 variable to @code{t}, but @code{nntp} usually checks whether @sc{nov}
7615 can be used automatically.
7616
7617 @item nntp-xover-commands
7618 @vindex nntp-xover-commands
7619 @cindex nov
7620 @cindex XOVER
7621 List of strings that are used as commands to fetch @sc{nov} lines from a
7622 server.  The default value of this variable is @code{("XOVER"
7623 "XOVERVIEW")}. 
7624
7625 @item nntp-nov-gap
7626 @vindex nntp-nov-gap
7627 @code{nntp} normally sends just one big request for @sc{nov} lines to
7628 the server.  The server responds with one huge list of lines.  However,
7629 if you have read articles 2-5000 in the group, and only want to read
7630 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
7631 lines that you do not want, and will not use.  This variable says how
7632 big a gap between two consecutive articles is allowed to be before the
7633 @code{XOVER} request is split into several request.  Note that if your
7634 network is fast, setting this variable to a really small number means
7635 that fetching will probably be slower.  If this variable is @code{nil},
7636 @code{nntp} will never split requests.
7637
7638 @item nntp-prepare-server-hook
7639 @vindex nntp-prepare-server-hook
7640 A hook run before attempting to connect to an @sc{nntp} server.
7641
7642 @item nntp-async-number
7643 @vindex nntp-async-number
7644 How many articles should be pre-fetched when in asynchronous mode.  If
7645 this variable is @code{t}, @code{nntp} will pre-fetch all the articles
7646 that it can without bound.  If it is @code{nil}, no pre-fetching will be
7647 made.
7648
7649 @item nntp-warn-about-losing-connection
7650 @vindex nntp-warn-about-losing-connection
7651 If this variable is non-@code{nil}, some noise will be made when a
7652 server closes connection.
7653
7654 @end table
7655
7656
7657 @node News Spool
7658 @subsection News Spool
7659 @cindex nnspool
7660 @cindex news spool
7661
7662 Subscribing to a foreign group from the local spool is extremely easy,
7663 and might be useful, for instance, to speed up reading groups like
7664 @samp{alt.binaries.pictures.furniture}.
7665
7666 Anyways, you just specify @code{nnspool} as the method and @samp{} (or
7667 anything else) as the address.
7668
7669 If you have access to a local spool, you should probably use that as the
7670 native select method (@pxref{Finding the News}).  It is normally faster
7671 than using an @code{nntp} select method, but might not be.  It depends.
7672 You just have to try to find out what's best at your site.
7673
7674 @table @code
7675
7676 @item nnspool-inews-program
7677 @vindex nnspool-inews-program
7678 Program used to post an article.
7679
7680 @item nnspool-inews-switches
7681 @vindex nnspool-inews-switches
7682 Parameters given to the inews program when posting an article. 
7683
7684 @item nnspool-spool-directory
7685 @vindex nnspool-spool-directory
7686 Where @code{nnspool} looks for the articles.  This is normally
7687 @file{/usr/spool/news/}.
7688
7689 @item nnspool-nov-directory 
7690 @vindex nnspool-nov-directory 
7691 Where @code{nnspool} will look for @sc{nov} files.  This is normally
7692 @file{/usr/spool/news/over.view/}.
7693
7694 @item nnspool-lib-dir
7695 @vindex nnspool-lib-dir
7696 Where the news lib dir is (@file{/usr/lib/news/} by default).
7697
7698 @item nnspool-active-file
7699 @vindex nnspool-active-file
7700 The path of the active file.
7701
7702 @item nnspool-newsgroups-file
7703 @vindex nnspool-newsgroups-file
7704 The path of the group descriptions file.
7705
7706 @item nnspool-history-file
7707 @vindex nnspool-history-file
7708 The path of the news history file.
7709
7710 @item nnspool-active-times-file
7711 @vindex nnspool-active-times-file
7712 The path of the active date file.
7713
7714 @item nnspool-nov-is-evil
7715 @vindex nnspool-nov-is-evil
7716 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
7717 that it finds.
7718
7719 @item nnspool-sift-nov-with-sed
7720 @vindex nnspool-sift-nov-with-sed
7721 @cindex sed
7722 If non-@code{nil}, which is the default, use @code{sed} to get the
7723 relevant portion from the overview file.  If nil, @code{nnspool} will
7724 load the entire file into a buffer and process it there.
7725
7726 @end table
7727
7728
7729 @node Getting Mail
7730 @section Getting Mail
7731 @cindex reading mail
7732 @cindex mail
7733
7734 Reading mail with a newsreader---isn't that just plain WeIrD? But of
7735 course.
7736
7737 @menu
7738 * Getting Started Reading Mail:: A simple cookbook example.
7739 * Splitting Mail::               How to create mail groups.
7740 * Mail Backend Variables::       Variables for customizing mail handling.
7741 * Fancy Mail Splitting::         Gnus can do hairy splitting of incoming mail.
7742 * Mail and Procmail::            Reading mail groups that procmail create.
7743 * Incorporating Old Mail::       What about the old mail you have?
7744 * Expiring Mail::                Getting rid of unwanted mail.
7745 * Duplicates::                   Dealing with duplicated mail.
7746 * Not Reading Mail::             Using mail backends for reading other files.
7747 * Choosing a Mail Backend::      Gnus can read a variety of mail formats.
7748 @end menu
7749
7750
7751 @node Getting Started Reading Mail
7752 @subsection Getting Started Reading Mail
7753
7754 It's quite easy to use Gnus to read your new mail.  You just plonk the
7755 mail backend of your choice into @code{gnus-secondary-select-methods},
7756 and things will happen automatically.
7757
7758 For instance, if you want to use @code{nnml} (which is a one file per
7759 mail backend), you could put the following in your @file{.gnus} file:
7760
7761 @lisp
7762 (setq gnus-secondary-select-methods
7763       '((nnml "private")))
7764 @end lisp
7765
7766 Now, the next time you start Gnus, this backend will be queried for new
7767 articles, and it will move all the messages in your spool file to its
7768 directory, which is @code{~/Mail/} by default.  The new group that will
7769 be created (@samp{mail.misc}) will be subscribed, and you can read it
7770 like any other group.
7771
7772 You will probably want to split the mail into several groups, though:
7773
7774 @lisp
7775 (setq nnmail-split-methods
7776   '(("junk" "^From:.*Lars Ingebrigtsen")
7777     ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
7778     ("other" "")))
7779 @end lisp
7780
7781 This will result in three new mail groups being created:
7782 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
7783 mail that doesn't fit into the first two groups will be placed in the
7784 latter group.
7785
7786 This should be sufficient for reading mail with Gnus.  You might want to
7787 give the other sections in this part of the manual a perusal, though,
7788 especially @pxref{Choosing a Mail Backend} and @pxref{Expiring Mail}. 
7789
7790
7791 @node Splitting Mail
7792 @subsection Splitting Mail
7793 @cindex splitting mail
7794 @cindex mail splitting
7795
7796 @vindex nnmail-split-methods
7797 The @code{nnmail-split-methods} variable says how the incoming mail is
7798 to be split into groups.
7799
7800 @lisp
7801 (setq nnmail-split-methods
7802   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
7803     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
7804     ("mail.other" "")))
7805 @end lisp
7806
7807 This variable is a list of lists, where the first element of each of
7808 these lists is the name of the mail group (they do not have to be called
7809 something beginning with @samp{mail}, by the way), and the second
7810 element is a regular expression used on the header of each mail to
7811 determine if it belongs in this mail group.
7812
7813 The second element can also be a function.  In that case, it will be
7814 called narrowed to the headers with the first element of the rule as the
7815 argument.  It should return a non-@code{nil} value if it thinks that the
7816 mail belongs in that group.
7817
7818 The last of these groups should always be a general one, and the regular
7819 expression should @emph{always} be @samp{} so that it matches any
7820 mails that haven't been matched by any of the other regexps.
7821
7822 If you like to tinker with this yourself, you can set this variable to a
7823 function of your choice.  This function will be called without any
7824 arguments in a buffer narrowed to the headers of an incoming mail
7825 message.  The function should return a list of groups names that it
7826 thinks should carry this mail message.
7827
7828 Note that the mail backends are free to maul the poor, innocent
7829 incoming headers all they want to.  They all add @code{Lines} headers;
7830 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
7831 @code{From<SPACE>} line to something else.
7832
7833 @vindex nnmail-crosspost
7834 The mail backends all support cross-posting.  If several regexps match,
7835 the mail will be ``cross-posted'' to all those groups.
7836 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
7837 that no articles are crossposted to the general (@samp{}) group.
7838
7839 @vindex nnmail-crosspost-link-function
7840 @cindex crosspost
7841 @cindex links
7842 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
7843 the crossposted articles.  However, not all files systems support hard
7844 links.  If that's the case for you, set
7845 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
7846 variable is @code{add-name-to-file} by default.)  
7847
7848 Gnus gives you all the opportunity you could possibly want for shooting
7849 yourself in the foot.  Let's say you create a group that will contain
7850 all the mail you get from your boss.  And then you accidentally
7851 unsubscribe from the group.  Gnus will still put all the mail from your
7852 boss in the unsubscribed group, and so, when your boss mails you ``Have
7853 that report ready by Monday or you're fired!'', you'll never see it and,
7854 come Tuesday, you'll still believe that you're gainfully employed while
7855 you really should be out collecting empty bottles to save up for next
7856 month's rent money.
7857
7858
7859 @node Mail Backend Variables
7860 @subsection Mail Backend Variables
7861
7862 These variables are (for the most part) pertinent to all the various
7863 mail backends.
7864
7865 @table @code
7866 @vindex nnmail-read-incoming-hook
7867 @item nnmail-read-incoming-hook
7868 The mail backends all call this hook after reading new mail.  You can
7869 use this hook to notify any mail watch programs, if you want to.
7870
7871 @vindex nnmail-spool-file
7872 @item nnmail-spool-file
7873 @cindex POP mail
7874 @cindex MAILHOST
7875 @cindex movemail
7876 @vindex nnmail-pop-password
7877 @vindex nnmail-pop-password-required
7878 The backends will look for new mail in this file.  If this variable is
7879 @code{nil}, the mail backends will never attempt to fetch mail by
7880 themselves.  If you are using a POP mail server and your name is
7881 @samp{larsi}, you should set this variable to @samp{po:larsi}.  If
7882 your name is not @samp{larsi}, you should probably modify that
7883 slightly, but you may have guessed that already, you smart & handsome
7884 devil!  You can also set this variable to @code{pop}, and Gnus will try
7885 to figure out the POP mail string by itself.  In any case, Gnus will
7886 call @code{movemail} which will contact the POP server named in the
7887 @code{MAILHOST} environment variable.  If the POP server needs a
7888 password, you can either set @code{nnmail-pop-password-required} to
7889 @code{t} and be prompted for the password, or set
7890 @code{nnmail-pop-password} to the password itself.
7891
7892 When you use a mail backend, Gnus will slurp all your mail from your
7893 inbox and plonk it down in your home directory.  Gnus doesn't move any
7894 mail if you're not using a mail backend---you have to do a lot of magic
7895 invocations first.  At the time when you have finished drawing the
7896 pentagram, lightened the candles, and sacrificed the goat, you really
7897 shouldn't be too surprised when Gnus moves your mail.
7898
7899 @vindex nnmail-use-procmail
7900 @vindex nnmail-procmail-suffix
7901 @item nnmail-use-procmail
7902 If non-@code{nil}, the mail backends will look in
7903 @code{nnmail-procmail-directory} for incoming mail.  All the files in
7904 that directory that have names ending in @code{nnmail-procmail-suffix}
7905 will be considered incoming mailboxes, and will be searched for new
7906 mail.
7907
7908 @vindex nnmail-crash-box
7909 @item nnmail-crash-box
7910 When the mail backends read a spool file, it is first moved to this
7911 file, which is @file{~/.gnus-crash-box} by default.  If this file
7912 already exists, it will always be read (and incorporated) before any
7913 other spool files.
7914
7915 @vindex nnmail-prepare-incoming-hook
7916 @item nnmail-prepare-incoming-hook
7917 This is run in a buffer that holds all the new incoming mail, and can be
7918 used for, well, anything, really.
7919
7920 @vindex nnmail-pre-get-new-mail-hook
7921 @vindex nnmail-post-get-new-mail-hook
7922 @item nnmail-pre-get-new-mail-hook
7923 @itemx nnmail-post-get-new-mail-hook
7924 These are two useful hooks executed when treating new incoming
7925 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
7926 starting to handle the new mail) and
7927 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
7928 is done).  Here's and example of using these two hooks to change the
7929 default file modes the new mail files get:
7930
7931 @lisp
7932 (add-hook 'gnus-pre-get-new-mail-hook 
7933           (lambda () (set-default-file-modes 511)))
7934
7935 (add-hook 'gnus-post-get-new-mail-hook 
7936           (lambda () (set-default-file-modes 551)))
7937 @end lisp
7938
7939 @item nnmail-tmp-directory
7940 @vindex nnmail-tmp-directory
7941 This variable says where to move the incoming mail to while processing
7942 it.  This is usually done in the same directory that the mail backend
7943 inhabits (i.e., @file{~/Mail/}), but if this variable is non-@code{nil},
7944 it will be used instead.
7945
7946 @item nnmail-movemail-program
7947 @vindex nnmail-movemail-program
7948 This program is executed to move mail from the user's inbox to her home
7949 directory.  The default is @samp{movemail}.
7950
7951 @item nnmail-delete-incoming
7952 @vindex nnmail-delete-incoming
7953 @cindex incoming mail files
7954 @cindex deleting incoming files
7955 If non-@code{nil}, the mail backends will delete the temporary incoming
7956 file after splitting mail into the proper groups.  This is @code{t} by
7957 default for reasons of security.
7958
7959 @item nnmail-use-long-file-names
7960 @vindex nnmail-use-long-file-names
7961 If non-@code{nil}, the mail backends will use long file and directory
7962 names.  Groups like @samp{mail.misc} will end up in directories like
7963 @file{mail.misc/}.  If it is @code{nil}, the same group will end up in
7964 @file{mail/misc/}.
7965
7966 @item nnmail-delete-file-function
7967 @vindex nnmail-delete-file-function
7968 @findex delete-file
7969 Function called to delete files.  It is @code{delete-file} by default. 
7970
7971 @end table
7972
7973
7974 @node Fancy Mail Splitting
7975 @subsection Fancy Mail Splitting
7976 @cindex mail splitting
7977 @cindex fancy mail splitting
7978
7979 @vindex nnmail-split-fancy
7980 @findex nnmail-split-fancy
7981 If the rather simple, standard method for specifying how to split mail
7982 doesn't allow you to do what you want, you can set
7983 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
7984 play with the @code{nnmail-split-fancy} variable. 
7985
7986 Let's look at an example value of this variable first:
7987
7988 @lisp
7989 ;; Messages from the mailer daemon are not crossposted to any of
7990 ;; the ordinary groups.  Warnings are put in a separate group
7991 ;; from real errors.
7992 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
7993                    "mail.misc"))
7994    ;; Non-error messages are crossposted to all relevant
7995    ;; groups, but we don't crosspost between the group for the
7996    ;; (ding) list and the group for other (ding) related mail.
7997    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
7998          ("subject" "ding" "ding.misc"))
7999       ;; Other mailing lists...
8000       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
8001       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
8002       ;; People...
8003       (any "larsi@@ifi\\.uio\\.no" "people.Lars Magne Ingebrigtsen"))
8004    ;; Unmatched mail goes to the catch all group.
8005    "misc.misc"))")
8006 @end lisp
8007
8008 This variable has the format of a @dfn{split}.  A split is a (possibly)
8009 recursive structure where each split may contain other splits.  Here are
8010 the four possible split syntaxes:
8011
8012 @table @dfn
8013
8014 @item GROUP 
8015 If the split is a string, that will be taken as a group name. 
8016
8017 @item (FIELD VALUE SPLIT)
8018 If the split is a list, and the first element is a string, then that
8019 means that if header FIELD (a regexp) contains VALUE (also a regexp),
8020 then store the message as specified by SPLIT.
8021
8022 @item (| SPLIT...)
8023 If the split is a list, and the first element is @code{|} (vertical
8024 bar), then process each SPLIT until one of them matches.  A SPLIT is
8025 said to match if it will cause the mail message to be stored in one or
8026 more groups.
8027
8028 @item (& SPLIT...)
8029 If the split is a list, and the first element is @code{&}, then process
8030 all SPLITs in the list.
8031 @end table
8032
8033 In these splits, FIELD must match a complete field name.  VALUE must
8034 match a complete word according to the fundamental mode syntax table.
8035 You can use @code{.*} in the regexps to match partial field names or
8036 words.
8037
8038 @vindex nnmail-split-abbrev-alist
8039 FIELD and VALUE can also be lisp symbols, in that case they are expanded
8040 as specified by the variable @code{nnmail-split-abbrev-alist}.  This is
8041 an alist of cons cells, where the car of the cells contains the key, and
8042 the cdr contains a string.
8043
8044 @vindex nnmail-split-fancy-syntax-table
8045 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
8046 when all this splitting is performed.
8047
8048
8049 @node Mail and Procmail
8050 @subsection Mail and Procmail
8051 @cindex procmail
8052
8053 @cindex slocal
8054 @cindex elm
8055 Many people use @code{procmail} (or some other mail filter program or
8056 external delivery agent---@code{slocal}, @code{elm}, etc) to split
8057 incoming mail into groups.  If you do that, you should set
8058 @code{nnmail-spool-file} to @code{procmail} to ensure that the mail
8059 backends never ever try to fetch mail by themselves.
8060
8061 This also means that you probably don't want to set
8062 @code{nnmail-split-methods} either, which has some, perhaps, unexpected
8063 side effects.
8064
8065 When a mail backend is queried for what groups it carries, it replies
8066 with the contents of that variable, along with any groups it has figured
8067 out that it carries by other means.  None of the backends (except
8068 @code{nnmh}) actually go out to the disk and check what groups actually
8069 exist.  (It's not trivial to distinguish between what the user thinks is
8070 a basis for a newsgroup and what is just a plain old file or directory.)
8071
8072 This means that you have to tell Gnus (and the backends) what groups
8073 exist by hand.
8074
8075 Let's take the @code{nnmh} backend as an example. 
8076
8077 The folders are located in @code{nnmh-directory}, say, @file{~/Mail/}.
8078 There are three folders, @file{foo}, @file{bar} and @file{mail.baz}.
8079
8080 Go to the group buffer and type @kbd{G m}.  When prompted, answer
8081 @samp{foo} for the name and @samp{nnmh} for the method.  Repeat
8082 twice for the two other groups, @samp{bar} and @samp{mail.baz}.  Be sure
8083 to include all your mail groups.
8084
8085 That's it.  You are now set to read your mail.  An active file for this
8086 method will be created automatically.
8087
8088 @vindex nnmail-procmail-suffix
8089 @vindex nnmail-procmail-directory
8090 If you use @code{nnfolder} or any other backend that store more than a
8091 single article in each file, you should never have procmail add mails to
8092 the file that Gnus sees.  Instead, procmail should put all incoming mail
8093 in @code{nnmail-procmail-directory}.  To arrive at the file name to put
8094 the incoming mail in, append @code{nnmail-procmail-suffix} to the group
8095 name.  The mail backends will read the mail from these files.
8096
8097 @vindex nnmail-resplit-incoming
8098 When Gnus reads a file called @file{mail.misc.spool}, this mail will be
8099 put in the @code{mail.misc}, as one would expect.  However, if you want
8100 Gnus to split the mail the normal way, you could set
8101 @code{nnmail-resplit-incoming} to @code{t}.
8102
8103 @vindex nnmail-keep-last-article
8104 If you use @code{procmail} to split things directory into an @code{nnmh}
8105 directory (which you shouldn't do), you should set
8106 @code{nnmail-keep-last-article} to non-@code{nil} to prevent Gnus from
8107 ever expiring the final article in a mail newsgroup.  This is quite,
8108 quite important.
8109
8110
8111 @node Incorporating Old Mail
8112 @subsection Incorporating Old Mail
8113
8114 Most people have lots of old mail stored in various file formats.  If
8115 you have set up Gnus to read mail using one of the spiffy Gnus mail
8116 backends, you'll probably wish to have that old mail incorporated into
8117 your mail groups.
8118
8119 Doing so can be quite easy.
8120
8121 To take an example: You're reading mail using @code{nnml}
8122 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
8123 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
8124 file filled with important, but old, mail.  You want to move it into
8125 your @code{nnml} groups.
8126
8127 Here's how:
8128
8129 @enumerate
8130 @item
8131 Go to the group buffer.
8132
8133 @item 
8134 Type `G f' and give the path of the mbox file when prompted to create an
8135 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
8136
8137 @item 
8138 Type `SPACE' to enter the newly created group.
8139
8140 @item
8141 Type `M P b' to process-mark all articles in this group (@pxref{Setting
8142 Process Marks}).
8143
8144 @item 
8145 Type `B r' to respool all the process-marked articles, and answer
8146 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
8147 @end enumerate
8148
8149 All the mail messages in the mbox file will now also be spread out over
8150 all your @code{nnml} groups.  Try entering them and check whether things
8151 have gone without a glitch.  If things look ok, you may consider
8152 deleting the mbox file, but I wouldn't do that unless I was absolutely
8153 sure that all the mail has ended up where it should be.
8154
8155 Respooling is also a handy thing to do if you're switching from one mail
8156 backend to another.  Just respool all the mail in the old mail groups
8157 using the new mail backend.
8158
8159
8160 @node Expiring Mail
8161 @subsection Expiring Mail
8162 @cindex article expiry
8163
8164 Traditional mail readers have a tendency to remove mail articles when
8165 you mark them as read, in some way.  Gnus takes a fundamentally
8166 different approach to mail reading.
8167
8168 Gnus basically considers mail just to be news that has been received in
8169 a rather peculiar manner.  It does not think that it has the power to
8170 actually change the mail, or delete any mail messages.  If you enter a
8171 mail group, and mark articles as ``read'', or kill them in some other
8172 fashion, the mail articles will still exist on the system.  I repeat:
8173 Gnus will not delete your old, read mail.  Unless you ask it to, of
8174 course.
8175
8176 To make Gnus get rid of your unwanted mail, you have to mark the
8177 articles as @dfn{expirable}.  This does not mean that the articles will
8178 disappear right away, however.  In general, a mail article will be
8179 deleted from your system if, 1) it is marked as expirable, AND 2) it is
8180 more than one week old.  If you do not mark an article as expirable, it
8181 will remain on your system until hell freezes over.  This bears
8182 repeating one more time, with some spurious capitalizations: IF you do
8183 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
8184
8185 @vindex gnus-auto-expirable-newsgroups
8186 You do not have to mark articles as expirable by hand.  Groups that
8187 match the regular expression @code{gnus-auto-expirable-newsgroups} will
8188 have all articles that you read marked as expirable automatically.  All
8189 articles that are marked as expirable have an @samp{E} in the first
8190 column in the summary buffer.
8191
8192 Let's say you subscribe to a couple of mailing lists, and you want the
8193 articles you have read to disappear after a while:
8194
8195 @lisp
8196 (setq gnus-auto-expirable-newsgroups 
8197       "mail.nonsense-list\\|mail.nice-list")
8198 @end lisp
8199
8200 Another way to have auto-expiry happen is to have the element
8201 @code{auto-expire} in the group parameters of the group. 
8202
8203 @vindex nnmail-expiry-wait
8204 The @code{nnmail-expiry-wait} variable supplies the default time an
8205 expirable article has to live.  The default is seven days.  
8206
8207 Gnus also supplies a function that lets you fine-tune how long articles
8208 are to live, based on what group they are in.  Let's say you want to
8209 have one month expiry period in the @samp{mail.private} group, a one day
8210 expiry period in the @samp{mail.junk} group, and a six day expiry period
8211 everywhere else:
8212
8213 @vindex nnmail-expiry-wait-function
8214 @lisp
8215 (setq nnmail-expiry-wait-function
8216       (lambda (group)
8217        (cond ((string= group "mail.private")
8218                31)
8219              ((string= group "mail.junk")
8220                1)
8221              ((string= group "important")
8222                'never)
8223              (t
8224                6))))
8225 @end lisp
8226
8227 The group names that this function is fed are ``unadorned'' group
8228 names---no @samp{nnml:} prefixes and the like.
8229
8230 The @code{nnmail-expiry-wait} variable and
8231 @code{nnmail-expiry-wait-function} function can be either a number (not
8232 necessarily an integer) or the symbols @code{immediate} or
8233 @code{never}.  
8234
8235 You can also use the @code{expiry-wait} group parameter to selectively
8236 change the expiry period (@pxref{Group Parameters}).
8237
8238 @vindex nnmail-keep-last-article
8239 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
8240 expire the final article in a mail newsgroup.  This is to make life
8241 easier for procmail users.
8242
8243 @vindex gnus-total-expirable-newsgroups
8244 By the way, that line up there about Gnus never expiring non-expirable
8245 articles is a lie.  If you put @code{total-expire} in the group
8246 parameters, articles will not be marked as expirable, but all read
8247 articles will be put through the expiry process.  Use with extreme
8248 caution.  Even more dangerous is the
8249 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
8250 this regexp will have all read articles put through the expiry process,
8251 which means that @emph{all} old mail articles in the groups in question
8252 will be deleted after a while.  Use with extreme caution, and don't come
8253 crying to me when you discover that the regexp you used matched the
8254 wrong group and all your important mail has disappeared.  Be a
8255 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
8256 with!  So there!
8257
8258
8259 @node Duplicates
8260 @subsection Duplicates
8261
8262 @vindex nnmail-treat-duplicates
8263 @vindex nnmail-message-id-cache-length
8264 @vindex nnmail-message-id-cache-file
8265 @cindex duplicate mails
8266 If you are a member of a couple of mailing list, you will sometime
8267 receive two copies of the same mail.  This can be quite annoying, so
8268 @code{nnmail} checks for and treats any duplicates it might find.  To do
8269 this, it keeps a cache of old @code{Message-ID}s -
8270 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
8271 default.  The approximate maximum number of @code{Message-ID}s stored
8272 there is controlled by the @code{nnmail-message-id-cache-length}
8273 variable, which is 1000 by default. (So 1000 @code{Message-ID}s will be
8274 stored.) If all this sounds scary to you, you can set
8275 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
8276 default), and @code{nnmail} won't delete duplicate mails.  Instead it
8277 will generate a brand new @code{Message-ID} for the mail and insert a
8278 warning into the head of the mail saying that it thinks that this is a
8279 duplicate of a different message.  
8280
8281 This variable can also be a function.  If that's the case, the function
8282 will be called from a buffer narrowed to the message in question with
8283 the @code{Message-ID} as a parameter.  The function must return either
8284 @code{nil}, @code{warn}, or @code{delete}.
8285
8286 You can turn this feature off completely by setting the variable to
8287 @code{nil}.
8288
8289 If you want all the duplicate mails to be put into a special
8290 @dfn{duplicates} group, you could do that using the normal mail split
8291 methods:
8292
8293 @lisp
8294 (setq nnmail-split-fancy
8295       '(| ;; Messages duplicates go to a separate group.
8296           ("gnus-warning" "duplication of message" "duplicate")
8297           ;; Message from daemons, postmaster, and the like to another.
8298           (any mail "mail.misc")
8299           ;; Other rules.
8300           [ ... ] ))
8301 @end lisp
8302
8303 Or something like:
8304 @lisp
8305 (setq nnmail-split-methods 
8306       '(("duplicates" "^Gnus-Warning:")
8307         ;; Other rules.
8308         [...]))
8309 @end lisp
8310
8311 Here's a neat feature: If you know that the recipient reads her mail
8312 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
8313 @code{delete}, you can send her as many insults as you like, just by
8314 using a @code{Message-ID} of a mail that you know that she's already
8315 received.  Think of all the fun!  She'll never see any of it!  Whee!
8316
8317
8318 @node Not Reading Mail
8319 @subsection Not Reading Mail
8320
8321 If you start using any of the mail backends, they have the annoying
8322 habit of assuming that you want to read mail with them.  This might not
8323 be unreasonable, but it might not be what you want.
8324
8325 If you set @code{nnmail-spool-file} to @code{nil}, none of the backends
8326 will ever attempt to read incoming mail, which should help.
8327
8328 @vindex nnbabyl-get-new-mail
8329 @vindex nnmbox-get-new-mail
8330 @vindex nnml-get-new-mail
8331 @vindex nnmh-get-new-mail
8332 @vindex nnfolder-get-new-mail
8333 This might be too much, if, for instance, you are reading mail quite
8334 happily with @code{nnml} and just want to peek at some old @sc{rmail}
8335 file you have stashed away with @code{nnbabyl}.  All backends have
8336 variables called backend-@code{get-new-mail}.  If you want to disable
8337 the @code{nnbabyl} mail reading, you edit the virtual server for the
8338 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
8339
8340 All the mail backends will call @code{nn}*@code{-prepare-save-mail-hook}
8341 narrowed to the article to be saved before saving it when reading
8342 incoming mail.
8343
8344
8345 @node Choosing a Mail Backend
8346 @subsection Choosing a Mail Backend
8347
8348 Gnus will read the mail spool when you activate a mail group.  The mail
8349 file is first copied to your home directory.  What happens after that
8350 depends on what format you want to store your mail in.
8351
8352 @menu
8353 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
8354 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
8355 * Mail Spool::                  Store your mail in a private spool?
8356 * MH Spool::                    An mhspool-like backend.
8357 * Mail Folders::                Having one file for each group.
8358 @end menu
8359
8360
8361 @node Unix Mail Box
8362 @subsubsection Unix Mail Box
8363 @cindex nnmbox
8364 @cindex unix mail box
8365
8366 @vindex nnmbox-active-file
8367 @vindex nnmbox-mbox-file
8368 The @dfn{nnmbox} backend will use the standard Un*x mbox file to store
8369 mail.  @code{nnmbox} will add extra headers to each mail article to say
8370 which group it belongs in.
8371
8372 Virtual server settings:
8373
8374 @table @code
8375 @item nnmbox-mbox-file
8376 @vindex nnmbox-mbox-file
8377 The name of the mail box in the user's home directory. 
8378
8379 @item nnmbox-active-file
8380 @vindex nnmbox-active-file
8381 The name of the active file for the mail box.
8382
8383 @item nnmbox-get-new-mail
8384 @vindex nnmbox-get-new-mail
8385 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
8386 into groups.
8387 @end table
8388
8389
8390 @node Rmail Babyl
8391 @subsubsection Rmail Babyl
8392 @cindex nnbabyl
8393 @cindex rmail mbox
8394
8395 @vindex nnbabyl-active-file
8396 @vindex nnbabyl-mbox-file
8397 The @dfn{nnbabyl} backend will use a babyl mail box (aka. @dfn{rmail
8398 mbox}) to store mail. @code{nnbabyl} will add extra headers to each mail
8399 article to say which group it belongs in.
8400
8401 Virtual server settings:
8402
8403 @table @code
8404 @item nnbabyl-mbox-file
8405 @vindex nnbabyl-mbox-file
8406 The name of the rmail mbox file.
8407
8408 @item nnbabyl-active-file
8409 @vindex nnbabyl-active-file
8410 The name of the active file for the rmail box.
8411
8412 @item nnbabyl-get-new-mail
8413 @vindex nnbabyl-get-new-mail
8414 If non-@code{nil}, @code{nnbabyl} will read incoming mail. 
8415 @end table
8416
8417
8418 @node Mail Spool
8419 @subsubsection Mail Spool
8420 @cindex nnml
8421 @cindex mail @sc{nov} spool
8422
8423 The @dfn{nnml} spool mail format isn't compatible with any other known
8424 format.  It should be used with some caution.
8425
8426 @vindex nnml-directory
8427 If you use this backend, Gnus will split all incoming mail into files;
8428 one file for each mail, and put the articles into the correct
8429 directories under the directory specified by the @code{nnml-directory}
8430 variable.  The default value is @file{~/Mail/}.
8431
8432 You do not have to create any directories beforehand; Gnus will take
8433 care of all that.
8434
8435 If you have a strict limit as to how many files you are allowed to store
8436 in your account, you should not use this backend.  As each mail gets its
8437 own file, you might very well occupy thousands of inodes within a few
8438 weeks.  If this is no problem for you, and it isn't a problem for you
8439 having your friendly systems administrator walking around, madly,
8440 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
8441 know that this is probably the fastest format to use.  You do not have
8442 to trudge through a big mbox file just to read your new mail.
8443
8444 @code{nnml} is probably the slowest backend when it comes to article
8445 splitting.  It has to create lots of files, and it also generates
8446 @sc{nov} databases for the incoming mails.  This makes is the fastest
8447 backend when it comes to reading mail.
8448
8449 Virtual server settings:
8450
8451 @table @code
8452 @item nnml-directory
8453 @vindex nnml-directory
8454 All @code{nnml} directories will be placed under this directory. 
8455
8456 @item nnml-active-file
8457 @vindex nnml-active-file
8458 The active file for the @code{nnml} server.
8459
8460 @item nnml-newsgroups-file
8461 @vindex nnml-newsgroups-file
8462 The @code{nnml} group descriptions file.  @xref{Newsgroups File
8463 Format}. 
8464
8465 @item nnml-get-new-mail
8466 @vindex nnml-get-new-mail
8467 If non-@code{nil}, @code{nnml} will read incoming mail.
8468
8469 @item nnml-nov-is-evil
8470 @vindex nnml-nov-is-evil
8471 If non-@code{nil}, this backend will ignore any @sc{nov} files.  
8472
8473 @item nnml-nov-file-name
8474 @vindex nnml-nov-file-name
8475 The name of the @sc{nov} files.  The default is @file{.overview}. 
8476
8477 @item nnml-prepare-save-mail-hook
8478 @vindex nnml-prepare-save-mail-hook
8479 Hook run narrowed to an article before saving.
8480
8481 @end table
8482
8483 @findex nnml-generate-nov-databases
8484 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
8485 you can do a complete update by typing @kbd{M-x
8486 nnml-generate-nov-databases}.  This command will trawl through the
8487 entire @code{nnml} hierarchy, looking at each and every article, so it
8488 might take a while to complete.
8489
8490
8491 @node MH Spool
8492 @subsubsection MH Spool
8493 @cindex nnmh
8494 @cindex mh-e mail spool
8495
8496 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
8497 @sc{nov} databases and it doesn't keep an active file.  This makes
8498 @code{nnmh} a @emph{much} slower backend than @code{nnml}, but it also
8499 makes it easier to write procmail scripts for.
8500
8501 Virtual server settings:
8502
8503 @table @code
8504 @item nnmh-directory
8505 @vindex nnmh-directory
8506 All @code{nnmh} directories will be located under this directory.
8507
8508 @item nnmh-get-new-mail
8509 @vindex nnmh-get-new-mail
8510 If non-@code{nil}, @code{nnmh} will read incoming mail.
8511
8512 @item nnmh-be-safe
8513 @vindex nnmh-be-safe
8514 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
8515 sure that the articles in the folder are actually what Gnus thinks they
8516 are.  It will check date stamps and stat everything in sight, so
8517 setting this to @code{t} will mean a serious slow-down.  If you never
8518 use anything but Gnus to read the @code{nnmh} articles, you do not have
8519 to set this variable to @code{t}.
8520 @end table
8521
8522
8523 @node Mail Folders
8524 @subsubsection Mail Folders
8525 @cindex nnfolder
8526 @cindex mbox folders
8527 @cindex mail folders
8528
8529 @code{nnfolder} is a backend for storing each mail group in a separate
8530 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
8531 will add extra headers to keep track of article numbers and arrival
8532 dates.
8533
8534 Virtual server settings:
8535
8536 @table @code
8537 @item nnfolder-directory
8538 @vindex nnfolder-directory
8539 All the @code{nnfolder} mail boxes will be stored under this directory. 
8540
8541 @item nnfolder-active-file
8542 @vindex nnfolder-active-file
8543 The name of the active file.
8544
8545 @item nnfolder-newsgroups-file
8546 @vindex nnfolder-newsgroups-file
8547 The name of the group descriptions file.  @xref{Newsgroups File Format}.
8548
8549 @item nnfolder-get-new-mail
8550 @vindex nnfolder-get-new-mail
8551 If non-@code{nil}, @code{nnfolder} will read incoming mail.
8552 @end table
8553
8554 @findex nnfolder-generate-active-file
8555 @kindex M-x nnfolder-generate-active-file
8556 If you have lots of @code{nnfolder}-like files you'd like to read with
8557 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
8558 command to make @code{nnfolder} aware of all likely files in
8559 @code{nnfolder-directory}.
8560
8561
8562 @node Other Sources
8563 @section Other Sources
8564
8565 Gnus can do more than just read news or mail.  The methods described
8566 below allow Gnus to view directories and files as if they were
8567 newsgroups.
8568
8569 @menu
8570 * Directory Groups::   You can read a directory as if it was a newsgroup.
8571 * Anything Groups::    Dired?  Who needs dired?
8572 * Document Groups::    Single files can be the basis of a group.
8573 * SOUP::               Reading @sc{SOUP} packets ``offline''.
8574 @end menu
8575
8576
8577 @node Directory Groups
8578 @subsection Directory Groups
8579 @cindex nndir
8580 @cindex directory groups
8581
8582 If you have a directory that has lots of articles in separate files in
8583 it, you might treat it as a newsgroup.  The files have to have numerical
8584 names, of course.
8585
8586 This might be an opportune moment to mention @code{ange-ftp}, that most
8587 wonderful of all wonderful Emacs packages.  When I wrote @code{nndir}, I
8588 didn't think much about it---a backend to read directories.  Big deal.
8589
8590 @code{ange-ftp} changes that picture dramatically.  For instance, if you
8591 enter @file{"/ftp.hpc.uh.edu:/pub/emacs/ding-list/"} as the the
8592 directory name, ange-ftp will actually allow you to read this directory
8593 over at @samp{sina} as a newsgroup.  Distributed news ahoy!
8594
8595 @code{nndir} will use @sc{nov} files if they are present.
8596
8597 @code{nndir} is a ``read-only'' backend---you can't delete or expire
8598 articles with this method.  You can use @code{nnmh} or @code{nnml} for
8599 whatever you use @code{nndir} for, so you could switch to any of those
8600 methods if you feel the need to have a non-read-only @code{nndir}.
8601
8602
8603 @node Anything Groups
8604 @subsection Anything Groups
8605 @cindex nneething
8606
8607 From the @code{nndir} backend (which reads a single spool-like
8608 directory), it's just a hop and a skip to @code{nneething}, which
8609 pretends that any arbitrary directory is a newsgroup.  Strange, but
8610 true.
8611
8612 When @code{nneething} is presented with a directory, it will scan this
8613 directory and assign article numbers to each file.  When you enter such
8614 a group, @code{nneething} must create ``headers'' that Gnus can use.
8615 After all, Gnus is a newsreader, in case you're
8616 forgetting. @code{nneething} does this in a two-step process.  First, it
8617 snoops each file in question.  If the file looks like an article (i.e.,
8618 the first few lines look like headers), it will use this as the head.
8619 If this is just some arbitrary file without a head (eg. a C source
8620 file), @code{nneething} will cobble up a header out of thin air.  It
8621 will use file ownership, name and date and do whatever it can with these
8622 elements.
8623
8624 All this should happen automatically for you, and you will be presented
8625 with something that looks very much like a newsgroup.  Totally like a
8626 newsgroup, to be precise.  If you select an article, it will be displayed
8627 in the article buffer, just as usual.
8628
8629 If you select a line that represents a directory, Gnus will pop you into
8630 a new summary buffer for this @code{nneething} group.  And so on.  You can
8631 traverse the entire disk this way, if you feel like, but remember that
8632 Gnus is not dired, really, and does not intend to be, either.
8633
8634 There are two overall modes to this action---ephemeral or solid.  When
8635 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
8636 will not store information on what files you have read, and what files
8637 are new, and so on.  If you create a solid @code{nneething} group the
8638 normal way with @kbd{G m}, Gnus will store a mapping table between
8639 article numbers and file names, and you can treat this group like any
8640 other groups.  When you activate a solid @code{nneething} group, you will
8641 be told how many unread articles it contains, etc., etc.
8642
8643 Some variables:
8644
8645 @table @code
8646 @item nneething-map-file-directory
8647 @vindex nneething-map-file-directory
8648 All the mapping files for solid @code{nneething} groups will be stored
8649 in this directory, which defaults to @file{~/.nneething/}.
8650
8651 @item nneething-exclude-files
8652 @vindex nneething-exclude-files
8653 All files that match this regexp will be ignored.  Nice to use to exclude
8654 auto-save files and the like, which is what it does by default.
8655
8656 @item nneething-map-file
8657 @vindex nneething-map-file
8658 Name of the map files.
8659 @end table
8660
8661
8662 @node Document Groups
8663 @subsection Document Groups
8664 @cindex nndoc
8665 @cindex documentation group
8666 @cindex help group
8667
8668 @code{nndoc} is a cute little thing that will let you read a single file
8669 as a newsgroup.  Several files types are supported:
8670
8671 @table @code
8672 @cindex babyl
8673 @cindex rmail mbox
8674
8675 @item babyl
8676 The babyl (rmail) mail box.
8677 @cindex mbox
8678 @cindex Unix mbox
8679
8680 @item mbox
8681 The standard Unix mbox file.
8682
8683 @cindex MMDF mail box
8684 @item mmdf
8685 The MMDF mail box format.
8686
8687 @item news
8688 Several news articles appended into a file.
8689
8690 @item rnews
8691 @cindex rnews batch files
8692 The rnews batch transport format.
8693 @cindex forwarded messages
8694
8695 @item forward
8696 Forwarded articles.
8697
8698 @item mime-digest
8699 @cindex digest
8700 @cindex MIME digest
8701 @cindex 1153 digest
8702 @cindex RFC 1153 digest
8703 @cindex RFC 341 digest
8704 MIME (RFC 1341) digest format.
8705
8706 @item standard-digest
8707 The standard (RFC 1153) digest format.
8708
8709 @item slack-digest
8710 Non-standard digest format---matches most things, but does it badly. 
8711 @end table
8712
8713 You can also use the special ``file type'' @code{guess}, which means
8714 that @code{nndoc} will try to guess what file type it is looking at.
8715 @code{digest} means that @code{nndoc} should guess what digest type the
8716 file is.
8717
8718 @code{nndoc} will not try to change the file or insert any extra headers into
8719 it---it will simply, like, let you use the file as the basis for a
8720 group.  And that's it.
8721
8722 If you have some old archived articles that you want to insert into your
8723 new & spiffy Gnus mail backend, @code{nndoc} can probably help you with
8724 that.  Say you have an old @file{RMAIL} file with mail that you now want
8725 to split into your new @code{nnml} groups.  You look at that file using
8726 @code{nndoc}, set the process mark on all the articles in the buffer
8727 (@kbd{M P b}, for instance), and then re-spool (@kbd{B r}) using
8728 @code{nnml}.  If all goes well, all the mail in the @file{RMAIL} file is
8729 now also stored in lots of @code{nnml} directories, and you can delete
8730 that pesky @file{RMAIL} file.  If you have the guts!  
8731
8732 Virtual server variables:
8733
8734 @table @code
8735 @item nndoc-article-type
8736 @vindex nndoc-article-type
8737 This should be one of @code{mbox}, @code{babyl}, @code{digest},
8738 @code{mmdf}, @code{forward}, @code{news}, @code{rnews},
8739 @code{mime-digest}, @code{clari-briefs}, or @code{guess}.
8740
8741 @item nndoc-post-type
8742 @vindex nndoc-post-type
8743 This variable says whether Gnus is to consider the group a news group or
8744 a mail group.  There are two legal values:  @code{mail} (the default)
8745 and @code{news}.
8746 @end table
8747
8748 @menu
8749 * Document Server Internals::   How to add your own document types.
8750 @end menu
8751
8752
8753 @node Document Server Internals
8754 @subsubsection Document Server Internals
8755
8756 Adding new document types to be recognized by @code{nndoc} isn't
8757 difficult.  You just have to whip up a definition of what the document
8758 looks like, write a predicate function to recognize that document type,
8759 and then hook into @code{nndoc}.
8760
8761 First, here's an example document type definition:
8762
8763 @example
8764 (mmdf 
8765  (article-begin .  "^\^A\^A\^A\^A\n")
8766  (body-end .  "^\^A\^A\^A\^A\n"))
8767 @end example
8768
8769 The definition is simply a unique @dfn{name} followed by a series of
8770 regexp pseudo-variable settings.  Below are the possible
8771 variables---don't be daunted by the number of variables; most document
8772 types can be defined with very few settings:
8773
8774 @table @code
8775 @item first-article
8776 If present, @code{nndoc} will skip past all text until it finds
8777 something that match this regexp.  All text before this will be
8778 totally ignored. 
8779
8780 @item article-begin
8781 This setting has to be present in all document type definitions.  It
8782 says what the beginning of each article looks like.
8783
8784 @item head-begin-function
8785 If present, this should be a function that moves point to the head of
8786 the article.
8787
8788 @item nndoc-head-begin
8789 If present, this should be a regexp that matches the head of the
8790 article. 
8791
8792 @item nndoc-head-end
8793 This should match the end of the head of the article.  It defaults to
8794 @samp{"^$"}---the empty line.
8795
8796 @item body-begin-function
8797 If present, this function should move point to the beginning of the body
8798 of the article.
8799
8800 @item body-begin
8801 This should match the beginning of the body of the article.  It defaults
8802 to @samp{^\n}.
8803
8804 @item body-end-function
8805 If present, this function should move point to the end of the body of
8806 the article.
8807
8808 @item body-end
8809 If present, this should match the end of the body of the article.
8810
8811 @item nndoc-file-end
8812 If present, this should match the end of the file.  All text after this
8813 regexp will be totally ignored. 
8814
8815 @end table
8816
8817 So, using these variables @code{nndoc} is able to dissect a document
8818 file into a series of articles, each with a head and a body.  However, a
8819 few more variables are needed since not all document types are all that
8820 news-like---variables needed to transform the head or the body into
8821 something that's palatable for Gnus:
8822
8823 @table @code
8824 @item prepare-body-function
8825 If present, this function will be called when requesting an article.  It
8826 will be called with point at the start of the body, and is useful if the
8827 document has encoded some parts of its contents. 
8828
8829 @item article-transform-function
8830 If present, this function is called when requesting an article.  It's
8831 meant to be used how more wide-ranging transformation of both head and
8832 body of the article.
8833
8834 @item generate-head-function
8835 If present, this function is called to generate a head that Gnus can
8836 understand.  It is called with the article number as a parameter, and is
8837 expected to generate a nice head for the article in question.  It is
8838 called when requesting the headers of all articles.
8839
8840 @end table
8841
8842 Let's look at the most complicated example I can come up with---standard
8843 digests:
8844
8845 @example
8846 (standard-digest
8847  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
8848  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
8849  (prepare-body-function . nndoc-unquote-dashes)
8850  (body-end-function . nndoc-digest-body-end)
8851  (head-end . "^ ?$")
8852  (body-begin . "^ ?\n")
8853  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
8854  (subtype digest guess))
8855 @end example
8856
8857 We see that all text before a 70-width line of dashes is ignored; all
8858 text after a line that starts with that @samp{^End of} is also ignored;
8859 each article begins with a 30-width line of dashes; the line separating
8860 the head from the body may contain a single spcae; and that the body is
8861 run through @code{nndoc-unquote-dashes} before being delivered.
8862
8863 To hook your own document definition into @code{nndoc}, use the
8864 @code{nndoc-add-type} function.  It takes two parameters---the first is
8865 the definition itself and the second (optional) parameter says where in
8866 the document type definition alist to put this definition.  The alist is
8867 traversed sequentially, and @code{nndoc-TYPE-type-p} is called for each
8868 type.  So @code{nndoc-mmdf-type-p} is called to see whether a document
8869 is of @code{mmdf} type, and so on.  These type predicates should return
8870 @code{nil} if the document is not of the correct type; @code{t} if it is
8871 of the correct type; and a number if the document might be of the
8872 correct type.  A high number means high probability; a low number means
8873 low probability with @samp{0} being the lowest legal number.
8874
8875
8876 @node SOUP
8877 @subsection SOUP
8878 @cindex SOUP
8879 @cindex offline
8880
8881 In the PC world people often talk about ``offline'' newsreaders.  These
8882 are thingies that are combined reader/news transport monstrosities.
8883 With built-in modem programs.  Yecchh!
8884
8885 Of course, us Unix Weenie types of human beans use things like
8886 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
8887 transport things like Ghod intended.  And then we just use normal
8888 newsreaders.  
8889
8890 However, it can sometimes be convenient to do something a that's a bit
8891 easier on the brain if you have a very slow modem, and you're not really
8892 that interested in doing things properly.  
8893
8894 A file format called @sc{soup} has been developed for transporting news
8895 and mail from servers to home machines and back again.  It can be a bit
8896 fiddly.
8897
8898 @enumerate
8899
8900 @item
8901 You log in on the server and create a @sc{soup} packet.  You can either
8902 use a dedicated @sc{soup} thingie, or you can use Gnus to create the
8903 packet with the @kbd{O s} command.
8904
8905 @item 
8906 You transfer the packet home.  Rail, boat, car or modem will do fine.
8907
8908 @item
8909 You put the packet in your home directory.
8910
8911 @item
8912 You fire up Gnus using the @code{nnsoup} backend as the native server.
8913
8914 @item
8915 You read articles and mail and answer and followup to the things you
8916 want.
8917
8918 @item 
8919 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
8920 packet.
8921
8922 @item 
8923 You transfer this packet to the server.  
8924
8925 @item
8926 You use Gnus to mail this packet out with the @kbd{G s s} command.
8927
8928 @item
8929 You then repeat until you die.
8930
8931 @end enumerate
8932
8933 So you basically have a bipartite system---you use @code{nnsoup} for
8934 reading and Gnus for packing/sending these @sc{soup} packets.
8935
8936 @menu
8937 * SOUP Commands::     Commands for creating and sending @sc{soup} packets
8938 * SOUP Groups::       A backend for reading @sc{soup} packets.
8939 * SOUP Replies::      How to enable @code{nnsoup} to take over mail and news.
8940 @end menu
8941
8942
8943 @node SOUP Commands
8944 @subsubsection SOUP Commands
8945
8946 @table @kbd
8947 @item G s b
8948 @kindex G s b (Group)
8949 @findex gnus-group-brew-soup
8950 Pack all unread articles in the current group
8951 (@code{gnus-group-brew-soup}).  This command understands the
8952 process/prefix convention.
8953
8954 @item G s w
8955 @kindex G s w (Group)
8956 @findex gnus-soup-save-areas
8957 Save all data files (@code{gnus-soup-save-areas}).
8958
8959 @item G s s
8960 @kindex G s s (Group)
8961 @findex gnus-soup-send-replies
8962 Send all replies from the replies packet
8963 (@code{gnus-soup-send-replies}). 
8964
8965 @item G s p
8966 @kindex G s p (Group)
8967 @findex gnus-soup-pack-packet
8968 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}). 
8969
8970 @item G s r
8971 @kindex G s r (Group)
8972 @findex nnsoup-pack-replies
8973 Pack all replies into a replies packet (@code{nnsoup-pack-replies}). 
8974
8975 @item O s
8976 @kindex O s (Summary)
8977 @findex gnus-soup-add-article
8978 This summary-mode command adds the current article to a @sc{soup} packet
8979 (@code{gnus-soup-add-article}).  It understands the process/prefix
8980 convention. 
8981
8982 @end table
8983
8984
8985 There are a few variables to customize where Gnus will put all these
8986 thingies:  
8987
8988 @table @code
8989
8990 @item gnus-soup-directory
8991 @vindex gnus-soup-directory
8992 Directory where Gnus will save intermediate files while composing
8993 @sc{soup} packets.  The default is @file{~/SoupBrew/}. 
8994
8995 @item gnus-soup-replies-directory
8996 @vindex gnus-soup-replies-directory
8997 This is what Gnus will use as a temporary directory while sending our
8998 reply packets.  The default is @file{~/SoupBrew/SoupReplies/}. 
8999
9000 @item gnus-soup-prefix-file
9001 @vindex gnus-soup-prefix-file
9002 Name of the file where Gnus stores the last used prefix.  The default is
9003 @samp{gnus-prefix}. 
9004
9005 @item gnus-soup-packer
9006 @vindex gnus-soup-packer
9007 A format string command for packing a @sc{soup} packet.  The default is
9008 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}. 
9009
9010 @item gnus-soup-unpacker
9011 @vindex gnus-soup-unpacker
9012 Format string command for unpacking a @sc{soup} packet.  The default is
9013 @samp{gunzip -c %s | tar xvf -}.
9014
9015 @item gnus-soup-packet-directory
9016 @vindex gnus-soup-packet-directory
9017 Where Gnus will look for reply packets.  The default is @file{~/}. 
9018
9019 @item gnus-soup-packet-regexp
9020 @vindex gnus-soup-packet-regexp
9021 Regular expression matching @sc{soup} reply packets in
9022 @code{gnus-soup-packet-directory}. 
9023
9024 @end table
9025  
9026
9027 @node SOUP Groups
9028 @subsubsection @sc{soup} Groups
9029 @cindex nnsoup
9030
9031 @code{nnsoup} is the backend for reading @sc{soup} packets.  It will
9032 read incoming packets, unpack them, and put them in a directory where
9033 you can read them at leisure.
9034
9035 These are the variables you can use to customize its behavior:
9036
9037 @table @code
9038
9039 @item nnsoup-tmp-directory
9040 @vindex nnsoup-tmp-directory
9041 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
9042 directory.  (@file{/tmp/} by default.)  
9043
9044 @item nnsoup-directory
9045 @vindex nnsoup-directory
9046 @code{nnsoup} then moves each message and index file to this directory.
9047 The default is @file{~/SOUP/}.
9048
9049 @item nnsoup-replies-directory 
9050 @vindex nnsoup-replies-directory 
9051 All replies will stored in this directory before being packed into a
9052 reply packet.  The default is @file{~/SOUP/replies/"}.
9053
9054 @item nnsoup-replies-format-type
9055 @vindex nnsoup-replies-format-type
9056 The @sc{soup} format of the replies packets.  The default is @samp{?n}
9057 (rnews), and I don't think you should touch that variable.  I probably
9058 shouldn't even have documented it.  Drats!  Too late!
9059
9060 @item nnsoup-replies-index-type
9061 @vindex nnsoup-replies-index-type
9062 The index type of the replies packet.  The is @samp{?n}, which means
9063 ``none''.  Don't fiddle with this one either!
9064
9065 @item nnsoup-active-file
9066 @vindex nnsoup-active-file
9067 Where @code{nnsoup} stores lots of information.  This is not an ``active
9068 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
9069 this file or mess it up in any way, you're dead.  The default is
9070 @file{~/SOUP/active}.
9071
9072 @item nnsoup-packer
9073 @vindex nnsoup-packer
9074 Format string command for packing a reply @sc{soup} packet.  The default
9075 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}. 
9076
9077 @item nnsoup-unpacker
9078 @vindex nnsoup-unpacker
9079 Format string command for unpacking incoming @sc{soup} packets.  The
9080 default is @samp{gunzip -c %s | tar xvf -}. 
9081
9082 @item nnsoup-packet-directory
9083 @vindex nnsoup-packet-directory
9084 Where @code{nnsoup} will look for incoming packets.  The default is
9085 @file{~/}.  
9086
9087 @item nnsoup-packet-regexp
9088 @vindex nnsoup-packet-regexp
9089 Regular expression matching incoming @sc{soup} packets.  The default is
9090 @samp{Soupout}. 
9091
9092 @end table
9093
9094
9095 @node SOUP Replies
9096 @subsubsection SOUP Replies
9097
9098 Just using @code{nnsoup} won't mean that your postings and mailings end
9099 up in @sc{soup} reply packets automagically.  You have to work a bit
9100 more for that to happen.
9101
9102 @findex nnsoup-set-variables
9103 The @code{nnsoup-set-variables} command will set the appropriate
9104 variables to ensure that all your followups and replies end up in the
9105 @sc{soup} system.
9106
9107 In specific, this is what it does:
9108
9109 @lisp
9110 (setq message-send-news-function 'nnsoup-request-post)
9111 (setq message-send-mail-function 'nnsoup-request-mail)
9112 @end lisp
9113
9114 And that's it, really.  If you only want news to go into the @sc{soup}
9115 system you just use the first line.  If you only want mail to be
9116 @sc{soup}ed you use the second.
9117
9118
9119 @node Combined Groups
9120 @section Combined Groups
9121
9122 Gnus allows combining a mixture of all the other group types into bigger
9123 groups.
9124
9125 @menu
9126 * Virtual Groups::     Combining articles from many groups.
9127 * Kibozed Groups::     Looking through parts of the newsfeed for articles.
9128 @end menu
9129
9130
9131 @node Virtual Groups
9132 @subsection Virtual Groups
9133 @cindex nnvirtual
9134 @cindex virtual groups
9135
9136 An @dfn{nnvirtual group} is really nothing more than a collection of
9137 other groups.
9138
9139 For instance, if you are tired of reading many small group, you can
9140 put them all in one big group, and then grow tired of reading one
9141 big, unwieldy group.  The joys of computing!
9142
9143 You specify @code{nnvirtual} as the method.  The address should be a
9144 regexp to match component groups.
9145
9146 All marks in the virtual group will stick to the articles in the
9147 component groups.  So if you tick an article in a virtual group, the
9148 article will also be ticked in the component group from whence it came.
9149 (And vice versa---marks from the component groups will also be shown in
9150 the virtual group.)
9151
9152 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
9153 newsgroups into one, big, happy newsgroup:
9154
9155 @lisp
9156 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
9157 @end lisp
9158
9159 The component groups can be native or foreign; everything should work
9160 smoothly, but if your computer explodes, it was probably my fault.
9161
9162 Collecting the same group from several servers might actually be a good
9163 idea if users have set the Distribution header to limit distribution.
9164 If you would like to read @samp{soc.motss} both from a server in Japan
9165 and a server in Norway, you could use the following as the group regexp:
9166
9167 @example
9168 "^nntp+some.server.jp:soc.motss$\\|^nntp+some.server.no:soc.motss$"
9169 @end example
9170
9171 This should work kinda smoothly---all articles from both groups should
9172 end up in this one, and there should be no duplicates.  Threading (and
9173 the rest) will still work as usual, but there might be problems with the
9174 sequence of articles.  Sorting on date might be an option here
9175 (@pxref{Selecting a Group}.
9176
9177 One limitation, however---all groups that are included in a virtual
9178 group has to be alive (i.e., subscribed or unsubscribed).  Killed or
9179 zombie groups can't be component groups for @code{nnvirtual} groups.
9180
9181 @vindex nnvirtual-always-rescan
9182 If the @code{nnvirtual-always-rescan} is non-@code{nil},
9183 @code{nnvirtual} will always scan groups for unread articles when
9184 entering a virtual group.  If this variable is @code{nil} (which is the
9185 default) and you read articles in a component group after the virtual
9186 group has been activated, the read articles from the component group
9187 will show up when you enter the virtual group.  You'll also see this
9188 effect if you have two virtual groups that contain the same component
9189 group.  If that's the case, you should set this variable to @code{t}.
9190 Or you can just tap @code{M-g} on the virtual group every time before
9191 you enter it---it'll have much the same effect.
9192
9193
9194 @node Kibozed Groups
9195 @subsection Kibozed Groups
9196 @cindex nnkiboze
9197 @cindex kibozing
9198
9199 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
9200 the news feed''.  @code{nnkiboze} is a backend that will do this for
9201 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
9202 with useless requests!  Oh happiness!
9203
9204 @kindex G k (Group)
9205 To create a kibozed group, use the @kbd{G k} command in the group
9206 buffer. 
9207
9208 The address field of the @code{nnkiboze} method is, as with
9209 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
9210 @code{nnkiboze} group.  There most similarities between @code{nnkiboze}
9211 and @code{nnvirtual} ends.
9212
9213 In addition to this regexp detailing component groups, an @code{nnkiboze} group
9214 must have a score file to say what articles that are to be included in
9215 the group (@pxref{Scoring}).
9216
9217 @kindex M-x nnkiboze-generate-groups
9218 @findex nnkiboze-generate-groups
9219 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
9220 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
9221 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
9222 all the articles in all the components groups and run them through the
9223 scoring process to determine if there are any articles in the groups
9224 that are to be part of the @code{nnkiboze} groups.
9225
9226 Please limit the number of component groups by using restrictive
9227 regexps.  Otherwise your sysadmin may become annoyed with you, and the
9228 @sc{nntp} site may throw you off and never let you back in again.
9229 Stranger things have happened.
9230
9231 @code{nnkiboze} component groups do not have to be alive---they can be dead,
9232 and they can be foreign.  No restrictions.
9233
9234 @vindex nnkiboze-directory
9235 The generation of an @code{nnkiboze} group means writing two files in
9236 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
9237 contains the @sc{nov} header lines for all the articles in the group,
9238 and the other is an additional @file{.newsrc} file to store information
9239 on what groups that have been searched through to find component
9240 articles.
9241
9242 Articles that are marked as read in the @code{nnkiboze} group will have their
9243 @sc{nov} lines removed from the @sc{nov} file.
9244
9245
9246 @node Scoring
9247 @chapter Scoring
9248 @cindex scoring
9249
9250 Other people use @dfn{kill files}, but we here at Gnus Towers like
9251 scoring better than killing, so we'd rather switch than fight.  They do
9252 something completely different as well, so sit up straight and pay
9253 attention!
9254
9255 @vindex gnus-summary-mark-below
9256 All articles have a default score (@code{gnus-summary-default-score}),
9257 which is 0 by default.  This score may be raised or lowered either
9258 interactively or by score files.  Articles that have a score lower than
9259 @code{gnus-summary-mark-below} are marked as read.
9260
9261 Gnus will read any @dfn{score files} that apply to the current group
9262 before generating the summary buffer.
9263
9264 There are several commands in the summary buffer that insert score
9265 entries based on the current article.  You can, for instance, ask Gnus to
9266 lower or increase the score of all articles with a certain subject.
9267
9268 There are two sorts of scoring entries: Permanent and temporary.
9269 Temporary score entries are self-expiring entries.  Any entries that are
9270 temporary and have not been used for, say, a week, will be removed
9271 silently to help keep the sizes of the score files down.
9272
9273 @menu 
9274 * Summary Score Commands::   Adding score entries for the current group.
9275 * Group Score Commands::     General score commands.
9276 * Score Variables::          Customize your scoring.  (My, what terminology).
9277 * Score File Format::        What a score file may contain.
9278 * Score File Editing::       You can edit score files by hand as well.
9279 * Adaptive Scoring::         Big Sister Gnus @emph{knows} what you read.
9280 * Home Score File::          How to say where new score entries are to go.
9281 * Followups To Yourself::    Having Gnus notice when people answer you.
9282 * Scoring Tips::             How to score effectively.
9283 * Reverse Scoring::          That problem child of old is not problem.
9284 * Global Score Files::       Earth-spanning, ear-splitting score files.
9285 * Kill Files::               They are still here, but they can be ignored.
9286 * GroupLens::                Getting predictions on what you like to read.
9287 * Advanced Scoring::         Using logical expressions to build score rules.
9288 * Score Decays::             It can be useful to let scores wither away.
9289 @end menu
9290
9291
9292 @node Summary Score Commands
9293 @section Summary Score Commands
9294 @cindex score commands
9295
9296 The score commands that alter score entries do not actually modify real
9297 score files.  That would be too inefficient.  Gnus maintains a cache of
9298 previously loaded score files, one of which is considered the
9299 @dfn{current score file alist}.  The score commands simply insert
9300 entries into this list, and upon group exit, this list is saved.
9301
9302 The current score file is by default the group's local score file, even
9303 if no such score file actually exists.  To insert score commands into
9304 some other score file (eg. @file{all.SCORE}), you must first make this
9305 score file the current one.
9306
9307 General score commands that don't actually change the score file:
9308
9309 @table @kbd
9310
9311 @item V s
9312 @kindex V s (Summary)
9313 @findex gnus-summary-set-score
9314 Set the score of the current article (@code{gnus-summary-set-score}).  
9315
9316 @item V S
9317 @kindex V S (Summary)
9318 @findex gnus-summary-current-score
9319 Display the score of the current article
9320 (@code{gnus-summary-current-score}).   
9321
9322 @item V t
9323 @kindex V t (Summary)
9324 @findex gnus-score-find-trace
9325 Display all score rules that have been used on the current article
9326 (@code{gnus-score-find-trace}).   
9327
9328 @item V R
9329 @cindex V R (Summary)
9330 @findex gnus-summary-rescore
9331 Run the current summary through the scoring process
9332 (@code{gnus-summary-rescore}).  This might be useful if you're playing
9333 around with your score files behind Gnus' back and want to see the
9334 effect you're having.
9335
9336 @item V a
9337 @kindex V a (Summary)
9338 @findex gnus-summary-score-entry
9339 Add a new score entry, and allow specifying all elements 
9340 (@code{gnus-summary-score-entry}).
9341
9342 @item V c
9343 @kindex V c (Summary)
9344 @findex gnus-score-change-score-file
9345 Make a different score file the current
9346 (@code{gnus-score-change-score-file}). 
9347
9348 @item V e
9349 @kindex V e (Summary)
9350 @findex gnus-score-edit-current-scores
9351 Edit the current score file (@code{gnus-score-edit-current-scores}).
9352 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
9353 File Editing}).
9354
9355 @item V f
9356 @kindex V f (Summary)
9357 @findex gnus-score-edit-file
9358 Edit a score file and make this score file the current one
9359 (@code{gnus-score-edit-file}).
9360
9361 @item V F
9362 @kindex V F (Summary)
9363 @findex gnus-score-flush-cache
9364 Flush the score cahe (@code{gnus-score-flush-cache}).  This is useful
9365 after editing score files.
9366
9367 @item V C
9368 @kindex V C (Summary)
9369 @findex gnus-score-customize
9370 Customize a score file in a visually pleasing manner
9371 (@code{gnus-score-customize}). 
9372
9373 @item I C-i
9374 @kindex I C-i (Summary)
9375 @findex gnus-summary-raise-score
9376 Increase the score of the current article
9377 (@code{gnus-summary-raise-score}).
9378
9379 @item L C-l
9380 @kindex L C-l (Summary)
9381 @findex gnus-summary-lower-score
9382 Lower the score of the current article
9383 (@code{gnus-summary-lower-score}). 
9384 @end table
9385
9386 The rest of these commands modify the local score file.
9387
9388 @table @kbd
9389
9390 @item V m
9391 @kindex V m (Summary)
9392 @findex gnus-score-set-mark-below
9393 Prompt for a score, and mark all articles with a score below this as
9394 read (@code{gnus-score-set-mark-below}).
9395
9396 @item V x
9397 @kindex V x (Summary)
9398 @findex gnus-score-set-expunge-below
9399 Prompt for a score, and add a score rule to the current score file to
9400 expunge all articles below this score
9401 (@code{gnus-score-set-expunge-below}).
9402 @end table
9403
9404 The keystrokes for actually making score entries follow a very regular
9405 pattern, so there's no need to list all the commands.  (Hundreds of
9406 them.)  
9407
9408 @enumerate
9409 @item
9410 The first key is either @kbd{I} (upper case i) for increasing the score
9411 or @kbd{L} for lowering the score. 
9412 @item
9413 The second key says what header you want to score on.  The following
9414 keys are available:
9415 @table @kbd
9416
9417 @item a
9418 Score on the author name.
9419
9420 @item s
9421 Score on the subject line.
9422
9423 @item x
9424 Score on the Xref line---i.e., the cross-posting line.
9425
9426 @item t
9427 Score on thread---the References line.
9428
9429 @item d
9430 Score on the date.
9431
9432 @item l
9433 Score on the number of lines.
9434
9435 @item i
9436 Score on the Message-ID.
9437
9438 @item f
9439 Score on followups.
9440
9441 @item b
9442 Score on the body.
9443
9444 @item h
9445 Score on the head.
9446 @end table
9447
9448 @item
9449 The third key is the match type.  Which match types are legal depends on
9450 what headers you are scoring on.
9451
9452 @table @code
9453
9454 @item strings 
9455
9456 @table @kbd
9457
9458 @item e
9459 Exact matching.
9460
9461 @item s
9462 Substring matching.
9463
9464 @item f
9465 Fuzzy matching.
9466
9467 @item r
9468 Regexp matching
9469 @end table
9470
9471 @item date
9472 @table @kbd
9473
9474 @item b
9475 Before date.
9476
9477 @item a
9478 At date.
9479
9480 @item n
9481 This date.
9482 @end table
9483
9484 @item number
9485 @table @kbd
9486
9487 @item <
9488 Less than number.
9489
9490 @item =
9491 Equal to number.
9492
9493 @item >
9494 Greater than number.
9495 @end table
9496 @end table
9497
9498 @item 
9499 The fourth and final key says whether this is a temporary (i.e., expiring)
9500 score entry, or a permanent (i.e., non-expiring) score entry, or whether
9501 it is to be done immediately, without adding to the score file.
9502 @table @kbd
9503
9504 @item t
9505 Temporary score entry.
9506
9507 @item p
9508 Permanent score entry.
9509
9510 @item i
9511 Immediately scoring.
9512 @end table
9513
9514 @end enumerate
9515
9516 So, let's say you want to increase the score on the current author with
9517 exact matching permanently: @kbd{I a e p}.  If you want to lower the
9518 score based on the subject line, using substring matching, and make a
9519 temporary score entry: @kbd{L s s t}.  Pretty easy.
9520
9521 To make things a bit more complicated, there are shortcuts.  If you use
9522 a capital letter on either the second or third keys, Gnus will use
9523 defaults for the remaining one or two keystrokes.  The defaults are
9524 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
9525 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
9526
9527 @vindex gnus-score-mimic-keymap
9528 The @code{gnus-score-mimic-keymap} says whether these commands will
9529 pretend they are keymaps or not.
9530
9531
9532 @node Group Score Commands
9533 @section Group Score Commands
9534 @cindex group score commands
9535
9536 There aren't many of these as yet, I'm afraid.
9537
9538 @table @kbd
9539
9540 @item W f
9541 @kindex W f (Group)
9542 @findex gnus-score-flush-cache
9543 Gnus maintains a cache of score alists to avoid having to reload them
9544 all the time.  This command will flush the cache
9545 (@code{gnus-score-flush-cache}). 
9546
9547 @end table
9548
9549
9550 @node Score Variables
9551 @section Score Variables
9552 @cindex score variables
9553
9554 @table @code
9555
9556 @item gnus-use-scoring
9557 @vindex gnus-use-scoring
9558 If @code{nil}, Gnus will not check for score files, and will not, in
9559 general, do any score-related work.  This is @code{t} by default.
9560
9561 @item gnus-kill-killed
9562 @vindex gnus-kill-killed
9563 If this variable is @code{nil}, Gnus will never apply score files to
9564 articles that have already been through the kill process.  While this
9565 may save you lots of time, it also means that if you apply a kill file
9566 to a group, and then change the kill file and want to run it over you
9567 group again to kill more articles, it won't work.  You have to set this
9568 variable to @code{t} to do that.  (It is @code{t} by default.)
9569
9570 @item gnus-kill-files-directory
9571 @vindex gnus-kill-files-directory
9572 All kill and score files will be stored in this directory, which is
9573 initialized from the @code{SAVEDIR} environment variable by default.
9574 This is @file{~/News/} by default.
9575
9576 @item gnus-score-file-suffix
9577 @vindex gnus-score-file-suffix
9578 Suffix to add to the group name to arrive at the score file name
9579 (@samp{SCORE} by default.)
9580
9581 @item gnus-score-uncacheable-files
9582 @vindex gnus-score-uncacheable-files
9583 @cindex score cache
9584 All score files are normally cached to avoid excessive re-loading of
9585 score files.  However, if this might make you Emacs grow big and
9586 bloated, so this regexp can be used to weed out score files that are
9587 unlikely to be needed again.  It would be a bad idea to deny caching of
9588 @file{all.SCORE}, while it might be a good idea to not cache
9589 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
9590 variable is @samp{ADAPT$} by default, so no adaptive score files will
9591 be cached.
9592
9593 @item gnus-save-score
9594 @vindex gnus-save-score
9595 If you have really complicated score files, and do lots of batch
9596 scoring, then you might set this variable to @code{t}.  This will make
9597 Gnus save the scores into the @file{.newsrc.eld} file.
9598
9599 @item gnus-score-interactive-default-score
9600 @vindex gnus-score-interactive-default-score
9601 Score used by all the interactive raise/lower commands to raise/lower
9602 score with.  Default is 1000, which may seem excessive, but this is to
9603 ensure that the adaptive scoring scheme gets enough room to play with.
9604 We don't want the small changes from the adaptive scoring to overwrite
9605 manually entered data.
9606
9607 @item gnus-summary-default-score
9608 @vindex gnus-summary-default-score
9609 Default score of an article, which is 0 by default.
9610
9611 @item gnus-score-over-mark
9612 @vindex gnus-score-over-mark
9613 Mark (in the third column) used for articles with a score over the
9614 default.  Default is @samp{+}.
9615
9616 @item gnus-score-below-mark
9617 @vindex gnus-score-below-mark
9618 Mark (in the third column) used for articles with a score below the
9619 default.  Default is @samp{-}.
9620
9621 @item gnus-score-find-score-files-function
9622 @vindex gnus-score-find-score-files-function
9623 Function used to find score files for the current group.  This function
9624 is called with the name of the group as the argument. 
9625
9626 Predefined functions available are:
9627 @table @code
9628
9629 @item gnus-score-find-single
9630 @findex gnus-score-find-single
9631 Only apply the group's own score file.
9632
9633 @item gnus-score-find-bnews
9634 @findex gnus-score-find-bnews
9635 Apply all score files that match, using bnews syntax.  This is the
9636 default.  For instance, if the current group is @samp{gnu.emacs.gnus},
9637 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
9638 @file{gnu.all.SCORE} would all apply.  In short, the instances of
9639 @samp{all} in the score file names are translated into @samp{.*}, and
9640 then a regexp match is done.
9641
9642 This means that if you have some score entries that you want to apply to
9643 all groups, then you put those entries in the @file{all.SCORE} file. 
9644
9645 @item gnus-score-find-hierarchical
9646 @findex gnus-score-find-hierarchical
9647 Apply all score files from all the parent groups.  This means that you
9648 can't have score files like @file{all.SCORE} or @file{all.emacs.SCORE},
9649 but you can have @file{SCORE},  @file{comp.SCORE} and
9650 @file{comp.emacs.SCORE}. 
9651
9652 @end table
9653 This variable can also be a list of functions.  In that case, all these
9654 functions will be called, and all the returned lists of score files will
9655 be applied.  These functions can also return lists of score alists
9656 directly.  In that case, the functions that return these non-file score
9657 alists should probably be placed before the ``real'' score file
9658 functions, to ensure that the last score file returned is the local
9659 score file.  Phu.
9660
9661 @item gnus-score-expiry-days
9662 @vindex gnus-score-expiry-days
9663 This variable says how many days should pass before an unused score file
9664 entry is expired.  If this variable is @code{nil}, no score file entries
9665 are expired.  It's 7 by default.
9666
9667 @item gnus-update-score-entry-dates
9668 @vindex gnus-update-score-entry-dates
9669 If this variable is non-@code{nil}, matching score entries will have
9670 their dates updated.  (This is how Gnus controls expiry---all
9671 non-matching entries will become too old while matching entries will
9672 stay fresh and young.)  However, if you set this variable to @code{nil},
9673 even matching entries will grow old and will have to face that oh-so
9674 grim reaper.  
9675
9676 @item gnus-score-after-write-file-function
9677 @vindex gnus-score-after-write-file-function
9678 Function called with the name of the score file just written.
9679
9680 @end table
9681
9682
9683 @node Score File Format
9684 @section Score File Format
9685 @cindex score file format
9686
9687 A score file is an @code{emacs-lisp} file that normally contains just a
9688 single form.  Casual users are not expected to edit these files;
9689 everything can be changed from the summary buffer.
9690
9691 Anyway, if you'd like to dig into it yourself, here's an example:
9692
9693 @lisp
9694 (("from"
9695   ("Lars Ingebrigtsen" -10000)
9696   ("Per Abrahamsen")
9697   ("larsi\\|lmi" -50000 nil R))
9698  ("subject"
9699   ("Ding is Badd" nil 728373))
9700  ("xref"
9701   ("alt.politics" -1000 728372 s))
9702  ("lines"
9703   (2 -100 nil <))
9704  (mark 0)
9705  (expunge -1000)
9706  (mark-and-expunge -10)
9707  (read-only nil)
9708  (orphan -10)
9709  (adapt t)
9710  (files "/hom/larsi/News/gnu.SCORE")
9711  (exclude-files "all.SCORE")
9712  (local (gnus-newsgroup-auto-expire t)
9713         (gnus-summary-make-false-root 'empty))
9714  (eval (ding)))
9715 @end lisp
9716
9717 This example demonstrates absolutely everything about a score file. 
9718
9719 Even though this looks much like lisp code, nothing here is actually
9720 @code{eval}ed.  The lisp reader is used to read this form, though, so it
9721 has to be legal syntactically, if not semantically.
9722
9723 Six keys are supported by this alist:
9724
9725 @table @code
9726
9727 @item STRING
9728 If the key is a string, it is the name of the header to perform the
9729 match on.  Scoring can only be performed on these eight headers:
9730 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
9731 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
9732 these headers, there are three strings to tell Gnus to fetch the entire
9733 article and do the match on larger parts of the article: @code{Body}
9734 will perform the match on the body of the article, @code{Head} will
9735 perform the match on the head of the article, and @code{All} will
9736 perform the match on the entire article.  Note that using any of these
9737 last three keys will slow down group entry @emph{considerably}.  The
9738 final ``header'' you can score on is @code{Followup}.  These score
9739 entries will result in new score entries being added for all follow-ups
9740 to articles that matches these score entries.
9741
9742 Following this key is a arbitrary number of score entries, where each
9743 score entry has one to four elements.
9744 @enumerate
9745
9746 @item 
9747 The first element is the @dfn{match element}.  On most headers this will
9748 be a string, but on the Lines and Chars headers, this must be an
9749 integer. 
9750
9751 @item 
9752 If the second element is present, it should be a number---the @dfn{score
9753 element}.  This number should be an integer in the neginf to posinf
9754 interval.  This number is added to the score of the article if the match
9755 is successful.  If this element is not present, the
9756 @code{gnus-score-interactive-default-score} number will be used
9757 instead.  This is 1000 by default.
9758
9759 @item 
9760 If the third element is present, it should be a number---the @dfn{date
9761 element}.  This date says when the last time this score entry matched,
9762 which provides a mechanism for expiring the score entries.  It this
9763 element is not present, the score entry is permanent.  The date is
9764 represented by the number of days since December 31, 1 ce.
9765
9766 @item 
9767 If the fourth element is present, it should be a symbol---the @dfn{type
9768 element}.  This element specifies what function should be used to see
9769 whether this score entry matches the article.  What match types that can
9770 be used depends on what header you wish to perform the match on.
9771 @table @dfn
9772
9773 @item From, Subject, References, Xref, Message-ID
9774 For most header types, there are the @code{r} and @code{R} (regexp), as
9775 well as @code{s} and @code{S} (substring) types, and @code{e} and
9776 @code{E} (exact match), and @code{w} (word match) types.  If this
9777 element is not present, Gnus will assume that substring matching should
9778 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
9779 that the matches will be done in a case-sensitive manner.  All these
9780 one-letter types are really just abbreviations for the @code{regexp},
9781 @code{string}, @code{exact}, and @code{word} types, which you can use
9782 instead, if you feel like.
9783
9784 @item Lines, Chars
9785 These two headers use different match types: @code{<}, @code{>},
9786 @code{=}, @code{>=} and @code{<=}.
9787
9788 @item Date
9789 For the Date header we have three kinda silly match types:
9790 @code{before}, @code{at} and @code{after}.  I can't really imagine this
9791 ever being useful, but, like, it would feel kinda silly not to provide
9792 this function.  Just in case.  You never know.  Better safe than sorry.
9793 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
9794 sex on a first date.  (I have been told that at least one person, and I
9795 quote, ``found this function indispensable'', however.)
9796
9797 A more useful match type is @code{regexp}.  With it, you can match the
9798 date string using a regular expression.  The date is normalized to
9799 ISO8601 compact format first, which looks like @samp{YYYYMMDDTHHMMSS}.
9800 If you want to match all articles that have been posted on April 1st in
9801 every year, you could use @samp{....0401.........} as a match string,
9802 for instance.  (Note that the date is kept in its original time zone, so
9803 this will match articles that were posted when it was April 1st where
9804 the article was posted from.  Time zones are such wholesome fun for the
9805 whole family, eh?)
9806
9807 @item Head, Body, All
9808 These three match keys use the same match types as the @code{From} (etc)
9809 header uses.
9810
9811 @item Followup
9812 This match key will add a score entry on all articles that followup to
9813 some author.  Uses the same match types as the @code{From} header uses.
9814
9815 @item Thread
9816 This match key will add a score entry on all articles that are part of
9817 a thread.  Uses the same match types as the @code{References} header
9818 uses.
9819 @end table
9820 @end enumerate
9821
9822 @item mark
9823 The value of this entry should be a number.  Any articles with a score
9824 lower than this number will be marked as read.
9825
9826 @item expunge
9827 The value of this entry should be a number.  Any articles with a score
9828 lower than this number will be removed from the summary buffer.
9829
9830 @item mark-and-expunge
9831 The value of this entry should be a number.  Any articles with a score
9832 lower than this number will be marked as read and removed from the
9833 summary buffer.
9834
9835 @item thread-mark-and-expunge
9836 The value of this entry should be a number.  All articles that belong to
9837 a thread that has a total score below this number will be marked as read
9838 and removed from the summary buffer.  @code{gnus-thread-score-function}
9839 says how to compute the total score for a thread.
9840
9841 @item files
9842 The value of this entry should be any number of file names.  These files
9843 are assumed to be score files as well, and will be loaded the same way
9844 this one was.
9845
9846 @item exclude-files
9847 The clue of this entry should be any number of files.  This files will
9848 not be loaded, even though they would normally be so, for some reason or
9849 other. 
9850
9851 @item eval
9852 The value of this entry will be @code{eval}el.  This element will be
9853 ignored when handling global score files. 
9854
9855 @item read-only
9856 Read-only score files will not be updated or saved.  Global score files
9857 should feature this atom (@pxref{Global Score Files}).
9858
9859 @item orphan
9860 The value of this entry should be a number.  Articles that do not have
9861 parents will get this number added to their scores.  Imagine you follow
9862 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
9863 will only follow a few of the threads, also want to see any new threads.
9864
9865 You can do this with the following two score file entries:
9866
9867 @example
9868         (orphan -500)
9869         (mark-and-expunge -100)
9870 @end example
9871
9872 When you enter the group the first time, you will only see the new
9873 threads.  You then raise the score of the threads that you find
9874 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
9875 rest.  Next time you enter the group, you will see new articles in the
9876 interesting threads, plus any new threads.
9877
9878 I.e.---the orphan score atom is for high-volume groups where there
9879 exist a few interesting threads which can't be found automatically by
9880 ordinary scoring rules.
9881
9882 @item adapt
9883 This entry controls the adaptive scoring.  If it is @code{t}, the
9884 default adaptive scoring rules will be used.  If it is @code{ignore}, no
9885 adaptive scoring will be performed on this group.  If it is a list, this
9886 list will be used as the adaptive scoring rules.  If it isn't present,
9887 or is something other than @code{t} or @code{ignore}, the default
9888 adaptive scoring rules will be used.  If you want to use adaptive
9889 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
9890 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
9891 not want adaptive scoring.  If you only want adaptive scoring in a few
9892 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
9893 insert @code{(adapt t)} in the score files of the groups where you want
9894 it. 
9895
9896 @item adapt-file
9897 All adaptive score entries will go to the file named by this entry.  It
9898 will also be applied when entering the group.  This atom might be handy
9899 if you want to adapt on several groups at once, using the same adaptive
9900 file for a number of groups.
9901
9902 @item local
9903 @cindex local variables
9904 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
9905 Each @var{var} will be made buffer-local to the current summary buffer,
9906 and set to the value specified.  This is a convenient, if somewhat
9907 strange, way of setting variables in some groups if you don't like hooks
9908 much.
9909 @end table
9910
9911
9912 @node Score File Editing
9913 @section Score File Editing
9914
9915 You normally enter all scoring commands from the summary buffer, but you
9916 might feel the urge to edit them by hand as well, so we've supplied you
9917 with a mode for that.  
9918
9919 It's simply a slightly customized @code{emacs-lisp} mode, with these
9920 additional commands:
9921
9922 @table @kbd
9923
9924 @item C-c C-c
9925 @kindex C-c C-c (Score)
9926 @findex gnus-score-edit-done
9927 Save the changes you have made and return to the summary buffer
9928 (@code{gnus-score-edit-done}). 
9929
9930 @item C-c C-d
9931 @kindex C-c C-d (Score)
9932 @findex gnus-score-edit-insert-date
9933 Insert the current date in numerical format
9934 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
9935 you were wondering.
9936
9937 @item C-c C-p
9938 @kindex C-c C-p (Score)
9939 @findex gnus-score-pretty-print
9940 The adaptive score files are saved in an unformatted fashion.  If you
9941 intend to read one of these files, you want to @dfn{pretty print} it
9942 first.  This command (@code{gnus-score-pretty-print}) does that for
9943 you. 
9944
9945 @end table
9946
9947 Type @kbd{M-x gnus-score-mode} to use this mode.
9948
9949 @vindex gnus-score-mode-hook
9950 @code{gnus-score-menu-hook} is run in score mode buffers.
9951
9952 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
9953 e} to begin editing score files.
9954
9955
9956 @node Adaptive Scoring
9957 @section Adaptive Scoring
9958 @cindex adaptive scoring
9959
9960 If all this scoring is getting you down, Gnus has a way of making it all
9961 happen automatically---as if by magic.  Or rather, as if by artificial
9962 stupidity, to be precise.
9963
9964 @vindex gnus-use-adaptive-scoring
9965 When you read an article, or mark an article as read, or kill an
9966 article, you leave marks behind.  On exit from the group, Gnus can sniff
9967 these marks and add score elements depending on what marks it finds.
9968 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
9969 @code{t} or @code{(line)}.  If you want score adaptively on separate
9970 words appearing in the subjects, you should set this variable to
9971 @code{(word)}.  If you want to use both adaptive methods, set this
9972 variable to @code{(word line)}.
9973
9974 @vindex gnus-default-adaptive-score-alist
9975 To give you complete control over the scoring process, you can customize
9976 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
9977 might look something like this:
9978
9979 @lisp
9980 (defvar gnus-default-adaptive-score-alist
9981   '((gnus-unread-mark)
9982     (gnus-ticked-mark (from 4))
9983     (gnus-dormant-mark (from 5))
9984     (gnus-del-mark (from -4) (subject -1))
9985     (gnus-read-mark (from 4) (subject 2))
9986     (gnus-expirable-mark (from -1) (subject -1))
9987     (gnus-killed-mark (from -1) (subject -3))
9988     (gnus-kill-file-mark)
9989     (gnus-ancient-mark)
9990     (gnus-low-score-mark)
9991     (gnus-catchup-mark (from -1) (subject -1))))
9992 @end lisp
9993
9994 As you see, each element in this alist has a mark as a key (either a
9995 variable name or a ``real'' mark---a character).  Following this key is
9996 a arbitrary number of header/score pairs.  If there are no header/score
9997 pairs following the key, no adaptive scoring will be done on articles
9998 that have that key as the article mark.  For instance, articles with
9999 @code{gnus-unread-mark} in the example above will not get adaptive score
10000 entries.
10001
10002 Each article can have only one mark, so just a single of these rules
10003 will be applied to each article.
10004
10005 To take @code{gnus-del-mark} as an example---this alist says that all
10006 articles that have that mark (i.e., are marked with @samp{D}) will have a
10007 score entry added to lower based on the @code{From} header by -4, and
10008 lowered by @code{Subject} by -1.  Change this to fit your prejudices. 
10009
10010 If you have marked 10 articles with the same subject with
10011 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
10012 That means that that subject will get a score of ten times -1, which
10013 should be, unless I'm much mistaken, -10.
10014
10015 The headers you can score on are @code{from}, @code{subject},
10016 @code{message-id}, @code{references}, @code{xref}, @code{lines},
10017 @code{chars} and @code{date}.  In addition, you can score on
10018 @code{followup}, which will create an adaptive score entry that matches
10019 on the @code{References} header using the @code{Message-ID} of the
10020 current article, thereby matching the following thread.  
10021
10022 You can also score on @code{thread}, which will try to score all
10023 articles that appear in a thread.  @code{thread} matches uses a
10024 @code{Message-ID} to match on the @code{References} header of the
10025 article.  If the match is made, the @code{Message-ID} of the article is
10026 added to the @code{thread} rule.  (Think about it.  I'd recommend two
10027 aspirins afterwards.)
10028
10029 If you use this scheme, you should set the score file atom @code{mark}
10030 to something small---like -300, perhaps, to avoid having small random
10031 changes result in articles getting marked as read.
10032
10033 After using adaptive scoring for a week or so, Gnus should start to
10034 become properly trained and enhance the authors you like best, and kill
10035 the authors you like least, without you having to say so explicitly. 
10036
10037 You can control what groups the adaptive scoring is to be performed on
10038 by using the score files (@pxref{Score File Format}).  This will also
10039 let you use different rules in different groups.
10040
10041 @vindex gnus-adaptive-file-suffix
10042 The adaptive score entries will be put into a file where the name is the
10043 group name with @code{gnus-adaptive-file-suffix} appended.  The default
10044 is @samp{ADAPT}.
10045
10046 @vindex gnus-score-exact-adapt-limit
10047 When doing adaptive scoring, substring or fuzzy matching would probably
10048 give you the best results in most cases.  However, if the header one
10049 matches is short, the possibility for false positives is great, so if
10050 the length of the match is less than
10051 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
10052 this variable is @code{nil}, exact matching will always be used to avoid
10053 this problem.
10054
10055 @vindex gnus-default-adaptive-word-score-alist
10056 As mentioned above, you can adapt either on individual words or entire
10057 headers.  If you adapt on words, the
10058 @code{gnus-default-adaptive-word-score-alist} variable says what score
10059 each instance of a word should add given a mark.
10060
10061 @lisp
10062 (setq gnus-default-adaptive-word-score-alist  
10063       `((,gnus-read-mark . 30)
10064         (,gnus-catchup-mark . -10)
10065         (,gnus-killed-mark . -20)
10066         (,gnus-del-mark . -15)))
10067 @end lisp
10068
10069 This is the default value.  If you have adaption on words enabled, every
10070 word that appears in subjects of articles that are marked with
10071 @code{gnus-read-mark} will result in a score rule that increase the
10072 score with 30 points.
10073
10074 @vindex gnus-ignored-adaptive-words
10075 Words that appear in the @code{gnus-ignored-adaptive-words} list will be
10076 ignored.
10077
10078 After using this scheme for a while, it might be nice to write a
10079 @code{gnus-psychoanalyze-user} command to go through the rules and see
10080 what words you like and what words you don't like.  Or perhaps not.
10081
10082
10083 @node Home Score File
10084 @section Home Score File
10085
10086 The score file where new score file entries will go is called the
10087 @dfn{home score file}.  This is normally (and by default) the score file
10088 for the group itself.  For instance, the home score file for
10089 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
10090
10091 However, this may not be what you want.  It is often convenient to share
10092 a common home score file among many groups---all @samp{emacs} groups
10093 could perhaps use the same home score file.
10094
10095 @vindex gnus-home-score-file
10096 The variable that controls this is @code{gnus-home-score-file}.  It can
10097 be:
10098
10099 @enumerate
10100 @item
10101 A string.  Then this file will be used as the home score file for all
10102 groups. 
10103
10104 @item
10105 A function. The result of this function will be used as the home score
10106 file.  The function will be called with the name of the group as the
10107 parameter. 
10108
10109 @item
10110 A list.  The elements in this list can be:
10111
10112 @enumerate
10113 @item 
10114 @var{(regexp . file-name)}.  If the @var{regexp} matches the group name,
10115 the @var{file-name} will will be used as the home score file.
10116
10117 @item 
10118 A function. If the function returns non-nil, the result will be used as
10119 the home score file.
10120
10121 @item 
10122 A string.  Use the string as the home score file.
10123 @end enumerate
10124
10125 The list will be traversed from the beginning towards the end looking
10126 for matches.
10127
10128 @end enumerate
10129
10130 So, if you want to use just a single score file, you could say:
10131
10132 @lisp
10133 (setq gnus-home-score-file
10134       "my-total-score-file.SCORE")
10135 @end lisp
10136
10137 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
10138 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
10139
10140 @lisp
10141 (setq gnus-home-score-file
10142       'gnus-hierarchial-home-score-file)
10143 @end lisp
10144
10145 This is a ready-made function provided for your convenience.
10146
10147 If you want to have one score file for the @samp{emacs} groups and
10148 another for the @samp{comp} groups, while letting all other groups use
10149 their own home score files:
10150
10151 @lisp
10152 (setq gnus-home-score-file
10153       ;; All groups that match the regexp "\\.emacs"
10154       '("\\.emacs" . "emacs.SCORE")
10155       ;; All the comp groups in one score file
10156        ("^comp" . "comp.SCORE"))
10157 @end lisp
10158    
10159 @vindex gnus-home-adapt-file
10160 @code{gnus-home-adapt-file} works exactly the same way as
10161 @code{gnus-home-score-file}, but says what the home adaptive score file
10162 is instead.  All new adaptive file entries will go into the file
10163 specified by this variable, and the same syntax is allowed.
10164
10165 In addition to using @code{gnus-home-score-file} and
10166 @code{gnus-home-adapt-file}, you can also use group parameters
10167 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
10168 Parameters}) to achieve much the same.  Group and topic parameters take
10169 presedence over this variable.
10170
10171
10172 @node Followups To Yourself
10173 @section Followups To Yourself
10174
10175 Gnus offers two commands for picking out the @code{Message-ID} header in
10176 the current buffer.  Gnus will then add a score rule that scores using
10177 this @code{Message-ID} on the @code{References} header of other
10178 articles.  This will, in effect, increase the score of all articles that
10179 respond to the article in the current buffer.  Quite useful if you want
10180 to easily note when people answer what you've said.
10181
10182 @table @code
10183
10184 @item gnus-score-followup-article
10185 @findex gnus-score-followup-article
10186 This will add a score to articles that directly follow up your own
10187 article. 
10188
10189 @item gnus-score-followup-thread
10190 @findex gnus-score-followup-thread
10191 This will add a score to all articles that appear in a thread ``below''
10192 your own article.
10193 @end table
10194
10195 @vindex message-sent-hook
10196 These two functions are both primarily meant to be used in hooks like
10197 @code{message-sent-hook}.  
10198
10199 @node Scoring Tips
10200 @section Scoring Tips
10201 @cindex scoring tips
10202
10203 @table @dfn
10204
10205 @item Crossposts
10206 @cindex crossposts
10207 @cindex scoring crossposts
10208 If you want to lower the score of crossposts, the line to match on is
10209 the @code{Xref} header.
10210 @lisp
10211 ("xref" (" talk.politics.misc:" -1000))
10212 @end lisp
10213
10214 @item Multiple crossposts
10215 If you want to lower the score of articles that have been crossposted to
10216 more than, say, 3 groups:
10217 @lisp
10218 ("xref" ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+" -1000 nil r))
10219 @end lisp
10220
10221 @item Matching on the body
10222 This is generally not a very good idea---it takes a very long time.
10223 Gnus actually has to fetch each individual article from the server.  But
10224 you might want to anyway, I guess.  Even though there are three match
10225 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
10226 and stick with it in each score file.  If you use any two, each article
10227 will be fetched @emph{twice}.  If you want to match a bit on the
10228 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
10229 the matches.  
10230
10231 @item Marking as read
10232 You will probably want to mark articles that has a score below a certain
10233 number as read.  This is most easily achieved by putting the following
10234 in your @file{all.SCORE} file:
10235 @lisp
10236 ((mark -100))
10237 @end lisp
10238 You may also consider doing something similar with @code{expunge}.  
10239
10240 @item Negated character classes
10241 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
10242 That will match newlines, which might lead to, well, The Unknown.  Say
10243 @code{[^abcd\n]*} instead.
10244 @end table
10245
10246
10247 @node Reverse Scoring
10248 @section Reverse Scoring
10249 @cindex reverse scoring
10250
10251 If you want to keep just articles that have @samp{Sex with Emacs} in the
10252 subject header, and expunge all other articles, you could put something
10253 like this in your score file:
10254
10255 @lisp
10256 (("subject"
10257   ("Sex with Emacs" 2))
10258  (mark 1)
10259  (expunge 1))
10260 @end lisp
10261
10262 So, you raise all articles that match @samp{Sex with Emacs} and mark the
10263 rest as read, and expunge them to boot.
10264
10265
10266 @node Global Score Files
10267 @section Global Score Files
10268 @cindex global score files
10269
10270 Sure, other newsreaders have ``global kill files''.  These are usually
10271 nothing more than a single kill file that applies to all groups, stored
10272 in the user's home directory.  Bah!  Puny, weak newsreaders!
10273
10274 What I'm talking about here are Global Score Files.  Score files from
10275 all over the world, from users everywhere, uniting all nations in one
10276 big, happy score file union!  Ange-score!  New and untested!
10277
10278 @vindex gnus-global-score-files
10279 All you have to do to use other people's score files is to set the
10280 @code{gnus-global-score-files} variable.  One entry for each score file,
10281 or each score file directory.  Gnus will decide by itself what score
10282 files are applicable to which group.
10283
10284 Say you want to use all score files in the
10285 @file{/ftp@@ftp.some-where:/pub/score} directory and the single score
10286 file @file{/ftp@@ftp.ifi.uio.no:/pub/larsi/ding/score/soc.motss.SCORE}:
10287
10288 @lisp
10289 (setq gnus-global-score-files
10290       '("/ftp@@ftp.ifi.uio.no:/pub/larsi/ding/score/soc.motss.SCORE"
10291         "/ftp@@ftp.some-where:/pub/score/"))
10292 @end lisp
10293
10294 @findex gnus-score-search-global-directories
10295 Simple, eh?  Directory names must end with a @samp{/}.  These
10296 directories are typically scanned only once during each Gnus session.
10297 If you feel the need to manually re-scan the remote directories, you can
10298 use the @code{gnus-score-search-global-directories} command.
10299
10300 Note that, at present, using this option will slow down group entry
10301 somewhat.  (That is---a lot.)
10302
10303 If you want to start maintaining score files for other people to use,
10304 just put your score file up for anonymous ftp and announce it to the
10305 world.  Become a retro-moderator!  Participate in the retro-moderator
10306 wars sure to ensue, where retro-moderators battle it out for the
10307 sympathy of the people, luring them to use their score files on false
10308 premises!  Yay!  The net is saved!
10309
10310 Here are some tips for the would-be retro-moderator, off the top of my
10311 head: 
10312
10313 @itemize @bullet
10314
10315 @item 
10316 Articles that are heavily crossposted are probably junk. 
10317 @item
10318 To lower a single inappropriate article, lower by @code{Message-ID}.
10319 @item
10320 Particularly brilliant authors can be raised on a permanent basis. 
10321 @item
10322 Authors that repeatedly post off-charter for the group can safely be
10323 lowered out of existence.
10324 @item
10325 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
10326 articles completely.
10327
10328 @item 
10329 Use expiring score entries to keep the size of the file down.  You
10330 should probably have a long expiry period, though, as some sites keep
10331 old articles for a long time.
10332 @end itemize
10333
10334 ... I wonder whether other newsreaders will support global score files
10335 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
10336 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
10337 holding our breath yet?
10338
10339
10340 @node Kill Files
10341 @section Kill Files
10342 @cindex kill files
10343
10344 Gnus still supports those pesky old kill files.  In fact, the kill file
10345 entries can now be expiring, which is something I wrote before Daniel
10346 Quinlan thought of doing score files, so I've left the code in there.
10347
10348 In short, kill processing is a lot slower (and I do mean @emph{a lot})
10349 than score processing, so it might be a good idea to rewrite your kill
10350 files into score files.
10351
10352 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
10353 forms into this file, which means that you can use kill files as some
10354 sort of primitive hook function to be run on group entry, even though
10355 that isn't a very good idea.
10356
10357 XCNormal kill files look like this:
10358
10359 @lisp
10360 (gnus-kill "From" "Lars Ingebrigtsen")
10361 (gnus-kill "Subject" "ding")
10362 (gnus-expunge "X")
10363 @end lisp
10364
10365 This will mark every article written by me as read, and remove them from
10366 the summary buffer.  Very useful, you'll agree.
10367
10368 Other programs use a totally different kill file syntax.  If Gnus
10369 encounters what looks like a @code{rn} kill file, it will take a stab at
10370 interpreting it. 
10371
10372 Two summary functions for editing a GNUS kill file:
10373
10374 @table @kbd
10375
10376 @item M-k
10377 @kindex M-k (Summary)
10378 @findex gnus-summary-edit-local-kill
10379 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
10380
10381 @item M-K
10382 @kindex M-K (Summary)
10383 @findex gnus-summary-edit-global-kill
10384 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
10385 @end table
10386
10387 Two group mode functions for editing the kill files:
10388
10389 @table @kbd
10390
10391 @item M-k
10392 @kindex M-k (Group)
10393 @findex gnus-group-edit-local-kill
10394 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
10395
10396 @item M-K
10397 @kindex M-K (Group)
10398 @findex gnus-group-edit-global-kill
10399 Edit the general kill file (@code{gnus-group-edit-global-kill}).
10400 @end table
10401
10402 Kill file variables:
10403
10404 @table @code
10405 @item gnus-kill-file-name
10406 @vindex gnus-kill-file-name
10407 A kill file for the group @samp{soc.motss} is normally called
10408 @file{soc.motss.KILL}.  The suffix appended to the group name to get
10409 this file name is detailed by the @code{gnus-kill-file-name} variable.
10410 The ``global'' kill file (not in the score file sense of ``global'', of
10411 course) is called just @file{KILL}.
10412
10413 @vindex gnus-kill-save-kill-file
10414 @item gnus-kill-save-kill-file
10415 If this variable is non-@code{nil}, Gnus will save the
10416 kill file after processing, which is necessary if you use expiring
10417 kills. 
10418
10419 @item gnus-apply-kill-hook
10420 @vindex gnus-apply-kill-hook
10421 @findex gnus-apply-kill-file-unless-scored
10422 @findex gnus-apply-kill-file
10423 A hook called to apply kill files to a group.  It is
10424 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
10425 kill file if you have a score file for the same group, you can set this
10426 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
10427 kill files to be processed, you should set this variable to @code{nil}.
10428
10429 @item gnus-kill-file-mode-hook
10430 @vindex gnus-kill-file-mode-hook
10431 A hook called in kill-file mode buffers.
10432
10433 @end table
10434
10435
10436 @node GroupLens
10437 @section GroupLens
10438 @cindex GroupLens
10439
10440 GroupLens is a collaborative filtering system that helps you work
10441 together with other people to find the quality news articles out of the
10442 huge volume of news articles generated every day.
10443
10444 To accomplish this the GroupLens system combines your opinions about
10445 articles you have already read with the opinions of others who have done
10446 likewise and gives you a personalized prediction for each unread news
10447 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
10448 rate articles, and finds other people that rate articles the same way.
10449 Once it has found for you some people you agree with it tells you, in
10450 the form of a prediction, what they thought of the article.  You can use
10451 this prediction to help you decide whether or not you want to read the
10452 article.
10453
10454 @menu
10455 * Using GroupLens::          How to make Gnus use GroupLens.
10456 * Rating Articles::          Letting GroupLens know how you rate articles.
10457 * Displaying Predictions::   Displaying predictions given by GroupLens.
10458 * GroupLens Variables::      Customizing GroupLens.
10459 @end menu
10460
10461
10462 @node Using GroupLens
10463 @subsection Using GroupLens
10464
10465 To use GroupLens you must register a pseudonym with your local Better
10466 Bit Bureau (BBB).  At the moment the only better bit in town is at
10467 @samp{http://www.cs.umn.edu/Research/GroupLens/bbb.html}.
10468
10469 Once you have registered you'll need to set a couple of variables.
10470
10471 @table @code
10472
10473 @item gnus-use-grouplens
10474 @vindex gnus-use-grouplens
10475 Setting this variable to a non-@code{nil} value will make Gnus hook into
10476 all the relevant GroupLens functions.
10477
10478 @item grouplens-pseudonym
10479 @vindex grouplens-pseudonym
10480 This variable should be set to the pseudonum you got when registering
10481 with the Better Bit Bureau.
10482
10483 @item grouplens-newsgroups
10484 @vindex grouplens-newsgroups
10485 A list of groups that you want to get GroupLens predictions for. 
10486
10487 @end table
10488
10489 Thats the minimum of what you need to get up and running with GroupLens.
10490 Once you've registered, GroupLens will start giving you scores for
10491 articles based on the average of what other people think.  But, to get
10492 the real benefit of GroupLens you need to start rating articles
10493 yourself.  Then the scores GroupLens gives you will be personalized for
10494 you, based on how the people you usually agree with have already rated.
10495
10496
10497 @node Rating Articles
10498 @subsection Rating Articles
10499
10500 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
10501 Where 1 means something like this article is a waste of bandwidth and 5
10502 means that the article was really good.  The basic question to ask
10503 yourself is, "on a scale from 1 to 5 would I like to see more articles
10504 like this one?"
10505
10506 There are four ways to enter a rating for an article in GroupLens.
10507
10508 @table @kbd
10509
10510 @item r
10511 @kindex r (GroupLens)
10512 @findex bbb-summary-rate-article
10513 This function will prompt you for a rating on a scale of one to five.
10514
10515 @item k
10516 @kindex k (GroupLens)
10517 @findex grouplens-score-thread
10518 This function will prompt you for a rating, and rate all the articles in
10519 the thread.  This is really useful for some of those long running giant
10520 threads in rec.humor.
10521
10522 @end table
10523
10524 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
10525 the score of the article you're reading.
10526
10527 @table @kbd
10528
10529 @item 1-5 n
10530 @kindex n (GroupLens)
10531 @findex grouplens-next-unread-article
10532 Rate the article and go to the next unread article.
10533
10534 @item 1-5 ,
10535 @kindex , (GroupLens)
10536 @findex grouplens-best-unread-article
10537 Rate the article and go to the next unread article with the highest score.
10538
10539 @end table
10540
10541 If you want to give the current article a score of 4 and then go to the
10542 next article, just type @kbd{4 n}.
10543
10544
10545 @node Displaying Predictions
10546 @subsection Displaying Predictions
10547
10548 GroupLens makes a prediction for you about how much you will like a
10549 news article.  The predictions from GroupLens are on a scale from 1 to
10550 5, where 1 is the worst and 5 is the best.  You can use the predictions
10551 from GroupLens in one of three ways controlled by the variable
10552 @code{gnus-grouplens-override-scoring}.
10553
10554 @vindex gnus-grouplens-override-scoring
10555 There are three ways to display predictions in grouplens.  You may
10556 choose to have the GroupLens scores contribute to, or override the
10557 regular gnus scoring mechanism. override is the default; however, some
10558 people prefer to see the Gnus scores plus the grouplens scores.  To get
10559 the separate scoring behavior you need to set
10560 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
10561 GroupLens predictions combined with the grouplens scores set it to
10562 @code{'override} and to combine the scores set
10563 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
10564 the combine option you will also want to set the values for
10565 @code{grouplens-prediction-offset} and
10566 @code{grouplens-score-scale-factor}.
10567
10568 @vindex grouplens-prediction-display
10569 In either case, GroupLens gives you a few choices for how you would like
10570 to see your predictions displayed.  The display of predictions is
10571 controlled by the @code{grouplens-prediction-display} variable.
10572
10573 The following are legal values for that variable.
10574
10575 @table @code
10576 @item prediction-spot
10577 The higher the prediction, the further to the right an @samp{*} is
10578 displayed. 
10579
10580 @item confidence-interval
10581 A numeric confidence interval.
10582
10583 @item prediction-bar
10584 The higher the prediction, the longer the bar.
10585
10586 @item confidence-bar
10587 Numerical confidence.
10588
10589 @item confidence-spot
10590 The spot gets bigger with more confidence.
10591
10592 @item prediction-num
10593 Plain-old numeric value.
10594
10595 @item confidence-plus-minus
10596 Prediction +/i confidence.
10597
10598 @end table
10599
10600
10601 @node GroupLens Variables
10602 @subsection GroupLens Variables
10603
10604 @table @code
10605
10606 @item gnus-summary-grouplens-line-format
10607 The summary line format used in summary buffers that are GroupLens
10608 enhanced.  It accepts the same specs as the normal summary line format
10609 (@pxref{Summary Buffer Lines}).  The default is
10610 @samp{%U%R%z%l%I%(%[%4L: %-20,20n%]%) %s\n}.
10611
10612 @item grouplens-bbb-host
10613 Host running the bbbd server.  The default is
10614 @samp{grouplens.cs.umn.edu}. 
10615
10616 @item grouplens-bbb-port
10617 Port of the host running the bbbd server.  The default is 9000.
10618
10619 @item grouplens-score-offset
10620 Offset the prediction by this value.  In other words, subtract the
10621 prediction value by this number to arrive at the effective score.  The
10622 default is 0.
10623
10624 @item grouplens-score-scale-factor 
10625 This variable allows the user to magnify the effect of GroupLens scores.
10626 The scale factor is applied after the offset.  The default is 1.
10627
10628 @end table
10629
10630
10631 @node Advanced Scoring
10632 @section Advanced Scoring
10633
10634 Scoring on Subjects and From headers is nice enough, but what if you're
10635 really interested in what a person has to say only when she's talking
10636 about a particular subject?  Or what about if you really don't want to
10637 read what person A has to say when she's following up to person B, but
10638 want to read what she says when she's following up to person C?
10639
10640 By using advanced scoring rules you may create arbitrarily complex
10641 scoring patterns.
10642
10643 @menu
10644 * Advanced Scoring Syntax::     A definition.
10645 * Advanced Scoring Examples::   What they look like.
10646 * Advanced Scoring Tips::       Getting the most out of it.
10647 @end menu
10648
10649
10650 @node Advanced Scoring Syntax
10651 @subsection Advanced Scoring Syntax
10652
10653 Ordinary scoring rules have a string as the first element in the rule.
10654 Advanced scoring rules have a list as the first element.  The second
10655 element is the score to be applied if the first element evaluated to a
10656 non-@code{nil} value.
10657
10658 These lists may consist of three logical operators, one redirection
10659 operator, and various match operators.
10660
10661 Logical operators:
10662
10663 @table @code
10664 @item &
10665 @itemx and
10666 This logical operator will evaluate each of its arguments until it finds
10667 one that evaluates to @code{false}, and then it'll stop.  If all arguments
10668 evaluate to @code{true} values, then this operator will return
10669 @code{true}. 
10670
10671 @item |
10672 @itemx or
10673 This logical operator will evaluate each of its arguments until it finds
10674 one that evaluates to @code{true}.  If no arguments are @code{true},
10675 then this operator will return @code{false}.
10676
10677 @item !
10678 @itemx not
10679 @itemx Â¬
10680 This logical operator only takes a single argument.  It returns the
10681 inverse of the value of its argument.
10682
10683 @end table
10684
10685 There is an @dfn{indirection operator} that will make its arguments
10686 apply to the ancenstors of the current article being scored.  For
10687 instance, @code{1-} will make score rules apply to the parent of the
10688 current article.  @code{2-} will make score fules apply to the
10689 grandparent of the current article.  Alternatively, you can write
10690 @code{^^}, where the number of @code{^}s (carets) say how far back into
10691 the ancestry you want to go.
10692
10693 Finally, we have the match operators.  These are the ones that do the
10694 real work.  Match operators are header name strings followed by a match
10695 and a match type.  A typical match operator looks like @samp{("from"
10696 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
10697 simple scoring, and the match types are also the same.
10698
10699
10700 @node Advanced Scoring Examples
10701 @subsection Advanced Scoring Examples
10702
10703 Let's say you want to increase the score of articles written by Lars
10704 when he's talking about Gnus:
10705
10706 @example
10707 ((& 
10708   ("from" "Lars Ingebrigtsen")
10709   ("subject" "Gnus"))
10710  1000)
10711 @end example
10712
10713 Quite simple, huh?
10714
10715 When he writes long articles, he sometimes has something nice to say: 
10716
10717 @example
10718 ((& 
10719   ("from" "Lars Ingebrigtsen")
10720   (|
10721    ("subject" "Gnus")
10722    ("lines" 100 >)))
10723  1000)
10724 @end example
10725
10726 However, when he responds to things written by Reig Eigil Logge, you
10727 really don't want to read what he's written:
10728
10729 @example
10730 ((&
10731   ("from" "Lars Ingebrigtsen")
10732   (1- ("from" "Reig Eigir Logge")))
10733  -100000)
10734 @end example
10735
10736 Everybody that follows up Redmondo when he writes about disappearing
10737 socks should have their scores raised, but only when they talk about
10738 white socks.  However, when Lars talks about socks, it's usually not
10739 very interesting:
10740
10741 @example
10742 ((&
10743   (1-
10744    (&
10745     ("from" "redmondo@@.*no" r)
10746     ("body" "disappearing.*socks" t)))
10747   (! ("from" "Lars Ingebrigtsen"))
10748   ("body" "white.*socks"))
10749  1000)
10750 @end example
10751
10752 The possibilities are endless.
10753
10754
10755 @node Advanced Scoring Tips
10756 @subsection Advanced Scoring Tips
10757
10758 The @code{&} and @code{|} logical operators do short-circuit logic.
10759 That is, they stop processing their arguments when it's clear what the
10760 result of the operation will be.  For instance, if one of the arguments
10761 of an @code{&} evaluates to @code{false}, there's no point in evaluating
10762 the rest of the arguments.  This means that you should put slow matches
10763 (@samp{body}, @code{header}) last and quick matches (@samp{from},
10764 @samp{subject}) first.
10765
10766 The indirection arguments (@code{1-} and so on) will make their
10767 arguments work on previous generations of the thread.  If you say
10768 something like:
10769
10770 @example
10771 ...
10772 (1-
10773  (1-
10774   ("from" "lars")))
10775 ...
10776 @end example
10777
10778 Then that means "score on the from header of the grandparent of the
10779 current article".  An indirection is quite fast, but it's better to say:
10780
10781 @example
10782 (1-
10783  (& 
10784   ("from" "Lars")
10785   ("subject" "Gnus")))
10786 @end example
10787
10788 than it is to say:
10789
10790 @example
10791 (&
10792  (1- ("from" "Lars"))
10793  (1- ("subject" "Gnus")))
10794 @end example
10795
10796
10797 @node Score Decays
10798 @section Score Decays
10799 @cindex score decays
10800 @cindex decays
10801
10802 You may find that your scores have a tendency to grow without
10803 bounds, especially if you're using adaptive scoring.  If scores get too
10804 big, they lose all meaning---they simply max out and it's difficult to
10805 use them in any sensible way.
10806
10807 @vindex gnus-decay-scores
10808 @findex gnus-decay-score
10809 @vindex gnus-score-decay-function
10810 Gnus provides a mechanism for decaying scores to help with this problem.
10811 When score files are loaded and @code{gnus-decay-scores} is
10812 non-@code{nil}, Gnus will run the score files through the decaying
10813 mechanism thereby lowering the scores of all non-permanent score rules.
10814 The decay itself if performed by the @code{gnus-score-decay-function}
10815 function, which is @code{gnus-decay-score} by default.  Here's the
10816 definition of that function:
10817
10818 @lisp
10819 (defun gnus-decay-score (score)
10820   (floor
10821    (- score
10822       (* (if (< score 0) 1 -1)
10823          (min score
10824               (max gnus-score-decay-constant
10825                    (* (abs score)
10826                       gnus-score-decay-scale)))))))
10827 @end lisp
10828
10829 @vindex gnus-score-decay-scale
10830 @vindex gnus-score-decay-constant
10831 @code{gnus-score-decay-constant} is 3 by default and
10832 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
10833
10834 @enumerate
10835 @item
10836 Scores between -3 and 3 will be set to 0 when this function is called.
10837
10838 @item
10839 Scores with magnitudes between 3 and 60 will be shrunk by 3.
10840
10841 @item
10842 Scores with magnutudes greater than 60 will be shrunk by 5% of the
10843 score.
10844 @end enumerate
10845
10846 If you don't like this decay function, write your own.  It is called
10847 with the score to be decayed as its only parameter, and it should return
10848 the new score, which should be an integer.
10849
10850 Gnus will try to decay scores once a day.  If you haven't run Gnus for
10851 four days, Gnus will decay the scores four times, for instance.
10852
10853
10854 @node Various
10855 @chapter Various
10856
10857 @menu
10858 * Process/Prefix::             A convention used by many treatment commands.
10859 * Interactive::                Making Gnus ask you many questions.
10860 * Formatting Variables::       You can specify what buffers should look like.
10861 * Windows Configuration::      Configuring the Gnus buffer windows.
10862 * Compilation::                How to speed Gnus up.
10863 * Mode Lines::                 Displaying information in the mode lines.
10864 * Highlighting and Menus::     Making buffers look all nice and cozy.
10865 * Buttons::                    Get tendonitis in ten easy steps!
10866 * Daemons::                    Gnus can do things behind your back.
10867 * NoCeM::                      How to avoid spam and other fatty foods.
10868 * Picons::                     How to display pictures of what your reading.
10869 * Various Various::            Things that are really various.
10870 @end menu
10871
10872
10873 @node Process/Prefix
10874 @section Process/Prefix
10875 @cindex process/prefix convention
10876
10877 Many functions, among them functions for moving, decoding and saving
10878 articles, use what is known as the @dfn{Process/Prefix convention}.
10879
10880 This is a method for figuring out what articles that the user wants the
10881 command to be performed on.
10882
10883 It goes like this:
10884
10885 If the numeric prefix is N, perform the operation on the next N
10886 articles, starting with the current one.  If the numeric prefix is
10887 negative, perform the operation on the previous N articles, starting
10888 with the current one.
10889
10890 @vindex transient-mark-mode
10891 If @code{transient-mark-mode} in non-@code{nil} and the region is
10892 active, all articles in the region will be worked upon.
10893
10894 If there is no numeric prefix, but some articles are marked with the
10895 process mark, perform the operation on the articles that are marked with
10896 the process mark.
10897
10898 If there is neither a numeric prefix nor any articles marked with the
10899 process mark, just perform the operation on the current article.
10900
10901 Quite simple, really, but it needs to be made clear so that surprises
10902 are avoided.
10903
10904 @vindex gnus-summary-goto-unread
10905 One thing that seems to shock & horrify lots of people is that, for
10906 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
10907 Since each @kbd{d} (which marks the current article as read) by default
10908 goes to the next unread article after marking, this means that @kbd{3 d}
10909 will mark the next three unread articles as read, no matter what the
10910 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
10911 @code{nil} for a more straightforward action.
10912
10913
10914 @node Interactive
10915 @section Interactive
10916 @cindex interaction
10917
10918 @table @code
10919
10920 @item gnus-novice-user
10921 @vindex gnus-novice-user
10922 If this variable is non-@code{nil}, you are either a newcomer to the
10923 World of Usenet, or you are very cautious, which is a nice thing to be,
10924 really.  You will be given questions of the type ``Are you sure you want
10925 to do this?'' before doing anything dangerous.  This is @code{t} by
10926 default.
10927
10928 @item gnus-expert-user
10929 @vindex gnus-expert-user
10930 If this variable is non-@code{nil}, you will never ever be asked any
10931 questions by Gnus.  It will simply assume you know what you're doing, no
10932 matter how strange.
10933
10934 @item gnus-interactive-catchup
10935 @vindex gnus-interactive-catchup
10936 Require confirmation before catching up a group if non-@code{nil}.  It
10937 is @code{t} by default.
10938
10939 @item gnus-interactive-exit
10940 @vindex gnus-interactive-exit
10941 Require confirmation before exiting Gnus.  This variable is @code{t} by
10942 default. 
10943 @end table
10944
10945
10946 @node Formatting Variables
10947 @section Formatting Variables
10948 @cindex formatting variables
10949
10950 Throughout this manual you've probably noticed lots of variables that
10951 are called things like @code{gnus-group-line-format} and
10952 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
10953 output lines in the various buffers.  There's quite a lot of them.
10954 Fortunately, they all use the same syntax, so there's not that much to
10955 be annoyed by.
10956
10957 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
10958 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
10959 lots of percentages everywhere.  
10960
10961 @menu 
10962 * Formatting Basics::     A formatting variable is basically a format string.
10963 * Advanced Formatting::   Modifying output in various ways.
10964 * User-Defined Specs::    Having Gnus call your own functions.
10965 * Formatting Fonts::      Making the formatting look colorful and nice.
10966 @end menu
10967
10968 Currently Gnus uses the following formatting variables:
10969 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
10970 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
10971 @code{gnus-group-mode-line-format},
10972 @code{gnus-summary-mode-line-format},
10973 @code{gnus-article-mode-line-format},
10974 @code{gnus-server-mode-line-format}, and
10975 @code{gnus-summary-pick-line-format}.
10976
10977 All these format variables can also be arbitrary elisp forms.  In that
10978 case, they will be @code{eval}ed to insert the required lines.
10979
10980 @kindex M-x gnus-update-format
10981 @findex gnus-update-format
10982 Gnus includes a command to help you while creating your own format
10983 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
10984 update the spec in question and pop you to a buffer where you can
10985 examine the resulting lisp code to be run to generate the line.  
10986
10987
10988
10989 @node Formatting Basics
10990 @subsection Formatting Basics
10991
10992 Each @samp{%} element will be replaced by some string or other when the
10993 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
10994 spec, and pad with spaces to get a 5-character field''.
10995
10996 As with normal C and Emacs Lisp formatting strings, the numerical
10997 modifier between the @samp{%} and the formatting type character will
10998 @dfn{pad} the output so that it is always at least that long.
10999 @samp{%5y} will make the field always (at least) five characters wide by
11000 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
11001 the right instead.
11002
11003 You may also wish to limit the length of the field to protect against
11004 particularly wide values.  For that you can say @samp{%4,6y}, which
11005 means that the field will never be more than 6 characters wide and never
11006 less than 4 characters wide.
11007
11008
11009 @node Advanced Formatting
11010 @subsection Advanced Formatting
11011
11012 It is frequently useful to post-process the fields in some way.
11013 Padding, limiting, cutting off parts and suppressing certain values can
11014 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
11015 look like @samp{%~(cut 3)~(ignore "0")y}.
11016
11017 These are the legal modifiers:
11018
11019 @table @code
11020 @item pad
11021 @itemx pad-left
11022 Pad the field to the left with spaces until it reaches the required
11023 length.
11024
11025 @item pad-right
11026 Pad the field to the right with spaces until it reaches the required
11027 length.
11028
11029 @item max
11030 @itemx max-left
11031 Cut off characters from the left until it reaches the specified length.
11032
11033 @item max-right
11034 Cut off characters from the right until it reaches the specified
11035 length. 
11036
11037 @item cut
11038 @itemx cut-left
11039 Cut off the specified number of characters from the left.
11040
11041 @item cut-right
11042 Cut off the specified number of characters from the right.
11043
11044 @item ignore
11045 Return an empty string if the field is equal to the specified value. 
11046
11047 @item form
11048 Use the specified form as the field value when the @samp{@@} spec is
11049 used. 
11050 @end table
11051
11052 Let's take an example.  The @samp{%o} spec in the summary mode lines
11053 will return a date in compact ISO8601 format---@samp{19960809T230410}.
11054 This is quite a mouthful, so we want to shave off the century number and
11055 the time, leaving us with a six-character date.  That would be
11056 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
11057 maxing, and we need the padding to ensure that the date is never less
11058 than 6 characters to make it look nice in columns.)
11059
11060 Ignoring is done first; then cutting; then maxing; and then as the very
11061 last operation, padding.  
11062
11063 If you use lots of these advanced thingies, you'll find that Gnus gets
11064 quite slow.  This can be helped enourmously by running @kbd{M-x
11065 gnus-compile} when you are setisfied with the look of your lines.
11066 @xref{Compilation}. 
11067
11068
11069 @node User-Defined Specs
11070 @subsection User-Defined Specs
11071
11072 All the specs allow for inserting user defined specifiers---@samp{u}.
11073 The next character in the format string should be a letter.  Gnus
11074 will call the function @code{gnus-user-format-function-}@samp{X}, where
11075 @samp{X} is the letter following @samp{%u}.  The function will be passed
11076 a single parameter---what the parameter means depends on what buffer
11077 it's being called from.  The function should return a string, which will
11078 be inserted into the buffer just like information from any other
11079 specifier.  This function may also be called with dummy values, so it
11080 should protect against that.
11081
11082 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
11083 much the same without defining new functions.  Here's an example:
11084 @samp{%~(form (count-lines (point-min) (point-max)))@@}.  The form
11085 given here will be evaluated to yield the current line number, and then
11086 inserted.
11087
11088
11089 @node Formatting Fonts
11090 @subsection Formatting Fonts
11091
11092 There are specs for highlighting, and these are shared by all the format
11093 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
11094 the special @code{mouse-face} property set, which means that it will be
11095 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
11096 over it.
11097
11098 Text inside the @samp{%[} and @samp{%]} specifiers will have their
11099 normal faces set using @code{gnus-face-0}, which is @code{bold} by
11100 default.  If you say @samp{%1[} instead, you'll get @code{gnus-face-1}
11101 instead, and so on.  Create as many faces as you wish.  The same goes
11102 for the @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
11103 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
11104
11105 Here's an alternative recipe for the group buffer:
11106
11107 @lisp
11108 ;; Create three face types.
11109 (setq gnus-face-1 'bold)
11110 (setq gnus-face-3 'italic)
11111
11112 ;; We want the article count to be in 
11113 ;; a bold and green face.  So we create 
11114 ;; a new face called `my-green-bold'.
11115 (copy-face 'bold 'my-green-bold)
11116 ;; Set the color.
11117 (set-face-foreground 'my-green-bold "ForestGreen")
11118 (setq gnus-face-2 'my-green-bold)
11119
11120 ;; Set the new & fancy format.
11121 (setq gnus-group-line-format 
11122       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
11123 @end lisp
11124
11125 I'm sure you'll be able to use this scheme to create totally unreadable
11126 and extremely vulgar displays.  Have fun!
11127
11128 Note that the @samp{%(} specs (and friends) do not make any sense on the
11129 mode-line variables.
11130
11131
11132 @node Windows Configuration
11133 @section Windows Configuration
11134 @cindex windows configuration
11135
11136 No, there's nothing here about X, so be quiet.
11137
11138 @vindex gnus-use-full-window
11139 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
11140 other windows and occupy the entire Emacs screen by itself.  It is
11141 @code{t} by default.
11142
11143 @vindex gnus-buffer-configuration
11144 @code{gnus-buffer-configuration} describes how much space each Gnus
11145 buffer should be given.  Here's an excerpt of this variable:
11146
11147 @lisp
11148 ((group (vertical 1.0 (group 1.0 point)
11149                       (if gnus-carpal (group-carpal 4))))
11150  (article (vertical 1.0 (summary 0.25 point) 
11151                         (article 1.0))))
11152 @end lisp
11153
11154 This is an alist.  The @dfn{key} is a symbol that names some action or
11155 other.  For instance, when displaying the group buffer, the window
11156 configuration function will use @code{group} as the key.  A full list of
11157 possible names is listed below.
11158
11159 The @dfn{value} (i. e., the @dfn{split}) says how much space each buffer
11160 should occupy.  To take the @code{article} split as an example -
11161
11162 @lisp
11163 (article (vertical 1.0 (summary 0.25 point)
11164                        (article 1.0)))
11165 @end lisp
11166
11167 This @dfn{split} says that the summary buffer should occupy 25% of upper
11168 half of the screen, and that it is placed over the article buffer.  As
11169 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
11170 reaching for that calculator there).  However, the special number
11171 @code{1.0} is used to signal that this buffer should soak up all the
11172 rest of the space available after the rest of the buffers have taken
11173 whatever they need.  There should be only one buffer with the @code{1.0}
11174 size spec per split.
11175
11176 Point will be put in the buffer that has the optional third element
11177 @code{point}. 
11178
11179 Here's a more complicated example:
11180
11181 @lisp
11182 (article (vertical 1.0 (group 4)
11183                        (summary 0.25 point)
11184                        (if gnus-carpal (summary-carpal 4))
11185                        (article 1.0)))
11186 @end lisp
11187
11188 If the size spec is an integer instead of a floating point number, 
11189 then that number will be used to say how many lines a buffer should
11190 occupy, not a percentage.
11191
11192 If the @dfn{split} looks like something that can be @code{eval}ed (to be
11193 precise---if the @code{car} of the split is a function or a subr), this
11194 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
11195 be used as a split.  This means that there will be three buffers if
11196 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
11197 is non-@code{nil}.
11198
11199 Not complicated enough for you?  Well, try this on for size:
11200
11201 @lisp
11202 (article (horizontal 1.0 
11203              (vertical 0.5
11204                  (group 1.0)
11205                  (gnus-carpal 4))
11206              (vertical 1.0
11207                  (summary 0.25 point)
11208                  (summary-carpal 4)
11209                  (article 1.0))))
11210 @end lisp
11211
11212 Whoops.  Two buffers with the mystery 100% tag.  And what's that
11213 @code{horizontal} thingie?  
11214
11215 If the first element in one of the split is @code{horizontal}, Gnus will
11216 split the window horizontally, giving you two windows side-by-side.
11217 Inside each of these strips you may carry on all you like in the normal
11218 fashion.  The number following @code{horizontal} says what percentage of
11219 the screen is to be given to this strip.
11220
11221 For each split, there @emph{must} be one element that has the 100% tag.
11222 The splitting is never accurate, and this buffer will eat any leftover
11223 lines from the splits.
11224
11225 To be slightly more formal, here's a definition of what a legal split
11226 may look like:
11227
11228 @example
11229 split       = frame | horizontal | vertical | buffer | form
11230 frame       = "(frame " size *split ")"
11231 horizontal  = "(horizontal " size *split ")"
11232 vertical    = "(vertical " size *split ")"
11233 buffer      = "(" buffer-name " " size *[ "point" ] ")"
11234 size        = number | frame-params
11235 buffer-name = group | article | summary ...
11236 @end example
11237
11238 The limitations are that the @code{frame} split can only appear as the
11239 top-level split.  @var{form} should be an Emacs Lisp form that should
11240 return a valid split.  We see that each split is fully recursive, and
11241 may contain any number of @code{vertical} and @code{horizontal} splits. 
11242
11243 @vindex gnus-window-min-width
11244 @vindex gnus-window-min-height
11245 @cindex window height
11246 @cindex window width
11247 Finding the right sizes can be a bit complicated.  No window may be less
11248 than @code{gnus-window-min-height} (default 1) characters high, and all
11249 windows must be at least @code{gnus-window-min-width} (default 1)
11250 characters wide.  Gnus will try to enforce this before applying the
11251 splits.  If you want to use the normal Emacs window width/height limit,
11252 you can just set these two variables to @code{nil}.
11253
11254 If you're not familiar with Emacs terminology, @code{horizontal} and
11255 @code{vertical} splits may work the opposite way of what you'd expect.
11256 Windows inside a @code{horizontal} split are shown side-by-side, and
11257 windows within a @code{vertical} split are shown above each other.
11258
11259 @findex gnus-configure-frame
11260 If you want to experiment with window placement, a good tip is to call
11261 @code{gnus-configure-frame} directly with a split.  This is the function
11262 that does all the real work when splitting buffers.  Below is a pretty
11263 nonsensical configuration with 5 windows; two for the group buffer and
11264 three for the article buffer.  (I said it was nonsensical.)  If you
11265 @code{eval} the statement below, you can get an idea of how that would
11266 look straight away, without going through the normal Gnus channels.
11267 Play with it until you're satisfied, and then use
11268 @code{gnus-add-configuration} to add your new creation to the buffer
11269 configuration list. 
11270
11271 @lisp
11272 (gnus-configure-frame
11273  '(horizontal 1.0
11274     (vertical 10
11275       (group 1.0)
11276       (article 0.3 point))
11277     (vertical 1.0
11278       (article 1.0)
11279       (horizontal 4
11280         (group 1.0)
11281         (article 10)))))
11282 @end lisp
11283
11284 You might want to have several frames as well.  No prob---just use the
11285 @code{frame} split:
11286
11287 @lisp
11288 (gnus-configure-frame
11289  '(frame 1.0
11290          (vertical 1.0
11291                    (summary 0.25 point)
11292                    (article 1.0))
11293          (vertical ((height . 5) (width . 15)
11294                     (user-position . t)
11295                     (left . -1) (top . 1))
11296                    (picon 1.0))))
11297
11298 @end lisp
11299
11300 This split will result in the familiar summary/article window
11301 configuration in the first (or ``main'') frame, while a small additional
11302 frame will be created where picons will be shown.  As you can see,
11303 instead of the normal @code{1.0} top-level spec, each additional split
11304 should have a frame parameter alist as the size spec.
11305 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
11306 Reference Manual}.
11307
11308 Here's a list of all possible keys for
11309 @code{gnus-buffer-configuration}:
11310
11311 @code{group}, @code{summary}, @code{article}, @code{server},
11312 @code{browse}, @code{message}, @code{pick}, @code{info},
11313 @code{summary-faq}, @code{edit-group}, @code{edit-server},
11314 @code{edit-score}, @code{post}, @code{reply}, @code{forward},
11315 @code{reply-yank}, @code{mail-bounce}, @code{draft},
11316 @code{pipe}, @code{bug}, @code{compose-bounce}.  
11317
11318 Note that the @code{message} key is used for both
11319 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
11320 it is desireable to distinguish between the two, something like this
11321 might be used:
11322
11323 @lisp
11324 (message (horizontal 1.0
11325                      (vertical 1.0 (message 1.0 point))
11326                      (vertical 0.24
11327                                (if (buffer-live-p gnus-summary-buffer)
11328                                    '(summary 0.5))
11329                                (group 1.0)))))
11330 @end lisp
11331
11332 @findex gnus-add-configuration
11333 Since the @code{gnus-buffer-configuration} variable is so long and
11334 complicated, there's a function you can use to ease changing the config
11335 of a single setting: @code{gnus-add-configuration}.  If, for instance,
11336 you want to change the @code{article} setting, you could say:
11337
11338 @lisp
11339 (gnus-add-configuration
11340  '(article (vertical 1.0
11341                (group 4)
11342                (summary .25 point)
11343                (article 1.0))))
11344 @end lisp
11345
11346 You'd typically stick these @code{gnus-add-configuration} calls in your
11347 @file{.gnus} file or in some startup hook---they should be run after
11348 Gnus has been loaded.
11349
11350
11351 @node Compilation
11352 @section Compilation
11353 @cindex compilation
11354 @cindex byte-compilation
11355
11356 @findex gnus-compile
11357
11358 Remember all those line format specification variables?
11359 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
11360 on.  Now, Gnus will of course heed whatever these variables are, but,
11361 unfortunately, changing them will mean a quite significant slow-down.
11362 (The default values of these variables have byte-compiled functions
11363 associated with them, while the user-generated versions do not, of
11364 course.) 
11365
11366 To help with this, you can run @kbd{M-x gnus-compile} after you've
11367 fiddled around with the variables and feel that you're (kind of)
11368 satisfied.  This will result in the new specs being byte-compiled, and
11369 you'll get top speed again.  Gnus will save these compiled specs in the
11370 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
11371 this function, though---you should compile them yourself by sticking
11372 them into the @code{.gnus.el} file and byte-compiling that file.)
11373
11374
11375 @node Mode Lines
11376 @section Mode Lines
11377 @cindex mode lines
11378
11379 @vindex gnus-updated-mode-lines
11380 @code{gnus-updated-mode-lines} says what buffers should keep their mode
11381 lines updated.  It is a list of symbols.  Supported symbols include
11382 @code{group}, @code{article}, @code{summary}, @code{server},
11383 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
11384 Gnus will keep that mode line updated with information that may be
11385 pertinent.  If this variable is @code{nil}, screen refresh may be
11386 quicker.
11387
11388 @cindex display-time
11389
11390 @vindex gnus-mode-non-string-length
11391 By default, Gnus displays information on the current article in the mode
11392 lines of the summary and article buffers.  The information Gnus wishes
11393 to display (eg. the subject of the article) is often longer than the
11394 mode lines, and therefore have to be cut off at some point.  The
11395 @code{gnus-mode-non-string-length} variable says how long the other
11396 elements on the line is (i.e., the non-info part).  If you put
11397 additional elements on the mode line (eg. a clock), you should modify
11398 this variable:
11399
11400 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
11401 @lisp
11402 (add-hook 'display-time-hook
11403           (lambda () (setq gnus-mode-non-string-length
11404                            (+ 21
11405                               (if line-number-mode 5 0)
11406                               (if column-number-mode 4 0)
11407                               (length display-time-string)))))
11408 @end lisp
11409
11410 If this variable is @code{nil} (which is the default), the mode line
11411 strings won't be chopped off, and they won't be padded either.
11412
11413
11414 @node Highlighting and Menus
11415 @section Highlighting and Menus
11416 @cindex visual
11417 @cindex highlighting
11418 @cindex menus
11419
11420 @vindex gnus-visual
11421 The @code{gnus-visual} variable controls most of the prettifying Gnus
11422 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
11423 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
11424 file.
11425
11426 This variable can be a list of visual properties that are enabled.  The
11427 following elements are legal, and are all included by default:
11428
11429 @table @code
11430 @item group-highlight
11431 Do highlights in the group buffer.
11432 @item summary-highlight
11433 Do highlights in the summary buffer.
11434 @item article-highlight
11435 Do highlights in the article buffer.
11436 @item highlight
11437 Turn on highlighting in all buffers.
11438 @item group-menu
11439 Create menus in the group buffer.
11440 @item summary-menu
11441 Create menus in the summary buffers.
11442 @item article-menu
11443 Create menus in the article buffer.
11444 @item browse-menu
11445 Create menus in the browse buffer.
11446 @item server-menu
11447 Create menus in the server buffer.
11448 @item score-menu
11449 Create menus in the score buffers.
11450 @item menu
11451 Create menus in all buffers.
11452 @end table
11453
11454 So if you only want highlighting in the article buffer and menus in all
11455 buffers, you could say something like:
11456
11457 @lisp
11458 (setq gnus-visual '(article-highlight menu))
11459 @end lisp
11460
11461 If you want only highlighting and no menus whatsoever, you'd say:
11462
11463 @lisp
11464 (setq gnus-visual '(highlight))
11465 @end lisp
11466
11467 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
11468 in all Gnus buffers.
11469
11470 Other general variables that influence the look of all buffers include:
11471
11472 @table @code
11473 @item gnus-mouse-face
11474 @vindex gnus-mouse-face
11475 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
11476 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
11477
11478 @item gnus-display-type
11479 @vindex gnus-display-type
11480 This variable is symbol indicating the display type Emacs is running
11481 under.  The symbol should be one of @code{color}, @code{grayscale} or
11482 @code{mono}.  If Gnus guesses this display attribute wrongly, either set
11483 this variable in your @file{~/.emacs} or set the resource
11484 @code{Emacs.displayType} in your @file{~/.Xdefaults}.
11485
11486 @item gnus-background-mode 
11487 @vindex gnus-background-mode 
11488 This is a symbol indicating the Emacs background brightness.  The symbol
11489 should be one of @code{light} or @code{dark}.  If Gnus guesses this
11490 frame attribute wrongly, either set this variable in your @file{~/.emacs} or
11491 set the resource @code{Emacs.backgroundMode} in your @file{~/.Xdefaults}. 
11492 `gnus-display-type'.
11493 @end table
11494
11495 There are hooks associated with the creation of all the different menus:
11496
11497 @table @code
11498
11499 @item gnus-article-menu-hook
11500 @vindex gnus-article-menu-hook
11501 Hook called after creating the article mode menu.
11502
11503 @item gnus-group-menu-hook
11504 @vindex gnus-group-menu-hook
11505 Hook called after creating the group mode menu.
11506
11507 @item gnus-summary-menu-hook
11508 @vindex gnus-summary-menu-hook
11509 Hook called after creating the summary mode menu.
11510
11511 @item gnus-server-menu-hook
11512 @vindex gnus-server-menu-hook
11513 Hook called after creating the server mode menu.
11514
11515 @item gnus-browse-menu-hook
11516 @vindex gnus-browse-menu-hook
11517 Hook called after creating the browse mode menu.
11518
11519 @item gnus-score-menu-hook
11520 @vindex gnus-score-menu-hook
11521 Hook called after creating the score mode menu.
11522
11523 @end table
11524
11525
11526 @node Buttons
11527 @section Buttons
11528 @cindex buttons
11529 @cindex mouse
11530 @cindex click
11531
11532 Those new-fangled @dfn{mouse} contraptions is very popular with the
11533 young, hep kids who don't want to learn the proper way to do things
11534 these days.  Why, I remember way back in the summer of '89, when I was
11535 using Emacs on a Tops 20 system.  Three hundred users on one single
11536 machine, and every user was running Simula compilers.  Bah!
11537
11538 Right.
11539
11540 @vindex gnus-carpal
11541 Well, you can make Gnus display bufferfuls of buttons you can click to
11542 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
11543 really.  Tell the chiropractor I sent you.
11544
11545
11546 @table @code
11547
11548 @item gnus-carpal-mode-hook
11549 @vindex gnus-carpal-mode-hook
11550 Hook run in all carpal mode buffers.
11551
11552 @item gnus-carpal-button-face
11553 @vindex gnus-carpal-button-face
11554 Face used on buttons.
11555
11556 @item gnus-carpal-header-face
11557 @vindex gnus-carpal-header-face
11558 Face used on carpal buffer headers.
11559
11560 @item gnus-carpal-group-buffer-buttons
11561 @vindex gnus-carpal-group-buffer-buttons
11562 Buttons in the group buffer.
11563
11564 @item gnus-carpal-summary-buffer-buttons
11565 @vindex gnus-carpal-summary-buffer-buttons
11566 Buttons in the summary buffer.
11567
11568 @item gnus-carpal-server-buffer-buttons
11569 @vindex gnus-carpal-server-buffer-buttons
11570 Buttons in the server buffer.
11571
11572 @item gnus-carpal-browse-buffer-buttons
11573 @vindex gnus-carpal-browse-buffer-buttons
11574 Buttons in the browse buffer.
11575 @end table
11576
11577 All the @code{buttons} variables are lists.  The elements in these list
11578 is either a cons cell where the car contains a text to be displayed and
11579 the cdr contains a function symbol, or a simple string.
11580
11581
11582 @node Daemons
11583 @section Daemons
11584 @cindex demons
11585 @cindex daemons
11586
11587 Gnus, being larger than any program ever written (allegedly), does lots
11588 of strange stuff that you may wish to have done while you're not
11589 present.  For instance, you may want it to check for new mail once in a
11590 while.  Or you may want it to close down all connections to all servers
11591 when you leave Emacs idle.  And stuff like that.
11592
11593 Gnus will let you do stuff like that by defining various
11594 @dfn{handlers}.  Each handler consists of three elements:  A
11595 @var{function}, a @var{time}, and an @var{idle} parameter.
11596
11597 Here's an example of a handler that closes connections when Emacs has
11598 been idle for thirty minutes:
11599
11600 @lisp
11601 (gnus-demon-close-connections nil 30)
11602 @end lisp
11603
11604 Here's a handler that scans for PGP headers every hour when Emacs is
11605 idle: 
11606
11607 @lisp
11608 (gnus-demon-scan-pgp 60 t)
11609 @end lisp
11610
11611 This @var{time} parameter and than @var{idle} parameter works together
11612 in a strange, but wonderful fashion.  Basically, if @var{idle} is
11613 @code{nil}, then the function will be called every @var{time} minutes.
11614
11615 If @var{idle} is @code{t}, then the function will be called after
11616 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
11617 the function will never be called.  But once Emacs goes idle, the
11618 function will be called every @var{time} minutes.
11619
11620 If @var{idle} is a number and @var{time} is a number, the function will
11621 be called every @var{time} minutes only when Emacs has been idle for
11622 @var{idle} minutes.
11623
11624 If @var{idle} is a number and @var{time} is @code{nil}, the function
11625 will be called once every time Emacs has been idle for @var{idle}
11626 minutes.  
11627
11628 And if @var{time} is a string, it should look like @samp{07:31}, and
11629 the function will then be called once every day somewhere near that
11630 time.  Modified by the @var{idle} parameter, of course.
11631
11632 @vindex gnus-demon-timestep
11633 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
11634 seconds.  This is @code{60} by default.  If you change that variable,
11635 all the timings in the handlers will be affected.)
11636
11637 @vindex gnus-use-demon
11638 To set the whole thing in motion, though, you have to set
11639 @code{gnus-use-demon} to @code{t}.
11640
11641 So, if you want to add a handler, you could put something like this in
11642 your @file{.gnus} file:
11643
11644 @findex gnus-demon-add-handler
11645 @lisp
11646 (gnus-demon-add-handler 'gnus-demon-close-connections nil 30)
11647 @end lisp
11648
11649 @findex gnus-demon-add-nocem
11650 @findex gnus-demon-add-scanmail
11651 @findex gnus-demon-add-disconnection
11652 Some ready-made functions to do this has been created:
11653 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection}, and
11654 @code{gnus-demon-add-scanmail}.  Just put those functions in your
11655 @file{.gnus} if you want those abilities.
11656
11657 @findex gnus-demon-init
11658 @findex gnus-demon-cancel
11659 @vindex gnus-demon-handlers
11660 If you add handlers to @code{gnus-demon-handlers} directly, you should
11661 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
11662 daemons, you can use the @code{gnus-demon-cancel} function.
11663
11664 Note that adding daemons can be pretty naughty if you overdo it.  Adding
11665 functions that scan all news and mail from all servers every two seconds
11666 is a sure-fire way of getting booted off any respectable system.  So
11667 behave. 
11668
11669
11670 @node NoCeM
11671 @section NoCeM
11672 @cindex nocem
11673 @cindex spam
11674
11675 @dfn{Spamming} is posting the same article lots and lots of times.
11676 Spamming is bad.  Spamming is evil.  
11677
11678 Spamming is usually canceled within a day or so by various anti-spamming
11679 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
11680 NoCeM is pronounced ``no see-'em'', and means what the name
11681 implies---these are messages that make the offending articles, like, go
11682 away.  
11683
11684 What use are these NoCeM messages if the articles are canceled anyway?
11685 Some sites do not honor cancel messages and some sites just honor cancels
11686 from a select few people.  Then you may wish to make use of the NoCeM
11687 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
11688
11689 Gnus can read and parse the messages in this group automatically, and
11690 this will make spam disappear.  
11691
11692 There are some variables to customize, of course:
11693
11694 @table @code
11695 @item gnus-use-nocem
11696 @vindex gnus-use-nocem
11697 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
11698 by default. 
11699
11700 @item gnus-nocem-groups
11701 @vindex gnus-nocem-groups
11702 Gnus will look for NoCeM messages in the groups in this list.  The
11703 default is @code{("alt.nocem.misc" "news.admin.net-abuse.announce")}. 
11704
11705 @item gnus-nocem-issuers
11706 @vindex gnus-nocem-issuers
11707 There are many people issuing NoCeM messages.  This list says what
11708 people you want to listen to.  The default is @code{("Automoose-1"
11709 "clewis@@ferret.ocunix.on.ca;" "jem@@xpat.com;" "red@@redpoll.mrfs.oh.us
11710 (Richard E. Depew)")}; fine, upstanding citizens all of them.
11711
11712 Known despammers that you can put in this list include:
11713
11714 @table @samp
11715 @item clewis@@ferret.ocunix.on.ca;
11716 @cindex Chris Lewis
11717 Chris Lewis---Major Canadian despammer who has probably canceled more
11718 usenet abuse than anybody else.
11719
11720 @item Automoose-1
11721 @cindex CancelMoose[tm]
11722 The CancelMoose[tm] on autopilot.  The CancelMoose[tm] is reputed to be
11723 Norwegian, and was the person(s) who invented NoCeM.  
11724
11725 @item jem@@xpat.com;
11726 @cindex Jem
11727 Jem---Korean despammer who is getting very busy these days.
11728
11729 @item red@@redpoll.mrfs.oh.us (Richard E. Depew)
11730 Richard E. Depew---lone American despammer.  He mostly cancels binary
11731 postings to non-binary groups and removes spews (regurgitated articles).
11732 @end table
11733
11734 You do not have to heed NoCeM messages from all these people---just the
11735 ones you want to listen to.
11736
11737 @item gnus-nocem-directory
11738 @vindex gnus-nocem-directory
11739 This is where Gnus will store its NoCeM cache files.  The default is
11740 @file{~/News/NoCeM/}. 
11741
11742 @item gnus-nocem-expiry-wait
11743 @vindex gnus-nocem-expiry-wait
11744 The number of days before removing old NoCeM entries from the cache.
11745 The default is 15.  If you make it shorter Gnus will be faster, but you
11746 might then see old spam.
11747
11748 @end table
11749
11750
11751 @node Picons
11752 @section Picons
11753
11754 So...  You want to slow down your news reader even more!  This is a
11755 good way to do so.  Its also a great way to impress people staring
11756 over your shoulder as you read news.
11757
11758 @menu
11759 * Picon Basics::           What are picons and How do I get them.
11760 * Picon Requirements::     Don't go further if you aren't using XEmacs.
11761 * Easy Picons::            Displaying Picons---the easy way.
11762 * Hard Picons::            The way you should do it.  You'll learn something.
11763 * Picon Configuration::    Other variables you can trash/tweak/munge/play with.
11764 @end menu
11765
11766
11767 @node Picon Basics
11768 @subsection Picon Basics
11769
11770 What are Picons?  To quote directly from the Picons Web site
11771 (@samp{http://www.cs.indiana.edu/picons/ftp/index.html}):
11772
11773 @quotation 
11774 @dfn{Picons} is short for ``personal icons''.  They're small,
11775 constrained images used to represent users and domains on the net,
11776 organized into databases so that the appropriate image for a given
11777 e-mail address can be found.  Besides users and domains, there are picon
11778 databases for Usenet newsgroups and weather forecasts.  The picons are
11779 in either monochrome @code{XBM} format or color @code{XPM} and
11780 @code{GIF} formats.
11781 @end quotation
11782
11783 Please see the above mentioned web site for instructions on obtaining
11784 and installing the picons databases, or the following ftp site:
11785 @samp{http://www.cs.indiana.edu/picons/ftp/index.html}.
11786
11787 @vindex gnus-picons-database
11788 Gnus expects picons to be installed into a location pointed to by
11789 @code{gnus-picons-database}.
11790
11791
11792 @node Picon Requirements
11793 @subsection Picon Requirements
11794
11795 To use have Gnus display Picons for you, you must be running XEmacs
11796 19.13 or greater since all other versions of Emacs aren't yet able to
11797 display images.
11798
11799 Additionally, you must have @code{xpm} support compiled into XEmacs.
11800
11801 @vindex gnus-picons-convert-x-face
11802 If you want to display faces from @code{X-Face} headers, you must have
11803 the @code{netpbm} utilities installed, or munge the
11804 @code{gnus-picons-convert-x-face} variable to use something else.
11805
11806
11807 @node Easy Picons
11808 @subsection Easy Picons
11809
11810 To enable displaying picons, simply put the following line in your
11811 @file{~/.gnus} file and start Gnus.
11812
11813 @lisp
11814 (setq gnus-use-picons t)
11815 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
11816 (add-hook 'gnus-summary-prepare-hook 'gnus-group-display-picons t)
11817 (add-hook 'gnus-article-display-hook 'gnus-picons-article-display-x-face)
11818 @end lisp
11819
11820
11821 @node Hard Picons
11822 @subsection Hard Picons 
11823
11824 Gnus can display picons for you as you enter and leave groups and
11825 articles.  It knows how to interact with three sections of the picons
11826 database.  Namely, it can display the picons newsgroup pictures,
11827 author's face picture(s), and the authors domain.  To enable this
11828 feature, you need to first decide where to display them.
11829
11830 @table @code 
11831
11832 @item gnus-picons-display-where 
11833 @vindex gnus-picons-display-where 
11834 Where the picon images should be displayed.  It is @code{picons} by
11835 default (which by default maps to the buffer @samp{*Picons*}).  Other
11836 valid places could be @code{article}, @code{summary}, or
11837 @samp{"*scratch*"} for all I care.  Just make sure that you've made the
11838 buffer visible using the standard Gnus window configuration
11839 routines---@xref{Windows Configuration}.
11840
11841 @end table
11842
11843 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
11844 window configuration for you to include the @code{picons} buffer.
11845
11846 Now that you've made that decision, you need to add the following
11847 functions to the appropriate hooks so these pictures will get
11848 displayed at the right time.
11849
11850 @vindex gnus-article-display-hook
11851 @vindex gnus-picons-display-where
11852 @table @code
11853 @item gnus-article-display-picons
11854 @findex gnus-article-display-picons
11855 Looks up and display the picons for the author and the author's domain
11856 in the @code{gnus-picons-display-where} buffer.  Should be added to
11857 the @code{gnus-article-display-hook}.
11858
11859 @item gnus-group-display-picons
11860 @findex gnus-article-display-picons
11861 Displays picons representing the current group.  This function should
11862 be added to the @code{gnus-summary-prepare-hook} or to the
11863 @code{gnus-article-display-hook} if @code{gnus-picons-display-where}
11864 is set to @code{article}.
11865
11866 @item gnus-picons-article-display-x-face
11867 @findex gnus-article-display-picons
11868 Decodes and displays the X-Face header if present.  This function
11869 should be added to @code{gnus-article-display-hook}.
11870
11871 @end table
11872
11873 Note:  You must append them to the hook, so make sure to specify 't'
11874 to the append flag of @code{add-hook}:
11875
11876 @lisp
11877 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
11878 @end lisp
11879
11880
11881 @node Picon Configuration
11882 @subsection Picon Configuration
11883
11884 The following variables offer further control over how things are
11885 done, where things are located, and other useless stuff you really
11886 don't need to worry about.
11887
11888 @table @code
11889 @item gnus-picons-database
11890 @vindex gnus-picons-database
11891 The location of the picons database.  Should point to a directory
11892 containing the @file{news}, @file{domains}, @file{users} (and so on)
11893 subdirectories.  Defaults to @file{/usr/local/faces}.
11894
11895 @item gnus-picons-news-directory
11896 @vindex gnus-picons-news-directory
11897 Sub-directory of the faces database containing the icons for
11898 newsgroups.
11899
11900 @item gnus-picons-user-directories
11901 @vindex gnus-picons-user-directories
11902 List of subdirectories to search in @code{gnus-picons-database} for user
11903 faces.  Defaults to @code{("local" "users" "usenix" "misc/MISC")}.
11904
11905 @item gnus-picons-domain-directories
11906 @vindex gnus-picons-domain-directories
11907 List of subdirectories to search in @code{gnus-picons-database} for
11908 domain name faces.  Defaults to @code{("domains")}.  Some people may
11909 want to add @samp{unknown} to this list.
11910
11911 @item gnus-picons-convert-x-face
11912 @vindex gnus-picons-convert-x-face
11913 The command to use to convert the @code{X-Face} header to an X bitmap
11914 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
11915 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
11916 gnus-picons-x-face-file-name)}
11917
11918 @item gnus-picons-x-face-file-name
11919 @vindex gnus-picons-x-face-file-name
11920 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
11921 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
11922
11923 @item gnus-picons-buffer
11924 @vindex gnus-picons-buffer
11925 The name of the buffer that @code{picons} points to.  Defaults to
11926 @samp{*Icon Buffer*}.
11927
11928 @end table
11929
11930
11931 @node Various Various
11932 @section Various Various
11933 @cindex mode lines
11934 @cindex highlights
11935
11936 @table @code
11937
11938 @item gnus-verbose
11939 @vindex gnus-verbose
11940 This variable is an integer between zero and ten.  The higher the value,
11941 the more messages will be displayed.  If this variable is zero, Gnus
11942 will never flash any messages, if it is seven (which is the default),
11943 most important messages will be shown, and if it is ten, Gnus won't ever
11944 shut up, but will flash so many messages it will make your head swim.
11945
11946 @item gnus-verbose-backends
11947 @vindex gnus-verbose-backends
11948 This variable works the same way as @code{gnus-verbose}, but it applies
11949 to the Gnus backends instead of Gnus proper.
11950
11951 @item nnheader-max-head-length
11952 @vindex nnheader-max-head-length
11953 When the backends read straight heads of articles, they all try to read
11954 as little as possible.  This variable (default @code{4096}) specifies
11955 the absolute max length the backends will try to read before giving up
11956 on finding a separator line between the head and the body.  If this
11957 variable is @code{nil}, there is no upper read bound.  If it is
11958 @code{t}, the backends won't try to read the articles piece by piece,
11959 but read the entire articles.  This makes sense with some versions of
11960 @code{ange-ftp}. 
11961
11962 @item nnheader-file-name-translation-alist 
11963 @vindex nnheader-file-name-translation-alist 
11964 @cindex file names
11965 @cindex illegal characters in file names
11966 @cindex characters in file names
11967 This is an alist that says how to translate characters in file names.
11968 For instance, if @samp{:} is illegal as a file character in file names
11969 on your system (you OS/2 user you), you could say something like:
11970
11971 @lisp
11972 (setq nnheader-file-name-translation-alist 
11973       '((?: . ?_)))
11974 @end lisp
11975
11976 In fact, this is the default value for this variable on OS/2 and MS
11977 Windows (phooey) systems.
11978
11979 @item gnus-hidden-properties
11980 @vindex gnus-hidden-properties
11981 This is a list of properties to use to hide ``invisible'' text.  It is
11982 @code{(invisible t intangible t)} by default on most systems, which
11983 makes invisible text invisible and intangible.
11984
11985 @item gnus-parse-headers-hook
11986 @vindex gnus-parse-headers-hook
11987 A hook called before parsing headers.  It can be used, for instance, to
11988 gather statistics on the headers fetched, or perhaps you'd like to prune
11989 some headers.  I don't see why you'd want that, though.
11990
11991 @item gnus-shell-command-separator
11992 @vindex gnus-shell-command-separator
11993 String used to separate to shell commands.  The default is @samp{;}. 
11994
11995
11996 @end table
11997
11998
11999 @node The End
12000 @chapter The End
12001
12002 Well, that's the manual---you can get on with your life now.  Keep in
12003 touch.  Say hello to your cats from me.  
12004
12005 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
12006
12007 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
12008
12009 @quotation
12010 @strong{Te Deum}
12011 @sp 1
12012 Not because of victories @*
12013 I sing,@*
12014 having none,@*
12015 but for the common sunshine,@*
12016 the breeze,@*
12017 the largess of the spring.
12018 @sp 1
12019 Not for victory@*
12020 but for the day's work done@*
12021 as well as I was able;@*
12022 not for a seat upon the dais@*
12023 but at the common table.@*
12024 @end quotation
12025
12026
12027 @node Appendices
12028 @chapter Appendices
12029
12030 @menu
12031 * History::                        How Gnus got where it is today.
12032 * Terminology::                    We use really difficult, like, words here.
12033 * Customization::                  Tailoring Gnus to your needs.
12034 * Troubleshooting::                What you might try if things do not work.
12035 * A Programmers Guide to Gnus::    Rilly, rilly technical stuff.
12036 * Emacs for Heathens::             A short introduction to Emacsian terms.
12037 * Frequently Asked Questions::     A question-and-answer session.
12038 @end menu
12039
12040
12041 @node History
12042 @section History
12043
12044 @cindex history
12045 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
12046 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
12047
12048 If you want to investigate the person responsible for this outrage, you
12049 can point your (feh!) web browser to
12050 @file{http://www.ifi.uio.no/~larsi/}.  This is also the primary
12051 distribution point for the new and spiffy versions of Gnus, and is known
12052 as The Site That Destroys Newsrcs And Drives People Mad.
12053
12054 During the first extended alpha period of development, the new Gnus was
12055 called ``(ding) Gnus''.  @dfn{(ding)}, is, of course, short for
12056 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
12057 (Besides, the ``Gnus'' in this abbreviation should probably be
12058 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
12059 appropriate name, don't you think?)
12060
12061 In any case, after spending all that energy on coming up with a new and
12062 spunky name, we decided that the name was @emph{too} spunky, so we
12063 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
12064 ``@sc{gnus}''.  New vs. old.
12065
12066 The first ``proper'' release of Gnus 5 was done in November 1995 when it
12067 was included in the Emacs 19.30 distribution.
12068
12069 In May 1996 the next Gnus generation (aka.  ``September Gnus'') was
12070 released under the name ``Gnus 5.2''.  
12071
12072 On July 28th 1996 work on Red Gnus was begun.
12073
12074 @menu
12075 * Why?::                What's the point of Gnus?
12076 * Compatibility::       Just how compatible is Gnus with @sc{gnus}?
12077 * Conformity::          Gnus tries to conform to all standards.
12078 * Emacsen::             Gnus can be run on a few modern Emacsen.
12079 * Contributors::        Oodles of people.  
12080 * New Features::        Pointers to some of the new stuff in Gnus.
12081 * Newest Features::     Features so new that they haven't been written yet.
12082 @end menu
12083
12084
12085 @node Why?
12086 @subsection Why?
12087
12088 What's the point of Gnus?  
12089
12090 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
12091 newsreader, that lets you do anything you can think of.  That was my
12092 original motivation, but while working on Gnus, it has become clear to
12093 me that this generation of newsreaders really belong in the stone age.
12094 Newsreaders haven't developed much since the infancy of the net.  If the
12095 volume continues to rise with the current rate of increase, all current
12096 newsreaders will be pretty much useless.  How do you deal with
12097 newsgroups that have thousands of new articles each day?  How do you
12098 keep track of millions of people who post?
12099
12100 Gnus offers no real solutions to these questions, but I would very much
12101 like to see Gnus being used as a testing ground for new methods of
12102 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
12103 to separate the newsreader from the backends, Gnus now offers a simple
12104 interface for anybody who wants to write new backends for fetching mail
12105 and news from different sources.  I have added hooks for customizations
12106 everywhere I could imagine useful.  By doing so, I'm inviting every one
12107 of you to explore and invent.
12108
12109 May Gnus never be complete. @kbd{C-u 100 M-x hail-emacs}. 
12110
12111
12112 @node Compatibility
12113 @subsection Compatibility
12114
12115 @cindex compatibility
12116 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
12117 bindings have been kept.  More key bindings have been added, of course,
12118 but only in one or two obscure cases have old bindings been changed.
12119
12120 Our motto is:
12121 @quotation
12122 @cartouche
12123 @center In a cloud bones of steel.
12124 @end cartouche
12125 @end quotation
12126
12127 All commands have kept their names.  Some internal functions have changed
12128 their names.
12129
12130 The @code{gnus-uu} package has changed drastically. @pxref{Decoding
12131 Articles}. 
12132
12133 One major compatibility question is the presence of several summary
12134 buffers.  All variables that are relevant while reading a group are
12135 buffer-local to the summary buffer they belong in.  Although many
12136 important variables have their values copied into their global
12137 counterparts whenever a command is executed in the summary buffer, this
12138 change might lead to incorrect values being used unless you are careful.
12139
12140 All code that relies on knowledge of @sc{gnus} internals will probably
12141 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
12142 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
12143 maintains a hash table that points to the entries in this alist (which
12144 speeds up many functions), and changing the alist directly will lead to
12145 peculiar results.
12146
12147 @cindex hilit19
12148 @cindex highlighting
12149 Old hilit19 code does not work at all.  In fact, you should probably
12150 remove all hilit code from all Gnus hooks
12151 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
12152 Gnus provides various integrated functions for highlighting.  These are
12153 faster and more accurate.  To make life easier for everybody, Gnus will
12154 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
12155 Away!
12156
12157 Packages like @code{expire-kill} will no longer work.  As a matter of
12158 fact, you should probably remove all old @sc{gnus} packages (and other
12159 code) when you start using Gnus.  More likely than not, Gnus already
12160 does what you have written code to make @sc{gnus} do.  (Snicker.)
12161
12162 Even though old methods of doing things are still supported, only the
12163 new methods are documented in this manual.  If you detect a new method of
12164 doing something while reading this manual, that does not mean you have
12165 to stop doing it the old way.
12166
12167 Gnus understands all @sc{gnus} startup files.
12168
12169 @kindex M-x gnus-bug
12170 @findex gnus-bug
12171 @cindex reporting bugs
12172 @cindex bugs
12173 Overall, a casual user who hasn't written much code that depends on
12174 @sc{gnus} internals should suffer no problems.  If problems occur,
12175 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
12176
12177
12178 @node Conformity
12179 @subsection Conformity
12180
12181 No rebels without a clue here, ma'am.  We conform to all standards known
12182 to (wo)man.  Except for those standards and/or conventions we disagree
12183 with, of course.
12184
12185 @table @strong
12186
12187 @item RFC 822
12188 @cindex RFC 822
12189 There are no known breaches of this standard.
12190
12191 @item RFC 1036
12192 @cindex RFC 1036
12193 There are no known breaches of this standard, either.
12194
12195 @item Good Net-Keeping Seal of Approval
12196 @cindex Good Net-Keeping Seal of Approval
12197 Gnus has been through the Seal process and failed.  I think it'll pass
12198 the next inspection.
12199
12200 @item Son-of-RFC 1036
12201 @cindex Son-of-RFC 1036
12202 We do have some breaches to this one.
12203
12204 @table @emph
12205
12206 @item MIME
12207 Gnus does no MIME handling, and this standard-to-be seems to think that
12208 MIME is the bees' knees, so we have major breakage here.
12209
12210 @item X-Newsreader
12211 This is considered to be a ``vanity header'', while I consider it to be
12212 consumer information.  After seeing so many badly formatted articles
12213 coming from @code{tin} and @code{Netscape} I know not to use either of
12214 those for posting articles.  I would not have known that if it wasn't
12215 for the @code{X-Newsreader} header.
12216
12217 @item References
12218 Gnus does line breaking on this header.  I infer from RFC1036 that being
12219 conservative in what you output is not creating 5000-character lines, so
12220 it seems like a good idea to me.  However, this standard-to-be says that
12221 whitespace in the @code{References} header is to be preserved, so...  It
12222 doesn't matter one way or the other to Gnus, so if somebody tells me
12223 what The Way is, I'll change it.  Or not.
12224 @end table
12225
12226 @end table
12227
12228 If you ever notice Gnus acting non-compliantly with regards to the texts
12229 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
12230 know.
12231
12232
12233 @node Emacsen
12234 @subsection Emacsen
12235 @cindex Emacsen
12236 @cindex XEmacs
12237 @cindex Mule
12238 @cindex Emacs
12239
12240 Gnus should work on :
12241
12242 @itemize @bullet 
12243
12244 @item
12245 Emacs 19.30 and up.
12246
12247 @item
12248 XEmacs 19.13 and up.
12249
12250 @item 
12251 Mule versions based on Emacs 19.30 and up.
12252
12253 @end itemize
12254
12255 Gnus will absolutely not work on any Emacsen older than that.  Not
12256 reliably, at least. 
12257
12258 There are some vague differences between Gnus on the various platforms: 
12259
12260 @itemize @bullet
12261
12262 @item
12263 The mouse-face on Gnus lines under Emacs and Mule is delimited to
12264 certain parts of the lines while they cover the entire line under
12265 XEmacs. 
12266
12267 @item 
12268 The same with current-article marking---XEmacs puts an underline under
12269 the entire summary line while Emacs and Mule are nicer and kinder.
12270
12271 @item
12272 XEmacs features more graphics---a logo and a toolbar.
12273
12274 @item
12275 Citation highlighting us better under Emacs and Mule than under XEmacs.
12276
12277 @item
12278 Emacs 19.26-19.28 have tangible hidden headers, which can be a bit
12279 confusing. 
12280
12281 @end itemize
12282
12283
12284 @node Contributors
12285 @subsection Contributors
12286 @cindex contributors
12287
12288 The new Gnus version couldn't have been done without the help of all the
12289 people on the (ding) mailing list.  Every day for over a year I have
12290 gotten billions of nice bug reports from them, filling me with joy,
12291 every single one of them.  Smooches.  The people on the list have been
12292 tried beyond endurance, what with my ``oh, that's a neat idea <type
12293 type>, yup, I'll release it right away <ship off> no wait, that doesn't
12294 work at all <type type>, yup, I'll ship that one off right away <ship
12295 off> no, wait, that absolutely does not work'' policy for releases.
12296 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
12297 ``worser''? ``much worser''?  ``worsest''?)
12298
12299 I would like to take this opportunity to thank the Academy for...  oops,
12300 wrong show.
12301
12302 @itemize @bullet
12303
12304 @item Masanobu @sc{Umeda}
12305 The writer of the original @sc{gnus}.
12306
12307 @item Per Abrahamsen
12308 Custom, scoring, highlighting and @sc{soup} code (as well as numerous
12309 other things).
12310
12311 @item Luis Fernandes
12312 Design and graphics.
12313
12314 @item Wes Hardaker
12315 @file{gnus-picon.el} and the manual section on @dfn{picons}
12316 (@pxref{Picons}). 
12317
12318 @item Brad Miller
12319 @file{gnus-gl.el} and the GroupLens manual section (@pxref{GroupLens}). 
12320
12321 @item Sudish Joseph
12322 Innumerable bug fixes.
12323
12324 @item Ilja Weis
12325 @file{gnus-topic.el}.
12326
12327 @item Steven L. Baur
12328 Lots and lots of bugs detections and fixes.
12329
12330 @item Vladimir Alexiev
12331 The refcard and reference booklets.
12332
12333 @item Felix Lee & JWZ
12334 I stole some pieces from the XGnus distribution by Felix Lee and JWZ.
12335
12336 @item Scott Byer
12337 @file{nnfolder.el} enhancements & rewrite.
12338
12339 @item Peter Mutsaers
12340 Orphan article scoring code.
12341
12342 @item Ken Raeburn
12343 POP mail support.
12344
12345 @item Hallvard B Furuseth
12346 Various bits and pieces, especially dealing with .newsrc files.
12347
12348 @item Brian Edmonds
12349 @file{gnus-bbdb.el}.
12350
12351 @item Ricardo Nassif and Mark Borges
12352 Proof-reading.
12353
12354 @item Kevin Davidson
12355 Came up with the name @dfn{ding}, so blame him.
12356
12357 @end itemize
12358
12359 Peter Arius, Stainless Steel Rat, Ulrik Dickow, Jack Vinson, Daniel
12360 Quinlan, Frank D. Cringle, Geoffrey T. Dairiki, Fabrice Popineau and
12361 Andrew Eskilsson have all contributed code and suggestions.
12362
12363
12364 @node New Features
12365 @subsection New Features
12366 @cindex new features
12367
12368 @itemize @bullet
12369
12370 @item
12371 The look of all buffers can be changed by setting format-like variables
12372 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}). 
12373  
12374 @item 
12375 Local spool and several @sc{nntp} servers can be used at once
12376 (@pxref{Select Methods}).  
12377
12378 @item 
12379 You can combine groups into virtual groups (@pxref{Virtual Groups}).
12380
12381 @item 
12382 You can read a number of different mail formats (@pxref{Getting Mail}).
12383 All the mail backends implement a convenient mail expiry scheme
12384 (@pxref{Expiring Mail}). 
12385
12386 @item
12387 Gnus can use various strategies for gathering threads that have lost
12388 their roots (thereby gathering loose sub-threads into one thread) or it
12389 can go back and retrieve enough headers to build a complete thread
12390 (@pxref{Customizing Threading}).
12391
12392 @item 
12393 Killed groups can be displayed in the group buffer, and you can read
12394 them as well (@pxref{Listing Groups}).
12395
12396 @item 
12397 Gnus can do partial group updates---you do not have to retrieve the
12398 entire active file just to check for new articles in a few groups
12399 (@pxref{The Active File}).
12400
12401 @item 
12402 Gnus implements a sliding scale of subscribedness to groups
12403 (@pxref{Group Levels}).
12404
12405 @item 
12406 You can score articles according to any number of criteria
12407 (@pxref{Scoring}).  You can even get Gnus to find out how to score
12408 articles for you (@pxref{Adaptive Scoring}).
12409
12410 @item 
12411 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
12412 manner, so it should be difficult to lose much data on what you have
12413 read if your machine should go down (@pxref{Auto Save}). 
12414
12415 @item 
12416 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
12417 the @file{.emacs} file.
12418
12419 @item 
12420 You can set the process mark on both groups and articles and perform
12421 operations on all the marked items (@pxref{Process/Prefix}).
12422
12423 @item 
12424 You can grep through a subset of groups and create a group from the
12425 results (@pxref{Kibozed Groups}). 
12426
12427 @item 
12428 You can list subsets of groups according to, well, anything
12429 (@pxref{Listing Groups}). 
12430
12431 @item 
12432 You can browse foreign servers and subscribe to groups from those
12433 servers (@pxref{Browse Foreign Server}). 
12434
12435 @item 
12436 Gnus can fetch articles asynchronously on a second connection to the
12437 server (@pxref{Asynchronous Fetching}).
12438
12439 @item 
12440 You can cache articles locally (@pxref{Article Caching}). 
12441
12442 @item 
12443 The uudecode functions have been expanded and generalized
12444 (@pxref{Decoding Articles}). 
12445
12446 @item
12447 You can still post uuencoded articles, which was a little-known feature
12448 of @sc{gnus}' past (@pxref{Uuencoding and Posting}). 
12449
12450 @item
12451 Fetching parents (and other articles) now actually works without
12452 glitches (@pxref{Finding the Parent}). 
12453
12454 @item
12455 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
12456
12457 @item
12458 Digests (and other files) can be used as the basis for groups
12459 (@pxref{Document Groups}).
12460
12461 @item 
12462 Articles can be highlighted and customized (@pxref{Customizing
12463 Articles}). 
12464
12465 @item 
12466 URLs and other external references can be buttonized (@pxref{Article
12467 Buttons}). 
12468
12469 @item
12470 You can do lots of strange stuff with the Gnus window & frame
12471 configuration (@pxref{Windows Configuration}).
12472
12473 @item
12474 You can click on buttons instead of using the keyboard
12475 (@pxref{Buttons}). 
12476
12477 @item 
12478 Gnus can use NoCeM files to weed out spam (@pxref{NoCeM}). 
12479
12480 @end itemize
12481
12482 This is, of course, just a @emph{short} overview of the @emph{most}
12483 important new features.  No, really.  There are tons more.  Yes, we have
12484 feeping creaturism in full effect, but nothing too gratuitous, I would
12485 hope. 
12486
12487
12488 @node Newest Features
12489 @subsection Newest Features
12490 @cindex todo
12491
12492 Also known as the @dfn{todo list}.  Sure to be implemented before the
12493 next millennium. 
12494
12495 Be afraid.  Be very afraid.
12496
12497 @itemize @bullet
12498 @item
12499 Native @sc{mime} support is something that should be done.  
12500 @item
12501 A better and simpler method for specifying mail composing methods. 
12502 @item
12503 Allow posting through mail-to-news gateways.
12504 @item
12505 Really do unbinhexing.
12506 @end itemize
12507
12508 And much, much, much more.  There is more to come than has already been
12509 implemented.  (But that's always true, isn't it?)
12510
12511 @code{<URL:http://www.ifi.uio.no/~larsi/sgnus/todo>} is where the actual
12512 up-to-the-second todo list is located, so if you're really curious, you
12513 could point your Web browser over that-a-way.
12514
12515
12516 @node Terminology
12517 @section Terminology
12518
12519 @cindex terminology
12520 @table @dfn
12521
12522 @item news
12523 @cindex news
12524 This is what you are supposed to use this thing for---reading news.
12525 News is generally fetched from a nearby @sc{nntp} server, and is
12526 generally publicly available to everybody.  If you post news, the entire
12527 world is likely to read just what you have written, and they'll all
12528 snigger mischievously.  Behind your back.
12529
12530 @item mail
12531 @cindex mail
12532 Everything that's delivered to you personally is mail.  Some news/mail
12533 readers (like Gnus) blur the distinction between mail and news, but
12534 there is a difference.  Mail is private.  News is public.  Mailing is
12535 not posting, and replying is not following up.
12536
12537 @item reply
12538 @cindex reply
12539 Send a mail to the person who has written what you are reading.
12540
12541 @item follow up
12542 @cindex follow up
12543 Post an article to the current newsgroup responding to the article you
12544 are reading.
12545
12546 @item backend
12547 @cindex backend
12548 Gnus gets fed articles from a number of backends, both news and mail
12549 backends.  Gnus does not handle the underlying media, so to speak---this
12550 is all done by the backends.
12551
12552 @item native
12553 @cindex native
12554 Gnus will always use one method (and backend) as the @dfn{native}, or
12555 default, way of getting news.
12556
12557 @item foreign
12558 @cindex foreign
12559 You can also have any number of foreign groups active at the same time.
12560 These are groups that use different backends for getting news.
12561
12562 @item secondary
12563 @cindex secondary
12564 Secondary backends are somewhere half-way between being native and being
12565 foreign, but they mostly act like they are native.
12566
12567 @item article
12568 @cindex article
12569 A nessage that has been posted as news.
12570
12571 @item mail message
12572 @cindex mail message
12573 A message that has been mailed.
12574
12575 @item message 
12576 @cindex message
12577 A mail message or news article
12578
12579 @item head
12580 @cindex head
12581 The top part of a message, where administrative information (etc.) is
12582 put.
12583
12584 @item body
12585 @cindex body
12586 The rest of an article.  Everything that is not in the head is in the
12587 body. 
12588
12589 @item header
12590 @cindex header
12591 A line from the head of an article. 
12592
12593 @item headers
12594 @cindex headers
12595 A collection of such lines, or a collection of heads.  Or even a
12596 collection of @sc{nov} lines.
12597
12598 @item @sc{nov}
12599 @cindex nov
12600 When Gnus enters a group, it asks the backend for the headers of all
12601 unread articles in the group.  Most servers support the News OverView
12602 format, which is more compact and much faster to read and parse than the
12603 normal @sc{head} format.
12604
12605 @item level
12606 @cindex levels
12607 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
12608 that have a lower level are ``more'' subscribed than the groups with a
12609 higher level.  In fact, groups on levels 1-5 are considered
12610 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
12611 are @dfn{killed}.  Commands for listing groups and scanning for new
12612 articles will all use the numeric prefix as @dfn{working level}.
12613
12614 @item killed groups
12615 @cindex killed groups
12616 No information on killed groups is stored or updated, which makes killed
12617 groups much easier to handle than subscribed groups.
12618
12619 @item zombie groups
12620 @cindex zombie groups
12621 Just like killed groups, only slightly less dead.
12622
12623 @item active file
12624 @cindex active file
12625 The news server has to keep track of what articles it carries, and what
12626 groups exist.  All this information in stored in the active file, which
12627 is rather large, as you might surmise.
12628
12629 @item bogus groups
12630 @cindex bogus groups
12631 A group that exists in the @file{.newsrc} file, but isn't known to the
12632 server (i. e.,  it isn't in the active file), is a @emph{bogus group}.
12633 This means that the group probably doesn't exist (any more).
12634
12635 @item server 
12636 @cindex server
12637 A machine than one can connect to and get news (or mail) from.
12638
12639 @item select method
12640 @cindex select method
12641 A structure that specifies the backend, the server and the virtual
12642 server parameters.
12643
12644 @item virtual server
12645 @cindex virtual server
12646 A named select method.  Since a select methods defines all there is to
12647 know about connecting to a (physical) server, taking the who things as a
12648 whole is a virtual server.
12649
12650 @end table
12651
12652
12653 @node Customization
12654 @section Customization
12655 @cindex general customization
12656
12657 All variables are properly documented elsewhere in this manual.  This
12658 section is designed to give general pointers on how to customize Gnus
12659 for some quite common situations.
12660
12661 @menu
12662 * Slow/Expensive Connection:: You run a local Emacs and get the news elsewhere.
12663 * Slow Terminal Connection::  You run a remote Emacs.
12664 * Little Disk Space::         You feel that having large setup files is icky.
12665 * Slow Machine::              You feel like buying a faster machine.
12666 @end menu
12667
12668
12669 @node Slow/Expensive Connection
12670 @subsection Slow/Expensive @sc{nntp} Connection
12671
12672 If you run Emacs on a machine locally, and get your news from a machine
12673 over some very thin strings, you want to cut down on the amount of data
12674 Gnus has to get from the @sc{nntp} server.
12675
12676 @table @code
12677
12678 @item gnus-read-active-file
12679 Set this to @code{nil}, which will inhibit Gnus from requesting the
12680 entire active file from the server.  This file is often v.  large.  You
12681 also have to set @code{gnus-check-new-news} and
12682 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
12683 doesn't suddenly decide to fetch the active file anyway.
12684
12685 @item gnus-nov-is-evil
12686 This one has to be @code{nil}.  If not, grabbing article headers from
12687 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
12688 support @sc{xover}; Gnus will detect this by itself.
12689 @end table
12690
12691
12692 @node Slow Terminal Connection
12693 @subsection Slow Terminal Connection
12694
12695 Let's say you use your home computer for dialing up the system that
12696 runs Emacs and Gnus.  If your modem is slow, you want to reduce the
12697 amount of data that is sent over the wires as much as possible.
12698
12699 @table @code
12700
12701 @item gnus-auto-center-summary
12702 Set this to @code{nil} to inhibit Gnus from re-centering the summary
12703 buffer all the time.  If it is @code{vertical}, do only vertical
12704 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
12705 horizontal and vertical recentering.
12706
12707 @item gnus-visible-headers
12708 Cut down on the headers that are included in the articles to the
12709 minimum.  You can, in fact, make do without them altogether---most of the
12710 useful data is in the summary buffer, anyway.  Set this variable to
12711 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
12712
12713 @item gnus-article-display-hook
12714 Set this hook to all the available hiding commands:
12715 @lisp
12716 (setq gnus-article-display-hook 
12717       '(gnus-article-hide-headers gnus-article-hide-signature
12718         gnus-article-hide-citation))
12719 @end lisp
12720
12721 @item gnus-use-full-window
12722 By setting this to @code{nil}, you can make all the windows smaller.
12723 While this doesn't really cut down much generally, it means that you
12724 have to see smaller portions of articles before deciding that you didn't
12725 want to read them anyway.
12726
12727 @item gnus-thread-hide-subtree
12728 If this is non-@code{nil}, all threads in the summary buffer will be
12729 hidden initially.
12730
12731 @item gnus-updated-mode-lines
12732 If this is @code{nil}, Gnus will not put information in the buffer mode
12733 lines, which might save some time.
12734 @end table
12735
12736
12737 @node Little Disk Space
12738 @subsection Little Disk Space
12739 @cindex disk space
12740
12741 The startup files can get rather large, so you may want to cut their
12742 sizes a bit if you are running out of space.
12743
12744 @table @code
12745
12746 @item gnus-save-newsrc-file
12747 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
12748 only save @file{.newsrc.eld}.  This means that you will not be able to
12749 use any other newsreaders than Gnus.  This variable is @code{t} by
12750 default. 
12751
12752 @item gnus-save-killed-list
12753 If this is @code{nil}, Gnus will not save the list of dead groups.  You
12754 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
12755 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
12756 variable to @code{nil}.  This variable is @code{t} by default.
12757
12758 @end table
12759
12760
12761 @node Slow Machine
12762 @subsection Slow Machine
12763 @cindex slow machine
12764
12765 If you have a slow machine, or are just really impatient, there are a
12766 few things you can do to make Gnus run faster.
12767
12768 Set@code{gnus-check-new-newsgroups} and
12769 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
12770
12771 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
12772 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
12773 summary buffer faster.
12774
12775 Set @code{gnus-article-display-hook} to @code{nil} to make article
12776 processing a bit faster.
12777
12778
12779 @node Troubleshooting
12780 @section Troubleshooting
12781 @cindex troubleshooting
12782
12783 Gnus works @emph{so} well straight out of the box---I can't imagine any
12784 problems, really.
12785
12786 Ahem.
12787
12788 @enumerate
12789
12790 @item
12791 Make sure your computer is switched on.
12792
12793 @item
12794 Make sure that you really load the current Gnus version.  If you have
12795 been running @sc{gnus}, you need to exit Emacs and start it up again before
12796 Gnus will work.
12797
12798 @item
12799 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
12800 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
12801 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
12802 flee}, you have some old @file{.el} files lying around.  Delete these.
12803
12804 @item
12805 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
12806 how-to. 
12807 @end enumerate
12808
12809 If all else fails, report the problem as a bug.
12810
12811 @cindex bugs
12812 @cindex reporting bugs
12813
12814 @kindex M-x gnus-bug
12815 @findex gnus-bug
12816 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
12817 command. @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
12818 me the backtrace.  I will fix bugs, but I can only fix them if you send
12819 me a precise description as to how to reproduce the bug.
12820
12821 You really can never be too detailed in a bug report.  Always use the
12822 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
12823 a 10Kb mail each time you use it, and even if you have sent me your
12824 environment 500 times before.  I don't care.  I want the full info each
12825 time.  
12826
12827 It is also important to remember that I have no memory whatsoever.  If
12828 you send a bug report, and I send you a reply, and then you send back
12829 just ``No, it's not! Moron!'', I will have no idea what you are
12830 insulting me about.  Always over-explain everything.  It's much easier
12831 for all of us---if I don't have all the information I need, I will just
12832 mail you and ask for more info, and everything takes more time.
12833
12834 If the problem you're seeing is very visual, and you can't quite explain
12835 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
12836 it somewhere it can be reached, and include the URL of the picture in
12837 the bug report.a
12838
12839 If you just need help, you are better off asking on
12840 @samp{gnu.emacs.gnus}.  I'm not very helpful.
12841
12842 @cindex gnu.emacs.gnus
12843 @cindex ding mailing list
12844 You can also ask on the ding mailing list---@samp{ding@@ifi.uio.no}.
12845 Write to @samp{ding-request@@ifi.uio.no} to subscribe.
12846
12847
12848 @node A Programmers Guide to Gnus
12849 @section A Programmer's Guide to Gnus
12850
12851 It is my hope that other people will figure out smart stuff that Gnus
12852 can do, and that other people will write those smart things as well.  To
12853 facilitate that I thought it would be a good idea to describe the inner
12854 workings of Gnus.  And some of the not-so-inner workings, while I'm at
12855 it.
12856
12857 You can never expect the internals of a program not to change, but I
12858 will be defining (in some details) the interface between Gnus and its
12859 backends (this is written in stone), the format of the score files
12860 (ditto), data structures (some are less likely to change than others)
12861 and general method of operations.
12862
12863 @menu 
12864 * Backend Interface::        How Gnus communicates with the servers.
12865 * Score File Syntax::        A BNF definition of the score file standard.
12866 * Headers::                  How Gnus stores headers internally.
12867 * Ranges::                   A handy format for storing mucho numbers.
12868 * Group Info::               The group info format.
12869 * Emacs/XEmacs Code::        Gnus can be run under all modern Emacsen.
12870 * Various File Formats::     Formats of files that Gnus use.
12871 @end menu
12872
12873
12874 @node Backend Interface
12875 @subsection Backend Interface
12876
12877 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
12878 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
12879 server is a @dfn{backend} and some @dfn{backend variables}.  As examples
12880 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
12881 examples of the latter we have @code{nntp-port-number} and
12882 @code{nnmbox-directory}.
12883
12884 When Gnus asks for information from a backend---say @code{nntp}---on
12885 something, it will normally include a virtual server name in the
12886 function parameters.  (If not, the backend should use the ``current''
12887 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
12888 server as its only (optional) parameter.  If this virtual server hasn't
12889 been opened, the function should fail.
12890
12891 Note that a virtual server name has no relation to some physical server
12892 name.  Take this example:
12893
12894 @lisp
12895 (nntp "odd-one" 
12896       (nntp-address "ifi.uio.no") 
12897       (nntp-port-number 4324))
12898 @end lisp
12899
12900 Here the virtual server name is @samp{odd-one} while the name of
12901 the physical server is @samp{ifi.uio.no}. 
12902
12903 The backends should be able to switch between several virtual servers.
12904 The standard backends implement this by keeping an alist of virtual
12905 server environments that it pulls down/pushes up when needed.  
12906
12907 There are two groups of interface functions: @dfn{required functions},
12908 which must be present, and @dfn{optional functions}, which Gnus will
12909 always check whether are present before attempting to call.
12910
12911 All these functions are expected to return data in the buffer
12912 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
12913 unfortunately named, but we'll have to live with it.  When I talk about
12914 @dfn{resulting data}, I always refer to the data in that buffer.  When I
12915 talk about @dfn{return value}, I talk about the function value returned by
12916 the function call.  Functions that fail should return @code{nil} as the
12917 return value.
12918
12919 Some backends could be said to be @dfn{server-forming} backends, and
12920 some might be said to not be.  The latter are backends that generally
12921 only operate on one group at a time, and have no concept of ``server''
12922 -- they have a group, and they deliver info on that group and nothing
12923 more.
12924
12925 In the examples and definitions I will refer to the imaginary backend
12926 @code{nnchoke}. 
12927
12928 @cindex @code{nnchoke}
12929
12930 @menu
12931 * Required Backend Functions::        Functions that must be implemented.
12932 * Optional Backend Functions::        Functions that need not be implemented.
12933 * Writing New Backends::              Extending old backends.
12934 * Hooking New Backends Into Gnus::    What has to be done on the Gnus end.
12935 @end menu
12936
12937
12938 @node Required Backend Functions
12939 @subsubsection Required Backend Functions
12940
12941 @table @code
12942
12943 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
12944
12945 @var{articles} is either a range of article numbers or a list of
12946 @code{Message-ID}s.  Current backends do not fully support either---only
12947 sequences (lists) of article numbers, and most backends do not support
12948 retrieval of @code{Message-ID}s.  But they should try for both. 
12949
12950 The result data should either be HEADs or NOV lines, and the result
12951 value should either be @code{headers} or @code{nov} to reflect this.
12952 This might later be expanded to @code{various}, which will be a mixture
12953 of HEADs and NOV lines, but this is currently not supported by Gnus.  
12954
12955 If @var{fetch-old} is non-@code{nil} it says to try to fetch "extra
12956 headers, in some meaning of the word.  This is generally done by
12957 fetching (at most) @var{fetch-old} extra headers less than the smallest
12958 article number in @code{articles}, and fill in the gaps as well.  The
12959 presence of this parameter can be ignored if the backend finds it
12960 cumbersome to follow the request.  If this is non-@code{nil} and not a
12961 number, do maximum fetches.
12962
12963 Here's an example HEAD:
12964
12965 @example
12966 221 1056 Article retrieved.
12967 Path: ifi.uio.no!sturles
12968 From: sturles@@ifi.uio.no (Sturle Sunde)
12969 Newsgroups: ifi.discussion
12970 Subject: Re: Something very droll
12971 Date: 27 Oct 1994 14:02:57 +0100
12972 Organization: Dept. of Informatics, University of Oslo, Norway
12973 Lines: 26
12974 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
12975 References: <38jdmq$4qu@@visbur.ifi.uio.no>
12976 NNTP-Posting-Host: holmenkollen.ifi.uio.no
12977 .
12978 @end example
12979
12980 So a @code{headers} return value would imply that there's a number of
12981 these in the data buffer.
12982
12983 Here's a BNF definition of such a buffer:
12984
12985 @example
12986 headers        = *head
12987 head           = error / valid-head
12988 error-message  = [ "4" / "5" ] 2number " " <error message> eol
12989 valid-head     = valid-message *header "." eol
12990 valid-message  = "221 " <number> " Article retrieved." eol
12991 header         = <text> eol
12992 @end example
12993
12994 If the return value is @code{nov}, the data buffer should contain
12995 @dfn{network overview database} lines.  These are basically fields
12996 separated by tabs. 
12997
12998 @example
12999 nov-buffer = *nov-line
13000 nov-line   = 8*9 [ field <TAB> ] eol
13001 field      = <text except TAB>
13002 @end example
13003
13004 For a closer explanation what should be in those fields,
13005 @pxref{Headers}. 
13006
13007
13008 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
13009
13010 @var{server} is here the virtual server name.  @var{definitions} is a
13011 list of @code{(VARIABLE VALUE)} pairs that defines this virtual server. 
13012
13013 If the server can't be opened, no error should be signaled.  The backend
13014 may then choose to refuse further attempts at connecting to this
13015 server.  In fact, it should do so. 
13016
13017 If the server is opened already, this function should return a
13018 non-@code{nil} value.  There should be no data returned.
13019
13020
13021 @item (nnchoke-close-server &optional SERVER)
13022
13023 Close connection to @var{server} and free all resources connected
13024 to it.  Return @code{nil} if the server couldn't be closed for some
13025 reason.
13026
13027 There should be no data returned.
13028
13029
13030 @item (nnchoke-request-close)
13031
13032 Close connection to all servers and free all resources that the backend
13033 have reserved.  All buffers that have been created by that backend
13034 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
13035 function is generally only called when Gnus is shutting down.
13036
13037 There should be no data returned. 
13038
13039
13040 @item (nnchoke-server-opened &optional SERVER)
13041
13042 If @var{server} is the current virtual server, and the connection to the
13043 physical server is alive, then this function should return a
13044 non-@code{nil} vlue.  This function should under no circumstances
13045 attempt to reconnect to a server that is has lost connection to.
13046
13047 There should be no data returned.
13048
13049
13050 @item (nnchoke-status-message &optional SERVER)
13051
13052 This function should return the last error message from @var{server}. 
13053
13054 There should be no data returned.
13055
13056
13057 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
13058
13059 The result data from this function should be the article specified by
13060 @var{article}.  This might either be a @code{Message-ID} or a number.
13061 It is optional whether to implement retrieval by @code{Message-ID}, but
13062 it would be nice if that were possible.
13063
13064 If @var{to-buffer} is non-@code{nil}, the result data should be returned
13065 in this buffer instead of the normal data buffer.  This is to make it
13066 possible to avoid copying large amounts of data from one buffer to
13067 another, and Gnus mainly request articles to be inserted directly into
13068 its article buffer.
13069
13070 If it is at all possible, this function should return a cons cell where
13071 the car is the group name the article was fetched from, and the cdr is
13072 the article number.  This will enable Gnus to find out what the real
13073 group and article numbers are when fetching articles by
13074 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
13075 on successful article retrievement.
13076
13077
13078 @item (nnchoke-open-group GROUP &optional SERVER)
13079
13080 Make @var{group} the current group.  
13081
13082 There should be no data returned by this function.
13083
13084
13085 @item (nnchoke-request-group GROUP &optional SERVER FAST)
13086
13087 Get data on @var{group}.  This function also has the side effect of
13088 making @var{group} the current group. 
13089
13090 If @var{FAST}, don't bother to return useful data, just make @var{group}
13091 the current group.
13092
13093 Here's an example of some result data and a definition of the same:
13094
13095 @example
13096 211 56 1000 1059 ifi.discussion
13097 @end example
13098
13099 The first number is the status, which should be @code{211}.  Next is the
13100 total number of articles in the group, the lowest article number, the
13101 highest article number, and finally the group name.  Note that the total
13102 number of articles may be less than one might think while just
13103 considering the highest and lowest article numbers, but some articles
13104 may have been canceled.  Gnus just discards the total-number, so
13105 whether one should take the bother to generate it properly (if that is a
13106 problem) is left as an exercise to the reader.
13107
13108 @example
13109 group-status = [ error / info ] eol
13110 error        = [ "4" / "5" ] 2<number> " " <Error message>
13111 info         = "211 " 3* [ <number> " " ] <string>
13112 @end example
13113
13114
13115 @item (nnchoke-close-group GROUP &optional SERVER)
13116
13117 Close @var{group} and free any resources connected to it.  This will be
13118 a no-op on most backends. 
13119
13120 There should be no data returned.
13121
13122
13123 @item (nnchoke-request-list &optional SERVER)
13124
13125 Return a list of all groups available on @var{server}.  And that means
13126 @emph{all}. 
13127
13128 Here's an example from a server that only carries two groups:
13129
13130 @example
13131 ifi.test 0000002200 0000002000 y
13132 ifi.discussion 3324 3300 n
13133 @end example
13134
13135 On each line we have a group name, then the highest article number in
13136 that group, the lowest article number, and finally a flag.
13137
13138 @example
13139 active-file = *active-line
13140 active-line = name " " <number> " " <number> " " flags eol
13141 name        = <string>
13142 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
13143 @end example
13144
13145 The flag says whether the group is read-only (@samp{n}), is moderated
13146 (@samp{m}), is dead (@samp{x}), is aliased to some other group
13147 (@samp{=other-group} or none of the above (@samp{y}). 
13148
13149
13150 @item (nnchoke-request-post &optional SERVER)
13151
13152 This function should post the current buffer.  It might return whether
13153 the posting was successful or not, but that's not required.  If, for
13154 instance, the posting is done asynchronously, it has generally not been
13155 completed by the time this function concludes.  In that case, this
13156 function should set up some kind of sentinel to beep the user loud and
13157 clear if the posting could not be completed.
13158
13159 There should be no result data from this function. 
13160
13161 @end table
13162
13163
13164 @node Optional Backend Functions
13165 @subsubsection Optional Backend Functions
13166
13167 @table @code
13168
13169 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
13170
13171 @var{groups} is a list of groups, and this function should request data
13172 on all those groups.  How it does it is of no concern to Gnus, but it
13173 should attempt to do this in a speedy fashion.
13174
13175 The return value of this function can be either @code{active} or
13176 @code{group}, which says what the format of the result data is.  The
13177 former is in the same format as the data from
13178 @code{nnchoke-request-list}, while the latter is a buffer full of lines
13179 in the same format as @code{nnchoke-request-group} gives.
13180
13181 @example
13182 group-buffer = *active-line / *group-status
13183 @end example
13184
13185
13186 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
13187
13188 A Gnus group info (@pxref{Group Info}) is handed to the backend for
13189 alterations.  This comes in handy if the backend really carries all the
13190 information (as is the case with virtual an imap groups).  This function
13191 may alter the info in any manner it sees fit, and should return the
13192 (altered) group info.  This function may alter the group info
13193 destructively, so no copying is needed before boogeying. 
13194
13195 There should be no result data from this function.
13196
13197
13198 @item (nnchoke-request-type GROUP &optional ARTICLE)
13199
13200 When the user issues commands for ``sending news'' (@kbd{F} in the
13201 summary buffer, for instance), Gnus has to know whether the article the
13202 user is following up is news or mail.  This function should return
13203 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
13204 is mail and @code{unknown} if the type can't be decided.  (The
13205 @var{article} parameter is necessary in @code{nnvirtual} groups which
13206 might very well combine mail groups and news groups.)
13207
13208 There should be no result data from this function.
13209
13210
13211 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
13212
13213 If the user tries to set a mark that the backend doesn't like, this
13214 function may change the mark.  Gnus will use whatever this function
13215 returns as the mark for @var{article} instead of the original
13216 @var{mark}.  If the backend doesn't care, it must return the original
13217 @var{mark}, and not @code{nil} or any other type of garbage.  
13218
13219 The only use for this that I can see is what @code{nnvirtual} does with
13220 it---if a component group is auto-expirable, marking an article as read
13221 in the virtual group should result in the article being marked as
13222 expirable. 
13223
13224 There should be no result data from this function.
13225
13226
13227 @item (nnchoke-request-scan &optional GROUP SERVER)
13228
13229 This function may be called at any time (by Gnus or anything else) to
13230 request that the backend check for incoming articles, in one way or
13231 another.  A mail backend will typically read the spool file or query the
13232 POP server when this function is invoked.  The @var{group} doesn't have
13233 to be heeded---if the backend decides that it is too much work just
13234 scanning for a single group, it may do a total scan of all groups.  It
13235 would be nice, however, to keep things local if that's practical.
13236
13237 There should be no result data from this function.
13238
13239
13240 @item (nnchoke-request-asynchronous GROUP &optional SERVER ARTICLES)
13241
13242 This is a request to fetch articles asynchronously later.
13243 @var{articles} is an alist of @var{(article-number line-number)}.  One
13244 would generally expect that if one later fetches article number 4, for
13245 instance, some sort of asynchronous fetching of the articles after 4
13246 (which might be 5, 6, 7 or 11, 3, 909 depending on the order in that
13247 alist) would be fetched asynchronously, but that is left up to the
13248 backend.  Gnus doesn't care.
13249
13250 There should be no result data from this function.
13251  
13252
13253 @item (nnchoke-request-group-description GROUP &optional SERVER)
13254
13255 The result data from this function should be a description of
13256 @var{group}. 
13257
13258 @example
13259 description-line = name <TAB> description eol
13260 name             = <string>
13261 description      = <text>
13262 @end example
13263
13264 @item (nnchoke-request-list-newsgroups &optional SERVER)
13265
13266 The result data from this function should be the description of all
13267 groups available on the server.
13268
13269 @example
13270 description-buffer = *description-line
13271 @end example
13272
13273
13274 @item (nnchoke-request-newgroups DATE &optional SERVER)
13275
13276 The result data from this function should be all groups that were
13277 created after @samp{date}, which is in normal human-readable date
13278 format.  The data should be in the active buffer format.
13279
13280
13281 @item (nnchoke-request-create-group GROUP &optional SERVER)
13282
13283 This function should create an empty group with name @var{group}.  
13284
13285 There should be no return data.
13286
13287
13288 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
13289
13290 This function should run the expiry process on all articles in the
13291 @var{articles} range (which is currently a simple list of article
13292 numbers.)  It is left up to the backend to decide how old articles
13293 should be before they are removed by this function.  If @var{force} is
13294 non-@code{nil}, all @var{articles} should be deleted, no matter how new
13295 they are. 
13296
13297 This function should return a list of articles that it did not/was not
13298 able to delete.
13299
13300 There should be no result data returned.
13301
13302
13303 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
13304 &optional LAST)
13305
13306 This function should move @var{article} (which is a number) from
13307 @var{group} by calling @var{accept-form}.  
13308
13309 This function should ready the article in question for moving by
13310 removing any header lines it has added to the article, and generally
13311 should ``tidy up'' the article.  Then it should @code{eval}
13312 @var{accept-form} in the buffer where the ``tidy'' article is.  This
13313 will do the actual copying.  If this @code{eval} returns a
13314 non-@code{nil} value, the article should be removed.
13315
13316 If @var{last} is @code{nil}, that means that there is a high likelihood
13317 that there will be more requests issued shortly, so that allows some
13318 optimizations. 
13319
13320 The function should return a cons where the car is the group name and
13321 the cdr is the article number that the article was entered as.
13322
13323 There should be no data returned. 
13324
13325
13326 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
13327
13328 This function takes the current buffer and inserts it into @var{group}.
13329 If @var{last} in @code{nil}, that means that there will be more calls to
13330 this function in short order.
13331
13332 The function should return a cons where the car is the group name and
13333 the cdr is the article number that the article was entered as.
13334
13335 There should be no data returned.
13336
13337
13338 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
13339
13340 This function should remove @var{article} (which is a number) from
13341 @var{group} and insert @var{buffer} there instead.
13342
13343 There should be no data returned.
13344
13345
13346 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
13347
13348 This function should delete @var{group}.  If @var{force}, it should
13349 really delete all the articles in the group, and then delete the group
13350 itself.  (If there is such a thing as ``the group itself''.)
13351
13352 There should be no data returned.
13353
13354
13355 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
13356
13357 This function should rename @var{group} into @var{new-name}.  All
13358 articles that are in @var{group} should move to @var{new-name}.
13359
13360 There should be no data returned.
13361
13362 @end table
13363
13364
13365 @node Writing New Backends
13366 @subsubsection Writing New Backends
13367
13368 The various backends share many similarities.  @code{nnml} is just like
13369 @code{nnspool}, but it allows you to edit the articles on the server.
13370 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
13371 and it doesn't maintain overview databases.  @code{nndir} is just like
13372 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
13373 editing articles.
13374
13375 It would make sense if it were possible to ``inherit'' functions from
13376 backends when writing new backends.  And, indeed, you can do that if you
13377 want to.  (You don't have to if you don't want to, of course.)  
13378
13379 All the backends declare their public variables and functions by using a
13380 package called @code{nnoo}.  
13381
13382 To inherit functions from other backends (and allow other backends to
13383 inherit functions from the current backend), you should use the
13384 following macros:
13385 following. 
13386
13387 @table @code
13388
13389 @item nnoo-declare
13390 This macro declares the first parameter to be a child of the subsequent
13391 parameters.  For instance:
13392
13393 @lisp
13394 (nnoo-declare nndir
13395   nnml nnmh)
13396 @end lisp
13397
13398 @code{nndir} has here declared that it intends to inherit functions from
13399 both @code{nnml} and @code{nnmh}.
13400
13401 @item defvoo
13402 This macro is equivalent to @code{defvar}, but registers the variable as
13403 a public server variable.  Most state-oriented variables should be
13404 declared with @code{defvoo} instead of @code{defvar}.  
13405
13406 In addition to the normal @code{defvar} parameters, it takes a list of
13407 variables in the parent backends to map the variable to when executing
13408 a function in those backends.
13409
13410 @lisp
13411 (defvoo nndir-directory nil
13412   "Where nndir will look for groups."
13413   nnml-current-directory nnmh-current-directory)
13414 @end lisp
13415
13416 This means that @code{nnml-current-directory} will be set to
13417 @code{nndir-directory} when an @code{nnml} function is called on behalf
13418 of @code{nndir}.  (The same with @code{nnmh}.)  
13419
13420 @item nnoo-define-basics
13421 This macro defines some common functions that almost all backends should
13422 have.
13423
13424 @example
13425 (nnoo-define-basics nndir)
13426 @end example
13427
13428 @item deffoo
13429 This macro is just like @code{defun} and takes the same parameters.  In
13430 addition to doing the normal @code{defun} things, it registers the
13431 function as being public so that other backends can inherit it.
13432
13433 @item nnoo-map-functions
13434 This macro allows mapping of functions from the current backend to
13435 functions from the parent backends.
13436
13437 @example
13438 (nnoo-map-functions nndir
13439   (nnml-retrieve-headers 0 nndir-current-group 0 0)
13440   (nnmh-request-article 0 nndir-current-group 0 0))
13441 @end example
13442
13443 This means that when @code{nndir-retrieve-headers} is called, the first,
13444 third, and fourth parameters will be passed on to
13445 @code{nnml-retrieve-headers}, while the second parameter is set to the
13446 value of @code{nndir-current-group}.
13447
13448 @item nnoo-import
13449 This macro allows importing functions from backends.  It should be the
13450 last thing in the source file, since it will only define functions that
13451 haven't already been defined.
13452
13453 @example
13454 (nnoo-import nndir
13455   (nnmh
13456    nnmh-request-list
13457    nnmh-request-newgroups)
13458   (nnml))
13459 @end example
13460
13461 This means that calls to @code{nndir-request-list} should just be passed
13462 on to @code{nnmh-request-list}, while all public functions from
13463 @code{nnml} that haven't been defined in @code{nndir} yet should be
13464 defined now.
13465
13466 @end table
13467
13468 Below is a slightly shortened version of the @code{nndir} backend.
13469
13470 @lisp
13471 ;;; nndir.el --- single directory newsgroup access for Gnus
13472 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
13473
13474 ;;; Code:
13475
13476 (require 'nnheader)
13477 (require 'nnmh)
13478 (require 'nnml)
13479 (require 'nnoo)
13480 (eval-when-compile (require 'cl))
13481
13482 (nnoo-declare nndir
13483   nnml nnmh)
13484
13485 (defvoo nndir-directory nil
13486   "Where nndir will look for groups."
13487   nnml-current-directory nnmh-current-directory)
13488
13489 (defvoo nndir-nov-is-evil nil
13490   "*Non-nil means that nndir will never retrieve NOV headers."
13491   nnml-nov-is-evil)
13492
13493 (defvoo nndir-current-group "" nil nnml-current-group nnmh-current-group)
13494 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
13495 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
13496
13497 (defvoo nndir-status-string "" nil nnmh-status-string)
13498 (defconst nndir-version "nndir 1.0")
13499
13500 ;;; Interface functions.
13501
13502 (nnoo-define-basics nndir)
13503
13504 (deffoo nndir-open-server (server &optional defs)
13505   (setq nndir-directory
13506         (or (cadr (assq 'nndir-directory defs))
13507             server))
13508   (unless (assq 'nndir-directory defs)
13509     (push `(nndir-directory ,server) defs))
13510   (push `(nndir-current-group
13511           ,(file-name-nondirectory (directory-file-name nndir-directory)))
13512         defs)
13513   (push `(nndir-top-directory
13514           ,(file-name-directory (directory-file-name nndir-directory)))
13515         defs)
13516   (nnoo-change-server 'nndir server defs))
13517
13518 (nnoo-map-functions nndir
13519   (nnml-retrieve-headers 0 nndir-current-group 0 0)
13520   (nnmh-request-article 0 nndir-current-group 0 0)
13521   (nnmh-request-group nndir-current-group 0 0)
13522   (nnmh-close-group nndir-current-group 0))
13523
13524 (nnoo-import nndir
13525   (nnmh
13526    nnmh-status-message
13527    nnmh-request-list
13528    nnmh-request-newgroups))
13529
13530 (provide 'nndir)
13531 @end lisp
13532
13533
13534 @node Hooking New Backends Into Gnus
13535 @subsubsection Hooking New Backends Into Gnus
13536
13537 @vindex gnus-valid-select-methods
13538 Having Gnus start using your new backend is rather easy---you just
13539 declare it with the @code{gnus-declare-backend} functions.  This will
13540 enter the backend into the @code{gnus-valid-select-methods} variable.
13541
13542 @code{gnus-declare-backend} takes two parameters---the backend name and
13543 an arbitrary number of @dfn{abilities}.
13544
13545 Here's an example:
13546
13547 @lisp
13548 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
13549 @end lisp
13550
13551 The abilities can be:
13552
13553 @table @code
13554 @item mail
13555 This is a mailish backend---followups should (probably) go via mail.
13556 @item post
13557 This is a newsish backend---followups should (probably) go via news. 
13558 @item post-mail
13559 This backend supports both mail and news.
13560 @item none
13561 This is neither a post or mail backend---it's something completely
13562 different. 
13563 @item respool
13564 It supports respooling---or rather, it is able to modify its source
13565 articles and groups.
13566 @item address
13567 The name of the server should be in the virtual server name.  This is
13568 true for almost all backends.
13569 @item prompt-address
13570 The user should be prompted for an address when doing commands like
13571 @kbd{B} in the group buffer.  This is true for backends like
13572 @code{nntp}, but not @code{nnmbox}, for instance. 
13573 @end table
13574
13575
13576
13577 @node Score File Syntax
13578 @subsection Score File Syntax
13579
13580 Score files are meant to be easily parsable, but yet extremely
13581 mallable.   It was decided that something that had the same read syntax
13582 as an Emacs Lisp list would fit that spec.
13583
13584 Here's a typical score file:
13585
13586 @lisp
13587 (("summary"
13588   ("win95" -10000 nil s)
13589   ("Gnus"))
13590  ("from"
13591   ("Lars" -1000))
13592  (mark -100))
13593 @end lisp
13594
13595 BNF definition of a score file:
13596
13597 @example
13598 score-file       = "" / "(" *element ")"
13599 element          = rule / atom
13600 rule             = string-rule / number-rule / date-rule
13601 string-rule      = "(" quote string-header quote space *string-match ")"
13602 number-rule      = "(" quote number-header quote space *number-match ")"
13603 date-rule        = "(" quote date-header quote space *date-match ")"
13604 quote            = <ascii 34>
13605 string-header    = "subject" / "from" / "references" / "message-id" / 
13606                    "xref" / "body" / "head" / "all" / "followup"
13607 number-header    = "lines" / "chars"
13608 date-header      = "date"
13609 string-match     = "(" quote <string> quote [ "" / [ space score [ "" / 
13610                    space date [ "" / [ space string-match-t ] ] ] ] ] ")"
13611 score            = "nil" / <integer>
13612 date             = "nil" / <natural number>
13613 string-match-t   = "nil" / "s" / "substring" / "S" / "Substring" / 
13614                    "r" / "regex" / "R" / "Regex" /
13615                    "e" / "exact" / "E" / "Exact" /
13616                    "f" / "fuzzy" / "F" / "Fuzzy"
13617 number-match     = "(" <integer> [ "" / [ space score [ "" / 
13618                    space date [ "" / [ space number-match-t ] ] ] ] ] ")"
13619 number-match-t   = "nil" / "=" / "<" / ">" / ">=" / "<="
13620 date-match       = "(" quote <string> quote [ "" / [ space score [ "" / 
13621                    space date [ "" / [ space date-match-t ] ] ] ] ")"
13622 date-match-t     = "nil" / "at" / "before" / "after"
13623 atom             = "(" [ required-atom / optional-atom ] ")"
13624 required-atom    = mark / expunge / mark-and-expunge / files /
13625                    exclude-files / read-only / touched
13626 optional-atom    = adapt / local / eval 
13627 mark             = "mark" space nil-or-number
13628 nil-or-number    = "nil" / <integer>
13629 expunge          = "expunge" space nil-or-number
13630 mark-and-expunge = "mark-and-expunge" space nil-or-number
13631 files            = "files" *[ space <string> ]
13632 exclude-files    = "exclude-files" *[ space <string> ]
13633 read-only        = "read-only" [ space "nil" / space "t" ]
13634 adapt            = "adapt" [ space "nil" / space "t" / space adapt-rule ]
13635 adapt-rule       = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
13636 local            = "local" *[ space "(" <string> space <form> ")" ]
13637 eval             = "eval" space <form>
13638 space            = *[ " " / <TAB> / <NEWLINE> ]
13639 @end example
13640
13641 Any unrecognized elements in a score file should be ignored, but not
13642 discarded.  
13643
13644 As you can see, white space is needed, but the type and amount of white
13645 space is irrelevant.  This means that formatting of the score file is
13646 left up to the programmer---if it's simpler to just spew it all out on
13647 one looong line, then that's ok.
13648
13649 The meaning of the various atoms are explained elsewhere in this
13650 manual. 
13651
13652
13653 @node Headers
13654 @subsection Headers
13655
13656 Gnus uses internally a format for storing article headers that
13657 corresponds to the @sc{nov} format in a mysterious fashion.  One could
13658 almost suspect that the author looked at the @sc{nov} specification and
13659 just shamelessly @emph{stole} the entire thing, and one would be right.
13660
13661 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
13662 RFC1036 to talk about lines in the head of an article (eg.,
13663 @code{From}).  It is used by many people as a synonym for
13664 ``head''---``the header and the body''.  (That should be avoided, in my
13665 opinion.)  And Gnus uses a format internally that it calls ``header'',
13666 which is what I'm talking about here.  This is a 9-element vector,
13667 basically, with each header (ouch) having one slot.
13668
13669 These slots are, in order: @code{number}, @code{subject}, @code{from},
13670 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
13671 @code{xref}.  There are macros for accessing and setting these
13672 slots---they all have predictable names beginning with
13673 @code{mail-header-} and @code{mail-header-set-}, respectively.
13674
13675 The @code{xref} slot is really a @code{misc} slot.  Any extra info will
13676 be put in there.
13677
13678
13679 @node Ranges
13680 @subsection Ranges
13681
13682 @sc{gnus} introduced a concept that I found so useful that I've started
13683 using it a lot and have elaborated on it greatly. 
13684
13685 The question is simple: If you have a large amount of objects that are
13686 identified by numbers (say, articles, to take a @emph{wild} example)
13687 that you want to callify as being ``included'', a normal sequence isn't
13688 very useful.  (A 200,000 length sequence is a bit long-winded.)
13689
13690 The solution is as simple as the question: You just collapse the
13691 sequence. 
13692
13693 @example
13694 (1 2 3 4 5 6 10 11 12)
13695 @end example
13696
13697 is transformed into
13698
13699 @example
13700 ((1 . 6) (10 . 12))
13701 @end example
13702
13703 To avoid having those nasty @samp{(13 . 13)} elements to denote a
13704 lonesome object, a @samp{13} is a valid element:
13705
13706 @example
13707 ((1 . 6) 7 (10 . 12))
13708 @end example
13709
13710 This means that comparing two ranges to find out whether they are equal
13711 is slightly tricky:
13712
13713 @example
13714 ((1 . 5) 7 8 (10 . 12))
13715 @end example
13716
13717 and
13718
13719 @example
13720 ((1 . 5) (7 . 8) (10 . 12))
13721 @end example
13722
13723 are equal.  In fact, any non-descending list is a range:
13724
13725 @example
13726 (1 2 3 4 5)
13727 @end example
13728
13729 is a perfectly valid range, although a pretty long-winded one.  This is
13730 also legal:
13731
13732 @example
13733 (1 . 5)
13734 @end example
13735
13736 and is equal to the previous range.
13737
13738 Here's a BNF definition of ranges.  Of course, one must remember the
13739 semantic requirement that the numbers are non-descending.  (Any number
13740 of repetition of the same number is allowed, but apt to disappear in
13741 range handling.)
13742
13743 @example
13744 range           = simple-range / normal-range
13745 simple-range    = "(" number " . " number ")"
13746 normal-range    = "(" start-contents ")"
13747 contents        = "" / simple-range *[ " " contents ] / 
13748                   number *[ " " contents ]
13749 @end example
13750
13751 Gnus currently uses ranges to keep track of read articles and article
13752 marks.  I plan on implementing a number of range operators in C if The
13753 Powers That Be are willing to let me.  (I haven't asked yet, because I
13754 need to do some more thinking on what operators I need to make life
13755 totally range-based without ever having to convert back to normal
13756 sequences.) 
13757
13758
13759 @node Group Info
13760 @subsection Group Info
13761
13762 Gnus stores all permanent info on groups in a @dfn{group info} list.
13763 This list is from three to six elements (or more) long and exhaustively
13764 describes the group.
13765
13766 Here are two example group infos; one is a very simple group while the
13767 second is a more complex one:
13768
13769 @example
13770 ("no.group" 5 (1 . 54324))
13771
13772 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
13773                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
13774                 (nnml "")
13775                 (auto-expire (to-address "ding@@ifi.uio.no")))
13776 @end example
13777
13778 The first element is the group name as Gnus knows the group; the second
13779 is the group level; the third is the read articles in range format; the
13780 fourth is a list of article marks lists; the fifth is the select method;
13781 and the sixth contains the group parameters.
13782
13783 Here's a BNF definition of the group info format:
13784
13785 @example
13786 info          = "(" group space level space read 
13787                 [ "" / [ space marks-list [ "" / [ space method [ "" /
13788                 space parameters ] ] ] ] ] ")" 
13789 group         = quote <string> quote
13790 level         = <integer in the range of 1 to inf>
13791 read          = range
13792 marks-lists   = nil / "(" *marks ")"
13793 marks         = "(" <string> range ")"
13794 method        = "(" <string> *elisp-forms ")"
13795 parameters    = "(" *elisp-forms ")"
13796 @end example
13797
13798 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
13799 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
13800 in pseudo-BNF.
13801
13802
13803 @node Emacs/XEmacs Code
13804 @subsection Emacs/XEmacs Code
13805 @cindex XEmacs
13806 @cindex Emacsen
13807
13808 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
13809 platforms must be the primary one.  I chose Emacs.  Not because I don't
13810 like XEmacs or Mule, but because it comes first alphabetically.
13811
13812 This means that Gnus will byte-compile under Emacs with nary a warning,
13813 while XEmacs will pump out gigabytes of warnings while byte-compiling.
13814 As I use byte-compilation warnings to help me root out trivial errors in
13815 Gnus, that's very useful.  
13816
13817 I've also consistently used Emacs function interfaces, but have used
13818 Gnusey aliases for the functions.  To take an example:  Emacs defines a
13819 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
13820 function.  I then define a function called @code{gnus-run-at-time} that
13821 takes the same parameters as the Emacs @code{run-at-time}.  When running
13822 Gnus under Emacs, the former function is just an alias for the latter.
13823 However, when running under XEmacs, the former is an alias for the
13824 following function:
13825
13826 @lisp
13827 (defun gnus-xmas-run-at-time (time repeat function &rest args)
13828   (start-itimer
13829    "gnus-run-at-time"
13830    `(lambda ()
13831       (,function ,@@args))
13832    time repeat))
13833 @end lisp
13834
13835 This sort of thing has been done for bunches of functions.  Gnus does
13836 not redefine any native Emacs functions while running under XEmacs---it
13837 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
13838 all over.
13839
13840 Of course, I could have chosen XEmacs as my native platform and done
13841 mapping functions the other way around.  But I didn't.  The performance
13842 hit these indirections impose on Gnus under XEmacs should be slight.
13843
13844
13845 @node Various File Formats
13846 @subsection Various File Formats
13847
13848 @menu
13849 * Active File Format::      Information on articles and groups available.
13850 * Newsgroups File Format::  Group descriptions.
13851 @end menu
13852
13853
13854 @node Active File Format
13855 @subsubsection Active File Format
13856
13857 The active file lists all groups that are available on the server in
13858 question.  It also lists the highest and lowest current article numbers
13859 in each group.  
13860
13861 Here's an excerpt from a typical active file:
13862
13863 @example
13864 soc.motss 296030 293865 y
13865 alt.binaries.pictures.fractals 3922 3913 n
13866 comp.sources.unix 1605 1593 m
13867 comp.binaries.ibm.pc 5097 5089 y
13868 no.general 1000 900 y
13869 @end example
13870
13871 Here's a pseudo-BNF definition of this file:
13872
13873 @example
13874 active      = *group-line
13875 group-line  = group space high-number space low-number space flag <NEWLINE>
13876 group       = <non-white-space string>
13877 space       = " "
13878 high-number = <non-negative integer>
13879 low-number  = <positive integer>
13880 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
13881 @end example
13882
13883
13884 @node Newsgroups File Format
13885 @subsubsection Newsgroups File Format
13886
13887 The newsgroups file lists groups along with their descriptions.  Not all
13888 groups on the server have to be listed,  and not all groups in the file
13889 have to exist on the server.  The file is meant purely as information to
13890 the user.
13891
13892 The format is quite simple; a group name, a tab, and the description.
13893 Here's the definition:
13894
13895 @example
13896 newsgroups    = *line
13897 line          = group tab description <NEWLINE>
13898 group         = <non-white-space string>
13899 tab           = <TAB>
13900 description   = <string>
13901 @end example
13902
13903
13904 @node Emacs for Heathens
13905 @section Emacs for Heathens
13906
13907 Believe it or not, but some people who use Gnus haven't really used
13908 Emacs much before they embarked on their journey on the Gnus Love Boat.
13909 If you are one of those unfortunates whom ``@kbd{M-C-a}'', ``kill the
13910 region'', and ``set @code{gnus-flargblossen} to an alist where the key
13911 is a regexp that is used for matching on the group name'' are magical
13912 phrases with little or no meaning, then this appendix is for you.  If
13913 you are already familiar with Emacs, just ignore this and go fondle your
13914 cat instead.
13915
13916 @menu
13917 * Keystrokes::      Entering text and executing commands.
13918 * Emacs Lisp::      The built-in Emacs programming language.
13919 @end menu
13920
13921
13922 @node Keystrokes
13923 @subsection Keystrokes
13924
13925 @itemize @bullet
13926 @item
13927 Q: What is an experienced Emacs user?
13928
13929 @item 
13930 A: A person who wishes that the terminal had pedals.
13931 @end itemize
13932
13933 Yes, when you use Emacs, you are apt to use the control key, the shift
13934 key and the meta key a lot.  This is very annoying to some people
13935 (notably @code{vi}le users), and the rest of us just love the hell out
13936 of it.  Just give up and submit.  Emacs really does stand for
13937 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
13938 may have heard from other disreputable sources (like the Emacs author).
13939
13940 The shift key is normally located near your pinky fingers, and are
13941 normally used to get capital letters and stuff.  You probably use it all
13942 the time.  The control key is normally marked ``CTRL'' or something like
13943 that.  The meta key is, funnily enough, never marked as such on any
13944 keyboards.  The one I'm currently at has a key that's marked ``Alt'',
13945 which is the meta key on this keyboard.  It's usually located somewhere
13946 to the left hand side of the keyboard, usually on the bottom row.
13947
13948 Now, us Emacs people doesn't say ``press the meta-control-m key'',
13949 because that's just too inconvenient.  We say ``press the @kbd{M-C-m}
13950 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
13951 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
13952 down the control key, and hold it down while you press @kbd{k}''.
13953 ``Press @kbd{M-C-k}'' means ``press down and hold down the meta key and
13954 the control key and then press @kbd{k}''.  Simple, ay?
13955
13956 This is somewhat complicated by the fact that not all keyboards have a
13957 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
13958 means ``press escape, release escape, press @kbd{k}''.  That's much more
13959 work than if you have a meta key, so if that's the case, I respectfully
13960 suggest you get a real keyboard with a meta key.  You can't live without
13961 it.
13962
13963
13964
13965 @node Emacs Lisp
13966 @subsection Emacs Lisp
13967
13968 Emacs is the King of Editors because it's really a Lisp interpreter.
13969 Each and every key you tap runs some Emacs Lisp code snippet, and since
13970 Emacs Lisp is an interpreted language, that means that you can configure
13971 any key to run any arbitrary code.  You just, like, do it.
13972
13973 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
13974 functions.  (These are byte-compiled for speed, but it's still
13975 interpreted.)  If you decide that you don't like the way Gnus does
13976 certain things, it's trivial to have it do something a different way.
13977 (Well, at least if you know how to write Lisp code.)  However, that's
13978 beyond the scope of this manual, so we are simply going to talk about
13979 some common constructs that you normally use in your @file{.emacs} file
13980 to customize Gnus.
13981
13982 If you want to set the variable @code{gnus-florgbnize} to four (4), you
13983 write the following:
13984
13985 @lisp
13986 (setq gnus-florgbnize 4)
13987 @end lisp
13988
13989 This function (really ``special form'') @code{setq} is the one that can
13990 set a variable to some value.  This is really all you need to know.  Now
13991 you can go and fill your @code{.emacs} file with lots of these to change
13992 how Gnus works.
13993
13994 If you have put that thing in your @code{.emacs} file, it will be read
13995 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
13996 start Emacs.  If you want to change the variable right away, simply say
13997 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
13998 previous ``form'', which here is a simple @code{setq} statement.
13999
14000 Go ahead---just try it, if you're located at your Emacs.  After you
14001 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
14002 is the return value of the form you @code{eval}ed.
14003
14004 Some pitfalls:
14005
14006 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
14007 that means:
14008
14009 @lisp
14010 (setq gnus-read-active-file 'some)
14011 @end lisp
14012
14013 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
14014 @samp{nntp.ifi.uio.no}'', that means:
14015
14016 @lisp
14017 (setq gnus-nntp-server "nntp.ifi.uio.no")
14018 @end lisp
14019
14020 So be careful not to mix up strings (the latter) with symbols (the
14021 former).  The manual is unambiguous, but it can be confusing.
14022
14023
14024 @include gnus-faq.texi
14025
14026 @node Index
14027 @chapter Index
14028 @printindex cp
14029
14030 @node Key Index
14031 @chapter Key Index
14032 @printindex ky
14033
14034 @summarycontents
14035 @contents
14036 @bye
14037
14038 @iftex
14039 @iflatex
14040 \end{document}
14041 @end iflatex
14042 @end iftex
14043
14044 @c End:
14045