*** 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 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 * Startup Variables::   Other variables you might change.
343 @end menu
344
345
346 @node Finding the News
347 @section Finding the News
348
349 @vindex gnus-select-method
350 @c @head
351 The @code{gnus-select-method} variable says where Gnus should look for
352 news.  This variable should be a list where the first element says
353 @dfn{how} and the second element says @dfn{where}.  This method is your
354 native method.  All groups that are not fetched with this method are
355 foreign groups.
356
357 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
358 you want to get your daily dosage of news from, you'd say:
359
360 @lisp
361 (setq gnus-select-method '(nntp "news.somewhere.edu"))
362 @end lisp
363
364 If you want to read directly from the local spool, say:
365
366 @lisp
367 (setq gnus-select-method '(nnspool ""))
368 @end lisp
369
370 If you can use a local spool, you probably should, as it will almost
371 certainly be much faster.
372
373 @vindex gnus-nntpserver-file
374 @cindex NNTPSERVER
375 @cindex @sc{nntp} server
376 If this variable is not set, Gnus will take a look at the
377 @code{NNTPSERVER} environment variable.  If that variable isn't set,
378 Gnus will see whether @code{gnus-nntpserver-file}
379 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
380 that fails as well, Gnus will will try to use the machine that is
381 running Emacs as an @sc{nntp} server.  That's a long-shot, though.
382
383 @vindex gnus-nntp-server
384 If @code{gnus-nntp-server} is set, this variable will override
385 @code{gnus-select-method}.  You should therefore set
386 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
387
388 @vindex gnus-secondary-servers
389 You can also make Gnus prompt you interactively for the name of an
390 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
391 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
392 in the @code{gnus-secondary-servers} list (if any).  You can also just
393 type in the name of any server you feel like visiting.
394
395 @findex gnus-group-browse-foreign-server
396 @kindex B (Group)
397 However, if you use one @sc{nntp} server regularly and are just
398 interested in a couple of groups from a different server, you would be
399 better served by using the @kbd{B} command in the group buffer.  It will
400 let you have a look at what groups are available, and you can subscribe
401 to any of the groups you want to.  This also makes @file{.newsrc}
402 maintenance much tidier.  @xref{Foreign Groups}.
403
404 @vindex gnus-secondary-select-methods
405 @c @head
406 A slightly different approach to foreign groups is to set the
407 @code{gnus-secondary-select-methods} variable.  The select methods
408 listed in this variable are in many ways just as native as the
409 @code{gnus-select-method} server.  They will also be queried for active
410 files during startup (if that's required), and new newsgroups that
411 appear on these servers will be subscribed (or not) just as native
412 groups are.
413
414 For instance, if you use the @code{nnmbox} backend to read your mail, you
415 would typically set this variable to
416
417 @lisp
418 (setq gnus-secondary-select-methods '((nnmbox "")))
419 @end lisp
420
421
422 @node The First Time
423 @section The First Time
424 @cindex first time usage
425
426 If no startup files exist, Gnus will try to determine what groups should
427 be subscribed by default.
428
429 @vindex gnus-default-subscribed-newsgroups
430 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
431 will subscribe you to just those groups in that list, leaving the rest
432 killed.  Your system administrator should have set this variable to
433 something useful.
434
435 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
436 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is here
437 defined as @dfn{whatever Lars thinks you should read}.)
438
439 You'll also be subscribed to the Gnus documentation group, which should
440 help you with most common problems.  
441
442 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
443 use the normal functions for handling new groups, and not do anything
444 special.
445
446
447 @node The Server is Down
448 @section The Server is Down
449 @cindex server errors
450
451 If the default server is down, Gnus will understandably have some
452 problems starting.  However, if you have some mail groups in addition to
453 the news groups, you may want to start Gnus anyway.
454
455 Gnus, being the trusting sort of program, will ask whether to proceed
456 without a native select method if that server can't be contacted.  This
457 will happen whether the server doesn't actually exist (i.e., you have
458 given the wrong address) or the server has just momentarily taken ill
459 for some reason or other.  If you decide to continue and have no foreign
460 groups, you'll find it difficult to actually do anything in the group
461 buffer.  But, hey, that's your problem.  Blllrph!
462
463 @findex gnus-no-server
464 @c @head
465 If you know that the server is definitely down, or you just want to read
466 your mail without bothering with the server at all, you can use the
467 @code{gnus-no-server} command to start Gnus.  That might come in handy
468 if you're in a hurry as well.
469
470
471 @node Slave Gnusii
472 @section Slave Gnusiï
473 @cindex slave
474
475 You might want to run more than one Emacs with more than one Gnus at the
476 same time.  If you are using different @file{.newsrc} files (eg., if you
477 are using the two different Gnusiï to read from two different servers),
478 that is no problem whatsoever.  You just do it.
479
480 The problem appears when you want to run two Gnusiï that use the same
481 @code{.newsrc} file.
482
483 To work around that problem some, we here at the Think-Tank at the Gnus
484 Towers have come up with a new concept: @dfn{Masters} and
485 @dfn{servants}.  (We have applied for a patent on this concept, and have
486 taken out a copyright on those words.  If you wish to use those words in
487 conjunction with each other, you have to send $1 per usage instance to
488 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
489 Applications}) will be much more expensive, of course.)
490
491 Anyways, you start one Gnus up the normal way with @kbd{M-x gnus} (or
492 however you do it).  Each subsequent slave Gnusiï should be started with
493 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
494 files, but instead save @dfn{slave files} that contains information only
495 on what groups have been read in the slave session.  When a master Gnus
496 starts, it will read (and delete) these slave files, incorporating all
497 information from them.  (The slave files will be read in the sequence
498 they were created, so the latest changes will have precedence.)
499
500 Information from the slave files has, of course, precedence over the
501 information in the normal (i. e., master) @code{.newsrc} file.
502
503
504 @node Fetching a Group
505 @section Fetching a Group
506
507 @findex gnus-fetch-group
508 It it sometime convenient to be able to just say ``I want to read this
509 group and I don't care whether Gnus has been started or not''.  This is
510 perhaps more useful for people who write code than for users, but the
511 command @code{gnus-fetch-group} provides this functionality in any case.
512 It takes the group name as a parameter.
513
514
515 @node New Groups
516 @section New Groups
517 @cindex new groups
518
519 @vindex gnus-subscribe-newsgroup-method
520 What Gnus does when it encounters a new group is determined by the
521 @code{gnus-subscribe-newsgroup-method} variable.
522
523 This variable should contain a function.  Some handy pre-fab values
524 are:
525
526 @table @code
527
528 @item gnus-subscribe-zombies
529 @vindex gnus-subscribe-zombies
530 Make all new groups zombies.  You can browse the zombies later (with
531 @kbd{A z}) and either kill them all off properly, or subscribe to them.
532 This is the default.
533
534 @item gnus-subscribe-randomly
535 @vindex gnus-subscribe-randomly
536 Subscribe all new groups randomly.
537
538 @item gnus-subscribe-alphabetically
539 @vindex gnus-subscribe-alphabetically
540 Subscribe all new groups alphabetically.
541
542 @item gnus-subscribe-hierarchically
543 @vindex gnus-subscribe-hierarchically
544 Subscribe all new groups hierarchically.  The difference between this
545 function and @code{gnus-subscribe-alphabetically} is slight.
546 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
547 alphabetical fashion, while this function will enter groups into it's
548 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
549 @samp{comp} hierarchy, this function will not mess that configuration
550 up.  Or something like that.
551
552 @item gnus-subscribe-interactively
553 @vindex gnus-subscribe-interactively
554 Subscribe new groups interactively.  This means that Gnus will ask
555 you about @strong{all} new groups.
556
557 @item gnus-subscribe-killed
558 @vindex gnus-subscribe-killed
559 Kill all new groups.
560
561 @end table
562
563 @vindex gnus-subscribe-hierarchical-interactive
564 A closely related variable is
565 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
566 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
567 hierarchical fashion whether to subscribe to new groups or not.  Gnus
568 will ask you for each sub-hierarchy whether you want to descend the
569 hierarchy or not.  
570
571 One common mistake is to set the variable a few paragraphs above to
572 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
573 will not work.  This is ga-ga.  So don't do it.
574
575 A nice and portable way to control which new newsgroups should be
576 subscribed (or ignored) is to put an @dfn{options} line at the start of
577 the @file{.newsrc} file.  Here's an example:
578
579 @example
580 options -n !alt.all !rec.all sci.all
581 @end example
582
583 @vindex gnus-subscribe-options-newsgroup-method
584 This line obviously belongs to a serious-minded intellectual scientific
585 person (or she may just be plain old boring), because it says that all
586 groups that have names beginning with @samp{alt} and @samp{rec} should
587 be ignored, and all groups with names beginning with @samp{sci} should
588 be subscribed.  Gnus will not use the normal subscription method for
589 subscribing these groups.
590 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
591 variable defaults to @code{gnus-subscribe-alphabetically}.
592
593 @vindex gnus-options-not-subscribe
594 @vindex gnus-options-subscribe
595 If you don't want to mess with your @file{.newsrc} file, you can just
596 set the two variables @code{gnus-options-subscribe} and
597 @code{gnus-options-not-subscribe}.  These two variables do exactly the
598 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
599 and if the the new group matches the former, it will be unconditionally
600 subscribed, and if it matches the latter, it will be ignored.
601
602 @vindex gnus-auto-subscribed-groups
603 Yet another variable that meddles here is
604 @code{gnus-auto-subscribed-groups}.  It works exactly like
605 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
606 thought it would be nice to have two of these.  This variable is more
607 meant for setting some ground rules, while the other variable is used
608 more for user fiddling.  By default this variable makes all new groups
609 that come from mail backends (@code{nnml}, @code{nnbabyl},
610 @code{nnfolder}, @code{nnmbox}, and @code{nnmh}) subscribed.  If you
611 don't like that, just set this variable to @code{nil}.
612
613 @vindex gnus-check-new-newsgroups
614 If you are satisfied that you really never want to see any new groups,
615 you could set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
616 also save you some time at startup.  Even if this variable is
617 @code{nil}, you can always subscribe to the new groups just by pressing
618 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
619 is @code{t} by default.
620
621 Gnus normally determines whether a group is new or not by comparing the
622 list of groups from the active file(s) with the lists of subscribed and
623 dead groups.  This isn't a particularly fast method.  If
624 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
625 server for new groups since the last time.  This is both faster &
626 cheaper.  This also means that you can get rid of the list of killed
627 groups altogether, so you may set @code{gnus-save-killed-list} to
628 @code{nil}, which will save time both at startup, at exit, and all over.
629 Saves disk space, too.  Why isn't this the default, then?
630 Unfortunately, not all servers support this command. 
631
632 I bet I know what you're thinking now: How do I find out whether my
633 server supports @code{ask-server}?  No?  Good, because I don't have a
634 fail-safe answer.  I would suggest just setting this variable to
635 @code{ask-server} and see whether any new groups appear within the next
636 few days.  If any do, then it works.  If any don't, then it doesn't
637 work.  I could write a function to make Gnus guess whether the server
638 supports @code{ask-server}, but it would just be a guess.  So I won't.
639 You could @code{telnet} to the server and say @code{HELP} and see
640 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
641 it does, then it might work.  (But there are servers that lists
642 @samp{NEWGROUPS} without supporting the function properly.)
643
644 This variable can also be a list of select methods.  If so, Gnus will
645 issue an @code{ask-server} command to each of the select methods, and
646 subscribe them (or not) using the normal methods.  This might be handy
647 if you are monitoring a few servers for new groups.  A side effect is
648 that startup will take much longer, so you can meditate while waiting.
649 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
650
651
652 @node Startup Files
653 @section Startup Files
654 @cindex startup files
655 @cindex .newsrc
656
657 Now, you all know about the @file{.newsrc} file.  All subscription
658 information is traditionally stored in this file.
659
660 Things got a bit more complicated with @sc{gnus}.  In addition to
661 keeping the @file{.newsrc} file updated, it also used a file called
662 @file{.newsrc.el} for storing all the information that didn't fit into
663 the @file{.newsrc} file.  (Actually, it also duplicated everything in
664 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
665 files was the most recently saved, which enabled people to swap between
666 @sc{gnus} and other newsreaders.
667
668 That was kinda silly, so Gnus went one better: In addition to the
669 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
670 @file{.newsrc.eld}.  It will read whichever of these files that are most
671 recent, but it will never write a @file{.newsrc.el} file.
672
673 @vindex gnus-save-newsrc-file
674 You can turn off writing the @file{.newsrc} file by setting
675 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
676 the file and save some space, as well as making exit from Gnus faster.
677 However, this will make it impossible to use other newsreaders than
678 Gnus.  But hey, who would want to, right?
679
680 @vindex gnus-save-killed-list
681 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
682 will not save the list of killed groups to the startup file.  This will
683 save both time (when starting and quitting) and space (on disk).  It
684 will also means that Gnus has no record of what groups are new or old,
685 so the automatic new groups subscription methods become meaningless.
686 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
687 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
688 Groups}).
689
690 @vindex gnus-startup-file
691 The @code{gnus-startup-file} variable says where the startup files are.
692 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
693 file being whatever that one is with a @samp{.eld} appended.
694
695 @vindex gnus-save-newsrc-hook
696 @vindex gnus-save-quick-newsrc-hook
697 @vindex gnus-save-standard-newsrc-hook
698 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
699 files, while @code{gnus-save-quick-newsrc-hook} is called just before
700 saving the @file{.newsrc.eld} file, and
701 @code{gnus-save-standard-newsrc-hook} is called just before saving the
702 @file{.newsrc} file.  The latter two are commonly used to turn version
703 control on or off.  Version control is off by default when saving the
704 startup files.
705
706 @vindex gnus-init-file
707 When Gnus starts, it will read the @code{gnus-init-file} file, which is
708 @file{~/.gnus.el} by default.  This is a normal Emacs Lisp file and can
709 be used to avoid cluttering your @file{.emacs} file with Gnus stuff.
710
711
712 @node Auto Save
713 @section Auto Save
714 @cindex dribble file
715 @cindex auto-save
716
717 Whenever you do something that changes the Gnus data (reading articles,
718 catching up, killing/subscribing groups), the change is added to a
719 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
720 Emacs way.  If your Emacs should crash before you have saved the
721 @file{.newsrc} files, all changes you have made can be recovered from
722 this file.
723
724 If Gnus detects this file at startup, it will ask the user whether to
725 read it.  The auto save file is deleted whenever the real startup file is
726 saved.
727
728 @vindex gnus-use-dribble-file
729 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
730 maintain a dribble buffer.  The default is @code{t}.
731
732 @vindex gnus-dribble-directory
733 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
734 this variable is @code{nil}, which it is by default, Gnus will dribble
735 into the directory where the @file{.newsrc} file is located.  (This is
736 normally the user's home directory.)  The dribble file will get the same
737 file permissions as the @code{.newsrc} file.
738
739
740 @node The Active File
741 @section The Active File
742 @cindex active file
743 @cindex ignored groups
744
745 When Gnus starts, or indeed whenever it tries to determine whether new
746 articles have arrived, it reads the active file.  This is a very large
747 file that lists all the active groups and articles on the server.
748
749 @vindex gnus-ignored-newsgroups
750 Before examining the active file, Gnus deletes all lines that match the
751 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
752 any groups with bogus names, but you can use this variable to make Gnus
753 ignore hierarchies you aren't ever interested in.  However, this is not
754 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
755 Groups} for an overview of other variables that can be used instead.
756
757 @c This variable is
758 @c @code{nil} by default, and will slow down active file handling somewhat
759 @c if you set it to anything else.
760
761 @vindex gnus-read-active-file
762 @c @head
763 The active file can be rather Huge, so if you have a slow network, you
764 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
765 reading the active file.  This variable is @code{t} by default.
766
767 Gnus will try to make do by getting information just on the groups that
768 you actually subscribe to.
769
770 Note that if you subscribe to lots and lots of groups, setting this
771 variable to @code{nil} will probably make Gnus slower, not faster.  At
772 present, having this variable @code{nil} will slow Gnus down
773 considerably, unless you read news over a 2400 baud modem.  
774
775 This variable can also have the value @code{some}.  Gnus will then
776 attempt to read active info only on the subscribed groups.  On some
777 servers this is quite fast (on sparkling, brand new INN servers that
778 support the @code{LIST ACTIVE group} command), on others this isn't fast
779 at all.  In any case, @code{some} should be faster than @code{nil}, and
780 is certainly faster than @code{t} over slow lines.
781
782 If this variable is @code{nil}, Gnus will ask for group info in total
783 lock-step, which isn't very fast.  If it is @code{some} and you use an
784 @sc{nntp} server, Gnus will pump out commands as fast as it can, and
785 read all the replies in one swoop.  This will normally result in better
786 performance, but if the server does not support the aforementioned
787 @code{LIST ACTIVE group} command, this isn't very nice to the server.
788
789 In any case, if you use @code{some} or @code{nil}, you should definitely
790 kill all groups that you aren't interested in to speed things up.
791
792
793 @node Startup Variables
794 @section Startup Variables
795
796 @table @code
797
798 @item gnus-load-hook
799 @vindex gnus-load-hook
800 A hook that is run while Gnus is being loaded.  Note that this hook will
801 normally be run just once in each Emacs session, no matter how many
802 times you start Gnus.
803
804 @item gnus-startup-hook
805 @vindex gnus-startup-hook
806 A hook that is run after starting up Gnus successfully.
807
808 @item gnus-check-bogus-newsgroups
809 @vindex gnus-check-bogus-newsgroups
810 If non-@code{nil}, Gnus will check for and delete all bogus groups at
811 startup.  A @dfn{bogus group} is a group that you have in your
812 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
813 bogus groups can take quite a while, so to save time and resources it's
814 best to leave this option off, and do the checking for bogus groups once
815 in a while from the group buffer instead (@pxref{Group Maintenance}).
816
817 @item gnus-inhibit-startup-message
818 @vindex gnus-inhibit-startup-message
819 If non-@code{nil}, the startup message won't be displayed.  That way,
820 your boss might not notice that you are reading news instead of doing
821 your job as easily.
822
823 @item gnus-no-groups-message
824 @vindex gnus-no-groups-message
825 Message displayed by Gnus when no groups are available.
826 @end table
827
828
829 @node The Group Buffer
830 @chapter The Group Buffer
831 @cindex group buffer
832
833 The @dfn{group buffer} lists all (or parts) of the available groups.  It
834 is the first buffer shown when Gnus starts, and will never be killed as
835 long as Gnus is active.
836
837 @menu
838 * Group Buffer Format::    Information listed and how you can change it.
839 * Group Maneuvering::      Commands for moving in the group buffer.
840 * Selecting a Group::      Actually reading news.
841 * Subscription Commands::  Unsubscribing, killing, subscribing.
842 * Group Levels::           Levels? What are those, then?
843 * Group Score::            A mechanism for finding out what groups you like.
844 * Marking Groups::         You can mark groups for later processing.
845 * Foreign Groups::         Creating and editing groups.
846 * Group Parameters::       Each group may have different parameters set.
847 * Listing Groups::         Gnus can list various subsets of the groups.
848 * Sorting Groups::         Re-arrange the group order.
849 * Group Maintenance::      Maintaining a tidy @file{.newsrc} file.
850 * Browse Foreign Server::  You can browse a server.  See what it has to offer.
851 * Exiting Gnus::           Stop reading news and get some work done.
852 * Group Topics::           A folding group mode divided into topics.
853 * Misc Group Stuff::       Other stuff that you can to do.
854 @end menu
855
856
857 @node Group Buffer Format
858 @section Group Buffer Format
859 @cindex group buffer format
860
861 @menu 
862 * Group Line Specification::       Deciding how the group buffer is to look.
863 * Group Modeline Specification::   The group buffer modeline.
864 * Group Highlighting::             Having nice colors in the group buffer.
865 @end menu
866
867
868 @node Group Line Specification
869 @subsection Group Line Specification
870
871 The default format of the group buffer is nice and dull, but you can
872 make it as exciting and ugly as you feel like.
873
874 Here's a couple of example group lines:
875
876 @example
877      25: news.announce.newusers
878  *    0: alt.fan.andrea-dworkin
879 @end example
880
881 Quite simple, huh?
882
883 You can see that there are 25 unread articles in
884 @samp{news.announce.newusers}.  There are no unread articles, but some
885 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
886 asterisk at the beginning of the line?)
887
888 @vindex gnus-group-line-format
889 You can change that format to whatever you want by fiddling with the
890 @code{gnus-group-line-format} variable.  This variable works along the
891 lines of a @code{format} specification, which is pretty much the same as
892 a @code{printf} specifications, for those of you who use (feh!) C.
893 @xref{Formatting Variables}. 
894
895 The default value that produced those lines above is 
896 @samp{%M%S%5y: %(%g%)\n}.
897
898 There should always be a colon on the line; the cursor always moves to
899 the colon after performing an operation.  Nothing else is required---not
900 even the group name.  All displayed text is just window dressing, and is
901 never examined by Gnus.  Gnus stores all real information it needs using
902 text properties.
903
904 (Note that if you make a really strange, wonderful, spreadsheet-like
905 layout, everybody will believe you are hard at work with the accounting
906 instead of wasting time reading news.)
907
908 Here's a list of all available format characters:
909
910 @table @samp
911
912 @item M    
913 Only marked articles.
914
915 @item S
916 Whether the group is subscribed.
917
918 @item L    
919 Level of subscribedness.
920
921 @item N
922 Number of unread articles.
923
924 @item I
925 Number of dormant articles.
926
927 @item T
928 Number of ticked articles.
929
930 @item R
931 Number of read articles.
932
933 @item t
934 Total number of articles.
935
936 @item y
937 Number of unread, unticked, non-dormant articles.
938
939 @item i
940 Number of ticked and dormant articles.
941
942 @item g
943 Full group name.
944
945 @item G
946 Group name.
947
948 @item D
949 Newsgroup description.
950
951 @item o
952 @samp{m} if moderated.
953
954 @item O
955 @samp{(m)} if moderated.
956
957 @item s
958 Select method.
959
960 @item n
961 Select from where.
962
963 @item z
964 A string that looks like @samp{<%s:%n>} if a foreign select method is
965 used.
966
967 @item P
968 Indentation based on the level of the topic (@pxref{Group Topics}). 
969
970 @item c
971 @vindex gnus-group-uncollapsed-levels
972 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
973 variable says how many levels to leave at the end of the group name.
974 The default is @code{1}.
975
976 @item u
977 User defined specifier.  The next character in the format string should
978 be a letter.  @sc{gnus} will call the function
979 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
980 following @samp{%u}.  The function will be passed the current headers as
981 argument.  The function should return a string, which will be inserted
982 into the buffer just like information from any other specifier.
983 @end table
984
985 @cindex *
986 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
987 if no info is available---for instance, if it is a non-activated foreign
988 group, or a bogus (or semi-bogus) native group.
989
990
991 @node Group Modeline Specification
992 @subsection Group Modeline Specification
993
994 @vindex gnus-group-mode-line-format
995 The mode line can be changed by setting
996 (@code{gnus-group-mode-line-format}).  It doesn't understand that many
997 format specifiers:
998
999 @table @samp
1000 @item S
1001 The native news server.
1002 @item M
1003 The native select method.
1004 @end table
1005
1006
1007 @node Group Highlighting
1008 @subsection Group Highlighting
1009
1010 @vindex gnus-group-highlight
1011 Highlighting in the group buffer is controlled by the
1012 @code{gnus-group-highlight} variable.  This is an alist with elements
1013 that look like @var{(form . face)}.  If @var{form} evaluates to
1014 something non-@code{nil}, the @var{face} will be used on the line.
1015
1016 Here's an example value for this variable that might look nice if the
1017 background is dark:
1018
1019 @lisp
1020 (setq gnus-group-highlight
1021     `(((> unread 200) . 
1022        ,(custom-face-lookup "Red" nil nil t nil nil))
1023       ((and (< level 3) (zerop unread)) . 
1024        ,(custom-face-lookup "SeaGreen" nil nil t nil nil))
1025       ((< level 3) . 
1026        ,(custom-face-lookup "SpringGreen" nil nil t nil nil))
1027       ((zerop unread) . 
1028        ,(custom-face-lookup "SteelBlue" nil nil t nil nil))
1029       (t . 
1030        ,(custom-face-lookup "SkyBlue" nil nil t nil nil))
1031       ))
1032 @end lisp
1033
1034 Variables that are dynamically bound when the forms are evaluated
1035 include:
1036
1037 @table @code
1038 @item group
1039 The group name.
1040 @item unread
1041 The number of unread articles in the group.
1042 @item method
1043 The select method.
1044 @item mailp
1045 Whether the group is a mail group.
1046 @item level
1047 The level of the group.
1048 @item score
1049 The score of the group.
1050 @item ticked 
1051 The number of ticked articles in the group.
1052 @item topic
1053 When using the topic minor mode, this variable is bound to the current
1054 topic being inserted.
1055 @end table
1056
1057 When the forms are @code{eval}ed, point is at the beginning of the line
1058 of the group in question, so you can use many of the normal Gnus
1059 functions for snarfing info on the group.
1060
1061 @vindex gnus-group-update-hook
1062 @findex gnus-group-highlight-line
1063 @code{gnus-group-update-hook} is called when a group line is changed.
1064 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1065 calls @code{gnus-group-highlight-line} by default.
1066
1067
1068 @node Group Maneuvering
1069 @section Group Maneuvering
1070 @cindex group movement
1071
1072 All movement commands understand the numeric prefix and will behave as
1073 expected, hopefully. 
1074
1075 @table @kbd
1076
1077 @item n
1078 @kindex n (Group)
1079 @findex gnus-group-next-unread-group
1080 Go to the next group that has unread articles
1081 (@code{gnus-group-next-unread-group}).
1082
1083 @item p
1084
1085 @itemx DEL
1086 @kindex DEL (Group)
1087 @kindex p (Group)
1088 @findex gnus-group-prev-unread-group
1089 Go to the previous group group that has unread articles
1090 (@code{gnus-group-prev-unread-group}).
1091
1092 @item N
1093 @kindex N (Group)
1094 @findex gnus-group-next-group
1095 Go to the next group (@code{gnus-group-next-group}).
1096
1097 @item P
1098 @kindex P (Group)
1099 @findex gnus-group-prev-group
1100 Go to the previous group (@code{gnus-group-prev-group}).
1101
1102 @item M-p
1103 @kindex M-p (Group)
1104 @findex gnus-group-next-unread-group-same-level
1105 Go to the next unread group on the same level (or lower)
1106 (@code{gnus-group-next-unread-group-same-level}). 
1107
1108 @item M-n
1109 @kindex M-n (Group)
1110 @findex gnus-group-prev-unread-group-same-level
1111 Go to the previous unread group on the same level (or lower)
1112 (@code{gnus-group-prev-unread-group-same-level}). 
1113 @end table
1114
1115 Three commands for jumping to groups:
1116
1117 @table @kbd
1118
1119 @item j
1120 @kindex j (Group)
1121 @findex gnus-group-jump-to-group
1122 Jump to a group (and make it visible if it isn't already)
1123 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
1124 like living groups.
1125
1126 @item ,
1127 @kindex , (Group)
1128 @findex gnus-group-best-unread-group
1129 Jump to the unread group with the lowest level
1130 (@code{gnus-group-best-unread-group}). 
1131
1132 @item .
1133 @kindex . (Group)
1134 @findex gnus-group-first-unread-group
1135 Jump to the first group with unread articles
1136 (@code{gnus-group-first-unread-group}).  
1137 @end table
1138
1139 @vindex gnus-group-goto-unread
1140 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
1141 commands will move to the next group, not the next unread group.  Even
1142 the commands that say they move to the next unread group.  The default
1143 is @code{t}.
1144
1145
1146 @node Selecting a Group
1147 @section Selecting a Group
1148 @cindex group selection
1149
1150 @table @kbd
1151
1152 @item SPACE
1153 @kindex SPACE (Group)
1154 @findex gnus-group-read-group
1155 Select the current group, switch to the summary buffer and display the
1156 first unread article (@code{gnus-group-read-group}).  If there are no
1157 unread articles in the group, or if you give a non-numerical prefix to
1158 this command, Gnus will offer to fetch all the old articles in this
1159 group from the server.  If you give a numerical prefix @var{N}, Gnus
1160 will fetch @var{N} number of articles.  If @var{N} is positive, fetch
1161 the @var{N} newest articles, if @var{N} is negative, fetch the
1162 @var{abs(N)} oldest articles.
1163
1164 @item RET
1165 @kindex RET (Group)
1166 @findex gnus-group-select-group
1167 Select the current group and switch to the summary buffer
1168 (@code{gnus-group-select-group}).  Takes the same arguments as
1169 @code{gnus-group-read-group}---the only difference is that this command
1170 does not display the first unread article automatically upon group
1171 entry. 
1172
1173 @item M-RET
1174 @kindex M-RET (Group)
1175 @findex gnus-group-quick-select-group
1176 This does the same as the command above, but tries to do it with the
1177 minimum amount off fuzz (@code{gnus-group-quick-select-group}).  No
1178 scoring/killing will be performed, there will be no highlights and no
1179 expunging.  This might be useful if you're in a real hurry and have to
1180 enter some humongous group.
1181
1182 @item M-SPACE
1183 @kindex M-RET (Group)
1184 @findex gnus-group-visible-select-group
1185 This is yet one more command that does the same as the one above, but
1186 this one does it without expunging and hiding dormants
1187 (@code{gnus-group-visible-select-group}).  
1188
1189 @item c
1190 @kindex c (Group)
1191 @findex gnus-group-catchup-current
1192 @vindex gnus-group-catchup-group-hook
1193 Mark all unticked articles in this group as read
1194 (@code{gnus-group-catchup-current}).
1195 @code{gnus-group-catchup-group-hook} is when catching up a group from
1196 the group buffer.
1197
1198 @item C
1199 @kindex C (Group)
1200 @findex gnus-group-catchup-current-all
1201 Mark all articles in this group, even the ticked ones, as read
1202 (@code{gnus-group-catchup-current-all}).   
1203 @end table
1204
1205 @vindex gnus-large-newsgroup
1206 The @code{gnus-large-newsgroup} variable says what Gnus should consider
1207 to be a big group.  This is 200 by default.  If the group has more
1208 unread articles than this, Gnus will query the user before entering the
1209 group.  The user can then specify how many articles should be fetched
1210 from the server.  If the user specifies a negative number (@code{-n}),
1211 the @code{n} oldest articles will be fetched.  If it is positive, the
1212 @code{n} articles that have arrived most recently will be fetched.
1213
1214 @vindex gnus-select-group-hook
1215 @vindex gnus-auto-select-first
1216 @code{gnus-auto-select-first} control whether any articles are selected
1217 automatically when entering a group.  
1218
1219 @table @code
1220
1221 @item nil
1222 Don't select any articles when entering the group.  Just display the
1223 full summary buffer.
1224
1225 @item t
1226 Select the first unread article when entering the group.  
1227
1228 @item best
1229 Select the most high-scored article in the group when entering the
1230 group. 
1231 @end table
1232         
1233 If you want to prevent automatic selection in some group (say, in a
1234 binary group with Huge articles) you can set this variable to @code{nil}
1235 in @code{gnus-select-group-hook}, which is called when a group is
1236 selected.
1237
1238
1239 @node Subscription Commands
1240 @section Subscription Commands
1241 @cindex subscribing
1242
1243 @table @kbd
1244
1245 @item S t
1246 @itemx u
1247 @kindex S t (Group)
1248 @kindex u (Group)
1249 @findex gnus-group-unsubscribe-current-group
1250 Toggle subscription to the current group
1251 (@code{gnus-group-unsubscribe-current-group}).  
1252
1253 @item S s
1254 @itemx U
1255 @kindex S s (Group)
1256 @kindex U (Group)
1257 @findex gnus-group-unsubscribe-group
1258 Prompt for a group to subscribe, and then subscribe it.  If it was
1259 subscribed already, unsubscribe it instead
1260 (@code{gnus-group-unsubscribe-group}).
1261
1262 @item S k
1263 @itemx C-k
1264 @kindex S k (Group)
1265 @kindex C-k (Group)
1266 @findex gnus-group-kill-group
1267 Kill the current group (@code{gnus-group-kill-group}).
1268
1269 @item S y
1270 @itemx C-y
1271 @kindex S y (Group)
1272 @kindex C-y (Group)
1273 @findex gnus-group-yank-group
1274 Yank the last killed group (@code{gnus-group-yank-group}).
1275
1276 @item C-x C-t
1277 @kindex C-x C-t (Group)
1278 @findex gnus-group-transpose-groups
1279 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
1280 really a subscription command, but you can use it instead of a
1281 kill-and-yank sequence sometimes.
1282
1283 @item S w
1284 @itemx C-w
1285 @kindex S w (Group)
1286 @kindex C-w (Group)
1287 @findex gnus-group-kill-region
1288 Kill all groups in the region (@code{gnus-group-kill-region}). 
1289
1290 @item S z
1291 @kindex S z (Group)
1292 @findex gnus-group-kill-all-zombies
1293 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
1294
1295 @item S C-k
1296 @kindex S C-k (Group)
1297 @findex gnus-group-kill-level
1298 Kill all groups on a certain level (@code{gnus-group-kill-level}).
1299 These groups can't be yanked back after killing, so this command should
1300 be used with some caution.  The only thing where this command comes in
1301 really handy is when you have a @file{.newsrc} with lots of unsubscribed
1302 groups that you want to get rid off.  @kbd{S C-k} on level @code{7} will
1303 kill off all unsubscribed groups that do not have message numbers in the
1304 @file{.newsrc} file.  
1305
1306 @end table
1307
1308 Also @pxref{Group Levels}.
1309
1310
1311 @node Group Levels
1312 @section Group Levels
1313 @cindex group level
1314
1315 All groups have a level of @dfn{subscribedness}.  For instance, if a
1316 group is on level 2, it is more subscribed than a group on level 5.  You
1317 can ask Gnus to just list groups on a given level or lower
1318 (@pxref{Listing Groups}), or to just check for new articles in groups on
1319 a given level or lower (@pxref{Scanning New Messages}).
1320
1321 Remember:  The higher the level of the group, the less important it is. 
1322
1323 @table @kbd
1324
1325 @item S l
1326 @kindex S l (Group)
1327 @findex gnus-group-set-current-level
1328 Set the level of the current group.  If a numeric prefix is given, the
1329 next @var{n} groups will have their levels set.  The user will be
1330 prompted for a level.
1331 @end table
1332
1333 @vindex gnus-level-killed
1334 @vindex gnus-level-zombie
1335 @vindex gnus-level-unsubscribed
1336 @vindex gnus-level-subscribed
1337 Gnus considers groups on between levels 1 and
1338 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
1339 @code{gnus-level-subscribed} (exclusive) and
1340 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
1341 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
1342 (default 8) and @code{gnus-level-killed} to be killed (default 9),
1343 completely dead.  Gnus treats subscribed and unsubscribed groups exactly
1344 the same, but zombie and killed groups have no information on what
1345 articles you have read, etc, stored.  This distinction between dead and
1346 living groups isn't done because it is nice or clever, it is done purely
1347 for reasons of efficiency.
1348
1349 It is recommended that you keep all your mail groups (if any) on quite
1350 low levels (eg. 1 or 2).
1351
1352 If you want to play with the level variables, you should show some care.
1353 Set them once, and don't touch them ever again.  Better yet, don't touch
1354 them at all unless you know exactly what you're doing.
1355
1356 @vindex gnus-level-default-unsubscribed
1357 @vindex gnus-level-default-subscribed
1358 Two closely related variables are @code{gnus-level-default-subscribed}
1359 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
1360 which are the levels that new groups will be put on if they are
1361 (un)subscribed.  These two variables should, of course, be inside the
1362 relevant legal ranges.
1363
1364 @vindex gnus-keep-same-level
1365 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
1366 will only move to groups that are of the same level (or lower).  In
1367 particular, going from the last article in one group to the next group
1368 will go to the next group of the same level (or lower).  This might be
1369 handy if you want to read the most important groups before you read the
1370 rest.
1371
1372 @vindex gnus-group-default-list-level
1373 All groups with a level less than or equal to
1374 @code{gnus-group-default-list-level} will be listed in the group buffer
1375 by default.
1376
1377 @vindex gnus-group-list-inactive-groups
1378 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
1379 groups will be listed along with the unread groups.  This variable is
1380 @code{t} by default.  If it is @code{nil}, inactive groups won't be
1381 listed. 
1382
1383 @vindex gnus-group-use-permanent-levels
1384 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
1385 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
1386 use this level as the ``work'' level.
1387
1388 @vindex gnus-activate-level
1389 Gnus will normally just activate groups that are on level
1390 @code{gnus-activate-level} or less.  If you don't want to activate
1391 unsubscribed groups, for instance, you might set this variable to
1392 @code{5}. 
1393
1394
1395 @node Group Score
1396 @section Group Score
1397 @cindex group score
1398
1399 You would normally keep important groups on high levels, but that scheme
1400 is somewhat restrictive.  Don't you wish you could have Gnus sort the
1401 group buffer according to how often you read groups, perhaps?  Within
1402 reason?  
1403
1404 This is what @dfn{group score} is for.  You can assign a score to each
1405 group.  You can then sort the group buffer based on this score.
1406 Alternatively, you can sort on score and then level.  (Taken together,
1407 the level and the score is called the @dfn{rank} of the group.  A group
1408 that is on level 4 and has a score of 1 has a higher rank than a group
1409 on level 5 that has a score of 300.  (The level is the most significant
1410 part and the score is the least significant part.)
1411
1412 @findex gnus-summary-bubble-group
1413 If you want groups you read often to get higher scores than groups you
1414 read seldom you can add the @code{gnus-summary-bubble-group} function to
1415 the @code{gnus-summary-exit-hook} hook.  This will result (after
1416 sorting) in a bubbling sort of action.  If you want to see that in
1417 action after each summary exit, you can add
1418 @code{gnus-group-sort-groups-by-rank} or
1419 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
1420 slow things down somewhat.
1421
1422
1423 @node Marking Groups
1424 @section Marking Groups
1425 @cindex marking groups
1426
1427 If you want to perform some command on several groups, and they appear
1428 subsequently in the group buffer, you would normally just give a
1429 numerical prefix to the command.  Most group commands will then do your
1430 bidding on those groups.
1431
1432 However, if the groups are not in sequential order, you can still
1433 perform a command on several groups.  You simply mark the groups first
1434 with the process mark and then execute the command.
1435
1436 @table @kbd
1437
1438 @item #
1439 @kindex # (Group)
1440 @itemx M m
1441 @kindex M m (Group)
1442 @findex gnus-group-mark-group
1443 Set the mark on the current group (@code{gnus-group-mark-group}). 
1444
1445 @item M-#
1446 @kindex M-# (Group)
1447 @itemx M u
1448 @kindex M u (Group)
1449 @findex gnus-group-unmark-group
1450 Remove the mark from the current group
1451 (@code{gnus-group-unmark-group}). 
1452
1453 @item M U
1454 @kindex M U (Group)
1455 @findex gnus-group-unmark-all-groups
1456 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}). 
1457
1458 @item M w
1459 @kindex M w (Group)
1460 @findex gnus-group-mark-region
1461 Mark all groups between point and mark (@code{gnus-group-mark-region}). 
1462
1463 @item M b
1464 @kindex M b (Group)
1465 @findex gnus-group-mark-buffer
1466 Mark all groups in the buffer (@code{gnus-group-mark-buffer}). 
1467
1468 @item M r
1469 @kindex M r (Group)
1470 @findex gnus-group-mark-regexp
1471 Mark all groups that match some regular expression
1472 (@code{gnus-group-mark-regexp}).  
1473 @end table
1474
1475 Also @pxref{Process/Prefix}.
1476
1477 @findex gnus-group-universal-argument
1478 If you want to execute some command on all groups that have been marked
1479 with the process mark, you can use the @kbd{M-&}
1480 (@code{gnus-group-universal-argument}) command.  It will prompt you for
1481 the command to be executed.
1482
1483
1484 @node Foreign Groups
1485 @section Foreign Groups
1486
1487 Here are some group mode commands for making and editing general foreign
1488 groups, as well as commands to ease the creation of a few
1489 special-purpose groups:
1490
1491 @table @kbd
1492
1493 @item G m
1494 @kindex G m (Group)
1495 @findex gnus-group-make-group
1496 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
1497 for a name, a method and possibly an @dfn{address}.  For an easier way
1498 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
1499
1500 @item G r
1501 @kindex G r (Group)
1502 @findex gnus-group-rename-group
1503 Rename the current group to something else
1504 (@code{gnus-group-rename-group}).  This is legal only on some
1505 groups---mail groups mostly.  This command might very well be quite slow
1506 on some backends.
1507
1508 @item G e
1509 @kindex G e (Group)
1510 @findex gnus-group-edit-group-method
1511 Enter a buffer where you can edit the select method of the current
1512 group (@code{gnus-group-edit-group-method}).
1513
1514 @item G p
1515 @kindex G p (Group)
1516 @findex gnus-group-edit-group-parameters
1517 Enter a buffer where you can edit the group parameters
1518 (@code{gnus-group-edit-group-parameters}). 
1519
1520 @item G E
1521 @kindex G E (Group)
1522 @findex gnus-group-edit-group
1523 Enter a buffer where you can edit the group info
1524 (@code{gnus-group-edit-group}).
1525
1526 @item G d
1527 @kindex G d (Group)
1528 @findex gnus-group-make-directory-group
1529 Make a directory group.  You will be prompted for a directory name
1530 (@code{gnus-group-make-directory-group}).  
1531
1532 @item G h 
1533 @kindex G h (Group)
1534 @findex gnus-group-make-help-group
1535 Make the Gnus help group (@code{gnus-group-make-help-group}).
1536
1537 @item G a
1538 @kindex G a (Group)
1539 @findex gnus-group-make-archive-group
1540 @vindex gnus-group-archive-directory
1541 @vindex gnus-group-recent-archive-directory
1542 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
1543 default a group pointing to the most recent articles will be created
1544 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
1545 group will be created from @code{gnus-group-archive-directory}.
1546
1547 @item G k
1548 @kindex G k (Group)
1549 @findex gnus-group-make-kiboze-group
1550 Make a kiboze group.  You will be prompted for a name, for a regexp to
1551 match groups to be ``included'' in the kiboze group, and a series of
1552 strings to match on headers (@code{gnus-group-make-kiboze-group}).
1553 @xref{Kibozed Groups}
1554
1555 @item G D
1556 @kindex G D (Group)
1557 @findex gnus-group-enter-directory
1558 Read an arbitrary directory as if with were a newsgroup with the
1559 @code{nneething} backend (@code{gnus-group-enter-directory}).
1560
1561 @item G f
1562 @kindex G f (Group)
1563 @findex gnus-group-make-doc-group
1564 @cindex ClariNet Briefs
1565 Make a group based on some file or other
1566 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
1567 command, you will be prompted for a file name and a file type.
1568 Currently supported types are @code{babyl}, @code{mbox}, @code{digest},
1569 @code{mmdf}, @code{news}, @code{rnews}, @code{clari-briefs}, and
1570 @code{forward}.  If you run this command without a prefix, Gnus will
1571 guess at the file type.
1572
1573 @item G DEL
1574 @kindex G DEL (Group)
1575 @findex gnus-group-delete-group
1576 This function will delete the current group
1577 (@code{gnus-group-delete-group}).  If given a prefix, this function will
1578 actually delete all the articles in the group, and forcibly remove the
1579 group itself from the face of the Earth.  Use a prefix only if you are
1580 absolutely sure of what you are doing.
1581
1582 @item G V
1583 @kindex G V (Group)
1584 @findex gnus-group-make-empty-virtual
1585 Make a new, fresh, empty @code{nnvirtual} group
1586 (@code{gnus-group-make-empty-virtual}).
1587
1588 @item G v
1589 @kindex G v (Group)
1590 @findex gnus-group-add-to-virtual
1591 Add the current group to an @code{nnvirtual} group
1592 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
1593 @end table
1594
1595 @xref{Select Methods} for more information on the various select
1596 methods. 
1597
1598 @vindex gnus-activate-foreign-newsgroups
1599 If the @code{gnus-activate-foreign-newsgroups} is a positive number,
1600 Gnus will check all foreign groups with this level or lower at startup.
1601 This might take quite a while, especially if you subscribe to lots of
1602 groups from different @sc{nntp} servers.
1603
1604
1605 @node Group Parameters
1606 @section Group Parameters
1607 @cindex group parameters
1608
1609 Gnus stores all information on a group in a list that is usually known
1610 as the @dfn{group info}.  This list has from three to six elements.
1611 Here's an example info.
1612
1613 @lisp
1614 ("nnml:mail.ding" 3 ((1 . 232) 244 (256 . 270)) ((tick 246 249))
1615                   (nnml "private") ((to-address . "ding@@ifi.uio.no")))
1616 @end lisp
1617
1618 The first element is the @dfn{group name}, as Gnus knows the group,
1619 anyway.  The second element is the @dfn{subscription level}, which
1620 normally is a small integer.  The third element is a list of ranges of
1621 read articles.  The fourth element is a list of lists of article marks
1622 of various kinds.  The fifth element is the select method (or virtual
1623 server, if you like).  The sixth element is a list of @dfn{group
1624 parameters}, which is what this section is about.
1625
1626 Any of the last three elements may be missing if they are not required.
1627 In fact, the vast majority of groups will normally only have the first
1628 three elements, which saves quite a lot of cons cells.
1629
1630 The group parameters store information local to a particular group:
1631
1632 @table @code
1633 @item to-address
1634 @cindex to-address
1635 If the group parameter list contains an element that looks like
1636 @code{(to-address .  "some@@where.com")}, that address will be used by
1637 the backend when doing followups and posts.  This is primarily useful in
1638 mail groups that represent closed mailing lists---mailing lists where
1639 it's expected that everybody that writes to the mailing list is
1640 subscribed to it.  Since using this parameter ensures that the mail only
1641 goes to the mailing list itself, it means that members won't receive two
1642 copies of your followups.
1643
1644 Using @code{to-address} will actually work whether the group is foreign
1645 or not.  Let's say there's a group on the server that is called
1646 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
1647 the articles from a mail-to-news gateway.  Posting directly to this
1648 group is therefore impossible---you have to send mail to the mailing
1649 list address instead. 
1650
1651 @item to-list
1652 @cindex to-list
1653 If the group parameter list has an element that looks like
1654 @code{(to-list . "some@@where.com")}, that address will be used when
1655 doing a @kbd{a} in any group.  It is totally ignored when doing a
1656 followup---except that if it is present in a news group, you'll get mail
1657 group semantics when doing @kbd{f}.
1658
1659 @item broken-reply-to
1660 @cindex broken-reply-to
1661 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
1662 headers in this group are to be ignored.  This can be useful if you're
1663 reading a mailing list group where the listserv has inserted
1664 @code{Reply-To} headers that point back to the listserv itself.  This is
1665 broken behavior.  So there!
1666
1667 @item to-group
1668 @cindex to-group
1669 If the group parameter list contains an element like @code{(to-group
1670 . "some.group.name")}, all posts will be sent to that group.
1671
1672 @item auto-expire
1673 @cindex auto-expire
1674 If this symbol is present in the group parameter list, all articles that
1675 are read will be marked as expirable.  For an alternative approach,
1676 @pxref{Expiring Mail}.
1677
1678 @item total-expire
1679 @cindex total-expire
1680 If this symbol is present, all read articles will be put through the
1681 expiry process, even if they are not marked as expirable.  Use with
1682 caution. 
1683
1684 @item expiry-wait
1685 @cindex expiry-wait
1686 @vindex nnmail-expiry-wait-function
1687 If the group parameter has an element that looks like @code{(expiry-wait
1688 . 10)}, this value will override any @code{nnmail-expiry-wait} and
1689 @code{nnmail-expiry-wait-function} when expiring expirable messages.
1690 The value can either be a number of days (not necessarily an integer) or
1691 the symbols @code{never} or @code{immediate}.
1692
1693 @item score-file
1694 Elements that look like @code{(score-file . "file")} will make
1695 @samp{file} into the current score file for the group in question.  This
1696 means that all score commands you issue will end up in that file. 
1697
1698 @item admin-address
1699 When unsubscribing to a mailing list you should never send the
1700 unsubscription notice to the mailing list itself.  Instead, you'd send
1701 messages to the administrative address.  This parameter allows you to
1702 put the admin address somewhere convenient.
1703
1704 @item comment
1705 This parameter allows you to enter a arbitrary comment on the group.
1706
1707 @item @var{(variable form)}
1708 You can use the group parameters to set variables local to the group you
1709 are entering.  Say you want to turn threading off in
1710 @samp{news.answers}.  You'd then put @code{(gnus-show-threads nil)} in
1711 the group parameters of that group.  @code{gnus-show-threads} will be
1712 made into a local variable in the summary buffer you enter, and the form
1713 @code{nil} will be @code{eval}ed there.  
1714
1715 This can also be used as a group-specific hook function, if you'd like.
1716 If you want to hear a beep when you enter the group
1717 @samp{alt.binaries.pictures.furniture}, you could put something like
1718 @code{(dummy-variable (ding))} in the parameters of that group.
1719 @code{dummy-variable} will be set to the result of the @code{(ding)}
1720 form, but who cares?
1721
1722 @end table
1723
1724 If you want to change the group info you can use the @kbd{G E} command
1725 to enter a buffer where you can edit it.
1726
1727 You usually don't want to edit the entire group info, so you'd be better
1728 off using the @kbd{G p} command to just edit the group parameters.
1729
1730
1731 @node Listing Groups
1732 @section Listing Groups
1733 @cindex group listing
1734
1735 These commands all list various slices of the groups that are available.
1736
1737 @table @kbd
1738
1739 @item l
1740 @itemx A s
1741 @kindex A s (Group)
1742 @kindex l (Group)
1743 @findex gnus-group-list-groups
1744 List all groups that have unread articles
1745 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
1746 command will list only groups of level ARG and lower.  By default, it
1747 only lists groups of level five or lower (i.e., just subscribed groups).
1748
1749 @item L
1750 @itemx A u
1751 @kindex A u (Group)
1752 @kindex L (Group)
1753 @findex gnus-group-list-all-groups
1754 List all groups, whether they have unread articles or not
1755 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
1756 this command will list only groups of level ARG and lower.  By default,
1757 it lists groups of level seven or lower (i.e., just subscribed and
1758 unsubscribed groups).
1759
1760 @item A l
1761 @kindex A l (Group)
1762 @findex gnus-group-list-level
1763 List all unread groups on a specific level
1764 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
1765 with no unread articles.
1766
1767 @item A k
1768 @kindex A k (Group)
1769 @findex gnus-group-list-killed
1770 List all killed groups (@code{gnus-group-list-killed}).  If given a
1771 prefix argument, really list all groups that are available, but aren't
1772 currently (un)subscribed.  This could entail reading the active file
1773 from the server.
1774
1775 @item A z
1776 @kindex A z (Group)
1777 @findex gnus-group-list-zombies
1778 List all zombie groups (@code{gnus-group-list-zombies}).
1779
1780 @item A m
1781 @kindex A m (Group)
1782 @findex gnus-group-list-matching
1783 List all unread, subscribed groups with names that match a regexp
1784 (@code{gnus-group-list-matching}). 
1785
1786 @item A M
1787 @kindex A M (Group)
1788 @findex gnus-group-list-all-matching
1789 List groups that match a regexp (@code{gnus-group-list-all-matching}).
1790
1791 @item A A
1792 @kindex A A (Group)
1793 @findex gnus-group-list-active
1794 List absolutely all groups that are in the active file(s) of the
1795 server(s) you are connected to (@code{gnus-group-list-active}).  This
1796 might very well take quite a while.  It might actually be a better idea
1797 to do a @kbd{A m} to list all matching, and just give @samp{.} as the
1798 thing to match on.
1799
1800 @item A a
1801 @kindex A a (Group)
1802 @findex gnus-group-apropos
1803 List all groups that have names that match a regexp
1804 (@code{gnus-group-apropos}).
1805
1806 @item A d
1807 @kindex A d (Group)
1808 @findex gnus-group-description-apropos
1809 List all groups that have names or descriptions that match a regexp
1810 (@code{gnus-group-description-apropos}).
1811
1812 @end table
1813
1814 @vindex gnus-permanently-visible-groups
1815 @cindex visible group parameter
1816 Groups that match the @code{gnus-permanently-visible-groups} regexp will
1817 always be shown, whether they have unread articles or not.  You can also
1818 add the @code{visible} element to the group parameters in question to
1819 get the same effect.
1820
1821 @vindex gnus-list-groups-with-ticked-articles
1822 Groups that have just ticked articles in it are normally listed in the
1823 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
1824 @code{nil}, these groups will be treated just like totally empty
1825 groups.  It is @code{t} by default.
1826
1827
1828 @node Sorting Groups
1829 @section Sorting Groups
1830 @cindex sorting groups
1831
1832 @kindex C-c C-s (Group)
1833 @findex gnus-group-sort-groups
1834 @vindex gnus-group-sort-function
1835 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
1836 group buffer according to the function(s) given by the
1837 @code{gnus-group-sort-function} variable.  Available sorting functions
1838 include: 
1839
1840 @table @code
1841
1842 @item gnus-group-sort-by-alphabet
1843 @findex gnus-group-sort-by-alphabet
1844 Sort the group names alphabetically.  This is the default.
1845
1846 @item gnus-group-sort-by-level
1847 @findex gnus-group-sort-by-level
1848 Sort by group level.
1849
1850 @item gnus-group-sort-by-score
1851 @findex gnus-group-sort-by-score
1852 Sort by group score.
1853
1854 @item gnus-group-sort-by-rank
1855 @findex gnus-group-sort-by-rank
1856 Sort by group score and then the group level.  The level and the score
1857 are, when taken together, the group's @dfn{rank}. 
1858
1859 @item gnus-group-sort-by-unread
1860 @findex gnus-group-sort-by-unread
1861 Sort by number of unread articles.
1862
1863 @item gnus-group-sort-by-method
1864 @findex gnus-group-sort-by-method
1865 Sort by alphabetically on the select method.
1866
1867
1868 @end table
1869
1870 @code{gnus-group-sort-function} can also be a list of sorting
1871 functions.  In that case, the most significant sort key function must be
1872 the last one.
1873
1874
1875 There are also a number of commands for sorting directly according to
1876 some sorting criteria:
1877
1878 @table @kbd
1879 @item G S a
1880 @kindex G S a (Group)
1881 @findex gnus-group-sort-groups-by-alphabet
1882 Sort the group buffer alphabetically by group name
1883 (@code{gnus-group-sort-groups-by-alphabet}). 
1884
1885 @item G S u
1886 @kindex G S u (Group)
1887 @findex gnus-group-sort-groups-by-unread
1888 Sort the group buffer by the number of unread articles
1889 (@code{gnus-group-sort-groups-by-unread}).
1890
1891 @item G S l
1892 @kindex G S l (Group)
1893 @findex gnus-group-sort-groups-by-level
1894 Sort the group buffer by group level
1895 (@code{gnus-group-sort-groups-by-level}). 
1896
1897 @item G S v
1898 @kindex G S v (Group)
1899 @findex gnus-group-sort-groups-by-score
1900 Sort the group buffer by group score
1901 (@code{gnus-group-sort-groups-by-score}). 
1902
1903 @item G S r
1904 @kindex G S r (Group)
1905 @findex gnus-group-sort-groups-by-rank
1906 Sort the group buffer by group level
1907 (@code{gnus-group-sort-groups-by-rank}). 
1908
1909 @item G S m
1910 @kindex G S m (Group)
1911 @findex gnus-group-sort-groups-by-method
1912 Sort the group buffer alphabetically by backend name
1913 (@code{gnus-group-sort-groups-by-method}). 
1914
1915 @end table
1916
1917 When given a prefix, all these commands will sort in reverse order. 
1918
1919
1920 @node Group Maintenance
1921 @section Group Maintenance
1922 @cindex bogus groups
1923
1924 @table @kbd
1925 @item b
1926 @kindex b (Group)
1927 @findex gnus-group-check-bogus-groups
1928 Find bogus groups and delete them
1929 (@code{gnus-group-check-bogus-groups}).
1930
1931 @item F
1932 @kindex F (Group)
1933 @findex gnus-find-new-newsgroups
1934 Find new groups and process them (@code{gnus-find-new-newsgroups}).  If
1935 given a prefix, use the @code{ask-server} method to query the server for
1936 new groups.
1937
1938 @item C-c C-x
1939 @kindex C-c C-x (Group)
1940 @findex gnus-group-expire-articles
1941 Run all expirable articles in the current group through the expiry
1942 process (if any) (@code{gnus-group-expire-articles}).
1943
1944 @item C-c M-C-x
1945 @kindex C-c M-C-x (Group)
1946 @findex gnus-group-expire-all-groups
1947 Run all articles in all groups through the expiry process
1948 (@code{gnus-group-expire-all-groups}).
1949
1950 @end table
1951
1952
1953 @node Browse Foreign Server
1954 @section Browse Foreign Server
1955 @cindex foreign servers
1956 @cindex browsing servers
1957
1958 @table @kbd
1959 @item B
1960 @kindex B (Group)
1961 @findex gnus-group-browse-foreign-server
1962 You will be queried for a select method and a server name.  Gnus will
1963 then attempt to contact this server and let you browse the groups there
1964 (@code{gnus-group-browse-foreign-server}).
1965 @end table
1966
1967 @findex gnus-browse-mode
1968 A new buffer with a list of available groups will appear.  This buffer
1969 will be use the @code{gnus-browse-mode}.  This buffer looks a bit
1970 (well, a lot) like a normal group buffer, but with one major difference
1971 - you can't enter any of the groups.  If you want to read any of the
1972 news available on that server, you have to subscribe to the groups you
1973 think may be interesting, and then you have to exit this buffer.  The
1974 new groups will be added to the group buffer, and then you can read them
1975 as you would any other group.
1976
1977 Future versions of Gnus may possibly permit reading groups straight from
1978 the browse buffer.
1979
1980 Here's a list of keystrokes available in the browse mode:
1981
1982 @table @kbd
1983 @item n
1984 @kindex n (Browse)
1985 @findex gnus-group-next-group
1986 Go to the next group (@code{gnus-group-next-group}).
1987
1988 @item p
1989 @kindex p (Browse)
1990 @findex gnus-group-prev-group
1991 Go to the previous group (@code{gnus-group-prev-group}).
1992
1993 @item SPACE
1994 @kindex SPACE (Browse)
1995 @findex gnus-browse-read-group
1996 Enter the current group and display the first article
1997 (@code{gnus-browse-read-group}). 
1998
1999 @item RET
2000 @kindex RET (Browse)
2001 @findex gnus-browse-select-group
2002 Enter the current group (@code{gnus-browse-select-group}). 
2003
2004 @item u
2005 @kindex u (Browse)
2006 @findex gnus-browse-unsubscribe-current-group
2007 Unsubscribe to the current group, or, as will be the case here,
2008 subscribe to it (@code{gnus-browse-unsubscribe-current-group}). 
2009
2010 @item l
2011 @itemx q
2012 @kindex q (Browse)
2013 @kindex l (Browse)
2014 @findex gnus-browse-exit
2015 Exit browse mode (@code{gnus-browse-exit}).
2016
2017 @item ?
2018 @kindex ? (Browse)
2019 @findex gnus-browse-describe-briefly
2020 Describe browse mode briefly (well, there's not much to describe, is
2021 there) (@code{gnus-browse-describe-briefly}).
2022 @end table
2023
2024
2025 @node Exiting Gnus
2026 @section Exiting Gnus
2027 @cindex exiting Gnus
2028
2029 Yes, Gnus is ex(c)iting.
2030
2031 @table @kbd
2032 @item z
2033 @kindex z (Group)
2034 @findex gnus-group-suspend
2035 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
2036 but it kills all buffers except the Group buffer.  I'm not sure why this
2037 is a gain, but then who am I to judge?
2038
2039 @item q
2040 @kindex q (Group)
2041 @findex gnus-group-exit
2042 Quit Gnus (@code{gnus-group-exit}).
2043
2044 @item Q
2045 @kindex Q (Group)
2046 @findex gnus-group-quit
2047 Quit Gnus without saving any startup files (@code{gnus-group-quit}).
2048 @end table
2049
2050 @vindex gnus-exit-gnus-hook
2051 @vindex gnus-suspend-gnus-hook
2052 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
2053 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
2054 @code{gnus-after-exiting-gnus-hook} is called as the final item when
2055 exiting Gnus.
2056
2057 @findex gnus-unload
2058 @cindex unloading
2059 If you wish to completely unload Gnus and all its adherents, you can use
2060 the @code{gnus-unload} command.  This command is also very handy when
2061 trying to customize meta-variables.
2062
2063 Note:
2064
2065 @quotation
2066 Miss Lisa Cannifax, while sitting in English class, feels her feet go
2067 numbly heavy and herself fall into a hazy trance as the boy sitting
2068 behind her drew repeated lines with his pencil across the back of her
2069 plastic chair.
2070 @end quotation
2071
2072
2073 @node Group Topics
2074 @section Group Topics
2075 @cindex topics
2076
2077 If you read lots and lots of groups, it might be convenient to group
2078 them hierarchically according to topics.  You put your Emacs groups over
2079 here, your sex groups over there, and the rest (what, two groups or so?)
2080 you put in some misc section that you never bother with anyway.  You can
2081 even group the Emacs sex groups as a sub-topic to either the Emacs
2082 groups or the sex groups---or both!  Go wild!
2083
2084 @findex gnus-topic-mode
2085 @kindex t (Group)
2086 To get this @emph{fab} functionality you simply turn on (ooh!) the
2087 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
2088 is a toggling command.)
2089
2090 Go ahead, just try it.  I'll still be here when you get back.  La de
2091 dum...  Nice tune, that...  la la la...  What, you're back? Yes, and now
2092 press @kbd{l}.  There.  All your groups are now listed under
2093 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
2094 bothered?
2095
2096 If you want this permanently enabled, you should add that minor mode to
2097 the hook for the group mode:
2098
2099 @lisp
2100 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
2101 @end lisp
2102
2103 @menu 
2104 * Topic Variables::    How to customize the topics the Lisp Way.
2105 * Topic Commands::     Interactive E-Z commands.
2106 * Topic Topology::     A map of the world.
2107 @end menu
2108
2109
2110 @node Topic Variables
2111 @subsection Topic Variables
2112 @cindex topic variables
2113
2114 Now, if you select a topic, if will fold/unfold that topic, which is
2115 really neat, I think.
2116
2117 @vindex gnus-topic-line-format
2118 The topic lines themselves are created according to the
2119 @code{gnus-topic-line-format} variable.  @xref{Formatting Variables}.
2120 Elements allowed are:
2121
2122 @table @samp
2123 @item i
2124 Indentation.
2125 @item n
2126 Topic name.
2127 @item v
2128 Visibility.
2129 @item l
2130 Level.
2131 @item g
2132 Number of groups in the topic.
2133 @item a
2134 Number of unread articles in the topic.
2135 @item A 
2136 Number of unread articles in the topic and all its subtopics. 
2137 @end table
2138
2139 @vindex gnus-topic-indent-level
2140 Each sub-topic (and the groups in the sub-topics) will be indented with
2141 @code{gnus-topic-indent-level} times the topic level number of spaces.
2142 The default is @code{2}.
2143
2144 @vindex gnus-topic-mode-hook
2145 @code{gnus-topic-mode-hook} is called in topic minor mode buffers. 
2146
2147
2148 @node Topic Commands
2149 @subsection Topic Commands
2150 @cindex topic commands
2151
2152 When the topic minor mode is turned on, a new @kbd{T} submap will be
2153 available.  In addition, a few of the standard keys change their
2154 definitions slightly.
2155
2156 @table @kbd
2157
2158 @item T n
2159 @kindex T n (Group)
2160 @findex gnus-topic-create-topic
2161 Prompt for a new topic name and create it 
2162 (@code{gnus-topic-create-topic}). 
2163
2164 @item T m
2165 @kindex T m (Group)
2166 @findex gnus-topic-move-group
2167 Move the current group to some other topic
2168 (@code{gnus-topic-move-group}).  This command understands the
2169 process/prefix convention (@pxref{Process/Prefix}).
2170
2171 @item T c
2172 @kindex T c (Group)
2173 @findex gnus-topic-copy-group
2174 Copy the current group to some other topic
2175 (@code{gnus-topic-copy-group}).  This command understands the
2176 process/prefix convention (@pxref{Process/Prefix}).
2177
2178 @item T D
2179 @kindex T D (Group)
2180 @findex gnus-topic-remove-group
2181 Remove a group from the current topic (@code{gnus-topic-remove-group}).
2182 This command understands the process/prefix convention
2183 (@pxref{Process/Prefix}).
2184
2185 @item T M
2186 @kindex T M (Group)
2187 @findex gnus-topic-move-matching
2188 Move all groups that match some regular expression to a topic
2189 (@code{gnus-topic-move-matching}). 
2190
2191 @item T C
2192 @kindex T C (Group)
2193 @findex gnus-topic-copy-matching
2194 Copy all groups that match some regular expression to a topic
2195 (@code{gnus-topic-copy-matching}). 
2196
2197 @item T #
2198 @kindex T # (Group)
2199 @findex gnus-topic-mark-topic
2200 Mark all groups in the current topic with the process mark
2201 (@code{gnus-topic-mark-topic}). 
2202
2203 @item T M-#
2204 @kindex T M-# (Group)
2205 @findex gnus-topic-unmark-topic
2206 Remove the process mark from all groups in the current topic
2207 (@code{gnus-topic-unmark-topic}). 
2208
2209 @item RET
2210 @kindex RET (Group)
2211 @findex gnus-topic-select-group
2212 @itemx SPACE
2213 Either select a group or fold a topic (@code{gnus-topic-select-group}).
2214 When you perform this command on a group, you'll enter the group, as
2215 usual.  When done on a topic line, the topic will be folded (if it was
2216 visible) or unfolded (if it was folded already).  So it's basically a
2217 toggling command on topics.  In addition, if you give a numerical
2218 prefix, group on that level (and lower) will be displayed.
2219
2220 @item T TAB
2221 @kindex T TAB (Group)
2222 @findex gnus-topic-indent
2223 ``Indent'' the current topic so that it becomes a sub-topic of the
2224 previous topic (@code{gnus-topic-indent}).  If given a prefix,
2225 ``un-indent'' the topic instead.
2226
2227 @item C-k
2228 @kindex C-k (Group)
2229 @findex gnus-topic-kill-group
2230 Kill a group or topic (@code{gnus-topic-kill-group}).  
2231
2232 @item C-y
2233 @kindex C-y (Group)
2234 @findex gnus-topic-yank-group
2235 Yank the previously killed group or topic (@code{gnus-topic-yank-group}).
2236 Note that all topics will be yanked before all groups.
2237
2238 @item T r
2239 @kindex T r (Group)
2240 @findex gnus-topic-rename
2241 Rename a topic (@code{gnus-topic-rename}). 
2242
2243 @item T DEL
2244 @kindex T DEL (Group)
2245 @findex gnus-topic-delete
2246 Delete an empty topic (@code{gnus-topic-delete}). 
2247
2248 @item A T
2249 @kindex A T (Group)
2250 @findex gnus-topic-list-active
2251 List all groups that Gnus knows about in a topics-ified way
2252 (@code{gnus-topic-list-active}).
2253
2254 @end table
2255
2256
2257 @node Topic Topology
2258 @subsection Topic Topology
2259 @cindex topic topology
2260 @cindex topology
2261
2262 So, let's have a look at an example group buffer:
2263
2264 @example
2265 Gnus
2266   Emacs -- I wuw it!
2267        3: comp.emacs
2268        2: alt.religion.emacs
2269     Naughty Emacs
2270      452: alt.sex.emacs
2271        0: comp.talk.emacs.recovery
2272   Misc
2273        8: comp.binaries.fractals
2274       13: comp.sources.unix
2275 @end example
2276
2277 So, here we have one top-level topic, two topics under that, and one
2278 sub-topic under one of the sub-topics.  (There is always just one (1)
2279 top-level topic).  This topology can be expressed as follows:
2280
2281 @lisp
2282 (("Gnus" visible)
2283  (("Emacs -- I wuw it!" visible) 
2284   (("Naughty Emacs" visible)))
2285  (("Misc" visible)))
2286 @end lisp
2287
2288 @vindex gnus-topic-topology
2289 This is in fact how the variable @code{gnus-topic-topology} would look
2290 for the display above.  That variable is saved in the @file{.newsrc.eld}
2291 file, and shouldn't be messed with manually---unless you really want
2292 to.  Since this variable is read from the @file{.newsrc.eld} file,
2293 setting it in any other startup files will have no effect.  
2294
2295 This topology shows what topics are sub-topics of what topics (right),
2296 and which topics are visible.  Two settings are currently
2297 allowed---@code{visible} and @code{invisible}.
2298
2299
2300 @node Misc Group Stuff
2301 @section Misc Group Stuff
2302
2303 @menu
2304 * Scanning New Messages:: Asking Gnus to see whether new messages have arrived.
2305 * Group Information::     Information and help on groups and Gnus.
2306 * File Commands::         Reading and writing the Gnus files.
2307 @end menu
2308
2309 @table @kbd
2310
2311 @item ^
2312 @kindex ^ (Group)
2313 @findex gnus-group-enter-server-mode
2314 Enter the server buffer (@code{gnus-group-enter-server-mode}). @xref{The
2315 Server Buffer}.
2316
2317 @item a
2318 @kindex a (Group)
2319 @findex gnus-group-post-news
2320 Post an article to a group (@code{gnus-group-post-news}).  The current
2321 group name will be used as the default.
2322
2323 @item m
2324 @kindex m (Group)
2325 @findex gnus-group-mail
2326 Mail a message somewhere (@code{gnus-group-mail}).
2327
2328 @end table
2329
2330 Variables for the group buffer:
2331
2332 @table @code
2333
2334 @item gnus-group-mode-hook
2335 @vindex gnus-group-mode-hook
2336 @code{gnus-group-mode-hook} is called after the group buffer has been
2337 created. 
2338
2339 @item gnus-group-prepare-hook
2340 @vindex gnus-group-prepare-hook
2341 @code{gnus-group-prepare-hook} is called after the group buffer is
2342 generated.  It may be used to modify the buffer in some strange,
2343 unnatural way.
2344
2345 @item gnus-permanently-visible-groups
2346 @vindex gnus-permanently-visible-groups
2347 Groups matching this regexp will always be listed in the group buffer,
2348 whether they are empty or not.
2349
2350 @end table
2351
2352
2353 @node Scanning New Messages
2354 @subsection Scanning New Messages
2355 @cindex new messages
2356 @cindex scanning new news
2357
2358 @table @kbd
2359
2360 @item g
2361 @kindex g (Group)
2362 @findex gnus-group-get-new-news
2363 Check the server(s) for new articles.  If the numerical prefix is used,
2364 this command will check only groups of level @var{arg} and lower
2365 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
2366 command will force a total rereading of the active file(s) from the
2367 backend(s).
2368
2369 @item M-g
2370 @kindex M-g (Group)
2371 @findex gnus-group-get-new-news-this-group
2372 @vindex gnus-goto-next-group-when-activating
2373 Check whether new articles have arrived in the current group
2374 (@code{gnus-group-get-new-news-this-group}).  The
2375 @code{gnus-goto-next-group-when-activating} variable controls whether
2376 this command is to move point to the next group or not.  It is @code{t}
2377 by default.
2378
2379 @findex gnus-activate-all-groups
2380 @cindex activating groups
2381 @item C-c M-g
2382 @kindex C-c M-g (Group)
2383 Activate absolutely all groups (@code{gnus-activate-all-groups}). 
2384
2385 @item R
2386 @kindex R (Group)
2387 @cindex restarting
2388 @findex gnus-group-restart
2389 Restart Gnus (@code{gnus-group-restart}).
2390
2391 @end table
2392
2393 @vindex gnus-get-new-news-hook
2394 @code{gnus-get-new-news-hook} is run just before checking for new news. 
2395
2396 @vindex gnus-after-getting-new-news-hook
2397 @code{gnus-after-getting-new-news-hook} is run after checking for new
2398 news.
2399
2400
2401 @node Group Information
2402 @subsection Group Information
2403 @cindex group information
2404 @cindex information on groups
2405
2406 @table @kbd
2407
2408 @item M-f
2409 @kindex M-f (Group)
2410 @findex gnus-group-fetch-faq
2411 @cindex FAQ
2412 @cindex ange-ftp
2413 Try to fetch the FAQ for the current group
2414 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
2415 @code{gnus-group-faq-directory}, which is usually a directory on a
2416 remote machine.  @code{ange-ftp} will be used for fetching the file.
2417
2418 @item D
2419 @kindex D (Group)
2420 @cindex describing groups
2421 @cindex group description
2422 @findex gnus-group-describe-group
2423 Describe the current group (@code{gnus-group-describe-group}).  If given
2424 a prefix, force Gnus to re-read the description from the server.
2425
2426 @item M-d
2427 @kindex M-d (Group)
2428 @findex gnus-group-describe-all-groups
2429 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
2430 prefix, force Gnus to re-read the description file from the server.
2431
2432 @item V
2433 @kindex V (Group)
2434 @cindex version
2435 @findex gnus-version
2436 Display current Gnus version numbers (@code{gnus-version}).
2437
2438 @item ?
2439 @kindex ? (Group)
2440 @findex gnus-group-describe-briefly
2441 Give a very short help message (@code{gnus-group-describe-briefly}).
2442
2443 @item C-c C-i
2444 @kindex C-c C-i (Group)
2445 @cindex info
2446 @cindex manual
2447 @findex gnus-info-find-node
2448 Go to the Gnus info node (@code{gnus-info-find-node}).
2449 @end table
2450
2451
2452 @node File Commands
2453 @subsection File Commands
2454 @cindex file commands
2455
2456 @table @kbd
2457
2458 @item r
2459 @kindex r (Group)
2460 @findex gnus-group-read-init-file
2461 @vindex gnus-init-file
2462 @cindex reading init file
2463 Read the init file (@code{gnus-init-file}, which defaults to
2464 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
2465
2466 @item s
2467 @kindex s (Group)
2468 @findex gnus-group-save-newsrc
2469 @cindex saving .newsrc
2470 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
2471 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
2472 file(s) whether Gnus thinks it is necessary or not.
2473
2474 @c @item Z
2475 @c @kindex Z (Group)
2476 @c @findex gnus-group-clear-dribble
2477 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
2478
2479 @end table
2480
2481
2482 @node The Summary Buffer
2483 @chapter The Summary Buffer
2484 @cindex summary buffer
2485
2486 A line for each article is displayed in the summary buffer.  You can
2487 move around, read articles, post articles and reply to articles.
2488
2489 @menu
2490 * Summary Buffer Format::       Deciding how the summary buffer is to look.
2491 * Summary Maneuvering::         Moving around the summary buffer.
2492 * Choosing Articles::           Reading articles.
2493 * Paging the Article::          Scrolling the current article.
2494 * Reply Followup and Post::     Posting articles.
2495 * Canceling and Superseding::   ``Whoops, I shouldn't have called him that.''
2496 * Marking Articles::            Marking articles as read, expirable, etc.
2497 * Limiting::                    You can limit the summary buffer.
2498 * Threading::                   How threads are made.
2499 * Sorting::                     How articles and threads are sorted.
2500 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
2501 * Article Caching::             You may store articles in a cache.
2502 * Persistent Articles::         Making articles expiry-resistant.
2503 * Article Backlog::             Having already read articles hang around.
2504 * Saving Articles::             Ways of customizing article saving.
2505 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
2506 * Article Treatment::           The article buffer can be mangled at will.
2507 * Summary Sorting::             Sorting the summary buffer in various ways.
2508 * Finding the Parent::          No child support? Get the parent.
2509 * Alternative Approaches::      Reading using non-default summaries.
2510 * Tree Display::                A more visual display of threads.
2511 * Mail Group Commands::         Some commands can only be used in mail groups.
2512 * Various Summary Stuff::       What didn't fit anywhere else.
2513 * Exiting the Summary Buffer::  Returning to the Group buffer.
2514 @end menu
2515
2516
2517 @node Summary Buffer Format
2518 @section Summary Buffer Format
2519 @cindex summary buffer format
2520
2521 @menu
2522 * Summary Buffer Lines::     You can specify how summary lines should look.
2523 * Summary Buffer Mode Line:: You can say how the mode line should look.
2524 * Summary Highlighting::     Making the summary buffer all pretty and nice.
2525 @end menu
2526
2527 @findex mail-extract-address-components
2528 @findex gnus-extract-address-components
2529 @vindex gnus-extract-address-components
2530 Gnus will use the value of the @code{gnus-extract-address-components}
2531 variable as a function for getting the name and address parts of a
2532 @code{From} header.  Two pre-defined function exist:
2533 @code{gnus-extract-address-components}, which is the default, quite
2534 fast, and too simplistic solution; and
2535 @code{mail-extract-address-components}, which works very nicely, but is
2536 slower.  The default function will return the wrong answer in 5% of the
2537 cases.  If this is unacceptable to you, use the other function instead.
2538
2539 @vindex gnus-summary-same-subject
2540 @code{gnus-summary-same-subject} is a string indicating that the current
2541 article has the same subject as the previous.  This string will be used
2542 with those specs that require it.  The default is @samp{}.
2543
2544
2545 @node Summary Buffer Lines
2546 @subsection Summary Buffer Lines
2547
2548 @vindex gnus-summary-line-format
2549 You can change the format of the lines in the summary buffer by changing
2550 the @code{gnus-summary-line-format} variable.  It works along the same
2551 lines a a normal @code{format} string, with some extensions.
2552
2553 The default string is @samp{%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n}.
2554
2555 The following format specification characters are understood:
2556
2557 @table @samp
2558 @item N 
2559 Article number.
2560 @item S
2561 Subject string.
2562 @item s
2563 Subject if the article is the root, @code{gnus-summary-same-subject}
2564 otherwise. 
2565 @item F
2566 Full @code{From} line.
2567 @item n
2568 The name (from the @code{From} header).
2569 @item a
2570 The name (from the @code{From} header).  This differs from the @code{n}
2571 spec in that it uses @code{gnus-extract-address-components}, which is
2572 slower, but may be more thorough.
2573 @item A
2574 The address (from the @code{From} header).  This works the same way as
2575 the @code{a} spec.
2576 @item L
2577 Number of lines in the article.
2578 @item c
2579 Number of characters in the article.
2580 @item I
2581 Indentation based on thread level (@pxref{Customizing Threading}).
2582 @item T
2583 Nothing if the article is a root and lots of spaces if it isn't (it
2584 pushes everything after it off the screen).
2585 @item \[
2586 Opening bracket, which is normally @samp{\[}, but can also be @samp{<}
2587 for adopted articles.
2588 @item \]
2589 Closing bracket, which is normally @samp{\]}, but can also be @samp{>}
2590 for adopted articles.
2591 @item >
2592 One space for each thread level.
2593 @item <
2594 Twenty minus thread level spaces.
2595 @item U
2596 Unread.
2597 @item R
2598 Replied.
2599 @item i
2600 Score as a number.
2601 @item z
2602 @vindex gnus-summary-zcore-fuzz
2603 Zcore, @samp{+} if above the default level and @samp{-} if below the
2604 default level.  If the difference between
2605 @code{gnus-summary-default-level} and the score is less than
2606 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
2607 @item V
2608 Total thread score.
2609 @item x
2610 @code{Xref}.
2611 @item D
2612 @code{Date}.
2613 @item M
2614 @code{Message-ID}.
2615 @item r
2616 @code{References}.
2617 @item t
2618 Number of articles in the current sub-thread.  Using this spec will slow
2619 down summary buffer generation somewhat.
2620 @item e
2621 A single character will be displayed if the article has any children. 
2622 @item u
2623 User defined specifier.  The next character in the format string should
2624 be a letter.  @sc{gnus} will call the function
2625 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
2626 following @samp{%u}.  The function will be passed the current header as
2627 argument.  The function should return a string, which will be inserted
2628 into the summary just like information from any other summary specifier.
2629 @end table
2630
2631 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
2632 have to be handled with care.  For reasons of efficiency, Gnus will
2633 compute what column these characters will end up in, and ``hard-code''
2634 that.  This means that it is illegal to have these specs after a
2635 variable-length spec.  Well, you might not be arrested, but your summary
2636 buffer will look strange, which is bad enough.
2637
2638 The smart choice is to have these specs as far to the left as possible.
2639 (Isn't that the case with everything, though?  But I digress.)
2640
2641 This restriction may disappear in later versions of Gnus.
2642
2643
2644 @node Summary Buffer Mode Line
2645 @subsection Summary Buffer Mode Line
2646
2647 @vindex gnus-summary-mode-line-format
2648 You can also change the format of the summary mode bar.  Set
2649 @code{gnus-summary-mode-line-format} to whatever you like.  Here are the
2650 elements you can play with:
2651
2652 @table @samp
2653 @item G
2654 Group name.
2655 @item p
2656 Unprefixed group name.
2657 @item A
2658 Current article number.
2659 @item V
2660 Gnus version.
2661 @item U
2662 Number of unread articles in this group.
2663 @item e
2664 Number of unselected articles in this group.
2665 @item Z
2666 A string with the number of unread and unselected articles represented
2667 either as @samp{<%U(+%u) more>} if there are both unread and unselected
2668 articles, and just as @samp{<%U more>} if there are just unread articles
2669 and no unselected ones.
2670 @item g
2671 Shortish group name.  For instance, @samp{rec.arts.anime} will be
2672 shortened to @samp{r.a.anime}. 
2673 @item S
2674 Subject of the current article.
2675 @item u
2676 Used-defined spec.
2677 @item s
2678 Name of the current score file.
2679 @item d
2680 Number of dormant articles.
2681 @item t
2682 Number of ticked articles.
2683 @item r
2684 Number of articles that have been marked as read in this session. 
2685 @item E
2686 Number of articles expunged by the score files.
2687 @end table
2688
2689
2690 @node Summary Highlighting
2691 @subsection Summary Highlighting
2692
2693 @table @code
2694
2695 @item gnus-visual-mark-article-hook
2696 @vindex gnus-visual-mark-article-hook
2697 This hook is run after selecting an article.  It is meant to be used for
2698 highlighting the article in some way.  It is not run if
2699 @code{gnus-visual} is @code{nil}.
2700
2701 @item gnus-summary-update-hook
2702 @vindex gnus-summary-update-hook
2703 This hook is called when a summary line is changed.  It is not run if
2704 @code{gnus-visual} is @code{nil}.
2705
2706 @item gnus-summary-selected-face
2707 @vindex gnus-summary-selected-face
2708 This is the face (or @dfn{font} as some people call it) that is used to
2709 highlight the current article in the summary buffer.
2710
2711 @item gnus-summary-highlight
2712 @vindex gnus-summary-highlight
2713 Summary lines are highlighted according to this variable, which is a
2714 list where the elements are on the format @code{(FORM . FACE)}.  If you
2715 would, for instance, like ticked articles to be italic and high-scored
2716 articles to be bold, you could set this variable to something like
2717 @lisp
2718 (((eq mark gnus-ticked-mark) . italic)
2719  ((> score default) . bold))
2720 @end lisp
2721 As you may have guessed, if @var{FORM} returns a non-@code{nil} value,
2722 @var{FACE} will be applied to the line.
2723 @end table
2724
2725
2726 @node Summary Maneuvering
2727 @section Summary Maneuvering
2728 @cindex summary movement
2729
2730 All the straight movement commands understand the numeric prefix and
2731 behave pretty much as you'd expect. 
2732
2733 None of these commands select articles.
2734
2735 @table @kbd
2736 @item G M-n
2737 @itemx M-n
2738 @kindex M-n (Summary)
2739 @kindex G M-n (Summary)
2740 @findex gnus-summary-next-unread-subject
2741 Go to the next summary line of an unread article
2742 (@code{gnus-summary-next-unread-subject}). 
2743
2744 @item G M-p
2745 @itemx M-p
2746 @kindex M-p (Summary)
2747 @kindex G M-p (Summary)
2748 @findex gnus-summary-prev-unread-subject
2749 Go to the previous summary line of an unread article
2750 (@code{gnus-summary-prev-unread-subject}). 
2751
2752 @item G j
2753 @itemx j
2754 @kindex j (Summary)
2755 @kindex G j (Summary)
2756 @findex gnus-summary-goto-article
2757 Ask for an article number and then go that article
2758 (@code{gnus-summary-goto-article}). 
2759
2760 @item G g
2761 @kindex G g (Summary)
2762 @findex gnus-summary-goto-subject
2763 Ask for an article number and then go the summary line of that article
2764 (@code{gnus-summary-goto-subject}).
2765 @end table
2766
2767 If Gnus asks you to press a key to confirm going to the next group, you
2768 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
2769 buffer, searching for the next group to read without actually returning
2770 to the group buffer.
2771
2772 Variables related to summary movement:
2773
2774 @table @code
2775
2776 @vindex gnus-auto-select-next
2777 @item gnus-auto-select-next
2778 If you are at the end of the group and issue one of the movement
2779 commands, Gnus will offer to go to the next group.  If this variable is
2780 @code{t} and the next group is empty, Gnus will exit summary mode and
2781 return to the group buffer.  If this variable is neither @code{t} nor
2782 @code{nil}, Gnus will select the next group, no matter whether it has
2783 any unread articles or not.  As a special case, if this variable is
2784 @code{quietly}, Gnus will select the next group without asking for
2785 confirmation.  If this variable is @code{almost-quietly}, the same will
2786 happen only if you are located on the last article in the group.
2787 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
2788 command will go to the next group without confirmation.  Also
2789 @pxref{Group Levels}.
2790
2791 @item gnus-auto-select-same
2792 @vindex gnus-auto-select-same
2793 If non-@code{nil}, all the movement commands will try to go to the next
2794 article with the same subject as the current.  (@dfn{Same} here might
2795 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
2796 for details (@pxref{Customizing Threading}).)  This variable is not
2797 particularly useful if you use a threaded display.
2798
2799 @item gnus-summary-check-current
2800 @vindex gnus-summary-check-current
2801 If non-@code{nil}, all the ``unread'' movement commands will not proceed
2802 to the next (or previous) article if the current article is unread.
2803 Instead, they will choose the current article.
2804
2805 @item gnus-auto-center-summary
2806 @vindex gnus-auto-center-summary
2807 If non-@code{nil}, Gnus will keep the point in the summary buffer
2808 centered at all times.  This makes things quite tidy, but if you have a
2809 slow network connection, or simply do not like this un-Emacsism, you can
2810 set this variable to @code{nil} to get the normal Emacs scrolling
2811 action.  This will also inhibit horizontal re-centering of the summary
2812 buffer, which might make it more inconvenient to read extremely long
2813 threads.
2814
2815 @end table
2816
2817
2818 @node Choosing Articles
2819 @section Choosing Articles
2820 @cindex selecting articles
2821
2822 None of the following movement commands understand the numeric prefix,
2823 and they all select and display an article.
2824
2825 @table @kbd
2826 @item SPACE
2827 @kindex SPACE (Summary)
2828 @findex gnus-summary-next-page
2829 Select the current article, or, if that one's read already, the next
2830 unread article (@code{gnus-summary-next-page}).
2831
2832 @item G n
2833 @itemx n
2834 @kindex n (Summary)
2835 @kindex G n (Summary)
2836 @findex gnus-summary-next-unread-article
2837 Go to next unread article (@code{gnus-summary-next-unread-article}).
2838
2839 @item G p
2840 @itemx p
2841 @kindex p (Summary)
2842 @findex gnus-summary-prev-unread-article
2843 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
2844
2845 @item G N
2846 @itemx N
2847 @kindex N (Summary)
2848 @kindex G N (Summary)
2849 @findex gnus-summary-next-article
2850 Go to the next article (@code{gnus-summary-next-article}).
2851
2852 @item G P
2853 @itemx P
2854 @kindex P (Summary)
2855 @kindex G P (Summary)
2856 @findex gnus-summary-prev-article
2857 Go to the previous article (@code{gnus-summary-prev-article}).
2858
2859 @item G C-n
2860 @kindex G C-n (Summary)
2861 @findex gnus-summary-next-same-subject
2862 Go to the next article with the same subject
2863 (@code{gnus-summary-next-same-subject}). 
2864
2865 @item G C-p
2866 @kindex G C-p (Summary)
2867 @findex gnus-summary-prev-same-subject
2868 Go to the previous article with the same subject
2869 (@code{gnus-summary-prev-same-subject}). 
2870
2871 @item G f
2872 @itemx .
2873 @kindex G f  (Summary)
2874 @kindex .  (Summary)
2875 @findex gnus-summary-first-unread-article
2876 Go to the first unread article
2877 (@code{gnus-summary-first-unread-article}).
2878
2879 @item G b
2880 @itemx ,
2881 @kindex G b (Summary)
2882 @kindex , (Summary)
2883 @findex gnus-summary-best-unread-article
2884 Go to the article with the highest score
2885 (@code{gnus-summary-best-unread-article}). 
2886
2887 @item G l
2888 @itemx l
2889 @kindex l (Summary)
2890 @kindex G l (Summary)
2891 @findex gnus-summary-goto-last-article
2892 Go to the previous article read (@code{gnus-summary-goto-last-article}).
2893
2894 @item G p
2895 @kindex G p (Summary)
2896 @findex gnus-summary-pop-article
2897 Pop an article off the summary history and go to this article
2898 (@code{gnus-summary-pop-article}).  This command differs from the
2899 command above in that you can pop as many previous articles off the
2900 history as you like.
2901 @end table
2902
2903 Some variables that are relevant for moving and selecting articles:
2904
2905 @table @code
2906 @item gnus-auto-extend-newsgroup
2907 @vindex gnus-auto-extend-newsgroup
2908 All the movement commands will try to go to the previous (or next)
2909 article, even if that article isn't displayed in the Summary buffer if
2910 this variable is non-@code{nil}.  Gnus will then fetch the article from
2911 the server and display it in the article buffer.
2912
2913 @item gnus-select-article-hook
2914 @vindex gnus-select-article-hook
2915 This hook is called whenever an article is selected.  By default it
2916 exposes any threads hidden under the selected article.
2917
2918 @item gnus-mark-article-hook
2919 @vindex gnus-mark-article-hook
2920 @findex gnus-summary-mark-unread-as-read
2921 @findex gnus-summary-mark-read-and-unread-as-read
2922 @findex gnus-unread-mark
2923 This hook is called whenever an article is selected.  It is intended to
2924 be used for marking articles as read.  The default value is
2925 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
2926 mark of almost any article you read to @code{gnus-unread-mark}.  The
2927 only articles not affected by this function are ticked, dormant, and
2928 expirable articles.  If you'd instead like to just have unread articles
2929 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
2930 instead.  It will leave marks like @code{gnus-low-score-mark},
2931 @code{gnus-del-mark} (and so on) alone.
2932
2933 @end table
2934
2935
2936 @node Paging the Article
2937 @section Scrolling the Article
2938 @cindex article scrolling
2939
2940 @table @kbd
2941
2942 @item SPACE
2943 @kindex SPACE (Summary)
2944 @findex gnus-summary-next-page
2945 Pressing @kbd{SPACE} will scroll the current article forward one page,
2946 or, if you have come to the end of the current article, will choose the
2947 next article (@code{gnus-summary-next-page}).
2948
2949 @item DEL
2950 @kindex DEL (Summary)
2951 @findex gnus-summary-prev-page
2952 Scroll the current article back one page (@code{gnus-summary-prev-page}). 
2953
2954 @item RET
2955 @kindex RET (Summary)
2956 @findex gnus-summary-scroll-up
2957 Scroll the current article one line forward
2958 (@code{gnus-summary-scroll-up}).
2959
2960 @item A g
2961 @itemx g
2962 @kindex A g (Summary)
2963 @kindex g (Summary)
2964 @findex gnus-summary-show-article
2965 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
2966 given a prefix, fetch the current article, but don't run any of the
2967 article treatment functions.  This will give you a ``raw'' article, just
2968 the way it came from the server.
2969
2970 @item A <
2971 @itemx <
2972 @kindex < (Summary)
2973 @kindex A < (Summary)
2974 @findex gnus-summary-beginning-of-article
2975 Scroll to the beginning of the article
2976 (@code{gnus-summary-beginning-of-article}).
2977
2978 @item A >
2979 @itemx >
2980 @kindex > (Summary)
2981 @kindex A > (Summary)
2982 @findex gnus-summary-end-of-article
2983 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
2984
2985 @item A s 
2986 @kindex A s (Summary)
2987 @findex gnus-summary-isearch-article
2988 Perform an isearch in the article buffer
2989 (@code{gnus-summary-isearch-article}). 
2990
2991 @end table
2992
2993
2994 @node Reply Followup and Post
2995 @section Reply, Followup and Post
2996
2997 @menu
2998 * Summary Mail Commands::            Sending mail.
2999 * Summary Post Commands::            Sending news.
3000 @end menu
3001
3002
3003 @node Summary Mail Commands
3004 @subsection Summary Mail Commands
3005 @cindex mail
3006 @cindex composing mail
3007
3008 Commands for composing a mail message:
3009
3010 @table @kbd
3011
3012 @item S r
3013 @itemx r
3014 @kindex S r (Summary)
3015 @kindex r (Summary)
3016 @findex gnus-summary-reply
3017 Mail a reply to the author of the current article
3018 (@code{gnus-summary-reply}). 
3019
3020 @item S R
3021 @itemx R
3022 @kindex R (Summary)
3023 @kindex S R (Summary)
3024 @findex gnus-summary-reply-with-original
3025 Mail a reply to the author of the current article and include the
3026 original message (@code{gnus-summary-reply-with-original}).  This
3027 command uses the process/prefix convention.
3028
3029 @item S o m
3030 @kindex S o m (Summary)
3031 @findex gnus-summary-mail-forward
3032 Forward the current article to some other person
3033 (@code{gnus-summary-mail-forward}). 
3034
3035 @item S o p
3036 @kindex S o p (Summary)
3037 @findex gnus-summary-post-forward
3038 Forward the current article to a newsgroup
3039 (@code{gnus-summary-post-forward}).
3040
3041 @item S m
3042 @itemx m
3043 @kindex m (Summary)
3044 @kindex S m (Summary)
3045 @findex gnus-summary-mail-other-window
3046 Send a mail to some other person
3047 (@code{gnus-summary-mail-other-window}).
3048
3049 @item S D b
3050 @kindex S D b (Summary)
3051 @findex gnus-summary-resend-bounced-mail
3052 @cindex bouncing mail
3053 If you have sent a mail, but the mail was bounced back to you for some
3054 reason (wrong address, transient failure), you can use this command to
3055 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
3056 will be popped into a mail buffer where you can edit the headers before
3057 sending the mail off again.  If you give a prefix to this command, and
3058 the bounced mail is a reply to some other mail, Gnus will try to fetch
3059 that mail and display it for easy perusal of its headers.  This might
3060 very well fail, though.
3061
3062 @item S D r
3063 @kindex S D r (Summary)
3064 @findex gnus-summary-resend-message
3065 Not to be confused with the previous command,
3066 @code{gnus-summary-resend-message} will prompt you for an address to
3067 send the current message off to, and then send it to that place.  The
3068 headers of the message won't be altered---but lots of headers that say
3069 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
3070 means that you actually send a mail to someone that has a @code{To}
3071 header that (probably) points to yourself.  This will confuse people.
3072 So, natcherly you'll only do that if you're really eVIl.  
3073
3074 This command is mainly used if you have several accounts and want to
3075 ship a mail to a different account of yours.  (If you're both
3076 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
3077 to the @code{root} account, you may want to resend it to
3078 @code{postmaster}.  Ordnung muss sein!
3079
3080 @item S O m
3081 @kindex S O m (Summary)
3082 @findex gnus-uu-digest-mail-forward
3083 Digest the current series and forward the result using mail
3084 (@code{gnus-uu-digest-mail-forward}).  This command uses the
3085 process/prefix convention (@pxref{Process/Prefix}). 
3086
3087 @item S O p
3088 @kindex S O p (Summary)
3089 @findex gnus-uu-digest-post-forward
3090 Digest the current series and forward the result to a newsgroup
3091 (@code{gnus-uu-digest-mail-forward}).  
3092 @end table
3093
3094
3095 @node Summary Post Commands
3096 @subsection Summary Post Commands
3097 @cindex post
3098 @cindex composing news
3099
3100 Commands for posting an article:
3101
3102 @table @kbd
3103 @item S p
3104 @itemx a
3105 @kindex a (Summary)
3106 @kindex S p (Summary)
3107 @findex gnus-summary-post-news
3108 Post an article to the current group
3109 (@code{gnus-summary-post-news}).
3110
3111 @item S f
3112 @itemx f
3113 @kindex f (Summary)
3114 @kindex S f (Summary)
3115 @findex gnus-summary-followup
3116 Post a followup to the current article (@code{gnus-summary-followup}).
3117
3118 @item S F
3119 @itemx F
3120 @kindex S F (Summary)
3121 @kindex F (Summary)
3122 @findex gnus-summary-followup-with-original
3123 Post a followup to the current article and include the original message
3124 (@code{gnus-summary-followup-with-original}).   This command uses the
3125 process/prefix convention.
3126
3127 @item S u
3128 @kindex S u (Summary)
3129 @findex gnus-uu-post-news
3130 Uuencode a file, split it into parts, and post it as a series
3131 (@code{gnus-uu-post-news}). (@pxref{Uuencoding and Posting}). 
3132 @end table
3133
3134
3135 @node Canceling and Superseding
3136 @section Canceling Articles
3137 @cindex canceling articles
3138 @cindex superseding articles
3139
3140 Have you ever written something, and then decided that you really,
3141 really, really wish you hadn't posted that?
3142
3143 Well, you can't cancel mail, but you can cancel posts.
3144
3145 @findex gnus-summary-cancel-article
3146 @kindex C (Summary)
3147 Find the article you wish to cancel (you can only cancel your own
3148 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
3149 c} (@code{gnus-summary-cancel-article}).  Your article will be
3150 canceled---machines all over the world will be deleting your article. 
3151
3152 Be aware, however, that not all sites honor cancels, so your article may
3153 live on here and there, while most sites will delete the article in
3154 question.
3155
3156 If you discover that you have made some mistakes and want to do some
3157 corrections, you can post a @dfn{superseding} article that will replace
3158 your original article.
3159
3160 @findex gnus-summary-supersede-article
3161 @kindex S (Summary)
3162 Go to the original article and press @kbd{S s}
3163 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
3164 where you can edit the article all you want before sending it off the
3165 usual way.
3166
3167 The same goes for superseding as for canceling, only more so: Some
3168 sites do not honor superseding.  On those sites, it will appear that you
3169 have posted almost the same article twice.
3170
3171 If you have just posted the article, and change your mind right away,
3172 there is a trick you can use to cancel/supersede the article without
3173 waiting for the article to appear on your site first.  You simply return
3174 to the post buffer (which is called @code{*post-buf*}).  There you will
3175 find the article you just posted, with all the headers intact.  Change
3176 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
3177 header by substituting one of those words for @code{Message-ID}.  Then
3178 just press @kbd{C-c C-c} to send the article as you would do normally.
3179 The previous article will be canceled/superseded.
3180
3181 Just remember, kids: There is no 'c' in 'supersede'.
3182
3183
3184 @node Marking Articles
3185 @section Marking Articles
3186 @cindex article marking
3187 @cindex article ticking
3188 @cindex marks
3189
3190 There are several marks you can set on an article. 
3191
3192 You have marks that decide the @dfn{readedness} (whoo, neato-keano
3193 neologism ohoy!) of the article.  Alphabetic marks generally mean
3194 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
3195
3196 In addition, you also have marks that do not affect readedness.
3197
3198 @menu
3199 * Unread Articles::      Marks for unread articles.
3200 * Read Articles::        Marks for read articles.
3201 * Other Marks::          Marks that do not affect readedness.
3202 @end menu
3203
3204 @ifinfo
3205 There's a plethora of commands for manipulating these marks:
3206 @end ifinfo
3207
3208 @menu
3209 * Setting Marks::           How to set and remove marks.
3210 * Setting Process Marks::   How to mark articles for later processing.
3211 @end menu
3212
3213
3214 @node Unread Articles
3215 @subsection Unread Articles
3216
3217 The following marks mark articles as unread, in one form or other.
3218
3219 @vindex gnus-dormant-mark
3220 @vindex gnus-ticked-mark
3221 @table @samp
3222 @item !
3223 @dfn{Ticked articles} are articles that will remain visible always.  If
3224 you see an article that you find interesting, or you want to put off
3225 reading it, or replying to it, until sometime later, you'd typically
3226 tick it.  However, articles can be expired, so if you want to keep an
3227 article forever, you'll have to save it.  Ticked articles have a
3228 @samp{!} (@code{gnus-ticked-mark}) in the first column.
3229
3230 @item ?
3231 @vindex gnus-dormant-mark
3232 A @dfn{dormant} article is marked with a @samp{?}
3233 (@code{gnus-dormant-mark}), and will only appear in the summary buffer
3234 if there are followups to it.
3235
3236 @item SPACE
3237 @vindex gnus-unread-mark
3238 An @dfn{unread} article is marked with a @samp{SPACE}
3239 (@code{gnus-unread-mark}).  These are articles that haven't been read at
3240 all yet.
3241 @end table
3242
3243
3244 @node Read Articles
3245 @subsection Read Articles
3246 @cindex expirable mark
3247
3248 All the following marks mark articles as read.
3249
3250 @table @samp
3251
3252 @item r
3253 @vindex gnus-del-mark
3254 Articles that are marked as read.  They have a @samp{r}
3255 (@code{gnus-del-mark}) in the first column.  These are articles that the
3256 user has marked as read more or less manually.
3257
3258 @item R
3259 @vindex gnus-read-mark
3260 Articles that are actually read are marked with @samp{R}
3261 (@code{gnus-read-mark}). 
3262
3263 @item O
3264 @vindex gnus-ancient-mark
3265 Articles that were marked as read in previous sessions are now
3266 @dfn{old} and marked with @samp{O} (@code{gnus-ancient-mark}). 
3267
3268 @item K
3269 @vindex gnus-killed-mark
3270 Marked as killed (@code{gnus-killed-mark}).
3271
3272 @item X
3273 @vindex gnus-kill-file-mark
3274 Marked as killed by kill files (@code{gnus-kill-file-mark}).
3275
3276 @item Y
3277 @vindex gnus-low-score-mark
3278 Marked as read by having a too low score (@code{gnus-low-score-mark}).
3279
3280 @item C
3281 @vindex gnus-catchup-mark
3282 Marked as read by a catchup (@code{gnus-catchup-mark}).
3283
3284 @item G
3285 @vindex gnus-canceled-mark
3286 Canceled article (@code{gnus-canceled-mark})
3287
3288 @item F
3289 @vindex gnus-souped-mark
3290 @sc{SOUP}ed article (@code{gnus-souped-mark}).
3291
3292 @item Q
3293 @vindex gnus-sparse-mark
3294 Sparsely reffed article (@code{gnus-sparse-mark}).
3295 @end table
3296
3297 All these marks just mean that the article is marked as read, really.
3298 They are interpreted differently by the adaptive scoring scheme,
3299 however.
3300
3301 One more special mark, though:
3302
3303 @table @samp
3304 @item E
3305 @vindex gnus-expirable-mark
3306 You can also mark articles as @dfn{expirable} (or have them marked as
3307 such automatically).  That doesn't make much sense in normal groups,
3308 because a user does not control the expiring of news articles, but in
3309 mail groups, for instance, articles that are marked as @dfn{expirable}
3310 can be deleted by Gnus at any time.  Expirable articles are marked with
3311 @samp{E} (@code{gnus-expirable-mark}).
3312 @end table
3313
3314
3315 @node Other Marks
3316 @subsection Other Marks
3317 @cindex process mark
3318 @cindex bookmarks
3319
3320 There are some marks that have nothing to do with whether the article is
3321 read or not.
3322
3323 @itemize @bullet
3324
3325 @item 
3326 You can set a bookmark in the current article.  Say you are reading a
3327 long thesis on cats' urinary tracts, and have to go home for dinner
3328 before you've finished reading the thesis.  You can then set a bookmark
3329 in the article, and Gnus will jump to this bookmark the next time it
3330 encounters the article.
3331
3332 @item
3333 @vindex gnus-replied-mark
3334 All articles that you have replied to or made a followup to (i.e., have
3335 answered) will be marked with an @samp{A} in the second column
3336 (@code{gnus-replied-mark}).
3337
3338 @item 
3339 @vindex gnus-cached-mark
3340 Articles that are stored in the article cache will be marked with an
3341 @samp{*} in the second column (@code{gnus-cached-mark}).
3342
3343 @item 
3344 @vindex gnus-saved-mark
3345 Articles that are ``saved'' (in some manner or other; not necessarily
3346 religiously) are marked with an @samp{S} in the second column
3347 (@code{gnus-saved-mark}.
3348
3349 @item 
3350 @vindex gnus-not-empty-thread-mark
3351 @vindex gnus-empty-thread-mark
3352 It the @samp{%e} spec is used, the presence of threads or not will be
3353 marked with @code{gnus-not-empty-thread-mark} and
3354 @code{gnus-empty-thread-mark} in the third column, respectively.
3355
3356 @item 
3357 @vindex gnus-process-mark
3358 Finally we have the @dfn{process mark} (@code{gnus-process-mark}.  A
3359 variety of commands react to the presence of the process mark.  For
3360 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
3361 all articles that have been marked with the process mark.  Articles
3362 marked with the process mark have a @samp{#} in the second column.
3363
3364 @end itemize
3365
3366 You might have noticed that most of these ``non-readedness'' marks
3367 appear in the second column by default.  So if you have a cached, saved,
3368 replied article that you have process-marked, what will that look like?
3369
3370 Nothing much.  The precedence rules go as follows: process -> cache ->
3371 replied -> saved.  So if the article is in the cache and is replied,
3372 you'll only see the cache mark and not the replied mark.
3373
3374
3375 @node Setting Marks
3376 @subsection Setting Marks
3377 @cindex setting marks
3378
3379 All the marking commands understand the numeric prefix.
3380
3381 @table @kbd
3382 @item M t
3383 @itemx !
3384 @kindex ! (Summary)
3385 @kindex M t (Summary)
3386 @findex gnus-summary-tick-article-forward
3387 Tick the current article (@code{gnus-summary-tick-article-forward}).
3388
3389 @item M ?
3390 @itemx ?
3391 @kindex ? (Summary)
3392 @kindex M ? (Summary)
3393 @findex gnus-summary-mark-as-dormant
3394 Mark the current article as dormant
3395 (@code{gnus-summary-mark-as-dormant}).
3396
3397 @item M d
3398 @itemx d
3399 @kindex M d (Summary)
3400 @kindex d (Summary)
3401 @findex gnus-summary-mark-as-read-forward
3402 Mark the current article as read
3403 (@code{gnus-summary-mark-as-read-forward}).
3404
3405 @item M k
3406 @itemx k
3407 @kindex k (Summary)
3408 @kindex M k (Summary)
3409 @findex gnus-summary-kill-same-subject-and-select
3410 Mark all articles that have the same subject as the current one as read,
3411 and then select the next unread article
3412 (@code{gnus-summary-kill-same-subject-and-select}).
3413
3414 @item M K
3415 @itemx C-k
3416 @kindex M K (Summary)
3417 @kindex C-k (Summary)
3418 @findex gnus-summary-kill-same-subject
3419 Mark all articles that have the same subject as the current one as read
3420 (@code{gnus-summary-kill-same-subject}).  
3421
3422 @item M C
3423 @kindex M C (Summary)
3424 @findex gnus-summary-catchup
3425 Mark all unread articles in the group as read
3426 (@code{gnus-summary-catchup}).
3427
3428 @item M C-c
3429 @kindex M C-c (Summary)
3430 @findex gnus-summary-catchup-all
3431 Mark all articles in the group as read---even the ticked and dormant
3432 articles (@code{gnus-summary-catchup-all}).
3433
3434 @item M H
3435 @kindex M H (Summary)
3436 @findex gnus-summary-catchup-to-here
3437 Catchup the current group to point
3438 (@code{gnus-summary-catchup-to-here}). 
3439
3440 @item C-w
3441 @kindex C-w (Summary)
3442 @findex gnus-summary-mark-region-as-read
3443 Mark all articles between point and mark as read
3444 (@code{gnus-summary-mark-region-as-read}). 
3445
3446 @item M V k
3447 @kindex M V k (Summary)
3448 @findex gnus-summary-kill-below
3449 Kill all articles with scores below the default score (or below the
3450 numeric prefix) (@code{gnus-summary-kill-below}).
3451
3452 @item M c
3453 @itemx M-u
3454 @kindex M c (Summary)
3455 @kindex M-u (Summary)
3456 @findex gnus-summary-clear-mark-forward
3457 Clear all readedness-marks from the current article
3458 (@code{gnus-summary-clear-mark-forward}).
3459
3460 @item M e
3461 @itemx E
3462 @kindex M e (Summary)
3463 @kindex E (Summary)
3464 @findex gnus-summary-mark-as-expirable
3465 Mark the current article as expirable
3466 (@code{gnus-summary-mark-as-expirable}).
3467
3468 @item M b
3469 @kindex M b (Summary)
3470 @findex gnus-summary-set-bookmark
3471 Set a bookmark in the current article
3472 (@code{gnus-summary-set-bookmark}).
3473
3474 @item M B
3475 @kindex M B (Summary)
3476 @findex gnus-summary-remove-bookmark
3477 Remove the bookmark from the current article
3478 (@code{gnus-summary-remove-bookmark}).
3479
3480 @item M V c
3481 @kindex M V c (Summary)
3482 @findex gnus-summary-clear-above
3483 Clear all marks from articles with scores over the default score (or
3484 over the numeric prefix) (@code{gnus-summary-clear-above}).
3485
3486 @item M V u
3487 @kindex M V u (Summary)
3488 @findex gnus-summary-tick-above
3489 Tick all articles with scores over the default score (or over the
3490 numeric prefix) (@code{gnus-summary-tick-above}).
3491
3492 @item M V m
3493 @kindex M V m (Summary)
3494 @findex gnus-summary-mark-above
3495 Prompt for a mark, and mark all articles with scores over the default
3496 score (or over the numeric prefix) with this mark
3497 (@code{gnus-summary-clear-above}).
3498 @end table
3499
3500 @vindex gnus-summary-goto-unread
3501 The @code{gnus-summary-goto-unread} variable controls what action should
3502 be taken after setting a mark.  If non-@code{nil}, point will move to
3503 the next/previous unread article.  If @code{nil}, point will just move
3504 one line up or down.  As a special case, if this variable is
3505 @code{never}, all the marking commands as well as other commands (like
3506 @kbd{SPACE}) will move to the next article, whether it is unread or not.
3507 The default is @code{t}.
3508
3509
3510 @node Setting Process Marks
3511 @subsection Setting Process Marks
3512 @cindex setting process marks
3513
3514 @table @kbd
3515
3516 @item M P p
3517 @itemx #
3518 @kindex # (Summary)
3519 @kindex M P p (Summary)
3520 @findex gnus-summary-mark-as-processable
3521 Mark the current article with the process mark
3522 (@code{gnus-summary-mark-as-processable}). 
3523 @findex gnus-summary-unmark-as-processable
3524
3525 @item M P u 
3526 @itemx M-#
3527 @kindex M P u (Summary)
3528 @kindex M-# (Summary)
3529 Remove the process mark, if any, from the current article
3530 (@code{gnus-summary-unmark-as-processable}).
3531
3532 @item M P U
3533 @kindex M P U (Summary)
3534 @findex gnus-summary-unmark-all-processable
3535 Remove the process mark from all articles
3536 (@code{gnus-summary-unmark-all-processable}). 
3537
3538 @item M P R
3539 @kindex M P R (Summary)
3540 @findex gnus-uu-mark-by-regexp
3541 Mark articles by a regular expression (@code{gnus-uu-mark-by-regexp}). 
3542
3543 @item M P r
3544 @kindex M P r (Summary)
3545 @findex gnus-uu-mark-region
3546 Mark articles in region (@code{gnus-uu-mark-region}).
3547
3548 @item M P t
3549 @kindex M P t (Summary)
3550 @findex gnus-uu-mark-thread
3551 Mark all articles in the current (sub)thread
3552 (@code{gnus-uu-mark-thread}).
3553
3554 @item M P T
3555 @kindex M P T (Summary)
3556 @findex gnus-uu-unmark-thread
3557 Unmark all articles in the current (sub)thread
3558 (@code{gnus-uu-unmark-thread}).
3559
3560 @item M P v
3561 @kindex M P v (Summary)
3562 @findex gnus-uu-mark-over
3563 Mark all articles that have a score above the prefix argument
3564 (@code{gnus-uu-mark-over}).
3565
3566 @item M P s
3567 @kindex M P s (Summary)
3568 @findex gnus-uu-mark-series
3569 Mark all articles in the current series (@code{gnus-uu-mark-series}).
3570
3571 @item M P S
3572 @kindex M P S (Summary)
3573 @findex gnus-uu-mark-sparse
3574 Mark all series that have already had some articles marked
3575 (@code{gnus-uu-mark-sparse}).
3576
3577 @item M P a
3578 @kindex M P a (Summary)
3579 @findex gnus-uu-mark-all
3580 Mark all articles in series order (@code{gnus-uu-mark-series}).
3581
3582 @item M P b
3583 @kindex M P b (Summary)
3584 @findex gnus-uu-mark-buffer
3585 Mark all articles in the buffer in the order they appear
3586 (@code{gnus-uu-mark-buffer}). 
3587 @end table
3588
3589
3590 @node Limiting
3591 @section Limiting
3592 @cindex limiting
3593
3594 It can be convenient to limit the summary buffer to just show some
3595 subset of the articles currently in the group.  The effect most limit
3596 commands have is to remove a few (or many) articles from the summary
3597 buffer. 
3598
3599 @table @kbd
3600
3601 @item / /
3602 @itemx / s
3603 @kindex / / (Summary)
3604 @findex gnus-summary-limit-to-subject
3605 Limit the summary buffer to articles that match some subject
3606 (@code{gnus-summary-limit-to-subject}). 
3607
3608 @item / a
3609 @kindex / a (Summary)
3610 @findex gnus-summary-limit-to-author
3611 Limit the summary buffer to articles that match some author
3612 (@code{gnus-summary-limit-to-author}).
3613
3614 @item / u
3615 @itemx x
3616 @kindex / u (Summary)
3617 @kindex x (Summary)
3618 @findex gnus-summary-limit-to-unread
3619 Limit the summary buffer to articles that are not marked as read
3620 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
3621 buffer to articles that are strictly unread.  This means that ticked and
3622 dormant articles will also be excluded.
3623
3624 @item / m
3625 @kindex / m (Summary)
3626 @findex gnus-summary-limit-to-marks
3627 Ask for a mark and then limit to all articles that have not been marked
3628 with that mark (@code{gnus-summary-limit-to-marks}).
3629
3630 @item / n
3631 @kindex / n (Summary)
3632 @findex gnus-summary-limit-to-articles
3633 Limit the summary buffer to the current article
3634 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
3635 convention (@pxref{Process/Prefix}).
3636
3637 @item / w
3638 @kindex / w (Summary)
3639 @findex gnus-summary-pop-limit
3640 Pop the previous limit off the stack and restore it
3641 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
3642 the stack.
3643
3644 @item / v
3645 @kindex / v (Summary)
3646 @findex gnus-summary-limit-to-score
3647 Limit the summary buffer to articles that have a score at or above some
3648 score (@code{gnus-summary-limit-to-score}).
3649
3650 @item / E
3651 @itemx M S
3652 @kindex M S (Summary)
3653 @kindex / E (Summary)
3654 @findex gnus-summary-limit-include-expunged
3655 Display all expunged articles
3656 (@code{gnus-summary-limit-include-expunged}). 
3657
3658 @item / D
3659 @kindex / D (Summary)
3660 @findex gnus-summary-limit-include-dormant
3661 Display all dormant articles (@code{gnus-summary-limit-include-dormant}).
3662
3663 @item / d
3664 @kindex / d (Summary)
3665 @findex gnus-summary-limit-exclude-dormant
3666 Hide all dormant articles (@code{gnus-summary-limit-exclude-dormant}).
3667
3668 @item / c
3669 @kindex / c (Summary)
3670 @findex gnus-summary-limit-exclude-childless-dormant
3671 Hide all dormant articles that have no children
3672 (@code{gnus-summary-limit-exclude-childless-dormant}). 
3673
3674 @item / C
3675 @kindex / C (Summary)
3676 @findex gnus-summary-limit-mark-excluded-as-read
3677 Mark all excluded unread articles as read
3678 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
3679 also mark excluded ticked and dormant articles as read.
3680
3681 @end table
3682
3683
3684 @node Threading
3685 @section Threading
3686 @cindex threading
3687 @cindex article threading
3688
3689 Gnus threads articles by default.  @dfn{To thread} is to put replies to
3690 articles directly after the articles they reply to---in a hierarchical
3691 fashion.
3692
3693 @menu
3694 * Customizing Threading::     Variables you can change to affect the threading.
3695 * Thread Commands::           Thread based commands in the summary buffer.
3696 @end menu
3697
3698
3699 @node Customizing Threading
3700 @subsection Customizing Threading
3701 @cindex customizing threading
3702 @cindex <
3703 @cindex >
3704
3705 @table @code
3706
3707 @item gnus-show-threads
3708 @vindex gnus-show-threads
3709 If this variable is @code{nil}, no threading will be done, and all of
3710 the rest of the variables here will have no effect.  Turning threading
3711 off will speed group selection up a bit, but it is sure to make reading
3712 slower and more awkward.
3713
3714 @item gnus-fetch-old-headers
3715 @vindex gnus-fetch-old-headers
3716 If non-@code{nil}, Gnus will attempt to build old threads by fetching
3717 more old headers---headers to articles that are marked as read.  If you
3718 would like to display as few summary lines as possible, but still
3719 connect as many loose threads as possible, you should set this variable
3720 to @code{some} or a number.  If you set it to a number, no more than
3721 that number of extra old headers will be fetched.  In either case,
3722 fetching old headers only works if the backend you are using carries
3723 overview files---this would normally be @code{nntp}, @code{nnspool} and
3724 @code{nnml}.  Also remember that if the root of the thread has been
3725 expired by the server, there's not much Gnus can do about that.
3726
3727 @item gnus-build-sparse-threads
3728 @vindex gnus-build-sparse-threads
3729 Fetching old headers can be slow.  A low-rent similar effect can be
3730 gotten by setting this variable to @code{some}.  Gnus will then look at
3731 the complete @code{References} headers of all articles and try to string
3732 articles that belong in the same thread together.  This will leave
3733 @dfn{gaps} in the threading display where Gnus guesses that an article
3734 is missing from the thread.  (These gaps appear like normal summary
3735 lines.  If you select a gap, Gnus will try to fetch the article in
3736 question.)  If this variable is @code{t}, Gnus will display all these
3737 ``gaps'' without regard for whether they are useful for completing the
3738 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
3739 off sparse leaf nodes that don't lead anywhere.  This variable is
3740 @code{nil} by default.
3741
3742 @item gnus-summary-gather-subject-limit
3743 @vindex gnus-summary-gather-subject-limit
3744 Loose threads are gathered by comparing subjects of articles.  If this
3745 variable is @code{nil}, Gnus requires an exact match between the
3746 subjects of the loose threads before gathering them into one big
3747 super-thread.  This might be too strict a requirement, what with the
3748 presence of stupid newsreaders that chop off long subjects lines.  If
3749 you think so, set this variable to, say, 20 to require that only the
3750 first 20 characters of the subjects have to match.  If you set this
3751 variable to a really low number, you'll find that Gnus will gather
3752 everything in sight into one thread, which isn't very helpful.
3753
3754 @cindex fuzzy article gathering
3755 If you set this variable to the special value @code{fuzzy}, Gnus will
3756 use a fuzzy string comparison algorithm on the subjects.
3757
3758 @item gnus-simplify-subject-fuzzy-regexp
3759 @vindex gnus-simplify-subject-fuzzy-regexp
3760 This can either be a regular expression or list of regular expressions
3761 that match strings that will be removed from subjects if fuzzy subject
3762 simplification is used.
3763
3764 @item gnus-simplify-ignored-prefixes
3765 @vindex gnus-simplify-ignored-prefixes
3766 If you set @code{gnus-summary-gather-subject-limit} to something as low
3767 as 10, you might consider setting this variable to something sensible:
3768
3769 @c Written by Michael Ernst <mernst@cs.rice.edu>
3770 @lisp
3771 (setq gnus-simplify-ignored-prefixes
3772       (concat 
3773        "\\`\\[?\\("
3774        (mapconcat 'identity
3775                   '("looking"
3776                      "wanted" "followup" "summary\\( of\\)?"
3777                      "help" "query" "problem" "question" 
3778                      "answer" "reference" "announce"
3779                      "How can I" "How to" "Comparison of"
3780                      ;; ...
3781                      )
3782                   "\\|")
3783                   "\\)\\s *\\("
3784                   (mapconcat 'identity
3785                              '("for" "for reference" "with" "about")
3786                              "\\|")
3787                   "\\)?\\]?:?[ \t]*"))
3788 @end lisp
3789
3790 All words that match this regexp will be removed before comparing two
3791 subjects. 
3792
3793 @item gnus-summary-gather-exclude-subject
3794 @vindex gnus-summary-gather-exclude-subject
3795 Since loose thread gathering is done on subjects only, that might lead
3796 to many false hits, especially with certain common subjects like
3797 @samp{} and @samp{(none)}.  To make the situation slightly better,
3798 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
3799 what subjects should be excluded from the gathering process.  The
3800 default is @samp{^ *$\\|^(none)$}.  
3801
3802 @item gnus-summary-thread-gathering-function
3803 @vindex gnus-summary-thread-gathering-function
3804 Gnus gathers threads by looking at @code{Subject} headers.  This means
3805 that totally unrelated articles may end up in the same ``thread'', which
3806 is confusing.  An alternate approach is to look at all the
3807 @code{Message-ID}s in all the @code{References} headers to find matches.
3808 This will ensure that no gathered threads ever includes unrelated
3809 articles, but it's also means that people who have posted with broken
3810 newsreaders won't be gathered properly.  The choice is yours---plague or
3811 cholera:
3812
3813 @table @code
3814 @item gnus-gather-threads-by-subject
3815 @findex gnus-gather-threads-by-subject
3816 This function is the default gathering function and looks at
3817 @code{Subject}s exclusively.
3818
3819 @item gnus-gather-threads-by-references
3820 @findex gnus-gather-threads-by-references
3821 This function looks at @code{References} headers exclusively.
3822 @end table
3823
3824 If you want to test gathering by @code{References}, you could say
3825 something like:
3826
3827 @lisp
3828 (setq gnus-summary-thread-gathering-function
3829       'gnus-gather-threads-by-references)
3830 @end lisp
3831
3832 @item gnus-summary-make-false-root
3833 @vindex gnus-summary-make-false-root
3834 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
3835 and create a dummy root at the top.  (Wait a minute.  Root at the top?
3836 Yup.)  Loose subtrees occur when the real root has expired, or you've
3837 read or killed the root in a previous session.
3838
3839 When there is no real root of a thread, Gnus will have to fudge
3840 something.  This variable says what fudging method Gnus should use.
3841 There are four possible values:
3842
3843 @cindex adopting articles
3844
3845 @table @code
3846
3847 @item adopt
3848 Gnus will make the first of the orphaned articles the parent.  This
3849 parent will adopt all the other articles.  The adopted articles will be
3850 marked as such by pointy brackets (@samp{<>}) instead of the standard
3851 square brackets (@samp{[]}).  This is the default method.
3852
3853 @item dummy
3854 @vindex gnus-summary-dummy-line-format
3855 Gnus will create a dummy summary line that will pretend to be the
3856 parent.  This dummy line does not correspond to any real article, so
3857 selecting it will just select the first real article after the dummy
3858 article.  @code{gnus-summary-dummy-line-format} is used to specify the
3859 format of the dummy roots.  It accepts only one format spec:  @samp{S},
3860 which is the subject of the article.  @xref{Formatting Variables}.
3861
3862 @item empty
3863 Gnus won't actually make any article the parent, but simply leave the
3864 subject field of all orphans except the first empty.  (Actually, it will
3865 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
3866 Buffer Format}).)
3867
3868 @item none
3869 Don't make any article parent at all.  Just gather the threads and
3870 display them after one another.
3871
3872 @item nil
3873 Don't gather loose threads.
3874 @end table
3875
3876 @item gnus-thread-hide-subtree
3877 @vindex gnus-thread-hide-subtree
3878 If non-@code{nil}, all threads will be hidden when the summary buffer is
3879 generated.
3880
3881 @item gnus-thread-hide-killed
3882 @vindex gnus-thread-hide-killed
3883 if you kill a thread and this variable is non-@code{nil}, the subtree
3884 will be hidden.
3885
3886 @item gnus-thread-ignore-subject
3887 @vindex gnus-thread-ignore-subject
3888 Sometimes somebody changes the subject in the middle of a thread.  If
3889 this variable is non-@code{nil}, the subject change is ignored.  If it
3890 is @code{nil}, which is the default, a change in the subject will result
3891 in a new thread.
3892
3893 @item gnus-thread-indent-level
3894 @vindex gnus-thread-indent-level
3895 This is a number that says how much each sub-thread should be indented.
3896 The default is @code{4}.
3897 @end table
3898
3899
3900 @node Thread Commands
3901 @subsection Thread Commands
3902 @cindex thread commands
3903
3904 @table @kbd
3905
3906 @item T k
3907 @itemx M-C-k
3908 @kindex T k (Summary)
3909 @kindex M-C-k (Summary)
3910 @findex gnus-summary-kill-thread
3911 Mark all articles in the current sub-thread as read
3912 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
3913 remove all marks instead.  If the prefix argument is negative, tick
3914 articles instead.
3915
3916 @item T l
3917 @itemx M-C-l
3918 @kindex T l (Summary)
3919 @kindex M-C-l (Summary)
3920 @findex gnus-summary-lower-thread
3921 Lower the score of the current thread
3922 (@code{gnus-summary-lower-thread}). 
3923
3924 @item T i
3925 @kindex T i (Summary)
3926 @findex gnus-summary-raise-thread
3927 Increase the score of the current thread
3928 (@code{gnus-summary-raise-thread}).
3929
3930 @item T #
3931 @kindex T # (Summary)
3932 @findex gnus-uu-mark-thread
3933 Set the process mark on the current thread
3934 (@code{gnus-uu-mark-thread}).
3935
3936 @item T M-#
3937 @kindex T M-# (Summary)
3938 @findex gnus-uu-unmark-thread
3939 Remove the process mark from the current thread
3940 (@code{gnus-uu-unmark-thread}).
3941
3942 @item T T
3943 @kindex T T (Summary)
3944 @findex gnus-summary-toggle-threads
3945 Toggle threading (@code{gnus-summary-toggle-threads}).
3946
3947 @item T s
3948 @kindex T s (Summary)
3949 @findex gnus-summary-show-thread
3950 Expose the thread hidden under the current article, if any
3951 (@code{gnus-summary-show-thread}).
3952
3953 @item T h
3954 @kindex T h (Summary)
3955 @findex gnus-summary-hide-thread
3956 Hide the current (sub)thread (@code{gnus-summary-hide-thread}).
3957
3958 @item T S
3959 @kindex T S (Summary)
3960 @findex gnus-summary-show-all-threads
3961 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
3962
3963 @item T H
3964 @kindex T H (Summary)
3965 @findex gnus-summary-hide-all-threads
3966 Hide all threads (@code{gnus-summary-hide-all-threads}).
3967
3968 @item T t
3969 @kindex T t (Summary)
3970 @findex gnus-summary-rethread-current
3971 Re-thread the thread the current article is part of
3972 (@code{gnus-summary-rethread-current}).  This works even when the
3973 summary buffer is otherwise unthreaded.
3974
3975 @item T ^
3976 @kindex T ^ (Summary)
3977 @findex gnus-summary-reparent-thread
3978 Make the current article the child of the marked (or previous) article
3979 (@code{gnus-summary-reparent-thread}.
3980
3981 @end table
3982
3983 The following commands are thread movement commands.  They all
3984 understand the numeric prefix.
3985
3986 @table @kbd
3987
3988 @item T n
3989 @kindex T n (Summary)
3990 @findex gnus-summary-next-thread
3991 Go to the next thread (@code{gnus-summary-next-thread}).
3992
3993 @item T p
3994 @kindex T p (Summary)
3995 @findex gnus-summary-prev-thread
3996 Go to the previous thread (@code{gnus-summary-prev-thread}).
3997
3998 @item T d
3999 @kindex T d (Summary)
4000 @findex gnus-summary-down-thread
4001 Descend the thread (@code{gnus-summary-down-thread}).
4002
4003 @item T u
4004 @kindex T u (Summary)
4005 @findex gnus-summary-up-thread
4006 Ascend the thread (@code{gnus-summary-up-thread}).
4007
4008 @item T o
4009 @kindex T o (Summary)
4010 @findex gnus-summary-top-thread
4011 Go to the top of the thread (@code{gnus-summary-top-thread}).
4012 @end table
4013
4014 @vindex gnus-thread-operation-ignore-subject 
4015 If you ignore subject while threading, you'll naturally end up with
4016 threads that have several different subjects in them.  If you then issue
4017 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
4018 wish to kill the entire thread, but just those parts of the thread that
4019 have the same subject as the current article.  If you like this idea,
4020 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If is
4021 is non-@code{nil} (which it is by default), subjects will be ignored
4022 when doing thread commands.  If this variable is @code{nil}, articles in
4023 the same thread with different subjects will not be included in the
4024 operation in question.  If this variable is @code{fuzzy}, only articles
4025 that have subjects that are fuzzily equal will be included.
4026
4027
4028 @node Sorting
4029 @section Sorting
4030
4031 @findex gnus-thread-sort-by-total-score
4032 @findex gnus-thread-sort-by-date
4033 @findex gnus-thread-sort-by-score
4034 @findex gnus-thread-sort-by-subject
4035 @findex gnus-thread-sort-by-author
4036 @findex gnus-thread-sort-by-number
4037 @vindex gnus-thread-sort-functions
4038 If you are using a threaded summary display, you can sort the threads by
4039 setting @code{gnus-thread-sort-functions}, which is a list of functions.
4040 By default, sorting is done on article numbers.  Ready-made sorting
4041 predicate functions include @code{gnus-thread-sort-by-number},
4042 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
4043 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score}, and
4044 @code{gnus-thread-sort-by-total-score}.
4045
4046 Each function takes two threads and return non-@code{nil} if the first
4047 thread should be sorted before the other.  Note that sorting really is
4048 normally done by looking only at the roots of each thread.  If you use
4049 more than one function, the primary sort key should be the last function
4050 in the list.  You should probably always include
4051 @code{gnus-thread-sort-by-number} in the list of sorting
4052 functions---preferably first.  This will ensure that threads that are
4053 equal with respect to the other sort criteria will be displayed in
4054 ascending article order.
4055
4056 If you would like to sort by score, then by subject, and finally by
4057 number, you could do something like:
4058
4059 @lisp
4060 (setq gnus-thread-sort-functions 
4061       '(gnus-thread-sort-by-number
4062         gnus-thread-sort-by-subject
4063         gnus-thread-sort-by-score))
4064 @end lisp
4065
4066 The threads that have highest score will be displayed first in the
4067 summary buffer.  When threads have the same score, they will be sorted
4068 alphabetically.  The threads that have the same score and the same
4069 subject will be sorted by number, which is (normally) the sequence in
4070 which the articles arrived.
4071
4072 If you want to sort by score and then reverse arrival order, you could
4073 say something like:
4074
4075 @lisp
4076 (setq gnus-thread-sort-functions
4077       '((lambda (t1 t2) 
4078           (not (gnus-thread-sort-by-number t1 t2)))
4079         gnus-thread-sort-by-score))
4080 @end lisp
4081
4082 @vindex gnus-thread-score-function
4083 The function in the @code{gnus-thread-score-function} variable (default
4084 @code{+}) is used for calculating the total score of a thread.  Useful
4085 functions might be @code{max}, @code{min}, or squared means, or whatever
4086 tickles your fancy.
4087
4088 @findex gnus-article-sort-functions
4089 @findex gnus-article-sort-by-date
4090 @findex gnus-article-sort-by-score
4091 @findex gnus-article-sort-by-subject
4092 @findex gnus-article-sort-by-author
4093 @findex gnus-article-sort-by-number
4094 If you are using an unthreaded display for some strange reason or other,
4095 you have to fiddle with the @code{gnus-article-sort-functions} variable.
4096 It is very similar to the @code{gnus-thread-sort-functions}, except that
4097 is uses slightly different functions for article comparison.  Available
4098 sorting predicate functions are @code{gnus-article-sort-by-number},
4099 @code{gnus-article-sort-by-author}, @code{gnus-article-sort-by-subject},
4100 @code{gnus-article-sort-by-date}, and @code{gnus-article-sort-by-score}.
4101
4102 If you want to sort an unthreaded summary display by subject, you could
4103 say something like:
4104
4105 @lisp
4106 (setq gnus-article-sort-functions 
4107       '(gnus-article-sort-by-number
4108         gnus-article-sort-by-subject))
4109 @end lisp
4110
4111
4112
4113 @node Asynchronous Fetching
4114 @section Asynchronous Article Fetching
4115 @cindex asynchronous article fetching
4116
4117 If you read your news from an @sc{nntp} server that's far away, the
4118 network latencies may make reading articles a chore.  You have to wait
4119 for a while after pressing @kbd{n} to go to the next article before the
4120 article appears.  Why can't Gnus just go ahead and fetch the article
4121 while you are reading the previous one? Why not, indeed.
4122
4123 First, some caveats.  There are some pitfalls to using asynchronous
4124 article fetching, especially the way Gnus does it.  
4125
4126 Let's say you are reading article 1, which is short, and article 2 is
4127 quite long, and you are not interested in reading that.  Gnus does not
4128 know this, so it goes ahead and fetches article 2.  You decide to read
4129 article 3, but since Gnus is in the process of fetching article 2, the
4130 connection is blocked.
4131
4132 To avoid these situations, Gnus will open two (count 'em two)
4133 connections to the server.  Some people may think this isn't a very nice
4134 thing to do, but I don't see any real alternatives.  Setting up that
4135 extra connection takes some time, so Gnus startup will be slower.
4136
4137 Gnus will fetch more articles than you will read.  This will mean that
4138 the link between your machine and the @sc{nntp} server will become more
4139 loaded than if you didn't use article pre-fetch.  The server itself will
4140 also become more loaded---both with the extra article requests, and the
4141 extra connection.
4142
4143 Ok, so now you know that you shouldn't really use this thing...  unless
4144 you really want to.
4145
4146 @vindex gnus-asynchronous
4147 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
4148 happen automatically.
4149
4150 @vindex nntp-async-number
4151 You can control how many articles that are to be pre-fetched by setting
4152 @code{nntp-async-number}.  This is five by default, which means that when
4153 you read an article in the group, @code{nntp} will pre-fetch the next
4154 five articles.  If this variable is @code{t}, @code{nntp} will pre-fetch
4155 all the articles that it can without bound.  If it is @code{nil}, no
4156 pre-fetching will be made.
4157
4158 @vindex gnus-asynchronous-article-function
4159 You may wish to create some sort of scheme for choosing which articles
4160 that @code{nntp} should consider as candidates for pre-fetching.  For
4161 instance, you may wish to pre-fetch all articles with high scores, and
4162 not pre-fetch low-scored articles.  You can do that by setting the
4163 @code{gnus-asynchronous-article-function}, which will be called with an
4164 alist where the keys are the article numbers.  Your function should
4165 return an alist where the articles you are not interested in have been
4166 removed.  You could also do sorting on article score and the like. 
4167
4168
4169 @node Article Caching
4170 @section Article Caching
4171 @cindex article caching
4172 @cindex caching
4173
4174 If you have an @emph{extremely} slow @sc{nntp} connection, you may
4175 consider turning article caching on.  Each article will then be stored
4176 locally under your home directory.  As you may surmise, this could
4177 potentially use @emph{huge} amounts of disk space, as well as eat up all
4178 your inodes so fast it will make your head swim.  In vodka.
4179
4180 Used carefully, though, it could be just an easier way to save articles.
4181
4182 @vindex gnus-use-long-file-name
4183 @vindex gnus-cache-directory
4184 @vindex gnus-use-cache
4185 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
4186 all articles that are ticked or marked as dormant will then be copied
4187 over to your local cache (@code{gnus-cache-directory}).  Whether this
4188 cache is flat or hierarchal is controlled by the
4189 @code{gnus-use-long-file-name} variable, as usual.
4190
4191 When re-select a ticked or dormant article, it will be fetched from the
4192 cache instead of from the server.  As articles in your cache will never
4193 expire, this might serve as a method of saving articles while still
4194 keeping them where they belong.  Just mark all articles you want to save
4195 as dormant, and don't worry.
4196
4197 When an article is marked as read, is it removed from the cache.
4198
4199 @vindex gnus-cache-remove-articles
4200 @vindex gnus-cache-enter-articles
4201 The entering/removal of articles from the cache is controlled by the
4202 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
4203 variables.  Both are lists of symbols.  The first is @code{(ticked
4204 dormant)} by default, meaning that ticked and dormant articles will be
4205 put in the cache.  The latter is @code{(read)} by default, meaning that
4206 articles that are marked as read are removed from the cache.  Possibly
4207 symbols in these two lists are @code{ticked}, @code{dormant},
4208 @code{unread} and @code{read}.
4209
4210 @findex gnus-jog-cache
4211 So where does the massive article-fetching and storing come into the
4212 picture?  The @code{gnus-jog-cache} command will go through all
4213 subscribed newsgroups, request all unread articles, and store them in
4214 the cache.  You should only ever, ever ever ever, use this command if 1)
4215 your connection to the @sc{nntp} server is really, really, really slow
4216 and 2) you have a really, really, really huge disk.  Seriously.
4217
4218 @vindex gnus-uncacheable-groups
4219 It is likely that you do not want caching on some groups.  For instance,
4220 if your @code{nnml} mail is located under your home directory, it makes no
4221 sense to cache it somewhere else under your home directory.  Unless you
4222 feel that it's neat to use twice as much space.  To limit the caching,
4223 you could set the @code{gnus-uncacheable-groups} regexp to
4224 @samp{^nnml}, for instance.  This variable is @code{nil} by
4225 default.
4226
4227 @findex gnus-cache-generate-nov-databases
4228 @findex gnus-cache-generate-active
4229 @vindex gnus-cache-active-file
4230 The cache stores information on what articles it contains in its active
4231 file (@code{gnus-cache-active-file}).  If this file (or any other parts
4232 of the cache) becomes all messed up for some reason or other, Gnus
4233 offers two functions that will try to set things right.  @kbd{M-x
4234 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
4235 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
4236 file.
4237
4238
4239 @node Persistent Articles
4240 @section Persistent Articles
4241 @cindex persistent articles
4242
4243 Closely related to article caching, we have @dfn{persistent articles}.
4244 In fact, it's just a different way of looking at caching, and much more
4245 useful in my opinion.
4246
4247 Say you're reading a newsgroup, and you happen on to some valuable gem
4248 that you want to keep and treasure forever.  You'd normally just save it
4249 (using one of the many saving commands) in some file.  The problem with
4250 that is that it's just, well, yucky.  Ideally you'd prefer just having
4251 the article remain in the group where you found it forever; untouched by
4252 the expiry going on at the news server.
4253
4254 This is what a @dfn{persistent article} is---an article that just won't
4255 be deleted.  It's implemented using the normal cache functions, but
4256 you use two explicit commands for managing persistent articles:
4257
4258 @table @kbd
4259
4260 @item *
4261 @kindex * (Summary)
4262 @findex gnus-cache-enter-article
4263 Make the current article persistent (@code{gnus-cache-enter-article}). 
4264
4265 @item M-*
4266 @kindex M-* (Summary)
4267 @findex gnus-cache-remove-article
4268 Remove the current article from the persistent articles
4269 (@code{gnus-cache-remove-article}).  This will normally delete the
4270 article. 
4271 @end table
4272
4273 Both these commands understand the process/prefix convention. 
4274
4275 To avoid having all ticked articles (and stuff) entered into the cache,
4276 you should set @code{gnus-use-cache} to @code{passive} if you're just
4277 interested in persistent articles:
4278
4279 @lisp
4280 (setq gnus-use-cache 'passive)
4281 @end lisp
4282
4283
4284 @node Article Backlog
4285 @section Article Backlog
4286 @cindex backlog
4287 @cindex article backlog
4288
4289 If you have a slow connection, but the idea of using caching seems
4290 unappealing to you (and it is, really), you can help the situation some
4291 by switching on the @dfn{backlog}.  This is where Gnus will buffer
4292 already read articles so that it doesn't have to re-fetch articles
4293 you've already read.  This only helps if you are in the habit of
4294 re-selecting articles you've recently read, of course.  If you never do
4295 that, turning the backlog on will slow Gnus down a little bit, and
4296 increase memory usage some.
4297
4298 @vindex gnus-keep-backlog
4299 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
4300 at most @var{n} old articles in a buffer for later re-fetching.  If this
4301 variable is non-@code{nil} and is not a number, Gnus will store
4302 @emph{all} read articles, which means that your Emacs will grow without
4303 bound before exploding and taking your machine down with you.  I put
4304 that in there just to keep y'all on your toes.  
4305
4306 This variable is @code{nil} by default.
4307
4308
4309 @node Saving Articles
4310 @section Saving Articles
4311 @cindex saving articles
4312
4313 Gnus can save articles in a number of ways.  Below is the documentation
4314 for saving articles in a fairly straight-forward fashion (i.e., little
4315 processing of the article is done before it is saved).  For a different
4316 approach (uudecoding, unsharing) you should use @code{gnus-uu}
4317 (@pxref{Decoding Articles}).
4318
4319 @vindex gnus-save-all-headers
4320 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
4321 unwanted headers before saving the article.
4322
4323 @vindex gnus-saved-headers
4324 If the preceding variable is @code{nil}, all headers that match the
4325 @code{gnus-saved-headers} regexp will be kept, while the rest will be
4326 deleted before saving.
4327
4328 @table @kbd
4329
4330 @item O o
4331 @itemx o
4332 @kindex O o (Summary)
4333 @kindex o (Summary)
4334 @findex gnus-summary-save-article
4335 Save the current article using the default article saver
4336 (@code{gnus-summary-save-article}). 
4337
4338 @item O m
4339 @kindex O m (Summary)
4340 @findex gnus-summary-save-article-mail
4341 Save the current article in mail format
4342 (@code{gnus-summary-save-article-mail}). 
4343
4344 @item O r
4345 @kindex O r (Summary)
4346 @findex gnus-summary-save-article-rmail
4347 Save the current article in rmail format
4348 (@code{gnus-summary-save-article-rmail}). 
4349
4350 @item O f
4351 @kindex O f (Summary)
4352 @findex gnus-summary-save-article-file
4353 Save the current article in plain file format
4354 (@code{gnus-summary-save-article-file}). 
4355
4356 @item O b
4357 @kindex O b (Summary)
4358 @findex gnus-summary-save-article-body-file
4359 Save the current article body in plain file format
4360 (@code{gnus-summary-save-article-body-file}). 
4361
4362 @item O h
4363 @kindex O h (Summary)
4364 @findex gnus-summary-save-article-folder
4365 Save the current article in mh folder format
4366 (@code{gnus-summary-save-article-folder}). 
4367
4368 @item O v
4369 @kindex O v (Summary)
4370 @findex gnus-summary-save-article-vm
4371 Save the current article in a VM folder
4372 (@code{gnus-summary-save-article-vm}).
4373
4374 @item O p
4375 @kindex O p (Summary)
4376 @findex gnus-summary-pipe-output
4377 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
4378 the current article to a process (@code{gnus-summary-pipe-output}).
4379 @end table
4380
4381 @vindex gnus-prompt-before-saving
4382 All these commands use the process/prefix convention
4383 (@pxref{Process/Prefix}).  If you save bunches of articles using these
4384 functions, you might get tired of being prompted for files to save each
4385 and every article in.  The prompting action is controlled by
4386 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
4387 default, giving you that excessive prompting action you know and
4388 loathe.  If you set this variable to @code{t} instead, you'll be prompted
4389 just once for each series of articles you save.  If you like to really
4390 have Gnus do all your thinking for you, you can even set this variable
4391 to @code{nil}, which means that you will never be prompted for files to
4392 save articles in.  Gnus will simply save all the articles in the default
4393 files. 
4394
4395
4396 @vindex gnus-default-article-saver
4397 You can customize the @code{gnus-default-article-saver} variable to make
4398 Gnus do what you want it to.  You can use any of the four ready-made
4399 functions below, or you can create your own.
4400
4401 @table @code
4402
4403 @item gnus-summary-save-in-rmail
4404 @findex gnus-summary-save-in-rmail
4405 @vindex gnus-rmail-save-name
4406 @findex gnus-plain-save-name
4407 This is the default format, @dfn{babyl}.  Uses the function in the
4408 @code{gnus-rmail-save-name} variable to get a file name to save the
4409 article in.  The default is @code{gnus-plain-save-name}.
4410
4411 @item gnus-summary-save-in-mail
4412 @findex gnus-summary-save-in-mail
4413 @vindex gnus-mail-save-name
4414 Save in a Unix mail (mbox) file.  Uses the function in the
4415 @code{gnus-mail-save-name} variable to get a file name to save the
4416 article in.  The default is @code{gnus-plain-save-name}.
4417
4418 @item gnus-summary-save-in-file
4419 @findex gnus-summary-save-in-file
4420 @vindex gnus-file-save-name
4421 @findex gnus-numeric-save-name
4422 Append the article straight to an ordinary file.  Uses the function in
4423 the @code{gnus-file-save-name} variable to get a file name to save the
4424 article in.  The default is @code{gnus-numeric-save-name}.
4425
4426 @item gnus-summary-save-body-in-file
4427 @findex gnus-summary-save-body-in-file
4428 Append the article body to an ordinary file.  Uses the function in the
4429 @code{gnus-file-save-name} variable to get a file name to save the
4430 article in.  The default is @code{gnus-numeric-save-name}.
4431
4432 @item gnus-summary-save-in-folder
4433 @findex gnus-summary-save-in-folder
4434 @findex gnus-folder-save-name
4435 @findex gnus-Folder-save-name
4436 @vindex gnus-folder-save-name
4437 @cindex rcvstore
4438 @cindex MH folders
4439 Save the article to an MH folder using @code{rcvstore} from the MH
4440 library.  Uses the function in the @code{gnus-folder-save-name} variable
4441 to get a file name to save the article in.  The default is
4442 @code{gnus-folder-save-name}, but you can also use
4443 @code{gnus-Folder-save-name}.  The former creates capitalized names, and
4444 the latter does not.
4445
4446 @item gnus-summary-save-in-vm
4447 @findex gnus-summary-save-in-vm
4448 Save the article in a VM folder.  You have to have the VM mail
4449 reader to use this setting.
4450 @end table
4451
4452 @vindex gnus-article-save-directory
4453 All of these functions, except for the last one, will save the article
4454 in the @code{gnus-article-save-directory}, which is initialized from the
4455 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
4456 default. 
4457
4458 As you can see above, the functions use different functions to find a
4459 suitable name of a file to save the article in.  Below is a list of
4460 available functions that generate names:
4461
4462 @table @code
4463
4464 @item gnus-Numeric-save-name
4465 @findex gnus-Numeric-save-name
4466 Generates file names that look like @file{~/News/Alt.andrea-dworkin/45}.
4467
4468 @item gnus-numeric-save-name
4469 @findex gnus-numeric-save-name
4470 Generates file names that look like @file{~/News/alt.andrea-dworkin/45}.
4471
4472 @item gnus-Plain-save-name
4473 @findex gnus-Plain-save-name
4474 Generates file names that look like @file{~/News/Alt.andrea-dworkin}.
4475
4476 @item gnus-plain-save-name
4477 @findex gnus-plain-save-name
4478 Generates file names that look like @file{~/News/alt.andrea-dworkin}.
4479 @end table
4480
4481 @vindex gnus-split-methods
4482 You can have Gnus suggest where to save articles by plonking a regexp into
4483 the @code{gnus-split-methods} alist.  For instance, if you would like to
4484 save articles related to Gnus in the file @file{gnus-stuff}, and articles
4485 related to VM in @code{vm-stuff}, you could set this variable to something
4486 like:
4487
4488 @lisp
4489 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
4490  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
4491  (my-choosing-function "../other-dir/my-stuff")
4492  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
4493 @end lisp
4494
4495 We see that this is a list where each element is a list that has two
4496 elements---the @dfn{match} and the @dfn{file}.  The match can either be
4497 a string (in which case it is used as a regexp to match on the article
4498 head); it can be a symbol (which will be called as a function with the
4499 group name as a parameter); or it can be a list (which will be
4500 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
4501 the @dfn{file} will be used as a default prompt.  In addition, the
4502 result of the operation itself will be used if the function or form
4503 called returns a string or a list of strings.
4504
4505 You basically end up with a list of file names that might be used when
4506 saving the current article.  (All ``matches'' will be used.)  You will
4507 then be prompted for what you really want to use as a name, with file
4508 name completion over the results from applying this variable.
4509
4510 This variable is @code{((gnus-article-archive-name))} by default, which
4511 means that Gnus will look at the articles it saves for an
4512 @code{Archive-name} line and use that as a suggestion for the file
4513 name. 
4514
4515 @vindex gnus-use-long-file-name
4516 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
4517 @code{nil}, all the preceding functions will replace all periods
4518 (@samp{.}) in the group names with slashes (@samp{/})---which means that
4519 the functions will generate hierarchies of directories instead of having
4520 all the files in the toplevel directory
4521 (@file{~/News/alt/andrea-dworkin} instead of
4522 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
4523 on most systems.  However, for historical reasons, this is @code{nil} on
4524 Xenix and usg-unix-v machines by default.
4525
4526 This function also affects kill and score file names.  If this variable
4527 is a list, and the list contains the element @code{not-score}, long file
4528 names will not be used for score files, if it contains the element
4529 @code{not-save}, long file names will not be used for saving, and if it
4530 contains the element @code{not-kill}, long file names will not be used
4531 for kill files.
4532
4533 If you'd like to save articles in a hierarchy that looks something like
4534 a spool, you could
4535
4536 @lisp
4537 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
4538 (setq gnus-default-article-save 'gnus-summary-save-in-file) ; no encoding
4539 @end lisp
4540
4541 Then just save with @kbd{o}.  You'd then read this hierarchy with
4542 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
4543 the toplevel directory as the argument (@file{~/News/}).  Then just walk
4544 around to the groups/directories with @code{nneething}.
4545
4546
4547 @node Decoding Articles
4548 @section Decoding Articles
4549 @cindex decoding articles
4550
4551 Sometime users post articles (or series of articles) that have been
4552 encoded in some way or other.  Gnus can decode them for you.
4553
4554 @menu 
4555 * Uuencoded Articles::    Uudecode articles.
4556 * Shared Articles::       Unshar articles.
4557 * PostScript Files::      Split PostScript.
4558 * Decoding Variables::    Variables for a happy decoding.
4559 * Viewing Files::         You want to look at the result of the decoding?
4560 @end menu
4561
4562 All these functions use the process/prefix convention
4563 (@pxref{Process/Prefix}) for finding out what articles to work on, with
4564 the extension that a ``single article'' means ``a single series''.  Gnus
4565 can find out by itself what articles belong to a series, decode all the
4566 articles and unpack/view/save the resulting file(s).
4567
4568 Gnus guesses what articles are in the series according to the following
4569 simplish rule: The subjects must be (nearly) identical, except for the
4570 last two numbers of the line.  (Spaces are largely ignored, however.)
4571
4572 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
4573 will find all the articles that match the regexp @samp{^cat.gif
4574 ([0-9]+/[0-9]+).*$}.  
4575
4576 Subjects that are nonstandard, like @samp{cat.gif (2/3) Part 6 of a
4577 series}, will not be properly recognized by any of the automatic viewing
4578 commands, and you have to mark the articles manually with @kbd{#}.
4579
4580
4581 @node Uuencoded Articles
4582 @subsection Uuencoded Articles
4583 @cindex uudecode
4584 @cindex uuencoded articles
4585
4586 @table @kbd
4587
4588 @item X u
4589 @kindex X u (Summary)
4590 @findex gnus-uu-decode-uu
4591 Uudecodes the current series (@code{gnus-uu-decode-uu}).
4592
4593 @item X U
4594 @kindex X U (Summary)
4595 @findex gnus-uu-decode-uu-and-save
4596 Uudecodes and saves the current series
4597 (@code{gnus-uu-decode-uu-and-save}).
4598
4599 @item X v u
4600 @kindex X v u (Summary)
4601 @findex gnus-uu-decode-uu-view
4602 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
4603
4604 @item X v U
4605 @kindex X v U (Summary)
4606 @findex gnus-uu-decode-uu-and-save-view
4607 Uudecodes, views and saves the current series
4608 (@code{gnus-uu-decode-uu-and-save-view}). 
4609 @end table
4610
4611 Remember that these all react to the presence of articles marked with
4612 the process mark.  If, for instance, you'd like to decode and save an
4613 entire newsgroup, you'd typically do @kbd{M P a}
4614 (@code{gnus-uu-mark-all}) and then @kbd{X U}
4615 (@code{gnus-uu-decode-uu-and-save}).
4616
4617 All this is very much different from how @code{gnus-uu} worked with
4618 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
4619 the sun.  This version of @code{gnus-uu} generally assumes that you mark
4620 articles in some way (@pxref{Setting Process Marks}) and then press
4621 @kbd{X u}.
4622
4623 @vindex gnus-uu-notify-files
4624 Note: When trying to decode articles that have names matching
4625 @code{gnus-uu-notify-files}, which is hard-coded to
4626 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
4627 automatically post an article on @samp{comp.unix.wizards} saying that
4628 you have just viewed the file in question.  This feature can't be turned
4629 off.
4630
4631
4632 @node Shared Articles
4633 @subsection Shared Articles
4634 @cindex unshar
4635 @cindex shared articles
4636
4637 @table @kbd
4638
4639 @item X s
4640 @kindex X s (Summary)
4641 @findex gnus-uu-decode-unshar
4642 Unshars the current series (@code{gnus-uu-decode-unshar}).
4643
4644 @item X S
4645 @kindex X S (Summary)
4646 @findex gnus-uu-decode-unshar-and-save
4647 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
4648
4649 @item X v s
4650 @kindex X v s (Summary)
4651 @findex gnus-uu-decode-unshar-view
4652 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
4653
4654 @item X v S
4655 @kindex X v S (Summary)
4656 @findex gnus-uu-decode-unshar-and-save-view
4657 Unshars, views and saves the current series
4658 (@code{gnus-uu-decode-unshar-and-save-view}). 
4659 @end table
4660
4661
4662 @node PostScript Files
4663 @subsection PostScript Files
4664 @cindex PostScript
4665
4666 @table @kbd
4667
4668 @item X p
4669 @kindex X p (Summary)
4670 @findex gnus-uu-decode-postscript
4671 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
4672
4673 @item X P
4674 @kindex X P (Summary)
4675 @findex gnus-uu-decode-postscript-and-save
4676 Unpack and save the current PostScript series
4677 (@code{gnus-uu-decode-postscript-and-save}).
4678
4679 @item X v p
4680 @kindex X v p (Summary)
4681 @findex gnus-uu-decode-postscript-view
4682 View the current PostScript series
4683 (@code{gnus-uu-decode-postscript-view}).
4684
4685 @item X v P
4686 @kindex X v P (Summary)
4687 @findex gnus-uu-decode-postscript-and-save-view
4688 View and save the current PostScript series
4689 (@code{gnus-uu-decode-postscript-and-save-view}). 
4690 @end table
4691
4692
4693 @node Decoding Variables
4694 @subsection Decoding Variables
4695
4696 Adjective, not verb.
4697
4698 @menu 
4699 * Rule Variables::          Variables that say how a file is to be viewed.
4700 * Other Decode Variables::  Other decode variables.
4701 * Uuencoding and Posting::  Variables for customizing uuencoding.
4702 @end menu
4703
4704
4705 @node Rule Variables
4706 @subsubsection Rule Variables
4707 @cindex rule variables
4708
4709 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
4710 variables are on the form
4711   
4712 @lisp
4713       (list '(regexp1 command2)
4714             '(regexp2 command2)
4715             ...)
4716 @end lisp
4717
4718 @table @code
4719
4720 @item gnus-uu-user-view-rules
4721 @vindex gnus-uu-user-view-rules
4722 @cindex sox
4723 This variable is consulted first when viewing files.  If you wish to use,
4724 for instance, @code{sox} to convert an @samp{.au} sound file, you could
4725 say something like:
4726 @lisp
4727        (setq gnus-uu-user-view-rules
4728          (list '(\"\\\\.au$\" \"sox %s -t .aiff > /dev/audio\")))
4729 @end lisp
4730
4731 @item gnus-uu-user-view-rules-end
4732 @vindex gnus-uu-user-view-rules-end
4733 This variable is consulted if Gnus couldn't make any matches from the
4734 user and default view rules.
4735
4736 @item gnus-uu-user-archive-rules
4737 @vindex gnus-uu-user-archive-rules
4738 This variable can be used to say what commands should be used to unpack
4739 archives.
4740 @end table
4741
4742
4743 @node Other Decode Variables
4744 @subsubsection Other Decode Variables
4745
4746 @table @code
4747 @vindex gnus-uu-grabbed-file-functions
4748
4749 @item gnus-uu-grabbed-file-functions
4750 All functions in this list will be called right each file has been
4751 successfully decoded---so that you can move or view files right away,
4752 and don't have to wait for all files to be decoded before you can do
4753 anything.  Ready-made functions you can put in this list are:
4754
4755 @table @code
4756
4757 @item gnus-uu-grab-view
4758 @findex gnus-uu-grab-view
4759 View the file.
4760
4761 @item gnus-uu-grab-move
4762 @findex gnus-uu-grab-move
4763 Move the file (if you're using a saving function.)
4764 @end table
4765
4766 @item gnus-uu-ignore-files-by-name
4767 @vindex gnus-uu-ignore-files-by-name
4768 Files with name matching this regular expression won't be viewed.
4769
4770 @item gnus-uu-ignore-files-by-type
4771 @vindex gnus-uu-ignore-files-by-type
4772 Files with a @sc{mime} type matching this variable won't be viewed.
4773 Note that Gnus tries to guess what type the file is based on the name.
4774 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
4775 kludgey.
4776
4777 @item gnus-uu-tmp-dir
4778 @vindex gnus-uu-tmp-dir
4779 Where @code{gnus-uu} does its work.
4780
4781 @item gnus-uu-do-not-unpack-archives
4782 @vindex gnus-uu-do-not-unpack-archives
4783 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
4784 looking for files to display.
4785
4786 @item gnus-uu-view-and-save
4787 @vindex gnus-uu-view-and-save
4788 Non-@code{nil} means that the user will always be asked to save a file
4789 after viewing it.
4790
4791 @item gnus-uu-ignore-default-view-rules
4792 @vindex gnus-uu-ignore-default-view-rules
4793 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
4794 rules.
4795
4796 @item gnus-uu-ignore-default-archive-rules
4797 @vindex gnus-uu-ignore-default-archive-rules
4798 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
4799 unpacking commands.
4800
4801 @item gnus-uu-kill-carriage-return
4802 @vindex gnus-uu-kill-carriage-return
4803 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
4804 from articles.
4805
4806 @item gnus-uu-unmark-articles-not-decoded
4807 @vindex gnus-uu-unmark-articles-not-decoded
4808 Non-@code{nil} means that @code{gnus-uu} will mark articles that were
4809 unsuccessfully decoded as unread.
4810
4811 @item gnus-uu-correct-stripped-uucode
4812 @vindex gnus-uu-correct-stripped-uucode
4813 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
4814 uuencoded files that have had trailing spaces deleted.
4815
4816 @item gnus-uu-view-with-metamail
4817 @vindex gnus-uu-view-with-metamail
4818 @cindex metamail
4819 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
4820 commands defined by the rule variables and just fudge a @sc{mime}
4821 content type based on the file name.  The result will be fed to
4822 @code{metamail} for viewing.
4823
4824 @item gnus-uu-save-in-digest
4825 @vindex gnus-uu-save-in-digest
4826 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
4827 decoding, will save in digests.  If this variable is @code{nil},
4828 @code{gnus-uu} will just save everything in a file without any
4829 embellishments.  The digesting almost conforms to RFC1153---no easy way
4830 to specify any meaningful volume and issue numbers were found, so I
4831 simply dropped them.
4832
4833 @end table
4834
4835
4836 @node Uuencoding and Posting
4837 @subsubsection Uuencoding and Posting
4838
4839 @table @code
4840
4841 @item gnus-uu-post-include-before-composing
4842 @vindex gnus-uu-post-include-before-composing
4843 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
4844 before you compose the article.  If this variable is @code{t}, you can
4845 either include an encoded file with @kbd{C-c C-i} or have one included
4846 for you when you post the article.
4847
4848 @item gnus-uu-post-length
4849 @vindex gnus-uu-post-length
4850 Maximum length of an article.  The encoded file will be split into how
4851 many articles it takes to post the entire file.
4852
4853 @item gnus-uu-post-threaded
4854 @vindex gnus-uu-post-threaded
4855 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
4856 thread.  This may not be smart, as no other decoder I have seen are able
4857 to follow threads when collecting uuencoded articles.  (Well, I have
4858 seen one package that does that---@code{gnus-uu}, but somehow, I don't
4859 think that counts...) Default is @code{nil}.
4860
4861 @item gnus-uu-post-separate-description
4862 @vindex gnus-uu-post-separate-description
4863 Non-@code{nil} means that the description will be posted in a separate
4864 article.  The first article will typically be numbered (0/x).  If this
4865 variable is @code{nil}, the description the user enters will be included
4866 at the beginning of the first article, which will be numbered (1/x).
4867 Default is @code{t}.
4868
4869 @end table
4870
4871
4872 @node Viewing Files
4873 @subsection Viewing Files
4874 @cindex viewing files
4875 @cindex pseudo-articles
4876
4877 After decoding, if the file is some sort of archive, Gnus will attempt
4878 to unpack the archive and see if any of the files in the archive can be
4879 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
4880 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
4881 uncompress and de-tar the main file, and then view the two pictures.
4882 This unpacking process is recursive, so if the archive contains archives
4883 of archives, it'll all be unpacked.
4884
4885 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
4886 extracted file into the summary buffer.  If you go to these
4887 ``articles'', you will be prompted for a command to run (usually Gnus
4888 will make a suggestion), and then the command will be run.
4889
4890 @vindex gnus-view-pseudo-asynchronously
4891 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
4892 until the viewing is done before proceeding.
4893
4894 @vindex gnus-view-pseudos
4895 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
4896 the pseudo-articles into the summary buffer, but view them
4897 immediately.  If this variable is @code{not-confirm}, the user won't even
4898 be asked for a confirmation before viewing is done.
4899
4900 @vindex gnus-view-pseudos-separately 
4901 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
4902 pseudo-article will be created for each file to be viewed.  If
4903 @code{nil}, all files that use the same viewing command will be given as
4904 a list of parameters to that command.
4905
4906 @vindex gnus-insert-pseudo-articles
4907 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
4908 pseudo-articles when decoding.  It is @code{t} by default.
4909
4910 So; there you are, reading your @emph{pseudo-articles} in your
4911 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
4912 Why isn't anything real anymore? How did we get here?
4913
4914
4915 @node Article Treatment
4916 @section Article Treatment
4917
4918 Reading through this huge manual, you may have quite forgotten that the
4919 object of newsreaders are to actually, like, read what people have
4920 written.  Reading articles.  Unfortunately, people are quite bad at
4921 writing, so there are tons of functions and variables to make reading
4922 these articles easier.
4923
4924 @menu
4925 * Article Highlighting::    You want to make the article look like fruit salad.
4926 * Article Hiding::          You also want to make certain info go away.
4927 * Article Washing::         Lots of way-neat functions to make life better.
4928 * Article Buttons::         Click on URLs, Message-IDs, addresses and the like.
4929 * Article Date::            Grumble, UT!
4930 @end menu
4931
4932
4933 @node Article Highlighting
4934 @subsection Article Highlighting
4935 @cindex highlight
4936
4937 Not only do you want your article buffer to look like fruit salad, but
4938 you want it to look like technicolor fruit salad.
4939
4940 @table @kbd
4941
4942 @item W H a
4943 @kindex W H a (Summary)
4944 @findex gnus-article-highlight
4945 Highlight the current article (@code{gnus-article-highlight}).
4946
4947 @item W H h
4948 @kindex W H h (Summary)
4949 @findex gnus-article-highlight-headers
4950 @vindex gnus-header-face-alist
4951 Highlight the headers (@code{gnus-article-highlight-headers}).  The
4952 highlighting will be done according to the @code{gnus-header-face-alist}
4953 variable, which is a list where each element has the form @var{(regexp
4954 name content)}.  @var{regexp} is a regular expression for matching the
4955 header, @var{name} is the face used for highlighting the header name and
4956 @var{content} is the face for highlighting the header value.  The first
4957 match made will be used.  Note that @var{regexp} shouldn't have @samp{^}
4958 prepended---Gnus will add one.
4959
4960 @item W H c
4961 @kindex W H c (Summary)
4962 @findex gnus-article-highlight-citation
4963 Highlight cited text (@code{gnus-article-highlight-citation}). 
4964
4965 Some variables to customize the citation highlights:
4966
4967 @table @code
4968 @vindex gnus-cite-parse-max-size
4969
4970 @item gnus-cite-parse-max-size
4971 If the article size if bigger than this variable (which is 25000 by
4972 default), no citation highlighting will be performed.  
4973
4974 @item gnus-cite-prefix-regexp
4975 @vindex gnus-cite-prefix-regexp
4976 Regexp matching the longest possible citation prefix on a line. 
4977
4978 @item gnus-cite-max-prefix
4979 @vindex gnus-cite-max-prefix
4980 Maximum possible length for a citation prefix (default 20).
4981
4982 @item gnus-cite-face-list
4983 @vindex gnus-cite-face-list
4984 List of faces used for highlighting citations.  When there are citations
4985 from multiple articles in the same message, Gnus will try to give each
4986 citation from each article its own face.  This should make it easier to
4987 see who wrote what.
4988
4989 @item gnus-supercite-regexp
4990 @vindex gnus-supercite-regexp
4991 Regexp matching normal Supercite attribution lines.  
4992
4993 @item gnus-supercite-secondary-regexp
4994 @vindex gnus-supercite-secondary-regexp
4995 Regexp matching mangled Supercite attribution lines.
4996
4997 @item gnus-cite-minimum-match-count
4998 @vindex gnus-cite-minimum-match-count
4999 Minimum number of identical prefixes we have to see before we believe
5000 that it's a citation.
5001
5002 @item gnus-cite-attribution-prefix
5003 @vindex gnus-cite-attribution-prefix
5004 Regexp matching the beginning of an attribution line.
5005
5006 @item gnus-cite-attribution-suffix
5007 @vindex gnus-cite-attribution-suffix
5008 Regexp matching the end of an attribution line.
5009
5010 @item gnus-cite-attribution-face
5011 @vindex gnus-cite-attribution-face
5012 Face used for attribution lines.  It is merged with the face for the
5013 cited text belonging to the attribution.
5014
5015 @end table
5016
5017
5018 @item W H s
5019 @kindex W H s (Summary)
5020 @vindex gnus-signature-separator
5021 @vindex gnus-signature-face
5022 @findex gnus-article-highlight-signature
5023 Highlight the signature (@code{gnus-article-highlight-signature}).
5024 Everything after @code{gnus-signature-separator} in an article will be
5025 considered a signature and will be highlighted with
5026 @code{gnus-signature-face}, which is @code{italic} by default. 
5027
5028 @end table
5029
5030
5031 @node Article Hiding
5032 @subsection Article Hiding
5033 @cindex article hiding
5034
5035 Or rather, hiding certain things in each article.  There usually is much
5036 too much cruft in most articles.  
5037
5038 @table @kbd
5039
5040 @item W W a
5041 @kindex W W a (Summary)
5042 @findex gnus-article-hide
5043 Do maximum hiding on the summary buffer (@kbd{gnus-article-hide}). 
5044
5045 @item W W h
5046 @kindex W W h (Summary)
5047 @findex gnus-article-hide-headers
5048 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
5049 Headers}. 
5050
5051 @item W W b
5052 @kindex W W b (Summary)
5053 @findex gnus-article-hide-boring-headers
5054 Hide headers that aren't particularly interesting
5055 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
5056
5057 @item W W s
5058 @kindex W W s (Summary)
5059 @findex gnus-article-hide-signature
5060 Hide signature (@code{gnus-article-hide-signature}).
5061
5062 @item W W p
5063 @kindex W W p (Summary)
5064 @findex gnus-article-hide-pgp
5065 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}). 
5066
5067 @item W W P
5068 @kindex W W P (Summary)
5069 @findex gnus-article-hide-pem
5070 Hide @sc{pem} (privacy enhavnced hessages) gruft
5071 (@code{gnus-article-hide-pem}).
5072
5073 @item W W c
5074 @kindex W W c (Summary)
5075 @findex gnus-article-hide-citation
5076 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
5077 customizing the hiding:
5078
5079 @table @code
5080
5081 @item gnus-cite-hide-percentage
5082 @vindex gnus-cite-hide-percentage
5083 If the cited text is of a bigger percentage than this variable (default
5084 50), hide the cited text.
5085
5086 @item gnus-cite-hide-absolute
5087 @vindex gnus-cite-hide-absolute
5088 The cited text must be have at least this length (default 10) before it
5089 is hidden.
5090
5091 @item gnus-cited-text-button-line-format
5092 @vindex gnus-cited-text-button-line-format
5093 Gnus adds buttons show where the cited text has been hidden, and to
5094 allow toggle hiding the text.  The format of the variable is specified
5095 by this format-like variable.  These specs are legal:
5096
5097 @table @samp
5098 @item b
5099 Start point of the hidden text.
5100 @item e
5101 End point of the hidden text.
5102 @item l
5103 Length of the hidden text.
5104 @end table
5105
5106 @item gnus-cited-lines-visible
5107 @vindex gnus-cited-lines-visible
5108 The number of lines at the beginning of the cited text to leave shown. 
5109
5110 @end table
5111
5112 @item W W C
5113 @kindex W W C (Summary)
5114 @findex gnus-article-hide-citation-in-followups
5115 Hide cited text in articles that aren't roots
5116 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
5117 useful as an interactive command, but might be a handy function to stick
5118 in @code{gnus-article-display-hook} (@pxref{Customizing Articles}). 
5119
5120 @end table
5121
5122 All these ``hiding'' commands are toggles, but if you give a negative
5123 prefix to these commands, they will show what they have previously
5124 hidden.  If you give a positive prefix, they will always hide.
5125
5126 Also @pxref{Article Highlighting} for further variables for
5127 citation customization.
5128
5129 @vindex gnus-signature-limit
5130 @code{gnus-signature-limit} provides a limit to what is considered a
5131 signature.  If it is a number, no signature may not be longer (in
5132 characters) than that number.  If it is a function, the function will be
5133 called without any parameters, and if it returns @code{nil}, there is no
5134 signature in the buffer.  If it is a string, it will be used as a
5135 regexp.  If it matches, the text in question is not a signature.
5136
5137
5138 @node Article Washing
5139 @subsection Article Washing
5140 @cindex washing
5141 @cindex article washing
5142
5143 We call this ``article washing'' for a really good reason.  Namely, the
5144 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
5145
5146 @dfn{Washing} is defined by us as ``changing something from something to
5147 something else'', but normally results in something looking better.
5148 Cleaner, perhaps.
5149
5150 @table @kbd
5151
5152 @item W l
5153 @kindex W l (Summary)
5154 @findex gnus-summary-stop-page-breaking
5155 Remove page breaks from the current article
5156 (@code{gnus-summary-stop-page-breaking}).
5157
5158 @item W r
5159 @kindex W r (Summary)
5160 @findex gnus-summary-caesar-message
5161 Do a Caesar rotate (rot13) on the article buffer
5162 (@code{gnus-summary-caesar-message}). 
5163
5164 @item W t
5165 @kindex W t (Summary)
5166 @findex gnus-summary-toggle-header
5167 Toggle whether to display all headers in the article buffer
5168 (@code{gnus-summary-toggle-header}). 
5169
5170 @item W v
5171 @kindex W v (Summary)
5172 @findex gnus-summary-verbose-header
5173 Toggle whether to display all headers in the article buffer permanently
5174 (@code{gnus-summary-verbose-header}).
5175
5176 @item W m
5177 @kindex W m (Summary)
5178 @findex gnus-summary-toggle-mime
5179 Toggle whether to run the article through @sc{mime} before displaying
5180 (@code{gnus-summary-toggle-mime}).
5181
5182 @item W o
5183 @kindex W o (Summary)
5184 @findex gnus-article-treat-overstrike
5185 Treat overstrike (@code{gnus-article-treat-overstrike}).
5186
5187 @item W w
5188 @kindex W w (Summary)
5189 @findex gnus-article-fill-cited-article
5190 Do word wrap (@code{gnus-article-fill-cited-article}).  If you use this
5191 function in @code{gnus-article-display-hook}, it should be run fairly
5192 late and certainly after any highlighting.
5193
5194 @item W c
5195 @kindex W c (Summary)
5196 @findex gnus-article-remove-cr
5197 Remove CR (@code{gnus-article-remove-cr}).
5198
5199 @item W L
5200 @kindex W L (Summary)
5201 @findex gnus-article-remove-trailing-blank-lines
5202 Remove all blank lines at the end of the article
5203 (@code{gnus-article-remove-trailing-blank-lines}).
5204
5205 @item W q
5206 @kindex W q (Summary)
5207 @findex gnus-article-de-quoted-unreadable
5208 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
5209
5210 @item W f
5211 @kindex W f (Summary)
5212 @cindex x-face
5213 @findex gnus-article-display-x-face
5214 @findex gnus-article-x-face-command
5215 @vindex gnus-article-x-face-command
5216 @vindex gnus-article-x-face-too-ugly
5217 Look for and display any X-Face headers
5218 (@code{gnus-article-display-x-face}).  The command executed by this
5219 function is given by the @code{gnus-article-x-face-command} variable.
5220 If this variable is a string, this string will be executed in a
5221 sub-shell.  If it is a function, this function will be called with the
5222 face as the argument.  If the @code{gnus-article-x-face-too-ugly} (which
5223 is a regexp) matches the @code{From} header, the face will not be shown.
5224 The default action under Emacs is to fork off an @code{xv} to view the
5225 face; under XEmacs the default action is to display the face before the
5226 @code{From} header.  (It's nicer if XEmacs has been compiled with X-Face
5227 support---that will make display somewhat faster.  If there's no native
5228 X-Face support, Gnus will try to convert the @code{X-Face} header using
5229 external programs from the @code{pbmplus} package and friends.)  If you
5230 want to have this function in the display hook, it should probably come
5231 last.
5232
5233 @item W b
5234 @kindex W b (Summary)
5235 @findex gnus-article-add-buttons
5236 Add clickable buttons to the article (@code{gnus-article-add-buttons}). 
5237
5238 @item W B
5239 @kindex W B (Summary)
5240 @findex gnus-article-add-buttons-to-head
5241 Add clickable buttons to the article headers
5242 (@code{gnus-article-add-buttons-to-head}).  
5243
5244 @end table
5245
5246
5247 @node Article Buttons
5248 @subsection Article Buttons
5249 @cindex buttons
5250
5251 People often include references to other stuff in articles, and it would
5252 be nice if Gnus could just fetch whatever it is that people talk about
5253 with the minimum of fuzz.
5254
5255 Gnus adds @dfn{buttons} to certain standard references by default:
5256 Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
5257 two variables, one that handles article bodies and one that handles
5258 article heads:
5259
5260 @table @code
5261
5262 @item gnus-button-alist
5263 @vindex gnus-button-alist
5264 This is an alist where each entry has this form:
5265
5266 @lisp
5267 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
5268 @end lisp
5269
5270 @table @var
5271
5272 @item regexp
5273 All text that match this regular expression will be considered an
5274 external reference.  Here's a typical regexp that match embedded URLs:
5275 @samp{<URL:\\([^\n\r>]*\\)>}. 
5276
5277 @item button-par
5278 Gnus has to know which parts of the match is to be highlighted.  This is
5279 a number that says what sub-expression of the regexp that is to be
5280 highlighted.  If you want it all highlighted, you use @code{0} here.
5281
5282 @item use-p
5283 This form will be @code{eval}ed, and if the result is non-@code{nil},
5284 this is considered a match.  This is useful if you want extra sifting to
5285 avoid false matches.
5286
5287 @item function
5288 This function will be called when you click on this button.
5289
5290 @item data-par
5291 As with @var{button-par}, this is a sub-expression number, but this one
5292 says which part of the match is to be sent as data to @var{function}. 
5293
5294 @end table
5295
5296 So the full entry for buttonizing URLs is then
5297
5298 @lisp
5299 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
5300 @end lisp
5301
5302 @item gnus-header-button-alist
5303 @vindex gnus-header-button-alist
5304 This is just like the other alist, except that it is applied to the
5305 article head only, and that each entry has an additional element that is
5306 used to say what headers to apply the buttonize coding to:
5307
5308 @lisp
5309 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
5310 @end lisp
5311
5312 @var{header} is a regular expression.
5313
5314 @item gnus-button-url-regexp
5315 @vindex gnus-button-url-regexp
5316 A regular expression that matches embedded URLs.  It is used in the
5317 default values of the variables above.
5318
5319 @item gnus-article-button-face
5320 @vindex gnus-article-button-face
5321 Face used on bottons.
5322
5323 @item gnus-article-mouse-face
5324 @vindex gnus-article-mouse-face
5325 Face is used when the mouse cursor is over a button.
5326
5327 @end table
5328
5329
5330 @node Article Date
5331 @subsection Article Date
5332
5333 The date is most likely generated in some obscure timezone you've never
5334 heard of, so it's quite nice to be able to find out what the time was
5335 when the article was sent.
5336
5337 @table @kbd
5338
5339 @item W T u
5340 @kindex W T u (Summary)
5341 @findex gnus-article-date-ut
5342 Display the date in UT (aka. GMT, aka ZULU)
5343 (@code{gnus-article-date-ut}). 
5344
5345 @item W T l
5346 @kindex W T l (Summary)
5347 @findex gnus-article-date-local
5348 Display the date in the local timezone (@code{gnus-article-date-local}).
5349
5350 @item W T e
5351 @kindex W T e (Summary)
5352 @findex gnus-article-date-lapsed
5353 Say how much time has (e)lapsed between the article was posted and now
5354 (@code{gnus-article-date-lapsed}).
5355
5356 @item W T o
5357 @kindex W T o (Summary)
5358 @findex gnus-article-date-original
5359 Display the original date (@code{gnus-article-date-original}).  This can
5360 be useful if you normally use some other conversion function and is
5361 worried that it might be doing something totally wrong.  Say, claiming
5362 that the article was posted in 1854.  Although something like that is
5363 @emph{totally} impossible.  Don't you trust me? *titter*
5364
5365 @end table
5366
5367
5368 @node Summary Sorting
5369 @section Summary Sorting
5370 @cindex summary sorting
5371
5372 You can have the summary buffer sorted in various ways, even though I
5373 can't really see why you'd want that.
5374
5375 @table @kbd
5376
5377 @item C-c C-s C-n
5378 @kindex C-c C-s C-n (Summary)
5379 @findex gnus-summary-sort-by-number
5380 Sort by article number (@code{gnus-summary-sort-by-number}).
5381
5382 @item C-c C-s C-a
5383 @kindex C-c C-s C-a (Summary)
5384 @findex gnus-summary-sort-by-author
5385 Sort by author (@code{gnus-summary-sort-by-author}).
5386
5387 @item C-c C-s C-s
5388 @kindex C-c C-s C-s (Summary)
5389 @findex gnus-summary-sort-by-subject
5390 Sort by subject (@code{gnus-summary-sort-by-subject}).
5391
5392 @item C-c C-s C-d
5393 @kindex C-c C-s C-d (Summary)
5394 @findex gnus-summary-sort-by-date
5395 Sort by date (@code{gnus-summary-sort-by-date}).
5396
5397 @item C-c C-s C-i
5398 @kindex C-c C-s C-i (Summary)
5399 @findex gnus-summary-sort-by-score
5400 Sort by score (@code{gnus-summary-sort-by-score}).
5401 @end table
5402
5403 These functions will work both when you use threading and when you don't
5404 use threading.  In the latter case, all summary lines will be sorted,
5405 line by line.  In the former case, sorting will be done on a
5406 root-by-root basis, which might not be what you were looking for.  To
5407 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
5408 Commands}).
5409
5410
5411 @node Finding the Parent
5412 @section Finding the Parent
5413 @cindex parent articles
5414 @cindex referring articles
5415
5416 @findex gnus-summary-refer-parent-article
5417 @kindex ^ (Summary)
5418 If you'd like to read the parent of the current article, and it is not
5419 displayed in the summary buffer, you might still be able to.  That is,
5420 if the current group is fetched by @sc{nntp}, the parent hasn't expired
5421 and the @code{References} in the current article are not mangled, you
5422 can just press @kbd{^} or @kbd{A r}
5423 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
5424 you'll get the parent.  If the parent is already displayed in the
5425 summary buffer, point will just move to this article.
5426
5427 @findex gnus-summary-refer-references
5428 @kindex A R (Summary)
5429 You can have Gnus fetch all articles mentioned in the @code{References}
5430 header of the article by pushing @kbd{A R}
5431 (@code{gnus-summary-refer-references}). 
5432
5433 @findex gnus-summary-refer-article
5434 @kindex M-^ (Summary)
5435 You can also ask the @sc{nntp} server for an arbitrary article, no
5436 matter what group it belongs to.  @kbd{M-^}
5437 (@code{gnus-summary-refer-article}) will ask you for a
5438 @code{Message-ID}, which is one of those long thingies that look
5439 something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You have to get
5440 it all exactly right.  No fuzzy searches, I'm afraid.
5441
5442 @vindex gnus-refer-article-method
5443 If the group you are reading is located on a backend that does not
5444 support fetching by @code{Message-ID} very well (like @code{nnspool}),
5445 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
5446 would, perhaps, be best if the @sc{nntp} server you consult is the same
5447 as the one that keeps the spool you are reading from updated, but that's
5448 not really necessary.
5449
5450 Most of the mail backends support fetching by @code{Message-ID}, but do
5451 not do a particularly excellent job of it.  That is, @code{nnmbox} and
5452 @code{nnbabyl} are able to locate articles from any groups, while
5453 @code{nnml} and @code{nnfolder} are only able to locate articles that
5454 have been posted to the current group.  (Anything else would be too time
5455 consuming.)  @code{nnmh} does not support this at all.
5456
5457
5458 @node Alternative Approaches
5459 @section Alternative Approaches
5460
5461 Different people like to read news using different methods.  This being
5462 Gnus, we offer a small selection of minor modes for the summary buffers.
5463
5464 @menu
5465 * Pick and Read::               First mark articles and then read them.
5466 * Binary Groups::               Auto-decode all articles.
5467 @end menu
5468
5469
5470 @node Pick and Read
5471 @subsection Pick and Read
5472 @cindex pick and read
5473
5474 Some newsreaders (like @code{nn} and, uhm, @code{nn}) use a two-phased
5475 reading interface.  The user first marks the articles she wants to read
5476 from a summary buffer.  Then she starts reading the articles with just
5477 an article buffer displayed.
5478
5479 @findex gnus-pick-mode
5480 @kindex M-x gnus-pick-mode
5481 Gnus provides a summary buffer minor mode that allows
5482 this---@code{gnus-pick-mode}.  This basically means that a few process
5483 mark commands become one-keystroke commands to allow easy marking, and
5484 it makes one additional command for switching to the summary buffer
5485 available. 
5486
5487 Here are the available keystrokes when using pick mode:
5488
5489 @table @kbd
5490 @item SPACE
5491 @kindex SPACE (Pick)
5492 @findex gnus-summary-mark-as-processable
5493 Pick the article (@code{gnus-summary-mark-as-processable}). 
5494
5495 @item u
5496 @kindex u (Pick)
5497 @findex gnus-summary-unmark-as-processable
5498 Unpick the article (@code{gnus-summary-unmark-as-processable}). 
5499
5500 @item U
5501 @kindex U (Pick)
5502 @findex gnus-summary-unmark-all-processable
5503 Unpick all articles (@code{gnus-summary-unmark-all-processable}). 
5504
5505 @item t
5506 @kindex t (Pick)
5507 @findex gnus-uu-mark-thread
5508 Pick the thread (@code{gnus-uu-mark-thread}). 
5509
5510 @item T
5511 @kindex T (Pick)
5512 @findex gnus-uu-unmark-thread
5513 Unpick the thread (@code{gnus-uu-unmark-thread}). 
5514
5515 @item r
5516 @kindex r (Pick)
5517 @findex gnus-uu-mark-region
5518 Pick the region (@code{gnus-uu-mark-region}). 
5519
5520 @item R
5521 @kindex R (Pick)
5522 @findex gnus-uu-unmark-region
5523 Unpick the region (@code{gnus-uu-unmark-region}). 
5524
5525 @item e
5526 @kindex e (Pick)
5527 @findex gnus-uu-mark-by-regexp
5528 Pick articles that match a regexp (@code{gnus-uu-mark-by-regexp}). 
5529
5530 @item E
5531 @kindex E (Pick)
5532 @findex gnus-uu-unmark-by-regexp
5533 Unpick articles that match a regexp (@code{gnus-uu-unmark-by-regexp}). 
5534
5535 @item b
5536 @kindex b (Pick)
5537 @findex gnus-uu-mark-buffer
5538 Pick the buffer (@code{gnus-uu-mark-buffer}). 
5539
5540 @item B
5541 @kindex B (Pick)
5542 @findex gnus-uu-unmark-buffer
5543 Unpick the buffer (@code{gnus-uu-unmark-buffer}). 
5544
5545 @item RET
5546 @kindex RET (Pick)
5547 @findex gnus-pick-start-reading
5548 @vindex gnus-pick-display-summary
5549 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
5550 given a prefix, mark all unpicked articles as read first.  If
5551 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
5552 will still be visible when you are reading.
5553
5554 @end table
5555
5556 If this sounds like a good idea to you, you could say:
5557
5558 @lisp
5559 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
5560 @end lisp
5561
5562 @vindex gnus-pick-mode-hook
5563 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
5564
5565
5566 @node Binary Groups
5567 @subsection Binary Groups
5568 @cindex binary groups
5569
5570 @findex gnus-binary-mode
5571 @kindex M-x gnus-binary-mode
5572 If you spend much time in binary groups, you may grow tired of hitting
5573 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
5574 is a minor mode for summary buffers that makes all ordinary Gnus article
5575 selection functions uudecode series of articles and display the result
5576 instead of just displaying the articles the normal way.  
5577
5578 @kindex g (Binary)
5579 @findex gnus-binary-show-article
5580 In fact, the only way to see the actual articles if you have turned this
5581 mode on is the @kbd{g} command (@code{gnus-binary-show-article}). 
5582
5583 @vindex gnus-binary-mode-hook
5584 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
5585
5586
5587 @node Tree Display
5588 @section Tree Display
5589 @cindex trees
5590
5591 @vindex gnus-use-trees
5592 If you don't like the normal Gnus summary display, you might try setting
5593 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
5594 additional @dfn{tree buffer}.  You can execute all summary mode commands
5595 in the tree buffer.  
5596
5597 There are a few variables to customize the tree display, of course:
5598
5599 @table @code
5600 @item gnus-tree-mode-hook
5601 @vindex gnus-tree-mode-hook
5602 A hook called in all tree mode buffers.
5603
5604 @item gnus-tree-mode-line-format
5605 @vindex gnus-tree-mode-line-format
5606 A format string for the mode bar in the tree mode buffers.  The default
5607 is @samp{Gnus: %%b [%A] %Z}.  For a list of legal specs, @pxref{Summary
5608 Buffer Mode Line}. 
5609
5610 @item gnus-selected-tree-face
5611 @vindex gnus-selected-tree-face
5612 Face used for highlighting the selected article in the tree buffer.  The
5613 default is @code{modeline}.
5614
5615 @item gnus-tree-line-format
5616 @vindex gnus-tree-line-format
5617 A format string for the tree nodes.  The name is a bit of a misnomer,
5618 though---it doesn't define a line, but just the node.  The default value
5619 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
5620 the name of the poster.  It is vital that all nodes are of the same
5621 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
5622
5623 Legal specs are:
5624
5625 @table @samp
5626 @item n
5627 The name of the poster.
5628 @item f
5629 The @code{From} header.
5630 @item N
5631 The number of the article.
5632 @item [
5633 The opening bracket.
5634 @item ] 
5635 The closing bracket.
5636 @item s
5637 The subject.
5638 @end table
5639
5640 @xref{Formatting Variables}.
5641
5642 Variables related to the display are:
5643
5644 @table @code
5645 @item gnus-tree-brackets
5646 @vindex gnus-tree-brackets
5647 This is used for differentiating between ``real'' articles and
5648 ``sparse'' articles.  The format is @var{((real-open . real-close)
5649 (sparse-open . sparse-close) (dummy-open . dummy-close))}, and the
5650 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}))}.
5651
5652 @item gnus-tree-parent-child-edges
5653 @vindex gnus-tree-parent-child-edges
5654 This is a list that contains the characters used for connecting parent
5655 nodes to their children.  The default is @code{(?- ?\\ ?|)}. 
5656
5657 @end table
5658
5659 @item gnus-tree-minimize-window
5660 @vindex gnus-tree-minimize-window
5661 If this variable is non-@code{nil}, Gnus will try to keep the tree
5662 buffer as small as possible to allow more room for the other Gnus
5663 windows.  If this variable is a number, the tree buffer will never be
5664 higher than that number.  The default is @code{t}.
5665
5666 @item gnus-generate-tree-function
5667 @vindex gnus-generate-tree-function
5668 @findex gnus-generate-horizontal-tree
5669 @findex gnus-generate-vertical-tree
5670 The function that actually generates the thread tree.  Two predefined
5671 functions are available: @code{gnus-generate-horizontal-tree} and
5672 @code{gnus-generate-vertical-tree} (which is the default).
5673
5674 @end table
5675
5676 Here's and example from a horizontal tree buffer:
5677
5678 @example
5679 @{***@}-(***)-[odd]-[Gun]
5680      |     \[Jan]
5681      |     \[odd]-[Eri]
5682      |     \(***)-[Eri]
5683      |           \[odd]-[Paa]
5684      \[Bjo]
5685      \[Gun]
5686      \[Gun]-[Jor]
5687 @end example
5688
5689 Here's the same thread displayed in a vertical tree buffer:
5690
5691 @example
5692 @{***@}
5693   |--------------------------\-----\-----\
5694 (***)                         [Bjo] [Gun] [Gun]
5695   |--\-----\-----\                          |
5696 [odd] [Jan] [odd] (***)                   [Jor]
5697   |           |     |--\
5698 [Gun]       [Eri] [Eri] [odd]
5699                           |
5700                         [Paa]
5701 @end example
5702
5703
5704 @node Mail Group Commands
5705 @section Mail Group Commands
5706 @cindex mail group commands
5707
5708 Some commands only make sense in mail groups.  If these commands are
5709 illegal in the current group, they will raise a hell and let you know.
5710
5711 All these commands (except the expiry and edit commands) use the
5712 process/prefix convention (@pxref{Process/Prefix}).
5713
5714 @table @kbd
5715
5716 @item B e
5717 @kindex B e (Summary)
5718 @findex gnus-summary-expire-articles
5719 Expire all expirable articles in the group
5720 (@code{gnus-summary-expire-articles}).
5721
5722 @item B M-C-e
5723 @kindex B M-C-e (Summary)
5724 @findex gnus-summary-expire-articles-now
5725 Expunge all the expirable articles in the group
5726 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
5727 articles that are eligible for expiry in the current group will
5728 disappear forever into that big @file{/dev/null} in the sky.
5729
5730 @item B DEL
5731 @kindex B DEL (Summary)
5732 @findex gnus-summary-delete-article
5733 Delete the mail article.  This is ``delete'' as in ``delete it from your
5734 disk forever and ever, never to return again.'' Use with caution.
5735 (@code{gnus-summary-delete-article}).
5736
5737 @item B m
5738 @kindex B m (Summary)
5739 @cindex move mail
5740 @findex gnus-summary-move-article
5741 Move the article from one mail group to another
5742 (@code{gnus-summary-move-article}). 
5743
5744 @item B c
5745 @kindex B c (Summary)
5746 @cindex copy mail
5747 @findex gnus-summary-copy-article
5748 Copy the article from one group (mail group or not) to a mail group
5749 (@code{gnus-summary-copy-article}).
5750
5751 @item B C
5752 @kindex B C (Summary)
5753 @cindex crosspost mail
5754 @findex gnus-summary-crosspost-article
5755 Crosspost the current article to some other group
5756 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
5757 the article in the other group, and the Xref headers of the article will
5758 be properly updated.
5759
5760 @item B i
5761 @kindex B i (Summary)
5762 @findex gnus-summary-import-article
5763 Import an arbitrary file into the current mail newsgroup
5764 (@code{gnus-summary-import-article}).  You will be prompted for a file
5765 name, a @code{From} header and a @code{Subject} header.
5766
5767 @item B r
5768 @kindex B r (Summary)
5769 @findex gnus-summary-respool-article
5770 Respool the mail article (@code{gnus-summary-move-article}).
5771
5772 @item B w
5773 @itemx e
5774 @kindex B w (Summary)
5775 @kindex e (Summary)
5776 @findex gnus-summary-edit-article
5777 @kindex C-c C-c (Article)
5778 Edit the current article (@code{gnus-summary-edit-article}).  To finish
5779 editing and make the changes permanent, type @kbd{C-c C-c}
5780 (@kbd{gnus-summary-edit-article-done}).
5781
5782 @item B q
5783 @kindex B q (Summary)
5784 @findex gnus-summary-respool-query
5785 If you want to re-spool an article, you might be curious as to what group
5786 the article will end up in before you do the re-spooling.  This command
5787 will tell you (@code{gnus-summary-respool-query}). 
5788 @end table
5789
5790 @vindex gnus-move-split-methods
5791 @cindex moving articles
5792 If you move (or copy) articles regularly, you might wish to have Gnus
5793 suggest where to put the articles.  @code{gnus-move-split-methods} is a
5794 variable that uses the same syntax as @code{gnus-split-methods}
5795 (@pxref{Saving Articles}).  You may customize that variable to create
5796 suggestions you find reasonable.
5797
5798
5799 @node Various Summary Stuff
5800 @section Various Summary Stuff
5801
5802 @menu
5803 * Summary Group Information::         Information oriented commands.
5804 * Searching for Articles::            Multiple article commands.
5805 * Really Various Summary Commands::   Those pesky non-conformant commands.
5806 @end menu
5807
5808 @table @code
5809 @vindex gnus-summary-mode-hook
5810 @item gnus-summary-mode-hook
5811 This hook is called when creating a summary mode buffer.
5812
5813 @vindex gnus-summary-generate-hook
5814 @item gnus-summary-generate-hook
5815 This is called as the last thing before doing the threading and the
5816 generation of the summary buffer.  It's quite convenient for customizing
5817 the threading variables based on what data the newsgroup has.  This hook
5818 is called from the summary buffer after most summary buffer variables
5819 has been set.
5820
5821 @vindex gnus-summary-prepare-hook
5822 @item gnus-summary-prepare-hook
5823 Is is called after the summary buffer has been generated.  You might use
5824 it to, for instance, highlight lines or modify the look of the buffer in
5825 some other ungodly manner.  I don't care.
5826
5827 @end table
5828
5829
5830 @node Summary Group Information
5831 @subsection Summary Group Information
5832
5833 @table @kbd
5834
5835 @item H f
5836 @kindex H f (Summary)
5837 @findex gnus-summary-fetch-faq
5838 @vindex gnus-group-faq-directory
5839 Try to fetch the FAQ (list of frequently asked questions) for the
5840 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
5841 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
5842 on a remote machine.  This variable can also be a list of directories.
5843 In that case, giving a prefix to this command will allow you to choose
5844 between the various sites.  @code{ange-ftp} probably will be used for
5845 fetching the file.
5846
5847 @item H d
5848 @kindex H d (Summary)
5849 @findex gnus-summary-describe-group
5850 Give a brief description of the current group
5851 (@code{gnus-summary-describe-group}).  If given a prefix, force
5852 rereading the description from the server.
5853
5854 @item H h
5855 @kindex H h (Summary)
5856 @findex gnus-summary-describe-briefly
5857 Give a very brief description of the most important summary keystrokes
5858 (@code{gnus-summary-describe-briefly}). 
5859
5860 @item H i
5861 @kindex H i (Summary)
5862 @findex gnus-info-find-node
5863 Go to the Gnus info node (@code{gnus-info-find-node}).
5864 @end table
5865
5866
5867 @node Searching for Articles
5868 @subsection Searching for Articles
5869
5870 @table @kbd
5871
5872 @item M-s
5873 @kindex M-s (Summary)
5874 @findex gnus-summary-search-article-forward
5875 Search through all subsequent articles for a regexp
5876 (@code{gnus-summary-search-article-forward}). 
5877
5878 @item M-r
5879 @kindex M-r (Summary)
5880 @findex gnus-summary-search-article-backward
5881 Search through all previous articles for a regexp
5882 (@code{gnus-summary-search-article-backward}). 
5883
5884 @item &
5885 @kindex & (Summary)
5886 @findex gnus-summary-execute-command
5887 This command will prompt you for a header field, a regular expression to
5888 match on this field, and a command to be executed if the match is made
5889 (@code{gnus-summary-execute-command}).
5890
5891 @item M-&
5892 @kindex M-& (Summary)
5893 @findex gnus-summary-universal-argument
5894 Perform any operation on all articles that have been marked with
5895 the process mark (@code{gnus-summary-universal-argument}).
5896 @end table
5897
5898
5899 @node Really Various Summary Commands
5900 @subsection Really Various Summary Commands
5901
5902 @table @kbd
5903
5904 @item A D
5905 @kindex A D (Summary)
5906 @findex gnus-summary-enter-digest-group
5907 If the current article is a collection of other articles (for instance,
5908 a digest), you might use this command to enter a group based on the that
5909 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
5910 guess what article type is currently displayed unless you give a prefix
5911 to this command, which forces a ``digest'' interpretation.  Basically,
5912 whenever you see a message that is a collection of other messages on
5913 some format, you @kbd{A D} and read these messages in a more convenient
5914 fashion.
5915
5916 @item C-t
5917 @kindex C-t (Summary)
5918 @findex gnus-summary-toggle-truncation
5919 Toggle truncation of summary lines (@code{gnus-summary-toggle-truncation}).
5920
5921 @item =
5922 @kindex = (Summary)
5923 @findex gnus-summary-expand-window
5924 Expand the summary buffer window (@code{gnus-summary-expand-window}).
5925 If given a prefix, force an @code{article} window configuration. 
5926 @end table
5927
5928
5929 @node Exiting the Summary Buffer
5930 @section Exiting the Summary Buffer
5931 @cindex summary exit
5932 @cindex exiting groups
5933
5934 Exiting from the summary buffer will normally update all info on the
5935 group and return you to the group buffer. 
5936
5937 @table @kbd
5938
5939 @item Z Z
5940 @itemx q
5941 @kindex Z Z (Summary)
5942 @kindex q (Summary)
5943 @findex gnus-summary-exit
5944 @vindex gnus-summary-exit-hook
5945 @vindex gnus-summary-prepare-exit-hook
5946 Exit the current group and update all information on the group
5947 (@code{gnus-summary-exit}). @code{gnus-summary-prepare-exit-hook} is
5948 called before doing much of the exiting, and calls
5949 @code{gnus-summary-expire-articles} by default.
5950 @code{gnus-summary-exit-hook} is called after finishing the exiting
5951 process. 
5952
5953 @item Z E
5954 @itemx Q
5955 @kindex Z E (Summary)
5956 @kindex Q (Summary)
5957 @findex gnus-summary-exit-no-update
5958 Exit the current group without updating any information on the group
5959 (@code{gnus-summary-exit-no-update}).
5960
5961 @item Z c
5962 @itemx c
5963 @kindex Z c (Summary)
5964 @kindex c (Summary)
5965 @findex gnus-summary-catchup-and-exit
5966 Mark all unticked articles in the group as read and then exit
5967 (@code{gnus-summary-catchup-and-exit}).
5968
5969 @item Z C
5970 @kindex Z C (Summary)
5971 @findex gnus-summary-catchup-all-and-exit
5972 Mark all articles, even the ticked ones, as read and then exit
5973 (@code{gnus-summary-catchup-all-and-exit}).
5974
5975 @item Z n
5976 @kindex Z n (Summary)
5977 @findex gnus-summary-catchup-and-goto-next-group
5978 Mark all articles as read and go to the next group
5979 (@code{gnus-summary-catchup-and-goto-next-group}). 
5980
5981 @item Z R
5982 @kindex Z R (Summary)
5983 @findex gnus-summary-reselect-current-group
5984 Exit this group, and then enter it again
5985 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
5986 all articles, both read and unread.
5987
5988 @item Z G
5989 @itemx M-g
5990 @kindex Z G (Summary)
5991 @kindex M-g (Summary)
5992 @findex gnus-summary-rescan-group
5993 Exit the group, check for new articles in the group, and select the
5994 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
5995 articles, both read and unread.
5996
5997 @item Z N
5998 @kindex Z N (Summary)
5999 @findex gnus-summary-next-group
6000 Exit the group and go to the next group
6001 (@code{gnus-summary-next-group}). 
6002
6003 @item Z P
6004 @kindex Z P (Summary)
6005 @findex gnus-summary-prev-group
6006 Exit the group and go to the previous group
6007 (@code{gnus-summary-prev-group}). 
6008 @end table
6009
6010 @vindex gnus-exit-group-hook
6011 @code{gnus-exit-group-hook} is called when you exit the current
6012 group.  
6013
6014 @findex gnus-summary-wake-up-the-dead
6015 @findex gnus-dead-summary-mode
6016 @vindex gnus-kill-summary-on-exit
6017 If you're in the habit of exiting groups, and then changing your mind
6018 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
6019 If you do that, Gnus won't kill the summary buffer when you exit it.
6020 (Quelle surprise!)  Instead it will change the name of the buffer to
6021 something like @samp{*Dead Summary ... *} and install a minor mode
6022 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
6023 buffer, you'll find that all keys are mapped to a function called
6024 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
6025 summary buffer will result in a live, normal summary buffer.  
6026
6027 There will never be more than one dead summary buffer at any one time. 
6028
6029 @vindex gnus-use-cross-reference
6030 The data on the current group will be updated (which articles you have
6031 read, which articles you have replied to, etc.) when you exit the
6032 summary buffer.  If the @code{gnus-use-cross-reference} variable is
6033 @code{t} (which is the default), articles that are cross-referenced to
6034 this group and are marked as read, will also be marked as read in the
6035 other subscribed groups they were cross-posted to.  If this variable is
6036 neither @code{nil} nor @code{t}, the article will be marked as read in
6037 both subscribed and unsubscribed groups.
6038
6039 @cindex velveeta
6040 @cindex spamming
6041 Marking cross-posted articles as read ensures that you'll never have to
6042 read the same article more than once.  Unless, of course, somebody has
6043 posted it to several groups separately.  Posting the same article to
6044 several groups (not cross-posting) is called @dfn{spamming}, and you are
6045 by law required to send nasty-grams to anyone who perpetrates such a
6046 heinous crime.
6047
6048 Remember: Cross-posting is kinda ok, but posting the same article
6049 separately to several groups is not.  Massive cross-posting (aka.
6050 @dfn{velveeta}) is to be avoided.  
6051
6052 @cindex cross-posting
6053 @cindex Xref
6054 @cindex @sc{nov}
6055 One thing that may cause Gnus to not do the cross-posting thing
6056 correctly is if you use an @sc{nntp} server that supports @sc{xover}
6057 (which is very nice, because it speeds things up considerably) which
6058 does not include the @code{Xref} header in its @sc{nov} lines.  This is
6059 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
6060 even with @sc{xover} by registering the @code{Xref} lines of all
6061 articles you actually read, but if you kill the articles, or just mark
6062 them as read without reading them, Gnus will not get a chance to snoop
6063 the @code{Xref} lines out of these articles, and will be unable to use
6064 the cross reference mechanism.
6065
6066 @cindex LIST overview.fmt
6067 @cindex overview.fmt
6068 To check whether your @sc{nntp} server includes the @code{Xref} header
6069 in its overview files, try @samp{telnet your.nntp.server nntp},
6070 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
6071 overview.fmt}.  This may not work, but if it does, and the last line you
6072 get does not read @samp{Xref:full}, then you should shout and whine at
6073 your news admin until she includes the @code{Xref} header in the
6074 overview files.
6075
6076 @vindex gnus-nov-is-evil
6077 If you want Gnus to get the @code{Xref}s right all the time, you have to
6078 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
6079 considerably.
6080
6081 C'est la vie.
6082
6083
6084 @node The Article Buffer
6085 @chapter The Article Buffer
6086 @cindex article buffer
6087
6088 The articles are displayed in the article buffer, of which there is only
6089 one.  All the summary buffers share the same article buffer unless you
6090 tell Gnus otherwise.
6091
6092 @menu
6093 * Hiding Headers::        Deciding what headers should be displayed.
6094 * Using MIME::            Pushing articles through @sc{mime} before reading them.
6095 * Customizing Articles::  Tailoring the look of the articles.
6096 * Article Keymap::        Keystrokes available in the article buffer
6097 * Misc Article::          Other stuff.
6098 @end menu
6099
6100
6101 @node Hiding Headers
6102 @section Hiding Headers
6103 @cindex hiding headers
6104 @cindex deleting headers
6105
6106 The top section of each article is the @dfn{head}.  (The rest is the
6107 @dfn{body}, but you may have guessed that already.)
6108
6109 @vindex gnus-show-all-headers
6110 There is a lot of useful information in the head: the name of the person
6111 who wrote the article, the date it was written and the subject of the
6112 article.  That's well and nice, but there's also lots of information
6113 most people do not want to see---what systems the article has passed
6114 through before reaching you, the @code{Message-ID}, the
6115 @code{References}, etc. ad nauseum---and you'll probably want to get rid
6116 of some of those lines.  If you want to keep all those lines in the
6117 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
6118
6119 Gnus provides you with two variables for sifting headers:
6120
6121 @table @code
6122
6123 @item gnus-visible-headers
6124 @vindex gnus-visible-headers
6125 If this variable is non-@code{nil}, it should be a regular expression
6126 that says what headers you wish to keep in the article buffer.  All
6127 headers that do not match this variable will be hidden.
6128
6129 For instance, if you only want to see the name of the person who wrote
6130 the article and the subject, you'd say:
6131
6132 @lisp
6133 (setq gnus-visible-headers "^From:\\|^Subject:")
6134 @end lisp
6135
6136 This variable can also be a list of regexps to match headers that are to
6137 remain visible.
6138
6139 @item gnus-ignored-headers
6140 @vindex gnus-ignored-headers
6141 This variable is the reverse of @code{gnus-visible-headers}.  If this
6142 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
6143 should be a regular expression that matches all lines that you want to
6144 hide.  All lines that do not match this variable will remain visible.
6145
6146 For instance, if you just want to get rid of the @code{References} line
6147 and the @code{Xref} line, you might say:
6148
6149 @lisp
6150 (setq gnus-ignored-headers "^References:\\|^Xref:")
6151 @end lisp
6152
6153 This variable can also be a list of regexps to match headers that are to
6154 be removed.
6155
6156 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
6157 variable will have no effect.
6158
6159 @end table
6160
6161 @vindex gnus-sorted-header-list
6162 Gnus can also sort the headers for you.  (It does this by default.)  You
6163 can control the sorting by setting the @code{gnus-sorted-header-list}
6164 variable.  It is a list of regular expressions that says in what order
6165 the headers are to be displayed.
6166
6167 For instance, if you want the name of the author of the article first,
6168 and then the subject, you might say something like:
6169
6170 @lisp
6171 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
6172 @end lisp
6173
6174 Any headers that are to remain visible, but are not listed in this
6175 variable, will be displayed in random order after all the headers that
6176 are listed in this variable.
6177
6178 @findex gnus-article-hide-boring-headers
6179 @vindex gnus-article-display-hook
6180 @vindex gnus-boring-article-headers
6181 You can hide further boring headers by entering
6182 @code{gnus-article-hide-boring-headers} into
6183 @code{gnus-article-display-hook}.  What this function does depends on
6184 the @code{gnus-boring-article-headers} variable.  It's a list, but this
6185 list doesn't actually contain header names.  Instead is lists various
6186 @dfn{boring conditions} that Gnus can check and remove from sight.
6187
6188 These conditions are:
6189 @table @code
6190 @item empty
6191 Remove all empty headers.
6192 @item newsgroups
6193 Remove the @code{Newsgroups} header if it only contains the current group
6194 name. 
6195 @item followup-to
6196 Remove the @code{Followup-To} header if it is identical to the
6197 @code{Newsgroups} header.
6198 @item reply-to
6199 Remove the @code{Reply-To} header if it lists the same address as the
6200 @code{From} header.
6201 @item date
6202 Remove the @code{Date} header if the article is less than three days
6203 old. 
6204 @end table
6205
6206 To include the four first elements, you could say something like;
6207
6208 @lisp
6209 (setq gnus-boring-article-headers 
6210       '(empty newsgroups followup-to reply-to))
6211 @end lisp
6212
6213 This is also the default value for this variable.
6214
6215
6216 @node Using MIME
6217 @section Using @sc{mime}
6218 @cindex @sc{mime}
6219
6220 Mime is a standard for waving your hands through the air, aimlessly,
6221 while people stand around yawning.
6222
6223 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
6224 while all newsreaders die of fear.
6225
6226 @sc{mime} may specify what character set the article uses, the encoding
6227 of the characters, and it also makes it possible to embed pictures and
6228 other naughty stuff in innocent-looking articles.
6229
6230 @vindex gnus-show-mime
6231 @vindex gnus-show-mime-method
6232 @vindex gnus-strict-mime
6233 @findex metamail-buffer
6234 Gnus handles @sc{mime} by shoving the articles through
6235 @code{gnus-show-mime-method}, which is @code{metamail-buffer} by
6236 default.  Set @code{gnus-show-mime} to @code{t} if you want to use
6237 @sc{mime} all the time.  However, if @code{gnus-strict-mime} is
6238 non-@code{nil}, the @sc{mime} method will only be used if there are
6239 @sc{mime} headers in the article.
6240
6241 It might be best to just use the toggling functions from the summary
6242 buffer to avoid getting nasty surprises. (For instance, you enter the
6243 group @samp{alt.sing-a-long} and, before you know it, @sc{mime} has
6244 decoded the sound file in the article and some horrible sing-a-long song
6245 comes streaming out out your speakers, and you can't find the volume
6246 button, because there isn't one, and people are starting to look at you,
6247 and you try to stop the program, but you can't, and you can't find the
6248 program to control the volume, and everybody else in the room suddenly
6249 decides to look at you disdainfully, and you'll feel rather stupid.)
6250
6251 Any similarity to real events and people is purely coincidental.  Ahem.
6252
6253
6254 @node Customizing Articles
6255 @section Customizing Articles
6256 @cindex article customization
6257
6258 @vindex gnus-article-display-hook
6259 The @code{gnus-article-display-hook} is called after the article has
6260 been inserted into the article buffer.  It is meant to handle all
6261 treatment of the article before it is displayed. 
6262
6263 @findex gnus-article-maybe-highlight
6264 By default it contains @code{gnus-article-hide-headers},
6265 @code{gnus-article-treat-overstrike}, and
6266 @code{gnus-article-maybe-highlight}, but there are thousands, nay
6267 millions, of functions you can put in this hook.  For an overview of
6268 functions @pxref{Article Highlighting}, @pxref{Article Hiding},
6269 @pxref{Article Washing}, @pxref{Article Buttons} and @pxref{Article
6270 Date}.
6271
6272 You can, of course, write your own functions.  The functions are called
6273 from the article buffer, and you can do anything you like, pretty much.
6274 There is no information that you have to keep in the buffer---you can
6275 change everything.  However, you shouldn't delete any headers.  Instead
6276 make them invisible if you want to make them go away.
6277
6278
6279 @node Article Keymap
6280 @section Article Keymap
6281
6282 Most of the keystrokes in the summary buffer can also be used in the
6283 article buffer.  They should behave as if you typed them in the summary
6284 buffer, which means that you don't actually have to have a summary
6285 buffer displayed while reading.  You can do it all from the article
6286 buffer.
6287
6288 A few additional keystrokes are available:
6289
6290 @table @kbd
6291
6292 @item SPACE
6293 @kindex SPACE (Article)
6294 @findex gnus-article-next-page
6295 Scroll forwards one page (@code{gnus-article-next-page}).
6296
6297 @item DEL
6298 @kindex DEL (Article)
6299 @findex gnus-article-prev-page
6300 Scroll backwards one page (@code{gnus-article-prev-page}).
6301
6302 @item C-c ^
6303 @kindex C-c ^ (Article)
6304 @findex gnus-article-refer-article
6305 If point is in the neighborhood of a @code{Message-ID} and you press
6306 @kbd{r}, Gnus will try to get that article from the server
6307 (@code{gnus-article-refer-article}).
6308
6309 @item C-c C-m
6310 @kindex C-c C-m (Article)
6311 @findex gnus-article-mail
6312 Send a reply to the address near point (@code{gnus-article-mail}).  If
6313 given a prefix, include the mail.
6314
6315 @item s
6316 @kindex s (Article)
6317 @findex gnus-article-show-summary
6318 Reconfigure the buffers so that the summary buffer becomes visible
6319 (@code{gnus-article-show-summary}).
6320
6321 @item ?
6322 @kindex ? (Article)
6323 @findex gnus-article-describe-briefly
6324 Give a very brief description of the available keystrokes
6325 (@code{gnus-article-describe-briefly}). 
6326
6327 @item TAB
6328 @kindex TAB (Article)
6329 @findex gnus-article-next-button
6330 Go to the next button, if any (@code{gnus-article-next-button}.  This
6331 only makes sense if you have buttonizing turned on.
6332
6333 @item M-TAB
6334 @kindex M-TAB (Article)
6335 @findex gnus-article-prev-button
6336 Go to the previous button, if any (@code{gnus-article-prev-button}.  
6337
6338 @end table
6339
6340
6341 @node Misc Article
6342 @section Misc Article
6343
6344 @table @code
6345
6346 @item gnus-single-article-buffer
6347 @vindex gnus-single-article-buffer
6348 If non-@code{nil}, use the same article buffer for all the groups.
6349 (This is the default.)  If @code{nil}, each group will have its own
6350 article buffer.
6351
6352 @vindex gnus-article-prepare-hook
6353 @item gnus-article-prepare-hook
6354 This hook is called right after the article has been inserted into the
6355 article buffer.  It is mainly intended for functions that do something
6356 depending on the contents; it should probably not be used for changing
6357 the contents of the article buffer.
6358
6359 @vindex gnus-article-display-hook
6360 @item gnus-article-display-hook
6361 This hook is called as the last thing when displaying an article, and is
6362 intended for modifying the contents of the buffer, doing highlights,
6363 hiding headers, and the like.
6364
6365 @item gnus-article-mode-hook
6366 @vindex gnus-article-mode-hook
6367 Hook called in article mode buffers.
6368
6369 @vindex gnus-article-mode-line-format
6370 @item gnus-article-mode-line-format
6371 This variable is a format string along the same lines as
6372 @code{gnus-summary-mode-line-format}.  It accepts the same
6373 format specifications as that variable, with one extension:
6374
6375 @table @samp
6376 @item w
6377 The @dfn{wash status} of the article.  This is a short string with one
6378 character for each possible article wash operation that may have been
6379 performed. 
6380 @end table
6381
6382 @vindex gnus-break-pages
6383
6384 @item gnus-break-pages
6385 Controls whether @dfn{page breaking} is to take place.  If this variable
6386 is non-@code{nil}, the articles will be divided into pages whenever a
6387 page delimiter appears in the article.  If this variable is @code{nil},
6388 paging will not be done.
6389
6390 @item gnus-page-delimiter
6391 @vindex gnus-page-delimiter
6392 This is the delimiter mentioned above.  By default, it is @samp{^L}
6393 (form linefeed).
6394 @end table
6395
6396
6397 @node Composing Messages
6398 @chapter Composing Messages
6399 @cindex reply
6400 @cindex followup
6401 @cindex post
6402
6403 @kindex C-c C-c (Post)
6404 All commands for posting and mailing will put you in a message buffer
6405 where you can edit the article all you like, before you send the article
6406 by pressing @kbd{C-c C-c}.  @xref{Top, , Top, message, The Message
6407 Manual}.  If you are in a foreign news group, and you wish to post the
6408 article using the foreign server, you can give a prefix to @kbd{C-c C-c}
6409 to make Gnus try to post using the foreign server.
6410
6411 @menu 
6412 * Mail::                 Mailing and replying.
6413 * Post::                 Posting and following up.
6414 * Posting Server::       What server should you post via?
6415 * Mail and Post::        Mailing and posting at the same time.
6416 * Archived Messages::    Where Gnus stores the messages you've sent.
6417 @c * Posting Styles::       An easier way to configure some key elements.
6418 @c * Drafts::               Postponing messages and rejected messages.
6419 @c * Rejected Articles::    What happens if the server doesn't like your article?
6420 @end menu
6421
6422 Also see @pxref{Canceling and Superseding} for information on how to
6423 remove articles you shouldn't have posted.
6424
6425
6426 @node Mail
6427 @section Mail
6428
6429 Variables for customizing outgoing mail:
6430
6431 @table @code
6432 @item gnus-uu-digest-headers
6433 @vindex gnus-uu-digest-headers
6434 List of regexps to match headers included in digested messages.  The
6435 headers will be included in the sequence they are matched.
6436
6437 @end table
6438
6439
6440 @node Post
6441 @section Post
6442
6443 Variables for composing news articles:
6444
6445 @table @code
6446 @item gnus-sent-message-ids-file
6447 @vindex gnus-sent-message-ids-file
6448 Gnus will keep a @code{Message-ID} history file of all the mails it has
6449 sent.  If it discovers that it has already sent a mail, it will ask the
6450 user whether to re-send the mail.  (This is primarily useful when
6451 dealing with @sc{soup} packets and the like where one is apt to sent the
6452 same packet multiple times.)  This variable says what the name of this
6453 history file is.  It is @file{~/News/Sent-Message-IDs} by default.  Set
6454 this variable to @code{nil} if you don't want Gnus to keep a history
6455 file.
6456
6457 @item gnus-sent-message-ids-length
6458 @vindex gnus-sent-message-ids-length
6459 This variable says how many @code{Message-ID}s to keep in the history
6460 file.  It is 1000 by default.
6461
6462 @end table
6463
6464
6465 @node Posting Server
6466 @section Posting Server
6467
6468 When you press those magical @kbd{C-c C-c} keys to ship off your latest
6469 (extremely intelligent, of course) article, where does it go?
6470
6471 Thank you for asking.  I hate you.
6472
6473 @vindex gnus-post-method
6474
6475 It can be quite complicated.  Normally, Gnus will use the same native
6476 server.  However.  If your native server doesn't allow posting, just
6477 reading, you probably want to use some other server to post your
6478 (extremely intelligent and fabulously interesting) articles.  You can
6479 then set the @code{gnus-post-method} to some other method:
6480
6481 @lisp
6482 (setq gnus-post-method '(nnspool ""))
6483 @end lisp
6484
6485 Now, if you've done this, and then this server rejects your article, or
6486 this server is down, what do you do then?  To override this variable you
6487 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
6488 the ``current'' server for posting.
6489
6490 If you give a zero prefix (i. e., @kbd{C-u 0 C-c C-c}) to that command,
6491 Gnus will prompt you for what method to use for posting.  
6492
6493 You can also set @code{gnus-post-method} to a list of select methods.
6494 If that's the case, Gnus will always prompt you for what method to use
6495 for posting. 
6496
6497
6498 @node Mail and Post
6499 @section Mail and Post
6500
6501 Here's a list of variables that are relevant to both mailing and
6502 posting:
6503
6504 @table @code
6505 @item gnus-mailing-list-groups
6506 @findex gnus-mailing-list-groups
6507 @cindex mailing lists
6508
6509 If your news server offers groups that are really mailing lists that are
6510 gatewayed to the @sc{nntp} server, you can read those groups without
6511 problems, but you can't post/followup to them without some difficulty.
6512 One solution is to add a @code{to-address} to the group parameters
6513 (@pxref{Group Parameters}).  An easier thing to do is set the
6514 @code{gnus-mailing-list-groups} to a regexp that match the groups that
6515 really are mailing lists.  Then, at least, followups to the mailing
6516 lists will work most of the time.  Posting to these groups (@kbd{a}) is
6517 still a pain, though.
6518
6519 @end table
6520
6521 You may want to do spell-checking on messages that you send out.  Or, if
6522 you don't want to spell-check by hand, you could add automatic
6523 spell-checking via the @code{ispell} package:
6524
6525 @cindex ispell
6526 @findex ispell-message
6527 @lisp
6528 (add-hook 'message-send-hook 'ispell-message) 
6529 @end lisp
6530
6531
6532 @node Archived Messages
6533 @section Archived Messages
6534 @cindex archived messages
6535 @cindex sent messages
6536
6537 Gnus provides a few different methods for storing the mail you send.
6538 The default method is to use the @dfn{archive virtual server} to store
6539 the mail.  If you want to disable this completely, you should set
6540 @code{gnus-message-archive-group} to @code{nil}.
6541
6542 @vindex gnus-message-archive-method
6543 @code{gnus-message-archive-method} says what virtual server Gnus is to
6544 use to store sent messages.  It is @code{(nnfolder "archive"
6545 (nnfolder-directory "~/Mail/archive/"))} by default, but you can use any
6546 mail select method (@code{nnml}, @code{nnmbox}, etc.).  However,
6547 @code{nnfolder} is a quite likeable select method for doing this sort of
6548 thing.  If you don't like the default directory chosen, you could say
6549 something like:
6550
6551 @lisp
6552 (setq gnus-message-archive-method
6553       '(nnfolder "archive" 
6554                  (nnfolder-inhibit-expiry t)
6555                  (nnfolder-active-file "~/News/sent-mail/active")
6556                  (nnfolder-directory "~/News/sent-mail/")))
6557 @end lisp
6558
6559 @vindex gnus-message-archive-group
6560 @cindex Gcc
6561 Gnus will insert @code{Gcc} headers in all outgoing messages that point
6562 to one or more group(s) on that server.  Which group to use is
6563 determined by the @code{gnus-message-archive-group} variable.  
6564
6565 This variable can be:
6566
6567 @itemize @bullet
6568 @item a string
6569 Messages will be saved in that group.
6570 @item a list of strings
6571 Messages will be saved in all those groups.
6572 @item an alist of regexps, functions and forms
6573 When a key ``matches'', the result is used.
6574 @item @code{nil}
6575 No message archiving will take place.  This is the default.
6576 @end itemize
6577
6578 Let's illustrate:
6579
6580 Just saving to a single group called @samp{MisK}:
6581 @lisp
6582 (setq gnus-message-archive-group "MisK")
6583 @end lisp
6584
6585 Saving to two groups, @samp{MisK} and @samp{safe}:
6586 @lisp
6587 (setq gnus-message-archive-group '("MisK" "safe"))
6588 @end lisp
6589
6590 Save to different groups based on what group you are in:
6591 @lisp
6592 (setq gnus-message-archive-group 
6593       '(("^alt" "sent-to-alt")
6594         ("mail" "sent-to-mail")
6595         (".*" "sent-to-misc")))
6596 @end lisp
6597
6598 More complex stuff:
6599 @lisp
6600 (setq gnus-message-archive-group 
6601       '((if (message-news-p)
6602             "misc-news" 
6603           "misc-mail")))
6604 @end lisp       
6605
6606 How about storing all news messages in one file, but storing all mail
6607 messages in one file per month:
6608
6609 @lisp
6610 (setq gnus-message-archive-group
6611       '((if (message-news-p)
6612             "misc-news" 
6613           (concat "mail." (format-time-string 
6614                            "%Y-%m" (current-time))))))
6615 @end lisp
6616
6617 Now, when you send a message off, it will be stored in the appropriate
6618 group.  (If you want to disable storing for just one particular message,
6619 you can just remove the @code{Gcc} header that has been inserted.)  The
6620 archive group will appear in the group buffer the next time you start
6621 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
6622 enter it and read the articles in it just like you'd read any other
6623 group.  If the group gets really big and annoying, you can simply rename
6624 if (using @kbd{G r} in the group buffer) to something
6625 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
6626 continue to be stored in the old (now empty) group.
6627
6628 That's the default method of archiving sent mail.  Gnus also offers two
6629 other variables for the people who don't like the default method.  In
6630 that case you should set @code{gnus-message-archive-group} to
6631 @code{nil}; this will disable archiving.
6632
6633 XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
6634 use a different value for @code{gnus-message-archive-group} there.
6635
6636
6637 @table @code
6638 @item gnus-outgoing-message-group 
6639 @vindex gnus-outgoing-message-group 
6640 All outgoing messages will be put in this group.  If you want to store
6641 all your outgoing mail and articles in the group @samp{nnml:archive},
6642 you set this variable to that value.  This variable can also be a list of
6643 group names.
6644
6645 If you want to have greater control over what group to put each
6646 message in, you can set this variable to a function that checks the
6647 current newsgroup name and then returns a suitable group name (or list
6648 of names).
6649 @end table
6650
6651
6652 @c @node Posting Styles
6653 @c @section Posting Styles
6654 @c @cindex posting styles
6655 @c @cindex styles
6656 @c 
6657 @c All them variables, they make my head swim.  
6658 @c 
6659 @c So what if you want a different @code{Organization} and signature based
6660 @c on what groups you post to?  And you post both from your home machine
6661 @c and your work machine, and you want different @code{From} lines, and so
6662 @c on? 
6663 @c 
6664 @c @vindex gnus-posting-styles
6665 @c One way to do stuff like that is to write clever hooks that change the
6666 @c variables you need to have changed.  That's a bit boring, so somebody
6667 @c came up with the bright idea of letting the user specify these things in
6668 @c a handy alist.  Here's an example of a @code{gnus-posting-styles}
6669 @c variable: 
6670 @c 
6671 @c @lisp
6672 @c ((".*" 
6673 @c   (signature . "Peace and happiness")
6674 @c   (organization . "What me?"))
6675 @c  ("^comp" 
6676 @c   (signature . "Death to everybody"))
6677 @c  ("comp.emacs.i-love-it" 
6678 @c   (organization . "Emacs is it")))
6679 @c @end lisp
6680 @c 
6681 @c As you might surmise from this example, this alist consists of several
6682 @c @dfn{styles}.  Each style will be applicable if the first element
6683 @c ``matches'', in some form or other.  The entire alist will be iterated
6684 @c over, from the beginning towards the end, and each match will be
6685 @c applied, which means that attributes in later styles that match override
6686 @c the same attributes in earlier matching styles.  So
6687 @c @samp{comp.programming.literate} will have the @samp{Death to everybody}
6688 @c signature and the @samp{What me?} @code{Organization} header.
6689 @c 
6690 @c The first element in each style is called the @code{match}.  If it's a
6691 @c string, then Gnus will try to regexp match it against the group name.
6692 @c If it's a function symbol, that function will be called with no
6693 @c arguments.  If it's a variable symbol, then the variable will be
6694 @c referenced.  If it's a list, then that list will be @code{eval}ed.  In
6695 @c any case, if this returns a non-@code{nil} value, then the style is said
6696 @c to @dfn{match}.
6697 @c 
6698 @c Each style may contain a arbitrary amount of @dfn{attributes}.  Each
6699 @c attribute consists of a @var{(name . value)} pair.  The attribute name
6700 @c can be one of @code{signature}, @code{organization} or @code{from}.  The
6701 @c attribute name can also be a string.  In that case, this will be used as
6702 @c a header name, and the value will be inserted in the headers of the
6703 @c article.
6704 @c 
6705 @c The attribute value can be a string (used verbatim), a function (the
6706 @c return value will be used), a variable (its value will be used) or a
6707 @c list (it will be @code{eval}ed and the return value will be used).
6708 @c 
6709 @c So here's a new example:
6710 @c 
6711 @c @lisp
6712 @c (setq gnus-posting-styles
6713 @c       '((".*" 
6714 @c           (signature . "~/.signature") 
6715 @c           (from . "user@@foo (user)")
6716 @c           ("X-Home-Page" . (getenv "WWW_HOME"))
6717 @c           (organization . "People's Front Against MWM"))
6718 @c         ("^rec.humor" 
6719 @c           (signature . my-funny-signature-randomizer))
6720 @c         ((equal (system-name) "gnarly")
6721 @c           (signature . my-quote-randomizer))
6722 @c         (posting-from-work-p
6723 @c           (signature . "~/.work-signature")
6724 @c           (from . "user@@bar.foo (user)")
6725 @c           (organization . "Important Work, Inc"))
6726 @c         ("^nn.+:" 
6727 @c           (signature . "~/.mail-signature"))))
6728 @c @end lisp
6729
6730 @c @node Drafts
6731 @c @section Drafts
6732 @c @cindex drafts
6733 @c 
6734 @c If you are writing a message (mail or news) and suddenly remember that
6735 @c you have a steak in the oven (or some pesto in the food processor, you
6736 @c craazy vegetarians), you'll probably wish there was a method to save the
6737 @c message you are writing so that you can continue editing it some other
6738 @c day, and send it when you feel its finished.
6739 @c 
6740 @c Well, don't worry about it.  Whenever you start composing a message of
6741 @c some sort using the Gnus mail and post commands, the buffer you get will
6742 @c automatically associate to an article in a special @dfn{draft} group.
6743 @c If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
6744 @c article will be saved there.  (Auto-save files also go to the draft
6745 @c group.) 
6746 @c 
6747 @c @cindex nndraft
6748 @c @vindex gnus-draft-group-directory
6749 @c The draft group is a special group (which is implemented as an
6750 @c @code{nndraft} group, if you absolutely have to know) called
6751 @c @samp{nndraft:drafts}.  The variable @code{gnus-draft-group-directory}
6752 @c controls both the name of the group and the location---the leaf element
6753 @c in the path will be used as the name of the group.  What makes this
6754 @c group special is that you can't tick any articles in it or mark any
6755 @c articles as read---all articles in the group are permanently unread.
6756 @c 
6757 @c If the group doesn't exist, it will be created and you'll be subscribed
6758 @c to it.
6759 @c 
6760 @c @findex gnus-dissociate-buffer-from-draft
6761 @c @kindex C-c M-d (Mail)
6762 @c @kindex C-c M-d (Post)
6763 @c @findex gnus-associate-buffer-with-draft
6764 @c @kindex C-c C-d (Mail)
6765 @c @kindex C-c C-d (Post)
6766 @c If you're writing some super-secret message that you later want to
6767 @c encode with PGP before sending, you may wish to turn the auto-saving
6768 @c (and association with the draft group) off.  You never know who might be
6769 @c interested in reading all your extremely valuable and terribly horrible
6770 @c and interesting secrets.  The @kbd{C-c M-d}
6771 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
6772 @c If you change your mind and want to turn the auto-saving back on again,
6773 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
6774 @c 
6775 @c @vindex gnus-use-draft
6776 @c To leave association with the draft group off by default, set
6777 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default. 
6778 @c 
6779 @c @findex gnus-summary-send-draft
6780 @c @kindex S D c (Summary)
6781 @c When you want to continue editing the article, you simply enter the
6782 @c draft group and push @kbd{S D c} (@code{gnus-summary-send-draft}) to do
6783 @c that.  You will be placed in a buffer where you left off.
6784 @c 
6785 @c Rejected articles will also be put in this draft group (@pxref{Rejected
6786 @c Articles}).
6787 @c 
6788 @c @findex gnus-summary-send-all-drafts
6789 @c If you have lots of rejected messages you want to post (or mail) without
6790 @c doing further editing, you can use the @kbd{S D a} command
6791 @c (@code{gnus-summary-send-all-drafts}).  This command understands the
6792 @c process/prefix convention (@pxref{Process/Prefix}).  
6793 @c 
6794 @c 
6795 @c @node Rejected Articles
6796 @c @section Rejected Articles
6797 @c @cindex rejected articles
6798 @c 
6799 @c Sometimes a news server will reject an article.  Perhaps the server
6800 @c doesn't like your face.  Perhaps it just feels miserable.  Perhaps
6801 @c @emph{there be demons}.  Perhaps you have included too much cited text.
6802 @c Perhaps the disk is full.  Perhaps the server is down.
6803 @c 
6804 @c These situations are, of course, totally beyond the control of Gnus.
6805 @c (Gnus, of course, loves the way you look, always feels great, has angels
6806 @c fluttering around inside of it, doesn't care about how much cited text
6807 @c you include, never runs full and never goes down.)  So Gnus saves these
6808 @c articles until some later time when the server feels better.
6809 @c 
6810 @c The rejected articles will automatically be put in a special draft group
6811 @c (@pxref{Drafts}).  When the server comes back up again, you'd then
6812 @c typically enter that group and send all the articles off.
6813 @c 
6814
6815 @node Select Methods
6816 @chapter Select Methods
6817 @cindex foreign groups
6818 @cindex select methods
6819
6820 A @dfn{foreign group} is a group that is not read by the usual (or
6821 default) means.  It could be, for instance, a group from a different
6822 @sc{nntp} server, it could be a virtual group, or it could be your own
6823 personal mail group.
6824
6825 A foreign group (or any group, really) is specified by a @dfn{name} and
6826 a @dfn{select method}.  To take the latter first, a select method is a
6827 list where the first element says what backend to use (eg. @code{nntp},
6828 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
6829 name}.  There may be additional elements in the select method, where the
6830 value may have special meaning for the backend in question.
6831
6832 One could say that a select method defines a @dfn{virtual server}---so
6833 we do just that (@pxref{The Server Buffer}).
6834
6835 The @dfn{name} of the group is the name the backend will recognize the
6836 group as.
6837
6838 For instance, the group @samp{soc.motss} on the @sc{nntp} server
6839 @samp{some.where.edu} will have the name @samp{soc.motss} and select
6840 method @code{(nntp "some.where.edu")}.  Gnus will call this group, in
6841 all circumstances, @samp{nntp+some.where.edu:soc.motss}, even though the
6842 @code{nntp} backend just knows this group as @samp{soc.motss}.
6843
6844 The different methods all have their peculiarities, of course.
6845
6846 @menu
6847 * The Server Buffer::     Making and editing virtual servers.
6848 * Getting News::          Reading USENET news with Gnus.
6849 * Getting Mail::          Reading your personal mail with Gnus.
6850 * Other Sources::         Reading directories, files, SOUP packets.
6851 * Combined Groups::       Combining groups into one group.
6852 @end menu
6853
6854
6855 @node The Server Buffer
6856 @section The Server Buffer
6857
6858 Traditionally, a @dfn{server} is a machine or a piece of software that
6859 one connects to, and then requests information from.  Gnus does not
6860 connect directly to any real servers, but does all transactions through
6861 one backend or other.  But that's just putting one layer more between
6862 the actual media and Gnus, so we might just as well say that each
6863 backend represents a virtual server.
6864
6865 For instance, the @code{nntp} backend may be used to connect to several
6866 different actual @sc{nntp} servers, or, perhaps, to many different ports
6867 on the same actual @sc{nntp} server.  You tell Gnus which backend to
6868 use, and what parameters to set by specifying a @dfn{select method}.
6869
6870 These select methods specifications can sometimes become quite
6871 complicated---say, for instance, that you want to read from the
6872 @sc{nntp} server @samp{news.funet.fi} on port number @code{13}, which
6873 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
6874 Anyways, if you had to specify that for each group that used this
6875 server, that would be too much work, so Gnus offers a way of naming
6876 select methods, which is what you do in the server buffer.
6877
6878 To enter the server buffer, user the @kbd{^}
6879 (@code{gnus-group-enter-server-mode}) command in the group buffer.
6880
6881 @menu
6882 * Server Buffer Format::      You can customize the look of this buffer.
6883 * Server Commands::           Commands to manipulate servers.
6884 * Example Methods::           Examples server specifications.
6885 * Creating a Virtual Server:: An example session.
6886 * Servers and Methods::       You can use server names as select methods.
6887 * Unavailable Servers::       Some servers you try to contact may be down.
6888 @end menu
6889
6890 @vindex gnus-server-mode-hook
6891 @code{gnus-server-mode-hook} is run when creating the server buffer.
6892
6893
6894 @node Server Buffer Format
6895 @subsection Server Buffer Format
6896 @cindex server buffer format
6897
6898 @vindex gnus-server-line-format
6899 You can change the look of the server buffer lines by changing the
6900 @code{gnus-server-line-format} variable.  This is a @code{format}-like
6901 variable, with some simple extensions:
6902
6903 @table @samp
6904
6905 @item h 
6906 How the news is fetched---the backend name.
6907
6908 @item n
6909 The name of this server.
6910
6911 @item w
6912 Where the news is to be fetched from---the address.
6913
6914 @item s
6915 The opened/closed/denied status of the server.
6916 @end table
6917
6918 @vindex gnus-server-mode-line-format
6919 The mode line can also be customized by using the
6920 @code{gnus-server-mode-line-format} variable.  The following specs are
6921 understood: 
6922
6923 @table @samp
6924 @item S
6925 Server name.
6926
6927 @item M
6928 Server method.
6929 @end table
6930
6931 Also @pxref{Formatting Variables}.
6932
6933
6934 @node Server Commands
6935 @subsection Server Commands
6936 @cindex server commands
6937
6938 @table @kbd
6939
6940 @item a
6941 @kindex a (Server)
6942 @findex gnus-server-add-server
6943 Add a new server (@code{gnus-server-add-server}).
6944
6945 @item e
6946 @kindex e (Server)
6947 @findex gnus-server-edit-server
6948 Edit a server (@code{gnus-server-edit-server}).
6949
6950 @item SPACE
6951 @kindex SPACE (Server)
6952 @findex gnus-server-read-server
6953 Browse the current server (@code{gnus-server-read-server}).
6954
6955 @item q
6956 @kindex q (Server)
6957 @findex gnus-server-exit
6958 Return to the group buffer (@code{gnus-server-exit}).
6959
6960 @item k
6961 @kindex k (Server)
6962 @findex gnus-server-kill-server
6963 Kill the current server (@code{gnus-server-kill-server}).
6964
6965 @item y
6966 @kindex y (Server)
6967 @findex gnus-server-yank-server
6968 Yank the previously killed server (@code{gnus-server-yank-server}).
6969
6970 @item c
6971 @kindex c (Server)
6972 @findex gnus-server-copy-server
6973 Copy the current server (@code{gnus-server-copy-server}).
6974
6975 @item l
6976 @kindex l (Server)
6977 @findex gnus-server-list-servers
6978 List all servers (@code{gnus-server-list-servers}).
6979
6980 @end table
6981
6982
6983 @node Example Methods
6984 @subsection Example Methods
6985
6986 Most select methods are pretty simple and self-explanatory: 
6987
6988 @lisp
6989 (nntp "news.funet.fi")
6990 @end lisp
6991
6992 Reading directly from the spool is even simpler:
6993
6994 @lisp
6995 (nnspool "")
6996 @end lisp
6997
6998 As you can see, the first element in a select method is the name of the
6999 backend, and the second is the @dfn{address}, or @dfn{name}, if you
7000 will. 
7001
7002 After these two elements, there may be a arbitrary number of
7003 @var{(variable form)} pairs.
7004
7005 To go back to the first example---imagine that you want to read from
7006 port @code{15} from that machine.  This is what the select method should
7007 look like then:
7008
7009 @lisp
7010 (nntp "news.funet.fi" (nntp-port-number 15))
7011 @end lisp
7012
7013 You should read the documentation to each backend to find out what
7014 variables are relevant, but here's an @code{nnmh} example. 
7015
7016 @code{nnmh} is a mail backend that reads a spool-like structure.  Say
7017 you have two structures that you wish to access: One is your private
7018 mail spool, and the other is a public one.  Here's the possible spec for
7019 you private mail:
7020
7021 @lisp
7022 (nnmh "private" (nnmh-directory "~/private/mail/"))
7023 @end lisp
7024
7025 (This server is then called @samp{private}, but you may have guessed
7026 that.)
7027
7028 Here's the method for a public spool:
7029
7030 @lisp
7031 (nnmh "public" 
7032       (nnmh-directory "/usr/information/spool/") 
7033       (nnmh-get-new-mail nil))
7034 @end lisp
7035
7036
7037 @node Creating a Virtual Server
7038 @subsection Creating a Virtual Server
7039
7040 If you're saving lots of articles in the cache by using persistent
7041 articles, you may want to create a virtual server to read the cache.
7042
7043 First you need to add a new server.  The @kbd{a} command does that.  It
7044 would probably be best to use @code{nnspool} to read the cache.  You
7045 could also use @code{nnml} or @code{nnmh}, though.
7046
7047 Type @kbd{a nnspool RET cache RET}.
7048
7049 You should now have a brand new @code{nnspool} virtual server called
7050 @samp{cache}.  You now need to edit it to have the right definitions.
7051 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
7052 will contain the following:
7053
7054 @lisp
7055 (nnspool "cache")
7056 @end lisp
7057
7058 Change that to:
7059
7060 @lisp
7061 (nnspool "cache"
7062          (nnspool-spool-directory "~/News/cache/")
7063          (nnspool-nov-directory "~/News/cache/")
7064          (nnspool-active-file "~/News/cache/active"))
7065 @end lisp
7066
7067 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
7068 @kbd{RET} over this virtual server, you should be entered into a browse
7069 buffer, and you should be able to enter any of the groups displayed.
7070
7071
7072 @node Servers and Methods
7073 @subsection Servers and Methods
7074
7075 Wherever you would normally use a select method
7076 (eg. @code{gnus-secondary-select-method}, in the group select method,
7077 when browsing a foreign server) you can use a virtual server name
7078 instead.  This could potentially save lots of typing.  And it's nice all
7079 over.
7080
7081
7082 @node Unavailable Servers
7083 @subsection Unavailable Servers
7084
7085 If a server seems to be unreachable, Gnus will mark that server as
7086 @code{denied}.  That means that any subsequent attempt to make contact
7087 with that server will just be ignored.  ``It can't be opened,'' Gnus
7088 will tell you, without making the least effort to see whether that is
7089 actually the case or not.
7090
7091 That might seem quite naughty, but it does make sense most of the time.
7092 Let's say you have 10 groups subscribed to the server
7093 @samp{nepholococcygia.com}.  This server is located somewhere quite far
7094 away from you, the machine is quite, so it takes 1 minute just to find
7095 out that it refuses connection from you today.  If Gnus were to attempt
7096 to do that 10 times, you'd be quite annoyed, so Gnus won't attempt to do
7097 that.  Once it has gotten a single ``connection refused'', it will
7098 regard that server as ``down''.
7099
7100 So, what happens if the machine was only feeling unwell temporarily?
7101 How do you test to see whether the machine has come up again?
7102
7103 You jump to the server buffer (@pxref{The Server Buffer}) and poke it
7104 with the following commands:
7105
7106 @table @kbd
7107
7108 @item O
7109 @kindex O (Server)
7110 @findex gnus-server-open-server
7111 Try to establish connection to the server on the current line
7112 (@code{gnus-server-open-server}).
7113
7114 @item C
7115 @kindex C (Server)
7116 @findex gnus-server-close-server
7117 Close the connection (if any) to the server
7118 (@code{gnus-server-close-server}).
7119
7120 @item D
7121 @kindex D (Server)
7122 @findex gnus-server-deny-server
7123 Mark the current server as unreachable
7124 (@code{gnus-server-deny-server}). 
7125
7126 @item R
7127 @kindex R (Server)
7128 @findex gnus-server-remove-denials
7129 Remove all marks to whether Gnus was denied connection from all servers
7130 (@code{gnus-server-remove-denials}). 
7131
7132 @end table
7133
7134
7135 @node Getting News
7136 @section Getting News
7137 @cindex reading news
7138 @cindex news backends
7139
7140 A newsreader is normally used for reading news.  Gnus currently provides
7141 only two methods of getting news---it can read from an @sc{nntp} server,
7142 or it can read from a local spool.
7143
7144 @menu
7145 * NNTP::               Reading news from an @sc{nntp} server.
7146 * News Spool::         Reading news from the local spool.
7147 @end menu
7148
7149
7150 @node NNTP
7151 @subsection @sc{nntp}
7152 @cindex nntp
7153
7154 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
7155 You just specify @code{nntp} as method and the address of the @sc{nntp}
7156 server as the, uhm, address.
7157
7158 If the @sc{nntp} server is located at a non-standard port, setting the
7159 third element of the select method to this port number should allow you
7160 to connect to the right port.  You'll have to edit the group info for
7161 that (@pxref{Foreign Groups}).
7162
7163 The name of the foreign group can be the same as a native group.  In
7164 fact, you can subscribe to the same group from as many different servers
7165 you feel like.  There will be no name collisions.
7166
7167 The following variables can be used to create a virtual @code{nntp}
7168 server: 
7169
7170 @table @code
7171
7172 @item nntp-server-opened-hook
7173 @vindex nntp-server-opened-hook
7174 @cindex @sc{mode reader}
7175 @cindex authinfo
7176 @cindex authentification
7177 @cindex nntp authentification
7178 @findex nntp-send-authinfo
7179 @findex nntp-send-mode-reader
7180 @code{nntp-server-opened-hook} is run after a connection has been made.
7181 It can be used to send commands to the @sc{nntp} server after it has
7182 been contacted.  By default is sends the command @code{MODE READER} to
7183 the server with the @code{nntp-send-mode-reader} function.  Another
7184 popular function is @code{nntp-send-authinfo}, which will prompt you for
7185 an @sc{nntp} password and stuff.
7186
7187 @item nntp-server-action-alist 
7188 @vindex nntp-server-action-alist 
7189 This is an list of regexps to match on server types and actions to be
7190 taken when matches are made.  For instance, if you want Gnus to beep
7191 every time you connect to innd, you could say something like:
7192
7193 @lisp
7194 (setq nntp-server-action-alist
7195       '(("innd" (ding))))
7196 @end lisp
7197
7198 You probably don't want to do that, though.
7199
7200 The default value is
7201
7202 @lisp
7203   '(("nntpd 1\\.5\\.11t" 
7204      (remove-hook 'nntp-server-opened-hook nntp-send-mode-reader)))
7205 @end lisp
7206
7207 This ensures that Gnus doesn't send the @code{MODE READER} command to
7208 nntpd 1.5.11t, since that command chokes that server, I've been told. 
7209
7210 @item nntp-maximum-request
7211 @vindex nntp-maximum-request
7212 If the @sc{nntp} server doesn't support @sc{nov} headers, this backend
7213 will collect headers by sending a series of @code{head} commands.  To
7214 speed things up, the backend sends lots of these commands without
7215 waiting for reply, and then reads all the replies.  This is controlled
7216 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
7217 your network is buggy, you should set this to 1.
7218
7219 @item nntp-connection-timeout
7220 @vindex nntp-connection-timeout
7221 If you have lots of foreign @code{nntp} groups that you connect to
7222 regularly, you're sure to have problems with @sc{nntp} servers not
7223 responding properly, or being too loaded to reply within reasonable
7224 time.  This is can lead to awkward problems, which can be helped
7225 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
7226 that says how many seconds the @code{nntp} backend should wait for a
7227 connection before giving up.  If it is @code{nil}, which is the default,
7228 no timeouts are done.
7229
7230 @item nntp-command-timeout
7231 @vindex nntp-command-timeout
7232 @cindex PPP connections
7233 @cindex dynamic IP addresses
7234 If you're running Gnus on a machine that has a dynamically assigned
7235 address, Gnus may become confused.  If the address of your machine
7236 changes after connecting to the @sc{nntp} server, Gnus will simply sit
7237 waiting forever for replies from the server.  To help with this
7238 unfortunate problem, you can set this command to a number.  Gnus will
7239 then, if it sits waiting longer than that number of seconds for a reply
7240 from the server, shut down the connection, start a new one, and resend
7241 the command.  This should hopefully be transparent to the user.  A
7242 likely number is 30 seconds. 
7243
7244 @item nntp-retry-on-break
7245 @vindex nntp-retry-on-break
7246 If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
7247 hangs.  This will have much the same effect as the command timeout
7248 described above.
7249
7250 @item nntp-server-hook
7251 @vindex nntp-server-hook
7252 This hook is run as the last step when connecting to an @sc{nntp}
7253 server.
7254
7255 @findex nntp-open-rlogin
7256 @findex nntp-open-network-stream
7257 @item nntp-open-server-function
7258 @vindex nntp-open-server-function
7259 This function is used to connect to the remote system.  Two pre-made
7260 functions are @code{nntp-open-network-stream}, which is the default, and
7261 simply connects to some port or other on the remote system.  The other
7262 is @code{nntp-open-rlogin}, which does an rlogin on the remote system,
7263 and then does a telnet to the @sc{nntp} server available there.
7264
7265 @item nntp-rlogin-parameters
7266 @vindex nntp-rlogin-parameters
7267 If you use @code{nntp-open-rlogin} as the
7268 @code{nntp-open-server-function}, this list will be used as the
7269 parameter list given to @code{rsh}.
7270
7271 @item nntp-end-of-line
7272 @vindex nntp-end-of-line
7273 String to use as end-of-line markers when talking to the @sc{nntp}
7274 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
7275 using @code{rlogin} to talk to the server.
7276
7277 @item nntp-rlogin-user-name
7278 @vindex nntp-rlogin-user-name
7279 User name on the remote system when using the @code{rlogin} connect
7280 function. 
7281
7282 @item nntp-address
7283 @vindex nntp-address
7284 The address of the remote system running the @sc{nntp} server.
7285
7286 @item nntp-port-number
7287 @vindex nntp-port-number
7288 Port number to connect to when using the @code{nntp-open-network-stream}
7289 connect function.
7290
7291 @item nntp-buggy-select
7292 @vindex nntp-buggy-select
7293 Set this to non-@code{nil} if your select routine is buggy.
7294
7295 @item nntp-nov-is-evil 
7296 @vindex nntp-nov-is-evil 
7297 If the @sc{nntp} server does not support @sc{nov}, you could set this
7298 variable to @code{t}, but @code{nntp} usually checks whether @sc{nov}
7299 can be used automatically.
7300
7301 @item nntp-xover-commands
7302 @vindex nntp-xover-commands
7303 @cindex nov
7304 @cindex XOVER
7305 List of strings that are used as commands to fetch @sc{nov} lines from a
7306 server.  The default value of this variable is @code{("XOVER"
7307 "XOVERVIEW")}. 
7308
7309 @item nntp-nov-gap
7310 @vindex nntp-nov-gap
7311 @code{nntp} normally sends just one big request for @sc{nov} lines to
7312 the server.  The server responds with one huge list of lines.  However,
7313 if you have read articles 2-5000 in the group, and only want to read
7314 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
7315 lines that you do not want, and will not use.  This variable says how
7316 big a gap between two consecutive articles is allowed to be before the
7317 @code{XOVER} request is split into several request.  Note that if your
7318 network is fast, setting this variable to a really small number means
7319 that fetching will probably be slower.  If this variable is @code{nil},
7320 @code{nntp} will never split requests.
7321
7322 @item nntp-prepare-server-hook
7323 @vindex nntp-prepare-server-hook
7324 A hook run before attempting to connect to an @sc{nntp} server.
7325
7326 @item nntp-async-number
7327 @vindex nntp-async-number
7328 How many articles should be pre-fetched when in asynchronous mode.  If
7329 this variable is @code{t}, @code{nntp} will pre-fetch all the articles
7330 that it can without bound.  If it is @code{nil}, no pre-fetching will be
7331 made.
7332
7333 @item nntp-warn-about-losing-connection
7334 @vindex nntp-warn-about-losing-connection
7335 If this variable is non-@code{nil}, some noise will be made when a
7336 server closes connection.
7337
7338 @end table
7339
7340
7341 @node News Spool
7342 @subsection News Spool
7343 @cindex nnspool
7344 @cindex news spool
7345
7346 Subscribing to a foreign group from the local spool is extremely easy,
7347 and might be useful, for instance, to speed up reading groups like
7348 @samp{alt.binaries.pictures.furniture}.
7349
7350 Anyways, you just specify @code{nnspool} as the method and @samp{} (or
7351 anything else) as the address.
7352
7353 If you have access to a local spool, you should probably use that as the
7354 native select method (@pxref{Finding the News}).  It is normally faster
7355 than using an @code{nntp} select method, but might not be.  It depends.
7356 You just have to try to find out what's best at your site.
7357
7358 @table @code
7359
7360 @item nnspool-inews-program
7361 @vindex nnspool-inews-program
7362 Program used to post an article.
7363
7364 @item nnspool-inews-switches
7365 @vindex nnspool-inews-switches
7366 Parameters given to the inews program when posting an article. 
7367
7368 @item nnspool-spool-directory
7369 @vindex nnspool-spool-directory
7370 Where @code{nnspool} looks for the articles.  This is normally
7371 @file{/usr/spool/news/}.
7372
7373 @item nnspool-nov-directory 
7374 @vindex nnspool-nov-directory 
7375 Where @code{nnspool} will look for @sc{nov} files.  This is normally
7376 @file{/usr/spool/news/over.view/}.
7377
7378 @item nnspool-lib-dir
7379 @vindex nnspool-lib-dir
7380 Where the news lib dir is (@file{/usr/lib/news/} by default).
7381
7382 @item nnspool-active-file
7383 @vindex nnspool-active-file
7384 The path of the active file.
7385
7386 @item nnspool-newsgroups-file
7387 @vindex nnspool-newsgroups-file
7388 The path of the group descriptions file.
7389
7390 @item nnspool-history-file
7391 @vindex nnspool-history-file
7392 The path of the news history file.
7393
7394 @item nnspool-active-times-file
7395 @vindex nnspool-active-times-file
7396 The path of the active date file.
7397
7398 @item nnspool-nov-is-evil
7399 @vindex nnspool-nov-is-evil
7400 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
7401 that it finds.
7402
7403 @item nnspool-sift-nov-with-sed
7404 @vindex nnspool-sift-nov-with-sed
7405 @cindex sed
7406 If non-@code{nil}, which is the default, use @code{sed} to get the
7407 relevant portion from the overview file.  If nil, @code{nnspool} will
7408 load the entire file into a buffer and process it there.
7409
7410 @end table
7411
7412
7413 @node Getting Mail
7414 @section Getting Mail
7415 @cindex reading mail
7416 @cindex mail
7417
7418 Reading mail with a newsreader---isn't that just plain WeIrD? But of
7419 course.
7420
7421 @menu
7422 * Getting Started Reading Mail:: A simple cookbook example.
7423 * Splitting Mail::               How to create mail groups.
7424 * Mail Backend Variables::       Variables for customizing mail handling.
7425 * Fancy Mail Splitting::         Gnus can do hairy splitting of incoming mail.
7426 * Mail and Procmail::            Reading mail groups that procmail create.
7427 * Incorporating Old Mail::       What about the old mail you have?
7428 * Expiring Mail::                Getting rid of unwanted mail.
7429 * Duplicates::                   Dealing with duplicated mail.
7430 * Not Reading Mail::             Using mail backends for reading other files.
7431 * Choosing a Mail Backend::      Gnus can read a variety of mail formats.
7432 @end menu
7433
7434
7435 @node Getting Started Reading Mail
7436 @subsection Getting Started Reading Mail
7437
7438 It's quite easy to use Gnus to read your new mail.  You just plonk the
7439 mail backend of your choice into @code{gnus-secondary-select-methods},
7440 and things will happen automatically.
7441
7442 For instance, if you want to use @code{nnml} (which is a one file per
7443 mail backend), you could put the following in your @file{.gnus} file:
7444
7445 @lisp
7446 (setq gnus-secondary-select-methods
7447       '((nnml "private")))
7448 @end lisp
7449
7450 Now, the next time you start Gnus, this backend will be queried for new
7451 articles, and it will move all the messages in your spool file to its
7452 directory, which is @code{~/Mail/} by default.  The new group that will
7453 be created (@samp{mail.misc}) will be subscribed, and you can read it
7454 like any other group.
7455
7456 You will probably want to split the mail into several groups, though:
7457
7458 @lisp
7459 (setq nnmail-split-methods
7460   '(("junk" "^From:.*Lars Ingebrigtsen")
7461     ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
7462     ("other" "")))
7463 @end lisp
7464
7465 This will result in three new mail groups being created:
7466 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
7467 mail that doesn't fit into the first two groups will be placed in the
7468 latter group.
7469
7470 This should be sufficient for reading mail with Gnus.  You might want to
7471 give the other sections in this part of the manual a perusal, though,
7472 especially @pxref{Choosing a Mail Backend} and @pxref{Expiring Mail}. 
7473
7474
7475 @node Splitting Mail
7476 @subsection Splitting Mail
7477 @cindex splitting mail
7478 @cindex mail splitting
7479
7480 @vindex nnmail-split-methods
7481 The @code{nnmail-split-methods} variable says how the incoming mail is
7482 to be split into groups.
7483
7484 @lisp
7485 (setq nnmail-split-methods
7486   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
7487     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
7488     ("mail.other" "")))
7489 @end lisp
7490
7491 This variable is a list of lists, where the first element of each of
7492 these lists is the name of the mail group (they do not have to be called
7493 something beginning with @samp{mail}, by the way), and the second
7494 element is a regular expression used on the header of each mail to
7495 determine if it belongs in this mail group.
7496
7497 The second element can also be a function.  In that case, it will be
7498 called narrowed to the headers with the first element of the rule as the
7499 argument.  It should return a non-@code{nil} value if it thinks that the
7500 mail belongs in that group.
7501
7502 The last of these groups should always be a general one, and the regular
7503 expression should @emph{always} be @samp{} so that it matches any
7504 mails that haven't been matched by any of the other regexps.
7505
7506 If you like to tinker with this yourself, you can set this variable to a
7507 function of your choice.  This function will be called without any
7508 arguments in a buffer narrowed to the headers of an incoming mail
7509 message.  The function should return a list of groups names that it
7510 thinks should carry this mail message.
7511
7512 Note that the mail backends are free to maul the poor, innocent
7513 incoming headers all they want to.  They all add @code{Lines} headers;
7514 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
7515 @code{From<SPACE>} line to something else.
7516
7517 @vindex nnmail-crosspost
7518 The mail backends all support cross-posting.  If several regexps match,
7519 the mail will be ``cross-posted'' to all those groups.
7520 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
7521 that no articles are crossposted to the general (@samp{}) group.
7522
7523 @vindex nnmail-crosspost-link-function
7524 @cindex crosspost
7525 @cindex links
7526 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
7527 the crossposted articles.  However, not all files systems support hard
7528 links.  If that's the case for you, set
7529 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
7530 variable is @code{add-name-to-file} by default.)  
7531
7532 Gnus gives you all the opportunity you could possibly want for shooting
7533 yourself in the foot.  Let's say you create a group that will contain
7534 all the mail you get from your boss.  And then you accidentally
7535 unsubscribe from the group.  Gnus will still put all the mail from your
7536 boss in the unsubscribed group, and so, when your boss mails you ``Have
7537 that report ready by Monday or you're fired!'', you'll never see it and,
7538 come Tuesday, you'll still believe that you're gainfully employed while
7539 you really should be out collecting empty bottles to save up for next
7540 month's rent money.
7541
7542
7543 @node Mail Backend Variables
7544 @subsection Mail Backend Variables
7545
7546 These variables are (for the most part) pertinent to all the various
7547 mail backends.
7548
7549 @table @code
7550 @vindex nnmail-read-incoming-hook
7551 @item nnmail-read-incoming-hook
7552 The mail backends all call this hook after reading new mail.  You can
7553 use this hook to notify any mail watch programs, if you want to.
7554
7555 @vindex nnmail-spool-file
7556 @item nnmail-spool-file
7557 @cindex POP mail
7558 @cindex MAILHOST
7559 @cindex movemail
7560 @vindex nnmail-pop-password
7561 @vindex nnmail-pop-password-required
7562 The backends will look for new mail in this file.  If this variable is
7563 @code{nil}, the mail backends will never attempt to fetch mail by
7564 themselves.  If you are using a POP mail server and your name is
7565 @samp{larsi}, you should set this variable to @samp{po:larsi}.  If
7566 your name is not @samp{larsi}, you should probably modify that
7567 slightly, but you may have guessed that already, you smart & handsome
7568 devil!  You can also set this variable to @code{pop}, and Gnus will try
7569 to figure out the POP mail string by itself.  In any case, Gnus will
7570 call @code{movemail} which will contact the POP server named in the
7571 @code{MAILHOST} environment variable.  If the POP server needs a
7572 password, you can either set @code{nnmail-pop-password-required} to
7573 @code{t} and be prompted for the password, or set
7574 @code{nnmail-pop-password} to the password itself.
7575
7576 When you use a mail backend, Gnus will slurp all your mail from your
7577 inbox and plonk it down in your home directory.  Gnus doesn't move any
7578 mail if you're not using a mail backend---you have to do a lot of magic
7579 invocations first.  At the time when you have finished drawing the
7580 pentagram, lightened the candles, and sacrificed the goat, you really
7581 shouldn't be too surprised when Gnus moves your mail.
7582
7583 @vindex nnmail-use-procmail
7584 @vindex nnmail-procmail-suffix
7585 @item nnmail-use-procmail
7586 If non-@code{nil}, the mail backends will look in
7587 @code{nnmail-procmail-directory} for incoming mail.  All the files in
7588 that directory that have names ending in @code{nnmail-procmail-suffix}
7589 will be considered incoming mailboxes, and will be searched for new
7590 mail.
7591
7592 @vindex nnmail-crash-box
7593 @item nnmail-crash-box
7594 When the mail backends read a spool file, it is first moved to this
7595 file, which is @file{~/.gnus-crash-box} by default.  If this file
7596 already exists, it will always be read (and incorporated) before any
7597 other spool files.
7598
7599 @vindex nnmail-prepare-incoming-hook
7600 @item nnmail-prepare-incoming-hook
7601 This is run in a buffer that holds all the new incoming mail, and can be
7602 used for, well, anything, really.
7603
7604 @vindex nnmail-pre-get-new-mail-hook
7605 @vindex nnmail-post-get-new-mail-hook
7606 @item nnmail-pre-get-new-mail-hook
7607 @itemx nnmail-post-get-new-mail-hook
7608 These are two useful hooks executed when treating new incoming
7609 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
7610 starting to handle the new mail) and
7611 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
7612 is done).  Here's and example of using these two hooks to change the
7613 default file modes the new mail files get:
7614
7615 @lisp
7616 (add-hook 'gnus-pre-get-new-mail-hook 
7617           (lambda () (set-default-file-modes 511)))
7618
7619 (add-hook 'gnus-post-get-new-mail-hook 
7620           (lambda () (set-default-file-modes 551)))
7621 @end lisp
7622
7623 @item nnmail-tmp-directory
7624 @vindex nnmail-tmp-directory
7625 This variable says where to move the incoming mail to while processing
7626 it.  This is usually done in the same directory that the mail backend
7627 inhabits (i.e., @file{~/Mail/}), but if this variable is non-@code{nil},
7628 it will be used instead.
7629
7630 @item nnmail-movemail-program
7631 @vindex nnmail-movemail-program
7632 This program is executed to move mail from the user's inbox to her home
7633 directory.  The default is @samp{movemail}.
7634
7635 @item nnmail-delete-incoming
7636 @vindex nnmail-delete-incoming
7637 @cindex incoming mail files
7638 @cindex deleting incoming files
7639 If non-@code{nil}, the mail backends will delete the temporary incoming
7640 file after splitting mail into the proper groups.  This is @code{nil} by
7641 default for reasons of security.
7642
7643 @item nnmail-use-long-file-names
7644 @vindex nnmail-use-long-file-names
7645 If non-@code{nil}, the mail backends will use long file and directory
7646 names.  Groups like @samp{mail.misc} will end up in directories like
7647 @file{mail.misc/}.  If it is @code{nil}, the same group will end up in
7648 @file{mail/misc/}.
7649
7650 @item nnmail-delete-file-function
7651 @vindex nnmail-delete-file-function
7652 @findex delete-file
7653 Function called to delete files.  It is @code{delete-file} by default. 
7654
7655 @end table
7656
7657
7658 @node Fancy Mail Splitting
7659 @subsection Fancy Mail Splitting
7660 @cindex mail splitting
7661 @cindex fancy mail splitting
7662
7663 @vindex nnmail-split-fancy
7664 @findex nnmail-split-fancy
7665 If the rather simple, standard method for specifying how to split mail
7666 doesn't allow you to do what you want, you can set
7667 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
7668 play with the @code{nnmail-split-fancy} variable. 
7669
7670 Let's look at an example value of this variable first:
7671
7672 @lisp
7673 ;; Messages from the mailer daemon are not crossposted to any of
7674 ;; the ordinary groups.  Warnings are put in a separate group
7675 ;; from real errors.
7676 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
7677                    "mail.misc"))
7678    ;; Non-error messages are crossposted to all relevant
7679    ;; groups, but we don't crosspost between the group for the
7680    ;; (ding) list and the group for other (ding) related mail.
7681    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
7682          ("subject" "ding" "ding.misc"))
7683       ;; Other mailing lists...
7684       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
7685       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
7686       ;; People...
7687       (any "larsi@@ifi\\.uio\\.no" "people.Lars Magne Ingebrigtsen"))
7688    ;; Unmatched mail goes to the catch all group.
7689    "misc.misc"))")
7690 @end lisp
7691
7692 This variable has the format of a @dfn{split}.  A split is a (possibly)
7693 recursive structure where each split may contain other splits.  Here are
7694 the four possible split syntaxes:
7695
7696 @table @dfn
7697
7698 @item GROUP 
7699 If the split is a string, that will be taken as a group name. 
7700
7701 @item (FIELD VALUE SPLIT)
7702 If the split is a list, and the first element is a string, then that
7703 means that if header FIELD (a regexp) contains VALUE (also a regexp),
7704 then store the message as specified by SPLIT.
7705
7706 @item (| SPLIT...)
7707 If the split is a list, and the first element is @code{|} (vertical
7708 bar), then process each SPLIT until one of them matches.  A SPLIT is
7709 said to match if it will cause the mail message to be stored in one or
7710 more groups.
7711
7712 @item (& SPLIT...)
7713 If the split is a list, and the first element is @code{&}, then process
7714 all SPLITs in the list.
7715 @end table
7716
7717 In these splits, FIELD must match a complete field name.  VALUE must
7718 match a complete word according to the fundamental mode syntax table.
7719 You can use @code{.*} in the regexps to match partial field names or
7720 words.
7721
7722 @vindex nnmail-split-abbrev-alist
7723 FIELD and VALUE can also be lisp symbols, in that case they are expanded
7724 as specified by the variable @code{nnmail-split-abbrev-alist}.  This is
7725 an alist of cons cells, where the car of the cells contains the key, and
7726 the cdr contains a string.
7727
7728 @vindex nnmail-split-fancy-syntax-table
7729 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
7730 when all this splitting is performed.
7731
7732
7733 @node Mail and Procmail
7734 @subsection Mail and Procmail
7735 @cindex procmail
7736
7737 @cindex slocal
7738 @cindex elm
7739 Many people use @code{procmail} (or some other mail filter program or
7740 external delivery agent---@code{slocal}, @code{elm}, etc) to split
7741 incoming mail into groups.  If you do that, you should set
7742 @code{nnmail-spool-file} to @code{procmail} to ensure that the mail
7743 backends never ever try to fetch mail by themselves.
7744
7745 This also means that you probably don't want to set
7746 @code{nnmail-split-methods} either, which has some, perhaps, unexpected
7747 side effects.
7748
7749 When a mail backend is queried for what groups it carries, it replies
7750 with the contents of that variable, along with any groups it has figured
7751 out that it carries by other means.  None of the backends (except
7752 @code{nnmh}) actually go out to the disk and check what groups actually
7753 exist.  (It's not trivial to distinguish between what the user thinks is
7754 a basis for a newsgroup and what is just a plain old file or directory.)
7755
7756 This means that you have to tell Gnus (and the backends) what groups
7757 exist by hand.
7758
7759 Let's take the @code{nnmh} backend as an example. 
7760
7761 The folders are located in @code{nnmh-directory}, say, @file{~/Mail/}.
7762 There are three folders, @file{foo}, @file{bar} and @file{mail.baz}.
7763
7764 Go to the group buffer and type @kbd{G m}.  When prompted, answer
7765 @samp{foo} for the name and @samp{nnmh} for the method.  Repeat
7766 twice for the two other groups, @samp{bar} and @samp{mail.baz}.  Be sure
7767 to include all your mail groups.
7768
7769 That's it.  You are now set to read your mail.  An active file for this
7770 method will be created automatically.
7771
7772 @vindex nnmail-procmail-suffix
7773 @vindex nnmail-procmail-directory
7774 If you use @code{nnfolder} or any other backend that store more than a
7775 single article in each file, you should never have procmail add mails to
7776 the file that Gnus sees.  Instead, procmail should put all incoming mail
7777 in @code{nnmail-procmail-directory}.  To arrive at the file name to put
7778 the incoming mail in, append @code{nnmail-procmail-suffix} to the group
7779 name.  The mail backends will read the mail from these files.
7780
7781 @vindex nnmail-resplit-incoming
7782 When Gnus reads a file called @file{mail.misc.spool}, this mail will be
7783 put in the @code{mail.misc}, as one would expect.  However, if you want
7784 Gnus to split the mail the normal way, you could set
7785 @code{nnmail-resplit-incoming} to @code{t}.
7786
7787 @vindex nnmail-keep-last-article
7788 If you use @code{procmail} to split things directory into an @code{nnmh}
7789 directory (which you shouldn't do), you should set
7790 @code{nnmail-keep-last-article} to non-@code{nil} to prevent Gnus from
7791 ever expiring the final article in a mail newsgroup.  This is quite,
7792 quite important.
7793
7794
7795 @node Incorporating Old Mail
7796 @subsection Incorporating Old Mail
7797
7798 Most people have lots of old mail stored in various file formats.  If
7799 you have set up Gnus to read mail using one of the spiffy Gnus mail
7800 backends, you'll probably wish to have that old mail incorporated into
7801 your mail groups.
7802
7803 Doing so can be quite easy.
7804
7805 To take an example: You're reading mail using @code{nnml}
7806 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
7807 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
7808 file filled with important, but old, mail.  You want to move it into
7809 your @code{nnml} groups.
7810
7811 Here's how:
7812
7813 @enumerate
7814 @item
7815 Go to the group buffer.
7816
7817 @item 
7818 Type `G f' and give the path of the mbox file when prompted to create an
7819 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
7820
7821 @item 
7822 Type `SPACE' to enter the newly created group.
7823
7824 @item
7825 Type `M P b' to process-mark all articles in this group (@pxref{Setting
7826 Process Marks}).
7827
7828 @item 
7829 Type `B r' to respool all the process-marked articles, and answer
7830 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
7831 @end enumerate
7832
7833 All the mail messages in the mbox file will now also be spread out over
7834 all your @code{nnml} groups.  Try entering them and check whether things
7835 have gone without a glitch.  If things look ok, you may consider
7836 deleting the mbox file, but I wouldn't do that unless I was absolutely
7837 sure that all the mail has ended up where it should be.
7838
7839 Respooling is also a handy thing to do if you're switching from one mail
7840 backend to another.  Just respool all the mail in the old mail groups
7841 using the new mail backend.
7842
7843
7844 @node Expiring Mail
7845 @subsection Expiring Mail
7846 @cindex article expiry
7847
7848 Traditional mail readers have a tendency to remove mail articles when
7849 you mark them as read, in some way.  Gnus takes a fundamentally
7850 different approach to mail reading.
7851
7852 Gnus basically considers mail just to be news that has been received in
7853 a rather peculiar manner.  It does not think that it has the power to
7854 actually change the mail, or delete any mail messages.  If you enter a
7855 mail group, and mark articles as ``read'', or kill them in some other
7856 fashion, the mail articles will still exist on the system.  I repeat:
7857 Gnus will not delete your old, read mail.  Unless you ask it to, of
7858 course.
7859
7860 To make Gnus get rid of your unwanted mail, you have to mark the
7861 articles as @dfn{expirable}.  This does not mean that the articles will
7862 disappear right away, however.  In general, a mail article will be
7863 deleted from your system if, 1) it is marked as expirable, AND 2) it is
7864 more than one week old.  If you do not mark an article as expirable, it
7865 will remain on your system until hell freezes over.  This bears
7866 repeating one more time, with some spurious capitalizations: IF you do
7867 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
7868
7869 @vindex gnus-auto-expirable-newsgroups
7870 You do not have to mark articles as expirable by hand.  Groups that
7871 match the regular expression @code{gnus-auto-expirable-newsgroups} will
7872 have all articles that you read marked as expirable automatically.  All
7873 articles that are marked as expirable have an @samp{E} in the first
7874 column in the summary buffer.
7875
7876 Let's say you subscribe to a couple of mailing lists, and you want the
7877 articles you have read to disappear after a while:
7878
7879 @lisp
7880 (setq gnus-auto-expirable-newsgroups 
7881       "mail.nonsense-list\\|mail.nice-list")
7882 @end lisp
7883
7884 Another way to have auto-expiry happen is to have the element
7885 @code{auto-expire} in the group parameters of the group. 
7886
7887 @vindex nnmail-expiry-wait
7888 The @code{nnmail-expiry-wait} variable supplies the default time an
7889 expirable article has to live.  The default is seven days.  
7890
7891 Gnus also supplies a function that lets you fine-tune how long articles
7892 are to live, based on what group they are in.  Let's say you want to
7893 have one month expiry period in the @samp{mail.private} group, a one day
7894 expiry period in the @samp{mail.junk} group, and a six day expiry period
7895 everywhere else:
7896
7897 @vindex nnmail-expiry-wait-function
7898 @lisp
7899 (setq nnmail-expiry-wait-function
7900       (lambda (group)
7901        (cond ((string= group "mail.private")
7902                31)
7903              ((string= group "mail.junk")
7904                1)
7905              ((string= group "important")
7906                'never)
7907              (t
7908                6))))
7909 @end lisp
7910
7911 The group names that this function is fed are ``unadorned'' group
7912 names---no @samp{nnml:} prefixes and the like.
7913
7914 The @code{nnmail-expiry-wait} variable and
7915 @code{nnmail-expiry-wait-function} function can be either a number (not
7916 necessarily an integer) or the symbols @code{immediate} or
7917 @code{never}.  
7918
7919 You can also use the @code{expiry-wait} group parameter to selectively
7920 change the expiry period (@pxref{Group Parameters}).
7921
7922 @vindex nnmail-keep-last-article
7923 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
7924 expire the final article in a mail newsgroup.  This is to make life
7925 easier for procmail users.
7926
7927 @vindex gnus-total-expirable-newsgroups
7928 By the way, that line up there about Gnus never expiring non-expirable
7929 articles is a lie.  If you put @code{total-expire} in the group
7930 parameters, articles will not be marked as expirable, but all read
7931 articles will be put through the expiry process.  Use with extreme
7932 caution.  Even more dangerous is the
7933 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
7934 this regexp will have all read articles put through the expiry process,
7935 which means that @emph{all} old mail articles in the groups in question
7936 will be deleted after a while.  Use with extreme caution, and don't come
7937 crying to me when you discover that the regexp you used matched the
7938 wrong group and all your important mail has disappeared.  Be a
7939 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
7940 with!  So there!
7941
7942
7943 @node Duplicates
7944 @subsection Duplicates
7945
7946 @vindex nnmail-treat-duplicates
7947 @vindex nnmail-message-id-cache-length
7948 @vindex nnmail-message-id-cache-file
7949 @cindex duplicate mails
7950 If you are a member of a couple of mailing list, you will sometime
7951 receive two copies of the same mail.  This can be quite annoying, so
7952 @code{nnmail} checks for and treats any duplicates it might find.  To do
7953 this, it keeps a cache of old @code{Message-ID}s -
7954 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
7955 default.  The approximate maximum number of @code{Message-ID}s stored
7956 there is controlled by the @code{nnmail-message-id-cache-length}
7957 variable, which is 1000 by default. (So 1000 @code{Message-ID}s will be
7958 stored.) If all this sounds scary to you, you can set
7959 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
7960 default), and @code{nnmail} won't delete duplicate mails.  Instead it
7961 will generate a brand new @code{Message-ID} for the mail and insert a
7962 warning into the head of the mail saying that it thinks that this is a
7963 duplicate of a different message.  
7964
7965 This variable can also be a function.  If that's the case, the function
7966 will be called from a buffer narrowed to the message in question with
7967 the @code{Message-ID} as a parameter.  The function must return either
7968 @code{nil}, @code{warn}, or @code{delete}.
7969
7970 You can turn this feature off completely by setting the variable to
7971 @code{nil}.
7972
7973 If you want all the duplicate mails to be put into a special
7974 @dfn{duplicates} group, you could do that using the normal mail split
7975 methods:
7976
7977 @lisp
7978 (setq nnmail-split-fancy
7979       '(| ;; Messages duplicates go to a separate group.
7980           ("gnus-warning" "duplication of message" "duplicate")
7981           ;; Message from daemons, postmaster, and the like to another.
7982           (any mail "mail.misc")
7983           ;; Other rules.
7984           [ ... ] ))
7985 @end lisp
7986
7987 Or something like:
7988 @lisp
7989 (setq nnmail-split-methods 
7990       '(("duplicates" "^Gnus-Warning:")
7991         ;; Other rules.
7992         [...]))
7993 @end lisp
7994
7995 Here's a neat feature: If you know that the recipient reads her mail
7996 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
7997 @code{delete}, you can send her as many insults as you like, just by
7998 using a @code{Message-ID} of a mail that you know that she's already
7999 received.  Think of all the fun!  She'll never see any of it!  Whee!
8000
8001
8002 @node Not Reading Mail
8003 @subsection Not Reading Mail
8004
8005 If you start using any of the mail backends, they have the annoying
8006 habit of assuming that you want to read mail with them.  This might not
8007 be unreasonable, but it might not be what you want.
8008
8009 If you set @code{nnmail-spool-file} to @code{nil}, none of the backends
8010 will ever attempt to read incoming mail, which should help.
8011
8012 @vindex nnbabyl-get-new-mail
8013 @vindex nnmbox-get-new-mail
8014 @vindex nnml-get-new-mail
8015 @vindex nnmh-get-new-mail
8016 @vindex nnfolder-get-new-mail
8017 This might be too much, if, for instance, you are reading mail quite
8018 happily with @code{nnml} and just want to peek at some old @sc{rmail}
8019 file you have stashed away with @code{nnbabyl}.  All backends have
8020 variables called backend-@code{get-new-mail}.  If you want to disable
8021 the @code{nnbabyl} mail reading, you edit the virtual server for the
8022 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
8023
8024 All the mail backends will call @code{nn}*@code{-prepare-save-mail-hook}
8025 narrowed to the article to be saved before saving it when reading
8026 incoming mail.
8027
8028
8029 @node Choosing a Mail Backend
8030 @subsection Choosing a Mail Backend
8031
8032 Gnus will read the mail spool when you activate a mail group.  The mail
8033 file is first copied to your home directory.  What happens after that
8034 depends on what format you want to store your mail in.
8035
8036 @menu
8037 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
8038 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
8039 * Mail Spool::                  Store your mail in a private spool?
8040 * MH Spool::                    An mhspool-like backend.
8041 * Mail Folders::                Having one file for each group.
8042 @end menu
8043
8044
8045 @node Unix Mail Box
8046 @subsubsection Unix Mail Box
8047 @cindex nnmbox
8048 @cindex unix mail box
8049
8050 @vindex nnmbox-active-file
8051 @vindex nnmbox-mbox-file
8052 The @dfn{nnmbox} backend will use the standard Un*x mbox file to store
8053 mail.  @code{nnmbox} will add extra headers to each mail article to say
8054 which group it belongs in.
8055
8056 Virtual server settings:
8057
8058 @table @code
8059 @item nnmbox-mbox-file
8060 @vindex nnmbox-mbox-file
8061 The name of the mail box in the user's home directory. 
8062
8063 @item nnmbox-active-file
8064 @vindex nnmbox-active-file
8065 The name of the active file for the mail box.
8066
8067 @item nnmbox-get-new-mail
8068 @vindex nnmbox-get-new-mail
8069 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
8070 into groups.
8071 @end table
8072
8073
8074 @node Rmail Babyl
8075 @subsubsection Rmail Babyl
8076 @cindex nnbabyl
8077 @cindex rmail mbox
8078
8079 @vindex nnbabyl-active-file
8080 @vindex nnbabyl-mbox-file
8081 The @dfn{nnbabyl} backend will use a babyl mail box (aka. @dfn{rmail
8082 mbox}) to store mail. @code{nnbabyl} will add extra headers to each mail
8083 article to say which group it belongs in.
8084
8085 Virtual server settings:
8086
8087 @table @code
8088 @item nnbabyl-mbox-file
8089 @vindex nnbabyl-mbox-file
8090 The name of the rmail mbox file.
8091
8092 @item nnbabyl-active-file
8093 @vindex nnbabyl-active-file
8094 The name of the active file for the rmail box.
8095
8096 @item nnbabyl-get-new-mail
8097 @vindex nnbabyl-get-new-mail
8098 If non-@code{nil}, @code{nnbabyl} will read incoming mail. 
8099 @end table
8100
8101
8102 @node Mail Spool
8103 @subsubsection Mail Spool
8104 @cindex nnml
8105 @cindex mail @sc{nov} spool
8106
8107 The @dfn{nnml} spool mail format isn't compatible with any other known
8108 format.  It should be used with some caution.
8109
8110 @vindex nnml-directory
8111 If you use this backend, Gnus will split all incoming mail into files;
8112 one file for each mail, and put the articles into the correct
8113 directories under the directory specified by the @code{nnml-directory}
8114 variable.  The default value is @file{~/Mail/}.
8115
8116 You do not have to create any directories beforehand; Gnus will take
8117 care of all that.
8118
8119 If you have a strict limit as to how many files you are allowed to store
8120 in your account, you should not use this backend.  As each mail gets its
8121 own file, you might very well occupy thousands of inodes within a few
8122 weeks.  If this is no problem for you, and it isn't a problem for you
8123 having your friendly systems administrator walking around, madly,
8124 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
8125 know that this is probably the fastest format to use.  You do not have
8126 to trudge through a big mbox file just to read your new mail.
8127
8128 @code{nnml} is probably the slowest backend when it comes to article
8129 splitting.  It has to create lots of files, and it also generates
8130 @sc{nov} databases for the incoming mails.  This makes is the fastest
8131 backend when it comes to reading mail.
8132
8133 Virtual server settings:
8134
8135 @table @code
8136 @item nnml-directory
8137 @vindex nnml-directory
8138 All @code{nnml} directories will be placed under this directory. 
8139
8140 @item nnml-active-file
8141 @vindex nnml-active-file
8142 The active file for the @code{nnml} server.
8143
8144 @item nnml-newsgroups-file
8145 @vindex nnml-newsgroups-file
8146 The @code{nnml} group descriptions file.  @xref{Newsgroups File
8147 Format}. 
8148
8149 @item nnml-get-new-mail
8150 @vindex nnml-get-new-mail
8151 If non-@code{nil}, @code{nnml} will read incoming mail.
8152
8153 @item nnml-nov-is-evil
8154 @vindex nnml-nov-is-evil
8155 If non-@code{nil}, this backend will ignore any @sc{nov} files.  
8156
8157 @item nnml-nov-file-name
8158 @vindex nnml-nov-file-name
8159 The name of the @sc{nov} files.  The default is @file{.overview}. 
8160
8161 @item nnml-prepare-save-mail-hook
8162 @vindex nnml-prepare-save-mail-hook
8163 Hook run narrowed to an article before saving.
8164
8165 @end table
8166
8167 @findex nnml-generate-nov-databases
8168 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
8169 you can do a complete update by typing @kbd{M-x
8170 nnml-generate-nov-databases}.  This command will trawl through the
8171 entire @code{nnml} hierarchy, looking at each and every article, so it
8172 might take a while to complete.
8173
8174
8175 @node MH Spool
8176 @subsubsection MH Spool
8177 @cindex nnmh
8178 @cindex mh-e mail spool
8179
8180 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
8181 @sc{nov} databases and it doesn't keep an active file.  This makes
8182 @code{nnmh} a @emph{much} slower backend than @code{nnml}, but it also
8183 makes it easier to write procmail scripts for.
8184
8185 Virtual server settings:
8186
8187 @table @code
8188 @item nnmh-directory
8189 @vindex nnmh-directory
8190 All @code{nnmh} directories will be located under this directory.
8191
8192 @item nnmh-get-new-mail
8193 @vindex nnmh-get-new-mail
8194 If non-@code{nil}, @code{nnmh} will read incoming mail.
8195
8196 @item nnmh-be-safe
8197 @vindex nnmh-be-safe
8198 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
8199 sure that the articles in the folder are actually what Gnus thinks they
8200 are.  It will check date stamps and stat everything in sight, so
8201 setting this to @code{t} will mean a serious slow-down.  If you never
8202 use anything but Gnus to read the @code{nnmh} articles, you do not have
8203 to set this variable to @code{t}.
8204 @end table
8205
8206
8207 @node Mail Folders
8208 @subsubsection Mail Folders
8209 @cindex nnfolder
8210 @cindex mbox folders
8211 @cindex mail folders
8212
8213 @code{nnfolder} is a backend for storing each mail group in a separate
8214 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
8215 will add extra headers to keep track of article numbers and arrival
8216 dates.
8217
8218 Virtual server settings:
8219
8220 @table @code
8221 @item nnfolder-directory
8222 @vindex nnfolder-directory
8223 All the @code{nnfolder} mail boxes will be stored under this directory. 
8224
8225 @item nnfolder-active-file
8226 @vindex nnfolder-active-file
8227 The name of the active file.
8228
8229 @item nnfolder-newsgroups-file
8230 @vindex nnfolder-newsgroups-file
8231 The name of the group descriptions file.  @xref{Newsgroups File Format}.
8232
8233 @item nnfolder-get-new-mail
8234 @vindex nnfolder-get-new-mail
8235 If non-@code{nil}, @code{nnfolder} will read incoming mail.
8236 @end table
8237
8238 @findex nnfolder-generate-active-file
8239 @kindex M-x nnfolder-generate-active-file
8240 If you have lots of @code{nnfolder}-like files you'd like to read with
8241 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
8242 command to make @code{nnfolder} aware of all likely files in
8243 @code{nnfolder-directory}.
8244
8245
8246 @node Other Sources
8247 @section Other Sources
8248
8249 Gnus can do more than just read news or mail.  The methods described
8250 below allow Gnus to view directories and files as if they were
8251 newsgroups.
8252
8253 @menu
8254 * Directory Groups::   You can read a directory as if it was a newsgroup.
8255 * Anything Groups::    Dired?  Who needs dired?
8256 * Document Groups::    Single files can be the basis of a group.
8257 * SOUP::               Reading @sc{SOUP} packets ``offline''.
8258 @end menu
8259
8260
8261 @node Directory Groups
8262 @subsection Directory Groups
8263 @cindex nndir
8264 @cindex directory groups
8265
8266 If you have a directory that has lots of articles in separate files in
8267 it, you might treat it as a newsgroup.  The files have to have numerical
8268 names, of course.
8269
8270 This might be an opportune moment to mention @code{ange-ftp}, that most
8271 wonderful of all wonderful Emacs packages.  When I wrote @code{nndir}, I
8272 didn't think much about it---a backend to read directories.  Big deal.
8273
8274 @code{ange-ftp} changes that picture dramatically.  For instance, if you
8275 enter @file{"/ftp.hpc.uh.edu:/pub/emacs/ding-list/"} as the the
8276 directory name, ange-ftp will actually allow you to read this directory
8277 over at @samp{sina} as a newsgroup.  Distributed news ahoy!
8278
8279 @code{nndir} will use @sc{nov} files if they are present.
8280
8281 @code{nndir} is a ``read-only'' backend---you can't delete or expire
8282 articles with this method.  You can use @code{nnmh} or @code{nnml} for
8283 whatever you use @code{nndir} for, so you could switch to any of those
8284 methods if you feel the need to have a non-read-only @code{nndir}.
8285
8286
8287 @node Anything Groups
8288 @subsection Anything Groups
8289 @cindex nneething
8290
8291 From the @code{nndir} backend (which reads a single spool-like
8292 directory), it's just a hop and a skip to @code{nneething}, which
8293 pretends that any arbitrary directory is a newsgroup.  Strange, but
8294 true.
8295
8296 When @code{nneething} is presented with a directory, it will scan this
8297 directory and assign article numbers to each file.  When you enter such
8298 a group, @code{nneething} must create ``headers'' that Gnus can use.
8299 After all, Gnus is a newsreader, in case you're
8300 forgetting. @code{nneething} does this in a two-step process.  First, it
8301 snoops each file in question.  If the file looks like an article (i.e.,
8302 the first few lines look like headers), it will use this as the head.
8303 If this is just some arbitrary file without a head (eg. a C source
8304 file), @code{nneething} will cobble up a header out of thin air.  It
8305 will use file ownership, name and date and do whatever it can with these
8306 elements.
8307
8308 All this should happen automatically for you, and you will be presented
8309 with something that looks very much like a newsgroup.  Totally like a
8310 newsgroup, to be precise.  If you select an article, it will be displayed
8311 in the article buffer, just as usual.
8312
8313 If you select a line that represents a directory, Gnus will pop you into
8314 a new summary buffer for this @code{nneething} group.  And so on.  You can
8315 traverse the entire disk this way, if you feel like, but remember that
8316 Gnus is not dired, really, and does not intend to be, either.
8317
8318 There are two overall modes to this action---ephemeral or solid.  When
8319 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
8320 will not store information on what files you have read, and what files
8321 are new, and so on.  If you create a solid @code{nneething} group the
8322 normal way with @kbd{G m}, Gnus will store a mapping table between
8323 article numbers and file names, and you can treat this group like any
8324 other groups.  When you activate a solid @code{nneething} group, you will
8325 be told how many unread articles it contains, etc., etc.
8326
8327 Some variables:
8328
8329 @table @code
8330 @item nneething-map-file-directory
8331 @vindex nneething-map-file-directory
8332 All the mapping files for solid @code{nneething} groups will be stored
8333 in this directory, which defaults to @file{~/.nneething/}.
8334
8335 @item nneething-exclude-files
8336 @vindex nneething-exclude-files
8337 All files that match this regexp will be ignored.  Nice to use to exclude
8338 auto-save files and the like, which is what it does by default.
8339
8340 @item nneething-map-file
8341 @vindex nneething-map-file
8342 Name of the map files.
8343 @end table
8344
8345
8346 @node Document Groups
8347 @subsection Document Groups
8348 @cindex nndoc
8349 @cindex documentation group
8350 @cindex help group
8351
8352 @code{nndoc} is a cute little thing that will let you read a single file
8353 as a newsgroup.  Several files types are supported:
8354
8355 @table @code
8356 @cindex babyl
8357 @cindex rmail mbox
8358
8359 @item babyl
8360 The babyl (rmail) mail box.
8361 @cindex mbox
8362 @cindex Unix mbox
8363
8364 @item mbox
8365 The standard Unix mbox file.
8366
8367 @cindex MMDF mail box
8368 @item mmdf
8369 The MMDF mail box format.
8370
8371 @item news
8372 Several news articles appended into a file.
8373
8374 @item rnews
8375 @cindex rnews batch files
8376 The rnews batch transport format.
8377 @cindex forwarded messages
8378
8379 @item forward
8380 Forwarded articles.
8381
8382 @item mime-digest
8383 @cindex digest
8384 @cindex MIME digest
8385 @cindex 1153 digest
8386 @cindex RFC 1153 digest
8387 @cindex RFC 341 digest
8388 MIME (RFC 1341) digest format.
8389
8390 @item standard-digest
8391 The standard (RFC 1153) digest format.
8392
8393 @item slack-digest
8394 Non-standard digest format---matches most things, but does it badly. 
8395 @end table
8396
8397 You can also use the special ``file type'' @code{guess}, which means
8398 that @code{nndoc} will try to guess what file type it is looking at.
8399 @code{digest} means that @code{nndoc} should guess what digest type the
8400 file is.
8401
8402 @code{nndoc} will not try to change the file or insert any extra headers into
8403 it---it will simply, like, let you use the file as the basis for a
8404 group.  And that's it.
8405
8406 If you have some old archived articles that you want to insert into your
8407 new & spiffy Gnus mail backend, @code{nndoc} can probably help you with
8408 that.  Say you have an old @file{RMAIL} file with mail that you now want
8409 to split into your new @code{nnml} groups.  You look at that file using
8410 @code{nndoc}, set the process mark on all the articles in the buffer
8411 (@kbd{M P b}, for instance), and then re-spool (@kbd{B r}) using
8412 @code{nnml}.  If all goes well, all the mail in the @file{RMAIL} file is
8413 now also stored in lots of @code{nnml} directories, and you can delete
8414 that pesky @file{RMAIL} file.  If you have the guts!  
8415
8416 Virtual server variables:
8417
8418 @table @code
8419 @item nndoc-article-type
8420 @vindex nndoc-article-type
8421 This should be one of @code{mbox}, @code{babyl}, @code{digest},
8422 @code{mmdf}, @code{forward}, @code{news}, @code{rnews},
8423 @code{mime-digest}, @code{clari-briefs}, or @code{guess}.
8424
8425 @item nndoc-post-type
8426 @vindex nndoc-post-type
8427 This variable says whether Gnus is to consider the group a news group or
8428 a mail group.  There are two legal values:  @code{mail} (the default)
8429 and @code{news}.
8430 @end table
8431
8432 @menu
8433 * Document Server Internals::   How to add your own document types.
8434 @end menu
8435
8436
8437 @node Document Server Internals
8438 @subsubsection Document Server Internals
8439
8440 Adding new document types to be recognized by @code{nndoc} isn't
8441 difficult.  You just have to whip up a definition of what the document
8442 looks like, write a predicate function to recognize that document type,
8443 and then hook into @code{nndoc}.
8444
8445 First, here's an example document type definition:
8446
8447 @example
8448 (mmdf 
8449  (article-begin .  "^\^A\^A\^A\^A\n")
8450  (body-end .  "^\^A\^A\^A\^A\n"))
8451 @end example
8452
8453 The definition is simply a unique @dfn{name} followed by a series of
8454 regexp pseudo-variable settings.  Below are the possible
8455 variables---don't be daunted by the number of variables; most document
8456 types can be defined with very few settings:
8457
8458 @table @code
8459 @item first-article
8460 If present, @code{nndoc} will skip past all text until it finds
8461 something that match this regexp.  All text before this will be
8462 totally ignored. 
8463
8464 @item article-begin
8465 This setting has to be present in all document type definitions.  It
8466 says what the beginning of each article looks like.
8467
8468 @item head-begin-function
8469 If present, this should be a function that moves point to the head of
8470 the article.
8471
8472 @item nndoc-head-begin
8473 If present, this should be a regexp that matches the head of the
8474 article. 
8475
8476 @item nndoc-head-end
8477 This should match the end of the head of the article.  It defaults to
8478 @samp{"^$"}---the empty line.
8479
8480 @item body-begin-function
8481 If present, this function should move point to the beginning of the body
8482 of the article.
8483
8484 @item body-begin
8485 This should match the beginning of the body of the article.  It defaults
8486 to @samp{^\n}.
8487
8488 @item body-end-function
8489 If present, this function should move point to the end of the body of
8490 the article.
8491
8492 @item body-end
8493 If present, this should match the end of the body of the article.
8494
8495 @item nndoc-file-end
8496 If present, this should match the end of the file.  All text after this
8497 regexp will be totally ignored. 
8498
8499 @end table
8500
8501 So, using these variables @code{nndoc} is able to dissect a document
8502 file into a series of articles, each with a head and a body.  However, a
8503 few more variables are needed since not all document types are all that
8504 news-like---variables needed to transform the head or the body into
8505 something that's palatable for Gnus:
8506
8507 @table @code
8508 @item prepare-body-function
8509 If present, this function will be called when requesting an article.  It
8510 will be called with point at the start of the body, and is useful if the
8511 document has encoded some parts of its contents. 
8512
8513 @item article-transform-function
8514 If present, this function is called when requesting an article.  It's
8515 meant to be used how more wide-ranging transformation of both head and
8516 body of the article.
8517
8518 @item generate-head-function
8519 If present, this function is called to generate a head that Gnus can
8520 understand.  It is called with the article number as a parameter, and is
8521 expected to generate a nice head for the article in question.  It is
8522 called when requesting the headers of all articles.
8523
8524 @end table
8525
8526 Let's look at the most complicated example I can come up with---standard
8527 digests:
8528
8529 @example
8530 (standard-digest
8531  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
8532  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
8533  (prepare-body-function . nndoc-unquote-dashes)
8534  (body-end-function . nndoc-digest-body-end)
8535  (head-end . "^ ?$")
8536  (body-begin . "^ ?\n")
8537  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
8538  (subtype digest guess))
8539 @end example
8540
8541 We see that all text before a 70-width line of dashes is ignored; all
8542 text after a line that starts with that @samp{^End of} is also ignored;
8543 each article begins with a 30-width line of dashes; the line separating
8544 the head from the body may contain a single spcae; and that the body is
8545 run through @code{nndoc-unquote-dashes} before being delivered.
8546
8547 To hook your own document definition into @code{nndoc}, use the
8548 @code{nndoc-add-type} function.  It takes two parameters---the first is
8549 the definition itself and the second (optional) parameter says where in
8550 the document type definition alist to put this definition.  The alist is
8551 traversed sequentially, and @code{nndoc-TYPE-type-p} is called for each
8552 type.  So @code{nndoc-mmdf-type-p} is called to see whether a document
8553 is of @code{mmdf} type, and so on.  These type predicates should return
8554 @code{nil} if the document is not of the correct type; @code{t} if it is
8555 of the correct type; and a number if the document might be of the
8556 correct type.  A high number means high probability; a low number means
8557 low probability with @samp{0} being the lowest legal number.
8558
8559
8560 @node SOUP
8561 @subsection SOUP
8562 @cindex SOUP
8563 @cindex offline
8564
8565 In the PC world people often talk about ``offline'' newsreaders.  These
8566 are thingies that are combined reader/news transport monstrosities.
8567 With built-in modem programs.  Yecchh!
8568
8569 Of course, us Unix Weenie types of human beans use things like
8570 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
8571 transport things like Ghod intended.  And then we just use normal
8572 newsreaders.  
8573
8574 However, it can sometimes be convenient to do something a that's a bit
8575 easier on the brain if you have a very slow modem, and you're not really
8576 that interested in doing things properly.  
8577
8578 A file format called @sc{soup} has been developed for transporting news
8579 and mail from servers to home machines and back again.  It can be a bit
8580 fiddly.
8581
8582 @enumerate
8583
8584 @item
8585 You log in on the server and create a @sc{soup} packet.  You can either
8586 use a dedicated @sc{soup} thingie, or you can use Gnus to create the
8587 packet with the @kbd{O s} command.
8588
8589 @item 
8590 You transfer the packet home.  Rail, boat, car or modem will do fine.
8591
8592 @item
8593 You put the packet in your home directory.
8594
8595 @item
8596 You fire up Gnus using the @code{nnsoup} backend as the native server.
8597
8598 @item
8599 You read articles and mail and answer and followup to the things you
8600 want.
8601
8602 @item 
8603 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
8604 packet.
8605
8606 @item 
8607 You transfer this packet to the server.  
8608
8609 @item
8610 You use Gnus to mail this packet out with the @kbd{G s s} command.
8611
8612 @item
8613 You then repeat until you die.
8614
8615 @end enumerate
8616
8617 So you basically have a bipartite system---you use @code{nnsoup} for
8618 reading and Gnus for packing/sending these @sc{soup} packets.
8619
8620 @menu
8621 * SOUP Commands::     Commands for creating and sending @sc{soup} packets
8622 * SOUP Groups::       A backend for reading @sc{soup} packets.
8623 * SOUP Replies::      How to enable @code{nnsoup} to take over mail and news.
8624 @end menu
8625
8626
8627 @node SOUP Commands
8628 @subsubsection SOUP Commands
8629
8630 @table @kbd
8631 @item G s b
8632 @kindex G s b (Group)
8633 @findex gnus-group-brew-soup
8634 Pack all unread articles in the current group
8635 (@code{gnus-group-brew-soup}).  This command understands the
8636 process/prefix convention.
8637
8638 @item G s w
8639 @kindex G s w (Group)
8640 @findex gnus-soup-save-areas
8641 Save all data files (@code{gnus-soup-save-areas}).
8642
8643 @item G s s
8644 @kindex G s s (Group)
8645 @findex gnus-soup-send-replies
8646 Send all replies from the replies packet
8647 (@code{gnus-soup-send-replies}). 
8648
8649 @item G s p
8650 @kindex G s p (Group)
8651 @findex gnus-soup-pack-packet
8652 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}). 
8653
8654 @item G s r
8655 @kindex G s r (Group)
8656 @findex nnsoup-pack-replies
8657 Pack all replies into a replies packet (@code{nnsoup-pack-replies}). 
8658
8659 @item O s
8660 @kindex O s (Summary)
8661 @findex gnus-soup-add-article
8662 This summary-mode command adds the current article to a @sc{soup} packet
8663 (@code{gnus-soup-add-article}).  It understands the process/prefix
8664 convention. 
8665
8666 @end table
8667
8668
8669 There are a few variables to customize where Gnus will put all these
8670 thingies:  
8671
8672 @table @code
8673
8674 @item gnus-soup-directory
8675 @vindex gnus-soup-directory
8676 Directory where Gnus will save intermediate files while composing
8677 @sc{soup} packets.  The default is @file{~/SoupBrew/}. 
8678
8679 @item gnus-soup-replies-directory
8680 @vindex gnus-soup-replies-directory
8681 This is what Gnus will use as a temporary directory while sending our
8682 reply packets.  The default is @file{~/SoupBrew/SoupReplies/}. 
8683
8684 @item gnus-soup-prefix-file
8685 @vindex gnus-soup-prefix-file
8686 Name of the file where Gnus stores the last used prefix.  The default is
8687 @samp{gnus-prefix}. 
8688
8689 @item gnus-soup-packer
8690 @vindex gnus-soup-packer
8691 A format string command for packing a @sc{soup} packet.  The default is
8692 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}. 
8693
8694 @item gnus-soup-unpacker
8695 @vindex gnus-soup-unpacker
8696 Format string command for unpacking a @sc{soup} packet.  The default is
8697 @samp{gunzip -c %s | tar xvf -}.
8698
8699 @item gnus-soup-packet-directory
8700 @vindex gnus-soup-packet-directory
8701 Where Gnus will look for reply packets.  The default is @file{~/}. 
8702
8703 @item gnus-soup-packet-regexp
8704 @vindex gnus-soup-packet-regexp
8705 Regular expression matching @sc{soup} reply packets in
8706 @code{gnus-soup-packet-directory}. 
8707
8708 @end table
8709  
8710
8711 @node SOUP Groups
8712 @subsubsection @sc{soup} Groups
8713 @cindex nnsoup
8714
8715 @code{nnsoup} is the backend for reading @sc{soup} packets.  It will
8716 read incoming packets, unpack them, and put them in a directory where
8717 you can read them at leisure.
8718
8719 These are the variables you can use to customize its behavior:
8720
8721 @table @code
8722
8723 @item nnsoup-tmp-directory
8724 @vindex nnsoup-tmp-directory
8725 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
8726 directory.  (@file{/tmp/} by default.)  
8727
8728 @item nnsoup-directory
8729 @vindex nnsoup-directory
8730 @code{nnsoup} then moves each message and index file to this directory.
8731 The default is @file{~/SOUP/}.
8732
8733 @item nnsoup-replies-directory 
8734 @vindex nnsoup-replies-directory 
8735 All replies will stored in this directory before being packed into a
8736 reply packet.  The default is @file{~/SOUP/replies/"}.
8737
8738 @item nnsoup-replies-format-type
8739 @vindex nnsoup-replies-format-type
8740 The @sc{soup} format of the replies packets.  The default is @samp{?n}
8741 (rnews), and I don't think you should touch that variable.  I probably
8742 shouldn't even have documented it.  Drats!  Too late!
8743
8744 @item nnsoup-replies-index-type
8745 @vindex nnsoup-replies-index-type
8746 The index type of the replies packet.  The is @samp{?n}, which means
8747 ``none''.  Don't fiddle with this one either!
8748
8749 @item nnsoup-active-file
8750 @vindex nnsoup-active-file
8751 Where @code{nnsoup} stores lots of information.  This is not an ``active
8752 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
8753 this file or mess it up in any way, you're dead.  The default is
8754 @file{~/SOUP/active}.
8755
8756 @item nnsoup-packer
8757 @vindex nnsoup-packer
8758 Format string command for packing a reply @sc{soup} packet.  The default
8759 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}. 
8760
8761 @item nnsoup-unpacker
8762 @vindex nnsoup-unpacker
8763 Format string command for unpacking incoming @sc{soup} packets.  The
8764 default is @samp{gunzip -c %s | tar xvf -}. 
8765
8766 @item nnsoup-packet-directory
8767 @vindex nnsoup-packet-directory
8768 Where @code{nnsoup} will look for incoming packets.  The default is
8769 @file{~/}.  
8770
8771 @item nnsoup-packet-regexp
8772 @vindex nnsoup-packet-regexp
8773 Regular expression matching incoming @sc{soup} packets.  The default is
8774 @samp{Soupout}. 
8775
8776 @end table
8777
8778
8779 @node SOUP Replies
8780 @subsubsection SOUP Replies
8781
8782 Just using @code{nnsoup} won't mean that your postings and mailings end
8783 up in @sc{soup} reply packets automagically.  You have to work a bit
8784 more for that to happen.
8785
8786 @findex nnsoup-set-variables
8787 The @code{nnsoup-set-variables} command will set the appropriate
8788 variables to ensure that all your followups and replies end up in the
8789 @sc{soup} system.
8790
8791 In specific, this is what it does:
8792
8793 @lisp
8794 (setq gnus-inews-article-function 'nnsoup-request-post)
8795 (setq send-mail-function 'nnsoup-request-mail)
8796 @end lisp
8797
8798 And that's it, really.  If you only want news to go into the @sc{soup}
8799 system you just use the first line.  If you only want mail to be
8800 @sc{soup}ed you use the second.
8801
8802
8803 @node Combined Groups
8804 @section Combined Groups
8805
8806 Gnus allows combining a mixture of all the other group types into bigger
8807 groups.
8808
8809 @menu
8810 * Virtual Groups::     Combining articles from many groups.
8811 * Kibozed Groups::     Looking through parts of the newsfeed for articles.
8812 @end menu
8813
8814
8815 @node Virtual Groups
8816 @subsection Virtual Groups
8817 @cindex nnvirtual
8818 @cindex virtual groups
8819
8820 An @dfn{nnvirtual group} is really nothing more than a collection of
8821 other groups.
8822
8823 For instance, if you are tired of reading many small group, you can
8824 put them all in one big group, and then grow tired of reading one
8825 big, unwieldy group.  The joys of computing!
8826
8827 You specify @code{nnvirtual} as the method.  The address should be a
8828 regexp to match component groups.
8829
8830 All marks in the virtual group will stick to the articles in the
8831 component groups.  So if you tick an article in a virtual group, the
8832 article will also be ticked in the component group from whence it came.
8833 (And vice versa---marks from the component groups will also be shown in
8834 the virtual group.)
8835
8836 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
8837 newsgroups into one, big, happy newsgroup:
8838
8839 @lisp
8840 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
8841 @end lisp
8842
8843 The component groups can be native or foreign; everything should work
8844 smoothly, but if your computer explodes, it was probably my fault.
8845
8846 Collecting the same group from several servers might actually be a good
8847 idea if users have set the Distribution header to limit distribution.
8848 If you would like to read @samp{soc.motss} both from a server in Japan
8849 and a server in Norway, you could use the following as the group regexp:
8850
8851 @example
8852 "^nntp+some.server.jp:soc.motss$\\|^nntp+some.server.no:soc.motss$"
8853 @end example
8854
8855 This should work kinda smoothly---all articles from both groups should
8856 end up in this one, and there should be no duplicates.  Threading (and
8857 the rest) will still work as usual, but there might be problems with the
8858 sequence of articles.  Sorting on date might be an option here
8859 (@pxref{Selecting a Group}.
8860
8861 One limitation, however---all groups that are included in a virtual
8862 group has to be alive (i.e., subscribed or unsubscribed).  Killed or
8863 zombie groups can't be component groups for @code{nnvirtual} groups.
8864
8865 @vindex nnvirtual-always-rescan
8866 If the @code{nnvirtual-always-rescan} is non-@code{nil},
8867 @code{nnvirtual} will always scan groups for unread articles when
8868 entering a virtual group.  If this variable is @code{nil} (which is the
8869 default) and you read articles in a component group after the virtual
8870 group has been activated, the read articles from the component group
8871 will show up when you enter the virtual group.  You'll also see this
8872 effect if you have two virtual groups that contain the same component
8873 group.  If that's the case, you should set this variable to @code{t}.
8874 Or you can just tap @code{M-g} on the virtual group every time before
8875 you enter it---it'll have much the same effect.
8876
8877
8878 @node Kibozed Groups
8879 @subsection Kibozed Groups
8880 @cindex nnkiboze
8881 @cindex kibozing
8882
8883 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
8884 the news feed''.  @code{nnkiboze} is a backend that will do this for
8885 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
8886 with useless requests!  Oh happiness!
8887
8888 @kindex G k (Group)
8889 To create a kibozed group, use the @kbd{G k} command in the group
8890 buffer. 
8891
8892 The address field of the @code{nnkiboze} method is, as with
8893 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
8894 @code{nnkiboze} group.  There most similarities between @code{nnkiboze}
8895 and @code{nnvirtual} ends.
8896
8897 In addition to this regexp detailing component groups, an @code{nnkiboze} group
8898 must have a score file to say what articles that are to be included in
8899 the group (@pxref{Scoring}).
8900
8901 @kindex M-x nnkiboze-generate-groups
8902 @findex nnkiboze-generate-groups
8903 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
8904 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
8905 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
8906 all the articles in all the components groups and run them through the
8907 scoring process to determine if there are any articles in the groups
8908 that are to be part of the @code{nnkiboze} groups.
8909
8910 Please limit the number of component groups by using restrictive
8911 regexps.  Otherwise your sysadmin may become annoyed with you, and the
8912 @sc{nntp} site may throw you off and never let you back in again.
8913 Stranger things have happened.
8914
8915 @code{nnkiboze} component groups do not have to be alive---they can be dead,
8916 and they can be foreign.  No restrictions.
8917
8918 @vindex nnkiboze-directory
8919 The generation of an @code{nnkiboze} group means writing two files in
8920 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
8921 contains the @sc{nov} header lines for all the articles in the group,
8922 and the other is an additional @file{.newsrc} file to store information
8923 on what groups that have been searched through to find component
8924 articles.
8925
8926 Articles that are marked as read in the @code{nnkiboze} group will have their
8927 @sc{nov} lines removed from the @sc{nov} file.
8928
8929
8930 @node Scoring
8931 @chapter Scoring
8932 @cindex scoring
8933
8934 Other people use @dfn{kill files}, but we here at Gnus Towers like
8935 scoring better than killing, so we'd rather switch than fight.  They do
8936 something completely different as well, so sit up straight and pay
8937 attention!
8938
8939 @vindex gnus-summary-mark-below
8940 All articles have a default score (@code{gnus-summary-default-score}),
8941 which is 0 by default.  This score may be raised or lowered either
8942 interactively or by score files.  Articles that have a score lower than
8943 @code{gnus-summary-mark-below} are marked as read.
8944
8945 Gnus will read any @dfn{score files} that apply to the current group
8946 before generating the summary buffer.
8947
8948 There are several commands in the summary buffer that insert score
8949 entries based on the current article.  You can, for instance, ask Gnus to
8950 lower or increase the score of all articles with a certain subject.
8951
8952 There are two sorts of scoring entries: Permanent and temporary.
8953 Temporary score entries are self-expiring entries.  Any entries that are
8954 temporary and have not been used for, say, a week, will be removed
8955 silently to help keep the sizes of the score files down.
8956
8957 @menu 
8958 * Summary Score Commands::   Adding score entries for the current group.
8959 * Group Score Commands::     General score commands.
8960 * Score Variables::          Customize your scoring.  (My, what terminology).
8961 * Score File Format::        What a score file may contain.
8962 * Score File Editing::       You can edit score files by hand as well.
8963 * Adaptive Scoring::         Big Sister Gnus @emph{knows} what you read.
8964 * Followups To Yourself::    Having Gnus notice when people answer you.
8965 * Scoring Tips::             How to score effectively.
8966 * Reverse Scoring::          That problem child of old is not problem.
8967 * Global Score Files::       Earth-spanning, ear-splitting score files.
8968 * Kill Files::               They are still here, but they can be ignored.
8969 * GroupLens::                Getting predictions on what you like to read.
8970 * Advanced Scoring::         Using logical expressions to build score rules.
8971 @end menu
8972
8973
8974 @node Summary Score Commands
8975 @section Summary Score Commands
8976 @cindex score commands
8977
8978 The score commands that alter score entries do not actually modify real
8979 score files.  That would be too inefficient.  Gnus maintains a cache of
8980 previously loaded score files, one of which is considered the
8981 @dfn{current score file alist}.  The score commands simply insert
8982 entries into this list, and upon group exit, this list is saved.
8983
8984 The current score file is by default the group's local score file, even
8985 if no such score file actually exists.  To insert score commands into
8986 some other score file (eg. @file{all.SCORE}), you must first make this
8987 score file the current one.
8988
8989 General score commands that don't actually change the score file:
8990
8991 @table @kbd
8992
8993 @item V s
8994 @kindex V s (Summary)
8995 @findex gnus-summary-set-score
8996 Set the score of the current article (@code{gnus-summary-set-score}).  
8997
8998 @item V S
8999 @kindex V S (Summary)
9000 @findex gnus-summary-current-score
9001 Display the score of the current article
9002 (@code{gnus-summary-current-score}).   
9003
9004 @item V t
9005 @kindex V t (Summary)
9006 @findex gnus-score-find-trace
9007 Display all score rules that have been used on the current article
9008 (@code{gnus-score-find-trace}).   
9009
9010 @item V R
9011 @cindex V R (Summary)
9012 @findex gnus-summary-rescore
9013 Run the current summary through the scoring process
9014 (@code{gnus-summary-rescore}).  This might be useful if you're playing
9015 around with your score files behind Gnus' back and want to see the
9016 effect you're having.
9017
9018 @item V a
9019 @kindex V a (Summary)
9020 @findex gnus-summary-score-entry
9021 Add a new score entry, and allow specifying all elements 
9022 (@code{gnus-summary-score-entry}).
9023
9024 @item V c
9025 @kindex V c (Summary)
9026 @findex gnus-score-change-score-file
9027 Make a different score file the current
9028 (@code{gnus-score-change-score-file}). 
9029
9030 @item V e
9031 @kindex V e (Summary)
9032 @findex gnus-score-edit-current-scores
9033 Edit the current score file (@code{gnus-score-edit-current-scores}).
9034 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
9035 File Editing}).
9036
9037 @item V f
9038 @kindex V f (Summary)
9039 @findex gnus-score-edit-file
9040 Edit a score file and make this score file the current one
9041 (@code{gnus-score-edit-file}).
9042
9043 @item V F
9044 @kindex V F (Summary)
9045 @findex gnus-score-flush-cache
9046 Flush the score cahe (@code{gnus-score-flush-cache}).  This is useful
9047 after editing score files.
9048
9049 @item V C
9050 @kindex V C (Summary)
9051 @findex gnus-score-customize
9052 Customize a score file in a visually pleasing manner
9053 (@code{gnus-score-customize}). 
9054
9055 @item I C-i
9056 @kindex I C-i (Summary)
9057 @findex gnus-summary-raise-score
9058 Increase the score of the current article
9059 (@code{gnus-summary-raise-score}).
9060
9061 @item L C-l
9062 @kindex L C-l (Summary)
9063 @findex gnus-summary-lower-score
9064 Lower the score of the current article
9065 (@code{gnus-summary-lower-score}). 
9066 @end table
9067
9068 The rest of these commands modify the local score file.
9069
9070 @table @kbd
9071
9072 @item V m
9073 @kindex V m (Summary)
9074 @findex gnus-score-set-mark-below
9075 Prompt for a score, and mark all articles with a score below this as
9076 read (@code{gnus-score-set-mark-below}).
9077
9078 @item V x
9079 @kindex V x (Summary)
9080 @findex gnus-score-set-expunge-below
9081 Prompt for a score, and add a score rule to the current score file to
9082 expunge all articles below this score
9083 (@code{gnus-score-set-expunge-below}).
9084 @end table
9085
9086 The keystrokes for actually making score entries follow a very regular
9087 pattern, so there's no need to list all the commands.  (Hundreds of
9088 them.)  
9089
9090 @enumerate
9091 @item
9092 The first key is either @kbd{I} (upper case i) for increasing the score
9093 or @kbd{L} for lowering the score. 
9094 @item
9095 The second key says what header you want to score on.  The following
9096 keys are available:
9097 @table @kbd
9098
9099 @item a
9100 Score on the author name.
9101
9102 @item s
9103 Score on the subject line.
9104
9105 @item x
9106 Score on the Xref line---i.e., the cross-posting line.
9107
9108 @item t
9109 Score on thread---the References line.
9110
9111 @item d
9112 Score on the date.
9113
9114 @item l
9115 Score on the number of lines.
9116
9117 @item i
9118 Score on the Message-ID.
9119
9120 @item f
9121 Score on followups.
9122
9123 @item b
9124 Score on the body.
9125
9126 @item h
9127 Score on the head.
9128 @end table
9129
9130 @item
9131 The third key is the match type.  Which match types are legal depends on
9132 what headers you are scoring on.
9133
9134 @table @code
9135
9136 @item strings 
9137
9138 @table @kbd
9139
9140 @item e
9141 Exact matching.
9142
9143 @item s
9144 Substring matching.
9145
9146 @item f
9147 Fuzzy matching.
9148
9149 @item r
9150 Regexp matching
9151 @end table
9152
9153 @item date
9154 @table @kbd
9155
9156 @item b
9157 Before date.
9158
9159 @item a
9160 At date.
9161
9162 @item n
9163 This date.
9164 @end table
9165
9166 @item number
9167 @table @kbd
9168
9169 @item <
9170 Less than number.
9171
9172 @item =
9173 Equal to number.
9174
9175 @item >
9176 Greater than number.
9177 @end table
9178 @end table
9179
9180 @item 
9181 The fourth and final key says whether this is a temporary (i.e., expiring)
9182 score entry, or a permanent (i.e., non-expiring) score entry, or whether
9183 it is to be done immediately, without adding to the score file.
9184 @table @kbd
9185
9186 @item t
9187 Temporary score entry.
9188
9189 @item p
9190 Permanent score entry.
9191
9192 @item i
9193 Immediately scoring.
9194 @end table
9195
9196 @end enumerate
9197
9198 So, let's say you want to increase the score on the current author with
9199 exact matching permanently: @kbd{I a e p}.  If you want to lower the
9200 score based on the subject line, using substring matching, and make a
9201 temporary score entry: @kbd{L s s t}.  Pretty easy.
9202
9203 To make things a bit more complicated, there are shortcuts.  If you use
9204 a capital letter on either the second or third keys, Gnus will use
9205 defaults for the remaining one or two keystrokes.  The defaults are
9206 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
9207 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
9208
9209 @vindex gnus-score-mimic-keymap
9210 The @code{gnus-score-mimic-keymap} says whether these commands will
9211 pretend they are keymaps or not.
9212
9213
9214 @node Group Score Commands
9215 @section Group Score Commands
9216 @cindex group score commands
9217
9218 There aren't many of these as yet, I'm afraid.
9219
9220 @table @kbd
9221
9222 @item W f
9223 @kindex W f (Group)
9224 @findex gnus-score-flush-cache
9225 Gnus maintains a cache of score alists to avoid having to reload them
9226 all the time.  This command will flush the cache
9227 (@code{gnus-score-flush-cache}). 
9228
9229 @end table
9230
9231
9232 @node Score Variables
9233 @section Score Variables
9234 @cindex score variables
9235
9236 @table @code
9237
9238 @item gnus-use-scoring
9239 @vindex gnus-use-scoring
9240 If @code{nil}, Gnus will not check for score files, and will not, in
9241 general, do any score-related work.  This is @code{t} by default.
9242
9243 @item gnus-kill-killed
9244 @vindex gnus-kill-killed
9245 If this variable is @code{nil}, Gnus will never apply score files to
9246 articles that have already been through the kill process.  While this
9247 may save you lots of time, it also means that if you apply a kill file
9248 to a group, and then change the kill file and want to run it over you
9249 group again to kill more articles, it won't work.  You have to set this
9250 variable to @code{t} to do that.  (It is @code{t} by default.)
9251
9252 @item gnus-kill-files-directory
9253 @vindex gnus-kill-files-directory
9254 All kill and score files will be stored in this directory, which is
9255 initialized from the @code{SAVEDIR} environment variable by default.
9256 This is @file{~/News/} by default.
9257
9258 @item gnus-score-file-suffix
9259 @vindex gnus-score-file-suffix
9260 Suffix to add to the group name to arrive at the score file name
9261 (@samp{SCORE} by default.)
9262
9263 @item gnus-score-uncacheable-files
9264 @vindex gnus-score-uncacheable-files
9265 @cindex score cache
9266 All score files are normally cached to avoid excessive re-loading of
9267 score files.  However, if this might make you Emacs grow big and
9268 bloated, so this regexp can be used to weed out score files that are
9269 unlikely to be needed again.  It would be a bad idea to deny caching of
9270 @file{all.SCORE}, while it might be a good idea to not cache
9271 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
9272 variable is @samp{ADAPT$} by default, so no adaptive score files will
9273 be cached.
9274
9275 @item gnus-save-score
9276 @vindex gnus-save-score
9277 If you have really complicated score files, and do lots of batch
9278 scoring, then you might set this variable to @code{t}.  This will make
9279 Gnus save the scores into the @file{.newsrc.eld} file.
9280
9281 @item gnus-score-interactive-default-score
9282 @vindex gnus-score-interactive-default-score
9283 Score used by all the interactive raise/lower commands to raise/lower
9284 score with.  Default is 1000, which may seem excessive, but this is to
9285 ensure that the adaptive scoring scheme gets enough room to play with.
9286 We don't want the small changes from the adaptive scoring to overwrite
9287 manually entered data.
9288
9289 @item gnus-summary-default-score
9290 @vindex gnus-summary-default-score
9291 Default score of an article, which is 0 by default.
9292
9293 @item gnus-score-over-mark
9294 @vindex gnus-score-over-mark
9295 Mark (in the third column) used for articles with a score over the
9296 default.  Default is @samp{+}.
9297
9298 @item gnus-score-below-mark
9299 @vindex gnus-score-below-mark
9300 Mark (in the third column) used for articles with a score below the
9301 default.  Default is @samp{-}.
9302
9303 @item gnus-score-find-score-files-function
9304 @vindex gnus-score-find-score-files-function
9305 Function used to find score files for the current group.  This function
9306 is called with the name of the group as the argument. 
9307
9308 Predefined functions available are:
9309 @table @code
9310
9311 @item gnus-score-find-single
9312 @findex gnus-score-find-single
9313 Only apply the group's own score file.
9314
9315 @item gnus-score-find-bnews
9316 @findex gnus-score-find-bnews
9317 Apply all score files that match, using bnews syntax.  This is the
9318 default.  For instance, if the current group is @samp{gnu.emacs.gnus},
9319 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
9320 @file{gnu.all.SCORE} would all apply.  In short, the instances of
9321 @samp{all} in the score file names are translated into @samp{.*}, and
9322 then a regexp match is done.
9323
9324 This means that if you have some score entries that you want to apply to
9325 all groups, then you put those entries in the @file{all.SCORE} file. 
9326
9327 @item gnus-score-find-hierarchical
9328 @findex gnus-score-find-hierarchical
9329 Apply all score files from all the parent groups.  This means that you
9330 can't have score files like @file{all.SCORE} or @file{all.emacs.SCORE},
9331 but you can have @file{SCORE},  @file{comp.SCORE} and
9332 @file{comp.emacs.SCORE}. 
9333
9334 @end table
9335 This variable can also be a list of functions.  In that case, all these
9336 functions will be called, and all the returned lists of score files will
9337 be applied.  These functions can also return lists of score alists
9338 directly.  In that case, the functions that return these non-file score
9339 alists should probably be placed before the ``real'' score file
9340 functions, to ensure that the last score file returned is the local
9341 score file.  Phu.
9342
9343 @item gnus-score-expiry-days
9344 @vindex gnus-score-expiry-days
9345 This variable says how many days should pass before an unused score file
9346 entry is expired.  If this variable is @code{nil}, no score file entries
9347 are expired.  It's 7 by default.
9348
9349 @item gnus-update-score-entry-dates
9350 @vindex gnus-update-score-entry-dates
9351 If this variable is non-@code{nil}, matching score entries will have
9352 their dates updated.  (This is how Gnus controls expiry---all
9353 non-matching entries will become too old while matching entries will
9354 stay fresh and young.)  However, if you set this variable to @code{nil},
9355 even matching entries will grow old and will have to face that oh-so
9356 grim reaper.  
9357
9358 @item gnus-score-after-write-file-function
9359 @vindex gnus-score-after-write-file-function
9360 Function called with the name of the score file just written.
9361
9362 @end table
9363
9364
9365 @node Score File Format
9366 @section Score File Format
9367 @cindex score file format
9368
9369 A score file is an @code{emacs-lisp} file that normally contains just a
9370 single form.  Casual users are not expected to edit these files;
9371 everything can be changed from the summary buffer.
9372
9373 Anyway, if you'd like to dig into it yourself, here's an example:
9374
9375 @lisp
9376 (("from"
9377   ("Lars Ingebrigtsen" -10000)
9378   ("Per Abrahamsen")
9379   ("larsi\\|lmi" -50000 nil R))
9380  ("subject"
9381   ("Ding is Badd" nil 728373))
9382  ("xref"
9383   ("alt.politics" -1000 728372 s))
9384  ("lines"
9385   (2 -100 nil <))
9386  (mark 0)
9387  (expunge -1000)
9388  (mark-and-expunge -10)
9389  (read-only nil)
9390  (orphan -10)
9391  (adapt t)
9392  (files "/hom/larsi/News/gnu.SCORE")
9393  (exclude-files "all.SCORE")
9394  (local (gnus-newsgroup-auto-expire t)
9395         (gnus-summary-make-false-root 'empty))
9396  (eval (ding)))
9397 @end lisp
9398
9399 This example demonstrates absolutely everything about a score file. 
9400
9401 Even though this looks much like lisp code, nothing here is actually
9402 @code{eval}ed.  The lisp reader is used to read this form, though, so it
9403 has to be legal syntactically, if not semantically.
9404
9405 Six keys are supported by this alist:
9406
9407 @table @code
9408
9409 @item STRING
9410 If the key is a string, it is the name of the header to perform the
9411 match on.  Scoring can only be performed on these eight headers:
9412 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
9413 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
9414 these headers, there are three strings to tell Gnus to fetch the entire
9415 article and do the match on larger parts of the article: @code{Body}
9416 will perform the match on the body of the article, @code{Head} will
9417 perform the match on the head of the article, and @code{All} will
9418 perform the match on the entire article.  Note that using any of these
9419 last three keys will slow down group entry @emph{considerably}.  The
9420 final ``header'' you can score on is @code{Followup}.  These score
9421 entries will result in new score entries being added for all follow-ups
9422 to articles that matches these score entries.
9423
9424 Following this key is a arbitrary number of score entries, where each
9425 score entry has one to four elements.
9426 @enumerate
9427
9428 @item 
9429 The first element is the @dfn{match element}.  On most headers this will
9430 be a string, but on the Lines and Chars headers, this must be an
9431 integer. 
9432
9433 @item 
9434 If the second element is present, it should be a number---the @dfn{score
9435 element}.  This number should be an integer in the neginf to posinf
9436 interval.  This number is added to the score of the article if the match
9437 is successful.  If this element is not present, the
9438 @code{gnus-score-interactive-default-score} number will be used
9439 instead.  This is 1000 by default.
9440
9441 @item 
9442 If the third element is present, it should be a number---the @dfn{date
9443 element}.  This date says when the last time this score entry matched,
9444 which provides a mechanism for expiring the score entries.  It this
9445 element is not present, the score entry is permanent.  The date is
9446 represented by the number of days since December 31, 1 ce.
9447
9448 @item 
9449 If the fourth element is present, it should be a symbol---the @dfn{type
9450 element}.  This element specifies what function should be used to see
9451 whether this score entry matches the article.  What match types that can
9452 be used depends on what header you wish to perform the match on.
9453 @table @dfn
9454
9455 @item From, Subject, References, Xref, Message-ID
9456 For most header types, there are the @code{r} and @code{R} (regexp) as
9457 well as @code{s} and @code{S} (substring) types and @code{e} and
9458 @code{E} (exact match) types.  If this element is not present, Gnus will
9459 assume that substring matching should be used.  @code{R} and @code{S}
9460 differ from the other two in that the matches will be done in a
9461 case-sensitive manner.  All these one-letter types are really just
9462 abbreviations for the @code{regexp}, @code{string} and @code{exact}
9463 types, which you can use instead, if you feel like.
9464
9465 @item Lines, Chars
9466 These two headers use different match types: @code{<}, @code{>},
9467 @code{=}, @code{>=} and @code{<=}.
9468
9469 @item Date
9470 For the Date header we have three match types: @code{before}, @code{at}
9471 and @code{after}.  I can't really imagine this ever being useful, but,
9472 like, it would feel kinda silly not to provide this function.  Just in
9473 case.  You never know.  Better safe than sorry.  Once burnt, twice shy.
9474 Don't judge a book by its cover.  Never not have sex on a first date.
9475 (I have been told that at least one person, and I quote, ``found this
9476 function indispensable'', however.)
9477
9478 @item Head, Body, All
9479 These three match keys use the same match types as the @code{From} (etc)
9480 header uses.
9481
9482 @item Followup
9483 This match key will add a score entry on all articles that followup to
9484 some author.  Uses the same match types as the @code{From} header uses.
9485
9486 @item Thread
9487 This match key will add a score entry on all articles that are part of
9488 a thread.  Uses the same match types as the @code{References} header
9489 uses.
9490 @end table
9491 @end enumerate
9492
9493 @item mark
9494 The value of this entry should be a number.  Any articles with a score
9495 lower than this number will be marked as read.
9496
9497 @item expunge
9498 The value of this entry should be a number.  Any articles with a score
9499 lower than this number will be removed from the summary buffer.
9500
9501 @item mark-and-expunge
9502 The value of this entry should be a number.  Any articles with a score
9503 lower than this number will be marked as read and removed from the
9504 summary buffer.
9505
9506 @item thread-mark-and-expunge
9507 The value of this entry should be a number.  All articles that belong to
9508 a thread that has a total score below this number will be marked as read
9509 and removed from the summary buffer.  @code{gnus-thread-score-function}
9510 says how to compute the total score for a thread.
9511
9512 @item files
9513 The value of this entry should be any number of file names.  These files
9514 are assumed to be score files as well, and will be loaded the same way
9515 this one was.
9516
9517 @item exclude-files
9518 The clue of this entry should be any number of files.  This files will
9519 not be loaded, even though they would normally be so, for some reason or
9520 other. 
9521
9522 @item eval
9523 The value of this entry will be @code{eval}el.  This element will be
9524 ignored when handling global score files. 
9525
9526 @item read-only
9527 Read-only score files will not be updated or saved.  Global score files
9528 should feature this atom (@pxref{Global Score Files}).
9529
9530 @item orphan
9531 The value of this entry should be a number.  Articles that do not have
9532 parents will get this number added to their scores.  Imagine you follow
9533 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
9534 will only follow a few of the threads, also want to see any new threads.
9535
9536 You can do this with the following two score file entries:
9537
9538 @example
9539         (orphan -500)
9540         (mark-and-expunge -100)
9541 @end example
9542
9543 When you enter the group the first time, you will only see the new
9544 threads.  You then raise the score of the threads that you find
9545 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
9546 rest.  Next time you enter the group, you will see new articles in the
9547 interesting threads, plus any new threads.
9548
9549 I.e.---the orphan score atom is for high-volume groups where there
9550 exist a few interesting threads which can't be found automatically by
9551 ordinary scoring rules.
9552
9553 @item adapt
9554 This entry controls the adaptive scoring.  If it is @code{t}, the
9555 default adaptive scoring rules will be used.  If it is @code{ignore}, no
9556 adaptive scoring will be performed on this group.  If it is a list, this
9557 list will be used as the adaptive scoring rules.  If it isn't present,
9558 or is something other than @code{t} or @code{ignore}, the default
9559 adaptive scoring rules will be used.  If you want to use adaptive
9560 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
9561 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
9562 not want adaptive scoring.  If you only want adaptive scoring in a few
9563 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
9564 insert @code{(adapt t)} in the score files of the groups where you want
9565 it. 
9566
9567 @item adapt-file
9568 All adaptive score entries will go to the file named by this entry.  It
9569 will also be applied when entering the group.  This atom might be handy
9570 if you want to adapt on several groups at once, using the same adaptive
9571 file for a number of groups.
9572
9573 @item local
9574 @cindex local variables
9575 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
9576 Each @var{var} will be made buffer-local to the current summary buffer,
9577 and set to the value specified.  This is a convenient, if somewhat
9578 strange, way of setting variables in some groups if you don't like hooks
9579 much.
9580 @end table
9581
9582
9583 @node Score File Editing
9584 @section Score File Editing
9585
9586 You normally enter all scoring commands from the summary buffer, but you
9587 might feel the urge to edit them by hand as well, so we've supplied you
9588 with a mode for that.  
9589
9590 It's simply a slightly customized @code{emacs-lisp} mode, with these
9591 additional commands:
9592
9593 @table @kbd
9594
9595 @item C-c C-c
9596 @kindex C-c C-c (Score)
9597 @findex gnus-score-edit-done
9598 Save the changes you have made and return to the summary buffer
9599 (@code{gnus-score-edit-done}). 
9600
9601 @item C-c C-d
9602 @kindex C-c C-d (Score)
9603 @findex gnus-score-edit-insert-date
9604 Insert the current date in numerical format
9605 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
9606 you were wondering.
9607
9608 @item C-c C-p
9609 @kindex C-c C-p (Score)
9610 @findex gnus-score-pretty-print
9611 The adaptive score files are saved in an unformatted fashion.  If you
9612 intend to read one of these files, you want to @dfn{pretty print} it
9613 first.  This command (@code{gnus-score-pretty-print}) does that for
9614 you. 
9615
9616 @end table
9617
9618 Type @kbd{M-x gnus-score-mode} to use this mode.
9619
9620 @vindex gnus-score-mode-hook
9621 @code{gnus-score-menu-hook} is run in score mode buffers.
9622
9623 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
9624 e} to begin editing score files.
9625
9626
9627 @node Adaptive Scoring
9628 @section Adaptive Scoring
9629 @cindex adaptive scoring
9630
9631 If all this scoring is getting you down, Gnus has a way of making it all
9632 happen automatically---as if by magic.  Or rather, as if by artificial
9633 stupidity, to be precise.
9634
9635 @vindex gnus-use-adaptive-scoring
9636 When you read an article, or mark an article as read, or kill an
9637 article, you leave marks behind.  On exit from the group, Gnus can sniff
9638 these marks and add score elements depending on what marks it finds.
9639 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
9640 @code{t}. 
9641
9642 @vindex gnus-default-adaptive-score-alist
9643 To give you complete control over the scoring process, you can customize
9644 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
9645 might look something like this:
9646
9647 @lisp
9648 (defvar gnus-default-adaptive-score-alist
9649   '((gnus-unread-mark)
9650     (gnus-ticked-mark (from 4))
9651     (gnus-dormant-mark (from 5))
9652     (gnus-del-mark (from -4) (subject -1))
9653     (gnus-read-mark (from 4) (subject 2))
9654     (gnus-expirable-mark (from -1) (subject -1))
9655     (gnus-killed-mark (from -1) (subject -3))
9656     (gnus-kill-file-mark)
9657     (gnus-ancient-mark)
9658     (gnus-low-score-mark)
9659     (gnus-catchup-mark (from -1) (subject -1))))
9660 @end lisp
9661
9662 As you see, each element in this alist has a mark as a key (either a
9663 variable name or a ``real'' mark---a character).  Following this key is
9664 a arbitrary number of header/score pairs.  If there are no header/score
9665 pairs following the key, no adaptive scoring will be done on articles
9666 that have that key as the article mark.  For instance, articles with
9667 @code{gnus-unread-mark} in the example above will not get adaptive score
9668 entries.
9669
9670 Each article can have only one mark, so just a single of these rules
9671 will be applied to each article.
9672
9673 To take @code{gnus-del-mark} as an example---this alist says that all
9674 articles that have that mark (i.e., are marked with @samp{D}) will have a
9675 score entry added to lower based on the @code{From} header by -4, and
9676 lowered by @code{Subject} by -1.  Change this to fit your prejudices. 
9677
9678 If you have marked 10 articles with the same subject with
9679 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
9680 That means that that subject will get a score of ten times -1, which
9681 should be, unless I'm much mistaken, -10.
9682
9683 The headers you can score on are @code{from}, @code{subject},
9684 @code{message-id}, @code{references}, @code{xref}, @code{lines},
9685 @code{chars} and @code{date}.  In addition, you can score on
9686 @code{followup}, which will create an adaptive score entry that matches
9687 on the @code{References} header using the @code{Message-ID} of the
9688 current article, thereby matching the following thread.  
9689
9690 You can also score on @code{thread}, which will try to score all
9691 articles that appear in a thread.  @code{thread} matches uses a
9692 @code{Message-ID} to match on the @code{References} header of the
9693 article.  If the match is made, the @code{Message-ID} of the article is
9694 added to the @code{thread} rule.  (Think about it.  I'd recommend two
9695 aspirins afterwards.)
9696
9697 If you use this scheme, you should set the score file atom @code{mark}
9698 to something small---like -300, perhaps, to avoid having small random
9699 changes result in articles getting marked as read.
9700
9701 After using adaptive scoring for a week or so, Gnus should start to
9702 become properly trained and enhance the authors you like best, and kill
9703 the authors you like least, without you having to say so explicitly. 
9704
9705 You can control what groups the adaptive scoring is to be performed on
9706 by using the score files (@pxref{Score File Format}).  This will also
9707 let you use different rules in different groups.
9708
9709 @vindex gnus-adaptive-file-suffix
9710 The adaptive score entries will be put into a file where the name is the
9711 group name with @code{gnus-adaptive-file-suffix} appended.  The default
9712 is @samp{ADAPT}.
9713
9714 @vindex gnus-score-exact-adapt-limit
9715 When doing adaptive scoring, substring or fuzzy matching would probably
9716 give you the best results in most cases.  However, if the header one
9717 matches is short, the possibility for false positives is great, so if
9718 the length of the match is less than
9719 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
9720 this variable is @code{nil}, exact matching will always be used to avoid
9721 this problem.
9722
9723
9724 @node Followups To Yourself
9725 @section Followups To Yourself
9726
9727 Gnus offers two commands for picking out the @code{Message-ID} header in
9728 the current buffer.  Gnus will then add a score rule that scores using
9729 this @code{Message-ID} on the @code{References} header of other
9730 articles.  This will, in effect, increase the score of all articles that
9731 respond to the article in the current buffer.  Quite useful if you want
9732 to easily note when people answer what you've said.
9733
9734 @table @code
9735
9736 @item gnus-score-followup-article
9737 @findex gnus-score-followup-article
9738 This will add a score to articles that directly follow up your own
9739 article. 
9740
9741 @item gnus-score-followup-thread
9742 @findex gnus-score-followup-thread
9743 This will add a score to all articles that appear in a thread ``below''
9744 your own article.
9745 @end table
9746
9747 @vindex gnus-inews-article-hook
9748 These two functions are both primarily meant to be used in hooks like
9749 @code{message-send-hook}.  
9750
9751 @node Scoring Tips
9752 @section Scoring Tips
9753 @cindex scoring tips
9754
9755 @table @dfn
9756
9757 @item Crossposts
9758 @cindex crossposts
9759 @cindex scoring crossposts
9760 If you want to lower the score of crossposts, the line to match on is
9761 the @code{Xref} header.
9762 @lisp
9763 ("xref" (" talk.politics.misc:" -1000))
9764 @end lisp
9765
9766 @item Multiple crossposts
9767 If you want to lower the score of articles that have been crossposted to
9768 more than, say, 3 groups:
9769 @lisp
9770 ("xref" ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+" -1000 nil r))
9771 @end lisp
9772
9773 @item Matching on the body
9774 This is generally not a very good idea---it takes a very long time.
9775 Gnus actually has to fetch each individual article from the server.  But
9776 you might want to anyway, I guess.  Even though there are three match
9777 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
9778 and stick with it in each score file.  If you use any two, each article
9779 will be fetched @emph{twice}.  If you want to match a bit on the
9780 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
9781 the matches.  
9782
9783 @item Marking as read
9784 You will probably want to mark articles that has a score below a certain
9785 number as read.  This is most easily achieved by putting the following
9786 in your @file{all.SCORE} file:
9787 @lisp
9788 ((mark -100))
9789 @end lisp
9790 You may also consider doing something similar with @code{expunge}.  
9791
9792 @item Negated character classes
9793 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
9794 That will match newlines, which might lead to, well, The Unknown.  Say
9795 @code{[^abcd\n]*} instead.
9796 @end table
9797
9798
9799 @node Reverse Scoring
9800 @section Reverse Scoring
9801 @cindex reverse scoring
9802
9803 If you want to keep just articles that have @samp{Sex with Emacs} in the
9804 subject header, and expunge all other articles, you could put something
9805 like this in your score file:
9806
9807 @lisp
9808 (("subject"
9809   ("Sex with Emacs" 2))
9810  (mark 1)
9811  (expunge 1))
9812 @end lisp
9813
9814 So, you raise all articles that match @samp{Sex with Emacs} and mark the
9815 rest as read, and expunge them to boot.
9816
9817
9818 @node Global Score Files
9819 @section Global Score Files
9820 @cindex global score files
9821
9822 Sure, other newsreaders have ``global kill files''.  These are usually
9823 nothing more than a single kill file that applies to all groups, stored
9824 in the user's home directory.  Bah!  Puny, weak newsreaders!
9825
9826 What I'm talking about here are Global Score Files.  Score files from
9827 all over the world, from users everywhere, uniting all nations in one
9828 big, happy score file union!  Ange-score!  New and untested!
9829
9830 @vindex gnus-global-score-files
9831 All you have to do to use other people's score files is to set the
9832 @code{gnus-global-score-files} variable.  One entry for each score file,
9833 or each score file directory.  Gnus will decide by itself what score
9834 files are applicable to which group.
9835
9836 Say you want to use all score files in the
9837 @file{/ftp@@ftp.some-where:/pub/score} directory and the single score
9838 file @file{/ftp@@ftp.ifi.uio.no:/pub/larsi/ding/score/soc.motss.SCORE}:
9839
9840 @lisp
9841 (setq gnus-global-score-files
9842       '("/ftp@@ftp.ifi.uio.no:/pub/larsi/ding/score/soc.motss.SCORE"
9843         "/ftp@@ftp.some-where:/pub/score/"))
9844 @end lisp
9845
9846 @findex gnus-score-search-global-directories
9847 Simple, eh?  Directory names must end with a @samp{/}.  These
9848 directories are typically scanned only once during each Gnus session.
9849 If you feel the need to manually re-scan the remote directories, you can
9850 use the @code{gnus-score-search-global-directories} command.
9851
9852 Note that, at present, using this option will slow down group entry
9853 somewhat.  (That is---a lot.)
9854
9855 If you want to start maintaining score files for other people to use,
9856 just put your score file up for anonymous ftp and announce it to the
9857 world.  Become a retro-moderator!  Participate in the retro-moderator
9858 wars sure to ensue, where retro-moderators battle it out for the
9859 sympathy of the people, luring them to use their score files on false
9860 premises!  Yay!  The net is saved!
9861
9862 Here are some tips for the would-be retro-moderator, off the top of my
9863 head: 
9864
9865 @itemize @bullet
9866
9867 @item 
9868 Articles that are heavily crossposted are probably junk. 
9869 @item
9870 To lower a single inappropriate article, lower by @code{Message-ID}.
9871 @item
9872 Particularly brilliant authors can be raised on a permanent basis. 
9873 @item
9874 Authors that repeatedly post off-charter for the group can safely be
9875 lowered out of existence.
9876 @item
9877 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
9878 articles completely.
9879
9880 @item 
9881 Use expiring score entries to keep the size of the file down.  You
9882 should probably have a long expiry period, though, as some sites keep
9883 old articles for a long time.
9884 @end itemize
9885
9886 ... I wonder whether other newsreaders will support global score files
9887 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
9888 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
9889 holding our breath yet?
9890
9891
9892 @node Kill Files
9893 @section Kill Files
9894 @cindex kill files
9895
9896 Gnus still supports those pesky old kill files.  In fact, the kill file
9897 entries can now be expiring, which is something I wrote before Daniel
9898 Quinlan thought of doing score files, so I've left the code in there.
9899
9900 In short, kill processing is a lot slower (and I do mean @emph{a lot})
9901 than score processing, so it might be a good idea to rewrite your kill
9902 files into score files.
9903
9904 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
9905 forms into this file, which means that you can use kill files as some
9906 sort of primitive hook function to be run on group entry, even though
9907 that isn't a very good idea.
9908
9909 XCNormal kill files look like this:
9910
9911 @lisp
9912 (gnus-kill "From" "Lars Ingebrigtsen")
9913 (gnus-kill "Subject" "ding")
9914 (gnus-expunge "X")
9915 @end lisp
9916
9917 This will mark every article written by me as read, and remove them from
9918 the summary buffer.  Very useful, you'll agree.
9919
9920 Other programs use a totally different kill file syntax.  If Gnus
9921 encounters what looks like a @code{rn} kill file, it will take a stab at
9922 interpreting it. 
9923
9924 Two summary functions for editing a GNUS kill file:
9925
9926 @table @kbd
9927
9928 @item M-k
9929 @kindex M-k (Summary)
9930 @findex gnus-summary-edit-local-kill
9931 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
9932
9933 @item M-K
9934 @kindex M-K (Summary)
9935 @findex gnus-summary-edit-global-kill
9936 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
9937 @end table
9938
9939 Two group mode functions for editing the kill files:
9940
9941 @table @kbd
9942
9943 @item M-k
9944 @kindex M-k (Group)
9945 @findex gnus-group-edit-local-kill
9946 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
9947
9948 @item M-K
9949 @kindex M-K (Group)
9950 @findex gnus-group-edit-global-kill
9951 Edit the general kill file (@code{gnus-group-edit-global-kill}).
9952 @end table
9953
9954 Kill file variables:
9955
9956 @table @code
9957 @item gnus-kill-file-name
9958 @vindex gnus-kill-file-name
9959 A kill file for the group @samp{soc.motss} is normally called
9960 @file{soc.motss.KILL}.  The suffix appended to the group name to get
9961 this file name is detailed by the @code{gnus-kill-file-name} variable.
9962 The ``global'' kill file (not in the score file sense of ``global'', of
9963 course) is called just @file{KILL}.
9964
9965 @vindex gnus-kill-save-kill-file
9966 @item gnus-kill-save-kill-file
9967 If this variable is non-@code{nil}, Gnus will save the
9968 kill file after processing, which is necessary if you use expiring
9969 kills. 
9970
9971 @item gnus-apply-kill-hook
9972 @vindex gnus-apply-kill-hook
9973 @findex gnus-apply-kill-file-unless-scored
9974 @findex gnus-apply-kill-file
9975 A hook called to apply kill files to a group.  It is
9976 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
9977 kill file if you have a score file for the same group, you can set this
9978 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
9979 kill files to be processed, you should set this variable to @code{nil}.
9980
9981 @item gnus-kill-file-mode-hook
9982 @vindex gnus-kill-file-mode-hook
9983 A hook called in kill-file mode buffers.
9984
9985 @end table
9986
9987
9988 @node GroupLens
9989 @section GroupLens
9990 @cindex GroupLens
9991
9992 GroupLens is a collaborative filtering system that helps you work
9993 together with other people to find the quality news articles out of the
9994 huge volume of news articles generated every day.
9995
9996 To accomplish this the GroupLens system combines your opinions about
9997 articles you have already read with the opinions of others who have done
9998 likewise and gives you a personalized prediction for each unread news
9999 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
10000 rate articles, and finds other people that rate articles the same way.
10001 Once it has found for you some people you agree with it tells you, in
10002 the form of a prediction, what they thought of the article.  You can use
10003 this prediction to help you decide whether or not you want to read the
10004 article.
10005
10006 @menu
10007 * Using GroupLens::          How to make Gnus use GroupLens.
10008 * Rating Articles::          Letting GroupLens know how you rate articles.
10009 * Displaying Predictions::   Displaying predictions given by GroupLens.
10010 * GroupLens Variables::      Customizing GroupLens.
10011 @end menu
10012
10013
10014 @node Using GroupLens
10015 @subsection Using GroupLens
10016
10017 To use GroupLens you must register a pseudonym with your local Better
10018 Bit Bureau (BBB).  At the moment the only better bit in town is at
10019 @samp{http://www.cs.umn.edu/Research/GroupLens/bbb.html}.
10020
10021 Once you have registered you'll need to set a couple of variables.
10022
10023 @table @code
10024
10025 @item gnus-use-grouplens
10026 @vindex gnus-use-grouplens
10027 Setting this variable to a non-@code{nil} value will make Gnus hook into
10028 all the relevant GroupLens functions.
10029
10030 @item grouplens-pseudonym
10031 @vindex grouplens-pseudonym
10032 This variable should be set to the pseudonum you got when registering
10033 with the Better Bit Bureau.
10034
10035 @item grouplens-newsgroups
10036 @vindex grouplens-newsgroups
10037 A list of groups that you want to get GroupLens predictions for. 
10038
10039 @end table
10040
10041 Thats the minimum of what you need to get up and running with GroupLens.
10042 Once you've registered, GroupLens will start giving you scores for
10043 articles based on the average of what other people think.  But, to get
10044 the real benefit of GroupLens you need to start rating articles
10045 yourself.  Then the scores GroupLens gives you will be personalized for
10046 you, based on how the people you usually agree with have already rated.
10047
10048
10049 @node Rating Articles
10050 @subsection Rating Articles
10051
10052 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
10053 Where 1 means something like this article is a waste of bandwidth and 5
10054 means that the article was really good.  The basic question to ask
10055 yourself is, "on a scale from 1 to 5 would I like to see more articles
10056 like this one?"
10057
10058 There are four ways to enter a rating for an article in GroupLens.
10059
10060 @table @kbd
10061
10062 @item r
10063 @kindex r (GroupLens)
10064 @findex bbb-summary-rate-article
10065 This function will prompt you for a rating on a scale of one to five.
10066
10067 @item k
10068 @kindex k (GroupLens)
10069 @findex grouplens-score-thread
10070 This function will prompt you for a rating, and rate all the articles in
10071 the thread.  This is really useful for some of those long running giant
10072 threads in rec.humor.
10073
10074 @end table
10075
10076 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
10077 the score of the article you're reading.
10078
10079 @table @kbd
10080
10081 @item 1-5 n
10082 @kindex n (GroupLens)
10083 @findex grouplens-next-unread-article
10084 Rate the article and go to the next unread article.
10085
10086 @item 1-5 ,
10087 @kindex , (GroupLens)
10088 @findex grouplens-best-unread-article
10089 Rate the article and go to the next unread article with the highest score.
10090
10091 @end table
10092
10093 If you want to give the current article a score of 4 and then go to the
10094 next article, just type @kbd{4 n}.
10095
10096
10097 @node Displaying Predictions
10098 @subsection Displaying Predictions
10099
10100 GroupLens makes a prediction for you about how much you will like a
10101 news article.  The predictions from GroupLens are on a scale from 1 to
10102 5, where 1 is the worst and 5 is the best.  You can use the predictions
10103 from GroupLens in one of three ways controlled by the variable
10104 @code{gnus-grouplens-override-scoring}.
10105
10106 @vindex gnus-grouplens-override-scoring
10107 There are three ways to display predictions in grouplens.  You may
10108 choose to have the GroupLens scores contribute to, or override the
10109 regular gnus scoring mechanism. override is the default; however, some
10110 people prefer to see the Gnus scores plus the grouplens scores.  To get
10111 the separate scoring behavior you need to set
10112 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
10113 GroupLens predictions combined with the grouplens scores set it to
10114 @code{'override} and to combine the scores set
10115 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
10116 the combine option you will also want to set the values for
10117 @code{grouplens-prediction-offset} and
10118 @code{grouplens-score-scale-factor}.
10119
10120 @vindex grouplens-prediction-display
10121 In either case, GroupLens gives you a few choices for how you would like
10122 to see your predictions displayed.  The display of predictions is
10123 controlled by the @code{grouplens-prediction-display} variable.
10124
10125 The following are legal values for that variable.
10126
10127 @table @code
10128 @item prediction-spot
10129 The higher the prediction, the further to the right an @samp{*} is
10130 displayed. 
10131
10132 @item confidence-interval
10133 A numeric confidence interval.
10134
10135 @item prediction-bar
10136 The higher the prediction, the longer the bar.
10137
10138 @item confidence-bar
10139 Numerical confidence.
10140
10141 @item confidence-spot
10142 The spot gets bigger with more confidence.
10143
10144 @item prediction-num
10145 Plain-old numeric value.
10146
10147 @item confidence-plus-minus
10148 Prediction +/i confidence.
10149
10150 @end table
10151
10152
10153 @node GroupLens Variables
10154 @subsection GroupLens Variables
10155
10156 @table @code
10157
10158 @item gnus-summary-grouplens-line-format
10159 The summary line format used in summary buffers that are GroupLens
10160 enhanced.  It accepts the same specs as the normal summary line format
10161 (@pxref{Summary Buffer Lines}).  The default is
10162 @samp{%U%R%z%l%I%(%[%4L: %-20,20n%]%) %s\n}.
10163
10164 @item grouplens-bbb-host
10165 Host running the bbbd server.  The default is
10166 @samp{grouplens.cs.umn.edu}. 
10167
10168 @item grouplens-bbb-port
10169 Port of the host running the bbbd server.  The default is 9000.
10170
10171 @item grouplens-score-offset
10172 Offset the prediction by this value.  In other words, subtract the
10173 prediction value by this number to arrive at the effective score.  The
10174 default is 0.
10175
10176 @item grouplens-score-scale-factor 
10177 This variable allows the user to magnify the effect of GroupLens scores.
10178 The scale factor is applied after the offset.  The default is 1.
10179
10180 @end table
10181
10182
10183 @node Advanced Scoring
10184 @section Advanced Scoring
10185
10186 Scoring on Subjects and From headers is nice enough, but what if you're
10187 really interested in what a person has to say only when she's talking
10188 about a particular subject?  Or what about if you really don't want to
10189 read what person A has to say when she's following up to person B, but
10190 want to read what she says when she's following up to person C?
10191
10192 By using advanced scoring rules you may create arbitrarily complex
10193 scoring patterns.
10194
10195 @menu
10196 * Advanced Scoring Syntax::     A definition.
10197 * Advanced Scoring Examples::   What they look like.
10198 * Advanced Scoring Tips::       Getting the most out of it.
10199 @end menu
10200
10201
10202 @node Advanced Scoring Syntax
10203 @subsection Advanced Scoring Syntax
10204
10205 Ordinary scoring rules have a string as the first element in the rule.
10206 Advanced scoring rules have a list as the first element.  The second
10207 element is the score to be applied if the first element evaluated to a
10208 non-@code{nil} value.
10209
10210 These lists may consist of three logical operators, one redirection
10211 operator, and various match operators.
10212
10213 Logical operators:
10214
10215 @table @code
10216 @item &
10217 @itemx and
10218 This logical operator will evaluate each of its arguments until it finds
10219 one that evaluates to @code{false}, and then it'll stop.  If all arguments
10220 evaluate to @code{true} values, then this operator will return
10221 @code{true}. 
10222
10223 @item |
10224 @itemx or
10225 This logical operator will evaluate each of its arguments until it finds
10226 one that evaluates to @code{true}.  If no arguments are @code{true},
10227 then this operator will return @code{false}.
10228
10229 @item !
10230 @itemx not
10231 @itemx Â¬
10232 This logical operator only takes a single argument.  It returns the
10233 inverse of the value of its argument.
10234
10235 @end table
10236
10237 There is an @dfn{indirection operator} that will make its arguments
10238 apply to the ancenstors of the current article being scored.  For
10239 instance, @code{1-} will make score rules apply to the parent of the
10240 current article.  @code{2-} will make score fules apply to the
10241 grandparent of the current article.  Alternatively, you can write
10242 @code{^^}, where the number of @code{^}s (carets) say how far back into
10243 the ancestry you want to go.
10244
10245 Finally, we have the match operators.  These are the ones that do the
10246 real work.  Match operators are header name strings followed by a match
10247 and a match type.  A typical match operator looks like @samp{("from"
10248 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
10249 simple scoring, and the match types are also the same.
10250
10251
10252 @node Advanced Scoring Examples
10253 @subsection Advanced Scoring Examples
10254
10255 Let's say you want to increase the score of articles written by Lars
10256 when he's talking about Gnus:
10257
10258 @example
10259 ((& 
10260   ("from" "Lars Ingebrigtsen")
10261   ("subject" "Gnus"))
10262  1000)
10263 @end example
10264
10265 Quite simple, huh?
10266
10267 When he writes long articles, he sometimes has something nice to say: 
10268
10269 @example
10270 ((& 
10271   ("from" "Lars Ingebrigtsen")
10272   (|
10273    ("subject" "Gnus")
10274    ("lines" 100 >)))
10275  1000)
10276 @end example
10277
10278 However, when he responds to things written by Reig Eigil Logge, you
10279 really don't want to read what he's written:
10280
10281 @example
10282 ((&
10283   ("from" "Lars Ingebrigtsen")
10284   (1- ("from" "Reig Eigir Logge")))
10285  -100000)
10286 @end example
10287
10288 Everybody that follows up Redmondo when he writes about disappearing
10289 socks should have their scores raised, but only when they talk about
10290 white socks.  However, when Lars talks about socks, it's usually not
10291 very interesting:
10292
10293 @example
10294 ((&
10295   (1-
10296    (&
10297     ("from" "redmondo@@.*no" r)
10298     ("body" "disappearing.*socks" t)))
10299   (! ("from" "Lars Ingebrigtsen"))
10300   ("body" "white.*socks"))
10301  1000)
10302 @end example
10303
10304 The possibilities are endless.
10305
10306
10307 @node Advanced Scoring Tips
10308 @subsection Advanced Scoring Tips
10309
10310 The @code{&} and @code{|} logical operators do short-circuit logic.
10311 That is, they stop processing their arguments when it's clear what the
10312 result of the operation will be.  For instance, if one of the arguments
10313 of an @code{&} evaluates to @code{false}, there's no point in evaluating
10314 the rest of the arguments.  This means that you should put slow matches
10315 (@samp{body}, @code{header}) last and quick matches (@samp{from},
10316 @samp{subject}) first.
10317
10318 The indirection arguments (@code{1-} and so on) will make their
10319 arguments work on previous generations of the thread.  If you say
10320 something like:
10321
10322 @example
10323 ...
10324 (1-
10325  (1-
10326   ("from" "lars")))
10327 ...
10328 @end example
10329
10330 Then that means "score on the from header of the grandparent of the
10331 current article".  An indirection is quite fast, but it's better to say:
10332
10333 @example
10334 (1-
10335  (& 
10336   ("from" "Lars")
10337   ("subject" "Gnus")))
10338 @end example
10339
10340 than it is to say:
10341
10342 @example
10343 (&
10344  (1- ("from" "Lars"))
10345  (1- ("subject" "Gnus")))
10346 @end example
10347
10348
10349
10350 @node Various
10351 @chapter Various
10352
10353 @menu
10354 * Process/Prefix::             A convention used by many treatment commands.
10355 * Interactive::                Making Gnus ask you many questions.
10356 * Formatting Variables::       You can specify what buffers should look like.
10357 * Windows Configuration::      Configuring the Gnus buffer windows.
10358 * Compilation::                How to speed Gnus up.
10359 * Mode Lines::                 Displaying information in the mode lines.
10360 * Highlighting and Menus::     Making buffers look all nice and cozy.
10361 * Buttons::                    Get tendonitis in ten easy steps!
10362 * Daemons::                    Gnus can do things behind your back.
10363 * NoCeM::                      How to avoid spam and other fatty foods.
10364 * Picons::                     How to display pictures of what your reading.
10365 * Various Various::            Things that are really various.
10366 @end menu
10367
10368
10369 @node Process/Prefix
10370 @section Process/Prefix
10371 @cindex process/prefix convention
10372
10373 Many functions, among them functions for moving, decoding and saving
10374 articles, use what is known as the @dfn{Process/Prefix convention}.
10375
10376 This is a method for figuring out what articles that the user wants the
10377 command to be performed on.
10378
10379 It goes like this:
10380
10381 If the numeric prefix is N, perform the operation on the next N
10382 articles, starting with the current one.  If the numeric prefix is
10383 negative, perform the operation on the previous N articles, starting
10384 with the current one.
10385
10386 @vindex transient-mark-mode
10387 If @code{transient-mark-mode} in non-@code{nil} and the region is
10388 active, all articles in the region will be worked upon.
10389
10390 If there is no numeric prefix, but some articles are marked with the
10391 process mark, perform the operation on the articles that are marked with
10392 the process mark.
10393
10394 If there is neither a numeric prefix nor any articles marked with the
10395 process mark, just perform the operation on the current article.
10396
10397 Quite simple, really, but it needs to be made clear so that surprises
10398 are avoided.
10399
10400 @vindex gnus-summary-goto-unread
10401 One thing that seems to shock & horrify lots of people is that, for
10402 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
10403 Since each @kbd{d} (which marks the current article as read) by default
10404 goes to the next unread article after marking, this means that @kbd{3 d}
10405 will mark the next three unread articles as read, no matter what the
10406 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
10407 @code{nil} for a more straightforward action.
10408
10409
10410 @node Interactive
10411 @section Interactive
10412 @cindex interaction
10413
10414 @table @code
10415
10416 @item gnus-novice-user
10417 @vindex gnus-novice-user
10418 If this variable is non-@code{nil}, you are either a newcomer to the
10419 World of Usenet, or you are very cautious, which is a nice thing to be,
10420 really.  You will be given questions of the type ``Are you sure you want
10421 to do this?'' before doing anything dangerous.  This is @code{t} by
10422 default.
10423
10424 @item gnus-expert-user
10425 @vindex gnus-expert-user
10426 If this variable is non-@code{nil}, you will never ever be asked any
10427 questions by Gnus.  It will simply assume you know what you're doing, no
10428 matter how strange.
10429
10430 @item gnus-interactive-catchup
10431 @vindex gnus-interactive-catchup
10432 Require confirmation before catching up a group if non-@code{nil}.  It
10433 is @code{t} by default.
10434
10435 @item gnus-interactive-exit
10436 @vindex gnus-interactive-exit
10437 Require confirmation before exiting Gnus.  This variable is @code{t} by
10438 default. 
10439 @end table
10440
10441
10442 @node Formatting Variables
10443 @section Formatting Variables
10444 @cindex formatting variables
10445
10446 Throughout this manual you've probably noticed lots of variables that
10447 are called things like @code{gnus-group-line-format} and
10448 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
10449 output lines in the various buffers.  There's quite a lot of them.
10450 Fortunately, they all use the same syntax, so there's not that much to
10451 be annoyed by.
10452
10453 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
10454 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
10455 lots of percentages everywhere.  
10456
10457 Each @samp{%} element will be replaced by some string or other when the
10458 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
10459 spec, and pad with spaces to get a 5-character field''.  Just like a
10460 normal format spec, almost.
10461
10462 You can also say @samp{%6,4y}, which means that the field will never be
10463 more than 4 characters wide and never less than 6 characters wide.
10464
10465 There are also specs for highlighting, and these are shared by all the
10466 format variables.  Text inside the @samp{%(} and @samp{%)} specifiers
10467 will get the special @code{mouse-face} property set, which means that it
10468 will be highlighted (with @code{gnus-mouse-face}) when you put the mouse
10469 pointer over it.
10470
10471 Text inside the @samp{%[} and @samp{%]} specifiers will have their
10472 normal faces set using @code{gnus-face-0}, which is @code{bold} by
10473 default.  If you say @samp{%1[} instead, you'll get @code{gnus-face-1}
10474 instead, and so on.  Create as many faces as you wish.  The same goes
10475 for the @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
10476 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
10477
10478 Here's an alternative recipe for the group buffer:
10479
10480 @lisp
10481 ;; Create three face types.
10482 (setq gnus-face-1 'bold)
10483 (setq gnus-face-3 'italic)
10484
10485 ;; We want the article count to be in 
10486 ;; a bold and green face.  So we create 
10487 ;; a new face called `my-green-bold'.
10488 (copy-face 'bold 'my-green-bold)
10489 ;; Set the color.
10490 (set-face-foreground 'my-green-bold "ForestGreen")
10491 (setq gnus-face-2 'my-green-bold)
10492
10493 ;; Set the new & fancy format.
10494 (setq gnus-group-line-format 
10495       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
10496 @end lisp
10497
10498 I'm sure you'll be able to use this scheme to create totally unreadable
10499 and extremely vulgar displays.  Have fun!
10500
10501 Currently Gnus uses the following formatting variables:
10502 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
10503 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
10504 @code{gnus-group-mode-line-format},
10505 @code{gnus-summary-mode-line-format},
10506 @code{gnus-article-mode-line-format},
10507 @code{gnus-server-mode-line-format}. 
10508
10509 Note that the @samp{%(} specs (and friends) do not make any sense on the
10510 mode-line variables.
10511
10512 All these format variables can also be arbitrary elisp forms.  In that
10513 case, they will be @code{eval}ed to insert the required lines.
10514
10515 @kindex M-x gnus-update-format
10516 @findex gnus-update-format
10517 Gnus includes a command to help you while creating your own format
10518 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
10519 update the spec in question and pop you to a buffer where you can
10520 examine the resulting lisp code to be run to generate the line.  
10521
10522
10523 @node Windows Configuration
10524 @section Windows Configuration
10525 @cindex windows configuration
10526
10527 No, there's nothing here about X, so be quiet.
10528
10529 @vindex gnus-use-full-window
10530 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
10531 other windows and occupy the entire Emacs screen by itself.  It is
10532 @code{t} by default.
10533
10534 @vindex gnus-buffer-configuration
10535 @code{gnus-buffer-configuration} describes how much space each Gnus
10536 buffer should be given.  Here's an excerpt of this variable:
10537
10538 @lisp
10539 ((group (vertical 1.0 (group 1.0 point)
10540                       (if gnus-carpal (group-carpal 4))))
10541  (article (vertical 1.0 (summary 0.25 point) 
10542                         (article 1.0))))
10543 @end lisp
10544
10545 This is an alist.  The @dfn{key} is a symbol that names some action or
10546 other.  For instance, when displaying the group buffer, the window
10547 configuration function will use @code{group} as the key.  A full list of
10548 possible names is listed below.
10549
10550 The @dfn{value} (i. e., the @dfn{split}) says how much space each buffer
10551 should occupy.  To take the @code{article} split as an example -
10552
10553 @lisp
10554 (article (vertical 1.0 (summary 0.25 point)
10555                        (article 1.0)))
10556 @end lisp
10557
10558 This @dfn{split} says that the summary buffer should occupy 25% of upper
10559 half of the screen, and that it is placed over the article buffer.  As
10560 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
10561 reaching for that calculator there).  However, the special number
10562 @code{1.0} is used to signal that this buffer should soak up all the
10563 rest of the space available after the rest of the buffers have taken
10564 whatever they need.  There should be only one buffer with the @code{1.0}
10565 size spec per split.
10566
10567 Point will be put in the buffer that has the optional third element
10568 @code{point}. 
10569
10570 Here's a more complicated example:
10571
10572 @lisp
10573 (article (vertical 1.0 (group 4)
10574                        (summary 0.25 point)
10575                        (if gnus-carpal (summary-carpal 4))
10576                        (article 1.0)))
10577 @end lisp
10578
10579 If the size spec is an integer instead of a floating point number, 
10580 then that number will be used to say how many lines a buffer should
10581 occupy, not a percentage.
10582
10583 If the @dfn{split} looks like something that can be @code{eval}ed (to be
10584 precise---if the @code{car} of the split is a function or a subr), this
10585 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
10586 be used as a split.  This means that there will be three buffers if
10587 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
10588 is non-@code{nil}.
10589
10590 Not complicated enough for you?  Well, try this on for size:
10591
10592 @lisp
10593 (article (horizontal 1.0 
10594              (vertical 0.5
10595                  (group 1.0)
10596                  (gnus-carpal 4))
10597              (vertical 1.0
10598                  (summary 0.25 point)
10599                  (summary-carpal 4)
10600                  (article 1.0))))
10601 @end lisp
10602
10603 Whoops.  Two buffers with the mystery 100% tag.  And what's that
10604 @code{horizontal} thingie?  
10605
10606 If the first element in one of the split is @code{horizontal}, Gnus will
10607 split the window horizontally, giving you two windows side-by-side.
10608 Inside each of these strips you may carry on all you like in the normal
10609 fashion.  The number following @code{horizontal} says what percentage of
10610 the screen is to be given to this strip.
10611
10612 For each split, there @emph{must} be one element that has the 100% tag.
10613 The splitting is never accurate, and this buffer will eat any leftover
10614 lines from the splits.
10615
10616 To be slightly more formal, here's a definition of what a legal split
10617 may look like:
10618
10619 @example
10620 split       = frame | horizontal | vertical | buffer | form
10621 frame       = "(frame " size *split ")"
10622 horizontal  = "(horizontal " size *split ")"
10623 vertical    = "(vertical " size *split ")"
10624 buffer      = "(" buffer-name " " size *[ "point" ] ")"
10625 size        = number | frame-params
10626 buffer-name = group | article | summary ...
10627 @end example
10628
10629 The limitations are that the @code{frame} split can only appear as the
10630 top-level split.  @var{form} should be an Emacs Lisp form that should
10631 return a valid split.  We see that each split is fully recursive, and
10632 may contain any number of @code{vertical} and @code{horizontal} splits. 
10633
10634 @vindex gnus-window-min-width
10635 @vindex gnus-window-min-height
10636 @cindex window height
10637 @cindex window width
10638 Finding the right sizes can be a bit complicated.  No window may be less
10639 than @code{gnus-window-min-height} (default 1) characters high, and all
10640 windows must be at least @code{gnus-window-min-width} (default 1)
10641 characters wide.  Gnus will try to enforce this before applying the
10642 splits.  If you want to use the normal Emacs window width/height limit,
10643 you can just set these two variables to @code{nil}.
10644
10645 If you're not familiar with Emacs terminology, @code{horizontal} and
10646 @code{vertical} splits may work the opposite way of what you'd expect.
10647 Windows inside a @code{horizontal} split are shown side-by-side, and
10648 windows within a @code{vertical} split are shown above each other.
10649
10650 @findex gnus-configure-frame
10651 If you want to experiment with window placement, a good tip is to call
10652 @code{gnus-configure-frame} directly with a split.  This is the function
10653 that does all the real work when splitting buffers.  Below is a pretty
10654 nonsensical configuration with 5 windows; two for the group buffer and
10655 three for the article buffer.  (I said it was nonsensical.)  If you
10656 @code{eval} the statement below, you can get an idea of how that would
10657 look straight away, without going through the normal Gnus channels.
10658 Play with it until you're satisfied, and then use
10659 @code{gnus-add-configuration} to add your new creation to the buffer
10660 configuration list. 
10661
10662 @lisp
10663 (gnus-configure-frame
10664  '(horizontal 1.0
10665     (vertical 10
10666       (group 1.0)
10667       (article 0.3 point))
10668     (vertical 1.0
10669       (article 1.0)
10670       (horizontal 4
10671         (group 1.0)
10672         (article 10)))))
10673 @end lisp
10674
10675 You might want to have several frames as well.  No prob---just use the
10676 @code{frame} split:
10677
10678 @lisp
10679 (gnus-configure-frame
10680  '(frame 1.0
10681          (vertical 1.0
10682                    (summary 0.25 point)
10683                    (article 1.0))
10684          (vertical ((height . 5) (width . 15)
10685                     (user-position . t)
10686                     (left . -1) (top . 1))
10687                    (picon 1.0))))
10688
10689 @end lisp
10690
10691 This split will result in the familiar summary/article window
10692 configuration in the first (or ``main'') frame, while a small additional
10693 frame will be created where picons will be shown.  As you can see,
10694 instead of the normal @code{1.0} top-level spec, each additional split
10695 should have a frame parameter alist as the size spec.
10696 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
10697 Reference Manual}.
10698
10699 Here's a list of all possible keys for
10700 @code{gnus-buffer-configuration}:
10701
10702 @code{group}, @code{summary}, @code{article}, @code{server},
10703 @code{browse}, @code{group-mail}, @code{summary-mail},
10704 @code{summary-reply}, @code{info}, @code{summary-faq},
10705 @code{edit-group}, @code{edit-server}, @code{reply}, @code{reply-yank},
10706 @code{followup}, @code{followup-yank}, @code{edit-score}.  
10707
10708 @findex gnus-add-configuration
10709 Since the @code{gnus-buffer-configuration} variable is so long and
10710 complicated, there's a function you can use to ease changing the config
10711 of a single setting: @code{gnus-add-configuration}.  If, for instance,
10712 you want to change the @code{article} setting, you could say:
10713
10714 @lisp
10715 (gnus-add-configuration
10716  '(article (vertical 1.0
10717                (group 4)
10718                (summary .25 point)
10719                (article 1.0))))
10720 @end lisp
10721
10722 You'd typically stick these @code{gnus-add-configuration} calls in your
10723 @file{.gnus} file or in some startup hook---they should be run after
10724 Gnus has been loaded.
10725
10726
10727 @node Compilation 
10728 @section Compilation 
10729 @cindex compilation
10730 @cindex byte-compilation
10731
10732 @findex gnus-compile
10733
10734 Remember all those line format specification variables?
10735 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
10736 on.  Now, Gnus will of course heed whatever these variables are, but,
10737 unfortunately, changing them will mean a quite significant slow-down.
10738 (The default values of these variables have byte-compiled functions
10739 associated with them, while the user-generated versions do not, of
10740 course.) 
10741
10742 To help with this, you can run @kbd{M-x gnus-compile} after you've
10743 fiddled around with the variables and feel that you're (kind of)
10744 satisfied.  This will result in the new specs being byte-compiled, and
10745 you'll get top speed again.
10746
10747
10748 @node Mode Lines
10749 @section Mode Lines
10750 @cindex mode lines
10751
10752 @vindex gnus-updated-mode-lines
10753 @code{gnus-updated-mode-lines} says what buffers should keep their mode
10754 lines updated.  It is a list of symbols.  Supported symbols include
10755 @code{group}, @code{article}, @code{summary}, @code{server},
10756 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
10757 Gnus will keep that mode line updated with information that may be
10758 pertinent.  If this variable is @code{nil}, screen refresh may be
10759 quicker.
10760
10761 @cindex display-time
10762
10763 @vindex gnus-mode-non-string-length
10764 By default, Gnus displays information on the current article in the mode
10765 lines of the summary and article buffers.  The information Gnus wishes
10766 to display (eg. the subject of the article) is often longer than the
10767 mode lines, and therefore have to be cut off at some point.  The
10768 @code{gnus-mode-non-string-length} variable says how long the other
10769 elements on the line is (i.e., the non-info part).  If you put
10770 additional elements on the mode line (eg. a clock), you should modify
10771 this variable:
10772
10773 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
10774 @lisp
10775 (add-hook 'display-time-hook
10776           (lambda () (setq gnus-mode-non-string-length
10777                            (+ 21
10778                               (if line-number-mode 5 0)
10779                               (if column-number-mode 4 0)
10780                               (length display-time-string)))))
10781 @end lisp
10782
10783 If this variable is @code{nil} (which is the default), the mode line
10784 strings won't be chopped off, and they won't be padded either.
10785
10786
10787 @node Highlighting and Menus
10788 @section Highlighting and Menus
10789 @cindex visual
10790 @cindex highlighting
10791 @cindex menus
10792
10793 @vindex gnus-visual
10794 The @code{gnus-visual} variable controls most of the prettifying Gnus
10795 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
10796 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
10797 file.
10798
10799 This variable can be a list of visual properties that are enabled.  The
10800 following elements are legal, and are all included by default:
10801
10802 @table @code
10803 @item group-highlight
10804 Do highlights in the group buffer.
10805 @item summary-highlight
10806 Do highlights in the summary buffer.
10807 @item article-highlight
10808 Do highlights in the article buffer.
10809 @item highlight
10810 Turn on highlighting in all buffers.
10811 @item group-menu
10812 Create menus in the group buffer.
10813 @item summary-menu
10814 Create menus in the summary buffers.
10815 @item article-menu
10816 Create menus in the article buffer.
10817 @item browse-menu
10818 Create menus in the browse buffer.
10819 @item server-menu
10820 Create menus in the server buffer.
10821 @item score-menu
10822 Create menus in the score buffers.
10823 @item menu
10824 Create menus in all buffers.
10825 @end table
10826
10827 So if you only want highlighting in the article buffer and menus in all
10828 buffers, you could say something like:
10829
10830 @lisp
10831 (setq gnus-visual '(article-highlight menu))
10832 @end lisp
10833
10834 If you want only highlighting and no menus whatsoever, you'd say:
10835
10836 @lisp
10837 (setq gnus-visual '(highlight))
10838 @end lisp
10839
10840 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
10841 in all Gnus buffers.
10842
10843 Other general variables that influence the look of all buffers include:
10844
10845 @table @code
10846 @item gnus-mouse-face
10847 @vindex gnus-mouse-face
10848 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
10849 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
10850
10851 @item gnus-display-type
10852 @vindex gnus-display-type
10853 This variable is symbol indicating the display type Emacs is running
10854 under.  The symbol should be one of @code{color}, @code{grayscale} or
10855 @code{mono}.  If Gnus guesses this display attribute wrongly, either set
10856 this variable in your @file{~/.emacs} or set the resource
10857 @code{Emacs.displayType} in your @file{~/.Xdefaults}.
10858
10859 @item gnus-background-mode 
10860 @vindex gnus-background-mode 
10861 This is a symbol indicating the Emacs background brightness.  The symbol
10862 should be one of @code{light} or @code{dark}.  If Gnus guesses this
10863 frame attribute wrongly, either set this variable in your @file{~/.emacs} or
10864 set the resource @code{Emacs.backgroundMode} in your @file{~/.Xdefaults}. 
10865 `gnus-display-type'.
10866 @end table
10867
10868 There are hooks associated with the creation of all the different menus:
10869
10870 @table @code
10871
10872 @item gnus-article-menu-hook
10873 @vindex gnus-article-menu-hook
10874 Hook called after creating the article mode menu.
10875
10876 @item gnus-group-menu-hook
10877 @vindex gnus-group-menu-hook
10878 Hook called after creating the group mode menu.
10879
10880 @item gnus-summary-menu-hook
10881 @vindex gnus-summary-menu-hook
10882 Hook called after creating the summary mode menu.
10883
10884 @item gnus-server-menu-hook
10885 @vindex gnus-server-menu-hook
10886 Hook called after creating the server mode menu.
10887
10888 @item gnus-browse-menu-hook
10889 @vindex gnus-browse-menu-hook
10890 Hook called after creating the browse mode menu.
10891
10892 @item gnus-score-menu-hook
10893 @vindex gnus-score-menu-hook
10894 Hook called after creating the score mode menu.
10895
10896 @end table
10897
10898
10899 @node Buttons
10900 @section Buttons
10901 @cindex buttons
10902 @cindex mouse
10903 @cindex click
10904
10905 Those new-fangled @dfn{mouse} contraptions is very popular with the
10906 young, hep kids who don't want to learn the proper way to do things
10907 these days.  Why, I remember way back in the summer of '89, when I was
10908 using Emacs on a Tops 20 system.  Three hundred users on one single
10909 machine, and every user was running Simula compilers.  Bah!
10910
10911 Right.
10912
10913 @vindex gnus-carpal
10914 Well, you can make Gnus display bufferfuls of buttons you can click to
10915 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
10916 really.  Tell the chiropractor I sent you.
10917
10918
10919 @table @code
10920
10921 @item gnus-carpal-mode-hook
10922 @vindex gnus-carpal-mode-hook
10923 Hook run in all carpal mode buffers.
10924
10925 @item gnus-carpal-button-face
10926 @vindex gnus-carpal-button-face
10927 Face used on buttons.
10928
10929 @item gnus-carpal-header-face
10930 @vindex gnus-carpal-header-face
10931 Face used on carpal buffer headers.
10932
10933 @item gnus-carpal-group-buffer-buttons
10934 @vindex gnus-carpal-group-buffer-buttons
10935 Buttons in the group buffer.
10936
10937 @item gnus-carpal-summary-buffer-buttons
10938 @vindex gnus-carpal-summary-buffer-buttons
10939 Buttons in the summary buffer.
10940
10941 @item gnus-carpal-server-buffer-buttons
10942 @vindex gnus-carpal-server-buffer-buttons
10943 Buttons in the server buffer.
10944
10945 @item gnus-carpal-browse-buffer-buttons
10946 @vindex gnus-carpal-browse-buffer-buttons
10947 Buttons in the browse buffer.
10948 @end table
10949
10950 All the @code{buttons} variables are lists.  The elements in these list
10951 is either a cons cell where the car contains a text to be displayed and
10952 the cdr contains a function symbol, or a simple string.
10953
10954
10955 @node Daemons
10956 @section Daemons
10957 @cindex demons
10958 @cindex daemons
10959
10960 Gnus, being larger than any program ever written (allegedly), does lots
10961 of strange stuff that you may wish to have done while you're not
10962 present.  For instance, you may want it to check for new mail once in a
10963 while.  Or you may want it to close down all connections to all servers
10964 when you leave Emacs idle.  And stuff like that.
10965
10966 Gnus will let you do stuff like that by defining various
10967 @dfn{handlers}.  Each handler consists of three elements:  A
10968 @var{function}, a @var{time}, and an @var{idle} parameter.
10969
10970 Here's an example of a handler that closes connections when Emacs has
10971 been idle for thirty minutes:
10972
10973 @lisp
10974 (gnus-demon-close-connections nil 30)
10975 @end lisp
10976
10977 Here's a handler that scans for PGP headers every hour when Emacs is
10978 idle: 
10979
10980 @lisp
10981 (gnus-demon-scan-pgp 60 t)
10982 @end lisp
10983
10984 This @var{time} parameter and than @var{idle} parameter works together
10985 in a strange, but wonderful fashion.  Basically, if @var{idle} is
10986 @code{nil}, then the function will be called every @var{time} minutes.
10987
10988 If @var{idle} is @code{t}, then the function will be called after
10989 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
10990 the function will never be called.  But once Emacs goes idle, the
10991 function will be called every @var{time} minutes.
10992
10993 If @var{idle} is a number and @var{time} is a number, the function will
10994 be called every @var{time} minutes only when Emacs has been idle for
10995 @var{idle} minutes.
10996
10997 If @var{idle} is a number and @var{time} is @code{nil}, the function
10998 will be called once every time Emacs has been idle for @var{idle}
10999 minutes.  
11000
11001 And if @var{time} is a string, it should look like @samp{07:31}, and
11002 the function will then be called once every day somewhere near that
11003 time.  Modified by the @var{idle} parameter, of course.
11004
11005 @vindex gnus-demon-timestep
11006 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
11007 seconds.  This is @code{60} by default.  If you change that variable,
11008 all the timings in the handlers will be affected.)
11009
11010 @vindex gnus-use-demon
11011 To set the whole thing in motion, though, you have to set
11012 @code{gnus-use-demon} to @code{t}.
11013
11014 So, if you want to add a handler, you could put something like this in
11015 your @file{.gnus} file:
11016
11017 @findex gnus-demon-add-handler
11018 @lisp
11019 (gnus-demon-add-handler 'gnus-demon-close-connections nil 30)
11020 @end lisp
11021
11022 @findex gnus-demon-add-nocem
11023 @findex gnus-demon-add-scanmail
11024 @findex gnus-demon-add-disconnection
11025 Some ready-made functions to do this has been created:
11026 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection}, and
11027 @code{gnus-demon-add-scanmail}.  Just put those functions in your
11028 @file{.gnus} if you want those abilities.
11029
11030 @findex gnus-demon-init
11031 @findex gnus-demon-cancel
11032 @vindex gnus-demon-handlers
11033 If you add handlers to @code{gnus-demon-handlers} directly, you should
11034 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
11035 daemons, you can use the @code{gnus-demon-cancel} function.
11036
11037 Note that adding daemons can be pretty naughty if you overdo it.  Adding
11038 functions that scan all news and mail from all servers every two seconds
11039 is a sure-fire way of getting booted off any respectable system.  So
11040 behave. 
11041
11042
11043 @node NoCeM
11044 @section NoCeM
11045 @cindex nocem
11046 @cindex spam
11047
11048 @dfn{Spamming} is posting the same article lots and lots of times.
11049 Spamming is bad.  Spamming is evil.  
11050
11051 Spamming is usually canceled within a day or so by various anti-spamming
11052 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
11053 NoCeM is pronounced ``no see-'em'', and means what the name
11054 implies---these are messages that make the offending articles, like, go
11055 away.  
11056
11057 What use are these NoCeM messages if the articles are canceled anyway?
11058 Some sites do not honor cancel messages and some sites just honor cancels
11059 from a select few people.  Then you may wish to make use of the NoCeM
11060 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
11061
11062 Gnus can read and parse the messages in this group automatically, and
11063 this will make spam disappear.  
11064
11065 There are some variables to customize, of course:
11066
11067 @table @code
11068 @item gnus-use-nocem
11069 @vindex gnus-use-nocem
11070 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
11071 by default. 
11072
11073 @item gnus-nocem-groups
11074 @vindex gnus-nocem-groups
11075 Gnus will look for NoCeM messages in the groups in this list.  The
11076 default is @code{("alt.nocem.misc" "news.admin.net-abuse.announce")}. 
11077
11078 @item gnus-nocem-issuers
11079 @vindex gnus-nocem-issuers
11080 There are many people issuing NoCeM messages.  This list says what
11081 people you want to listen to.  The default is @code{("Automoose-1"
11082 "clewis@@ferret.ocunix.on.ca;" "jem@@xpat.com;" "red@@redpoll.mrfs.oh.us
11083 (Richard E. Depew)")}; fine, upstanding citizens all of them.
11084
11085 Known despammers that you can put in this list include:
11086
11087 @table @samp
11088 @item clewis@@ferret.ocunix.on.ca;
11089 @cindex Chris Lewis
11090 Chris Lewis---Major Canadian despammer who has probably canceled more
11091 usenet abuse than anybody else.
11092
11093 @item Automoose-1
11094 @cindex CancelMoose[tm]
11095 The CancelMoose[tm] on autopilot.  The CancelMoose[tm] is reputed to be
11096 Norwegian, and was the person(s) who invented NoCeM.  
11097
11098 @item jem@@xpat.com;
11099 @cindex Jem
11100 Jem---Korean despammer who is getting very busy these days.
11101
11102 @item red@@redpoll.mrfs.oh.us (Richard E. Depew)
11103 Richard E. Depew---lone American despammer.  He mostly cancels binary
11104 postings to non-binary groups and removes spews (regurgitated articles).
11105 @end table
11106
11107 You do not have to heed NoCeM messages from all these people---just the
11108 ones you want to listen to.
11109
11110 @item gnus-nocem-directory
11111 @vindex gnus-nocem-directory
11112 This is where Gnus will store its NoCeM cache files.  The default is
11113 @file{~/News/NoCeM/}. 
11114
11115 @item gnus-nocem-expiry-wait
11116 @vindex gnus-nocem-expiry-wait
11117 The number of days before removing old NoCeM entries from the cache.
11118 The default is 15.  If you make it shorter Gnus will be faster, but you
11119 might then see old spam.
11120
11121 @end table
11122
11123
11124 @node Picons
11125 @section Picons
11126
11127 So...  You want to slow down your news reader even more!  This is a
11128 good way to do so.  Its also a great way to impress people staring
11129 over your shoulder as you read news.
11130
11131 @menu
11132 * Picon Basics::           What are picons and How do I get them.
11133 * Picon Requirements::     Don't go further if you aren't using XEmacs.
11134 * Easy Picons::            Displaying Picons---the easy way.
11135 * Hard Picons::            The way you should do it.  You'll learn something.
11136 * Picon Configuration::    Other variables you can trash/tweak/munge/play with.
11137 @end menu
11138
11139
11140 @node Picon Basics
11141 @subsection Picon Basics
11142
11143 What are Picons?  To quote directly from the Picons Web site
11144 (@samp{http://www.cs.indiana.edu/picons/ftp/index.html}):
11145
11146 @quotation 
11147 @dfn{Picons} is short for ``personal icons''.  They're small,
11148 constrained images used to represent users and domains on the net,
11149 organized into databases so that the appropriate image for a given
11150 e-mail address can be found.  Besides users and domains, there are picon
11151 databases for Usenet newsgroups and weather forecasts.  The picons are
11152 in either monochrome @code{XBM} format or color @code{XPM} and
11153 @code{GIF} formats.
11154 @end quotation
11155
11156 Please see the above mentioned web site for instructions on obtaining
11157 and installing the picons databases, or the following ftp site:
11158 @samp{http://www.cs.indiana.edu/picons/ftp/index.html}.
11159
11160 @vindex gnus-picons-database
11161 Gnus expects picons to be installed into a location pointed to by
11162 @code{gnus-picons-database}.
11163
11164
11165 @node Picon Requirements
11166 @subsection Picon Requirements
11167
11168 To use have Gnus display Picons for you, you must be running XEmacs
11169 19.13 or greater since all other versions of Emacs aren't yet able to
11170 display images.
11171
11172 Additionally, you must have @code{xpm} support compiled into XEmacs.
11173
11174 @vindex gnus-picons-convert-x-face
11175 If you want to display faces from @code{X-Face} headers, you must have
11176 the @code{netpbm} utilities installed, or munge the
11177 @code{gnus-picons-convert-x-face} variable to use something else.
11178
11179
11180 @node Easy Picons
11181 @subsection Easy Picons
11182
11183 To enable displaying picons, simply put the following line in your
11184 @file{~/.gnus} file and start Gnus.
11185
11186 @lisp
11187 (setq gnus-use-picons t)
11188 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
11189 (add-hook 'gnus-summary-prepare-hook 'gnus-group-display-picons t)
11190 (add-hook 'gnus-article-display-hook 'gnus-picons-article-display-x-face)
11191 @end lisp
11192
11193
11194 @node Hard Picons
11195 @subsection Hard Picons 
11196
11197 Gnus can display picons for you as you enter and leave groups and
11198 articles.  It knows how to interact with three sections of the picons
11199 database.  Namely, it can display the picons newsgroup pictures,
11200 author's face picture(s), and the authors domain.  To enable this
11201 feature, you need to first decide where to display them.
11202
11203 @table @code 
11204
11205 @item gnus-picons-display-where 
11206 @vindex gnus-picons-display-where 
11207 Where the picon images should be displayed.  It is @code{picons} by
11208 default (which by default maps to the buffer @samp{*Picons*}).  Other
11209 valid places could be @code{article}, @code{summary}, or
11210 @samp{"*scratch*"} for all I care.  Just make sure that you've made the
11211 buffer visible using the standard Gnus window configuration
11212 routines---@xref{Windows Configuration}.
11213
11214 @end table
11215
11216 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
11217 window configuration for you to include the @code{picons} buffer.
11218
11219 Now that you've made that decision, you need to add the following
11220 functions to the appropriate hooks so these pictures will get
11221 displayed at the right time.
11222
11223 @vindex gnus-article-display-hook
11224 @vindex gnus-picons-display-where
11225 @table @code
11226 @item gnus-article-display-picons
11227 @findex gnus-article-display-picons
11228 Looks up and display the picons for the author and the author's domain
11229 in the @code{gnus-picons-display-where} buffer.  Should be added to
11230 the @code{gnus-article-display-hook}.
11231
11232 @item gnus-group-display-picons
11233 @findex gnus-article-display-picons
11234 Displays picons representing the current group.  This function should
11235 be added to the @code{gnus-summary-prepare-hook} or to the
11236 @code{gnus-article-display-hook} if @code{gnus-picons-display-where}
11237 is set to @code{article}.
11238
11239 @item gnus-picons-article-display-x-face
11240 @findex gnus-article-display-picons
11241 Decodes and displays the X-Face header if present.  This function
11242 should be added to @code{gnus-article-display-hook}.
11243
11244 @end table
11245
11246 Note:  You must append them to the hook, so make sure to specify 't'
11247 to the append flag of @code{add-hook}:
11248
11249 @lisp
11250 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
11251 @end lisp
11252
11253
11254 @node Picon Configuration
11255 @subsection Picon Configuration
11256
11257 The following variables offer further control over how things are
11258 done, where things are located, and other useless stuff you really
11259 don't need to worry about.
11260
11261 @table @code
11262 @item gnus-picons-database
11263 @vindex gnus-picons-database
11264 The location of the picons database.  Should point to a directory
11265 containing the @file{news}, @file{domains}, @file{users} (and so on)
11266 subdirectories.  Defaults to @file{/usr/local/faces}.
11267
11268 @item gnus-picons-news-directory
11269 @vindex gnus-picons-news-directory
11270 Sub-directory of the faces database containing the icons for
11271 newsgroups.
11272
11273 @item gnus-picons-user-directories
11274 @vindex gnus-picons-user-directories
11275 List of subdirectories to search in @code{gnus-picons-database} for user
11276 faces.  Defaults to @code{("local" "users" "usenix" "misc/MISC")}.
11277
11278 @item gnus-picons-domain-directories
11279 @vindex gnus-picons-domain-directories
11280 List of subdirectories to search in @code{gnus-picons-database} for
11281 domain name faces.  Defaults to @code{("domains")}.  Some people may
11282 want to add @samp{unknown} to this list.
11283
11284 @item gnus-picons-convert-x-face
11285 @vindex gnus-picons-convert-x-face
11286 The command to use to convert the @code{X-Face} header to an X bitmap
11287 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
11288 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
11289 gnus-picons-x-face-file-name)}
11290
11291 @item gnus-picons-x-face-file-name
11292 @vindex gnus-picons-x-face-file-name
11293 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
11294 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
11295
11296 @item gnus-picons-buffer
11297 @vindex gnus-picons-buffer
11298 The name of the buffer that @code{picons} points to.  Defaults to
11299 @samp{*Icon Buffer*}.
11300
11301 @end table
11302
11303
11304 @node Various Various
11305 @section Various Various
11306 @cindex mode lines
11307 @cindex highlights
11308
11309 @table @code
11310
11311 @item gnus-verbose
11312 @vindex gnus-verbose
11313 This variable is an integer between zero and ten.  The higher the value,
11314 the more messages will be displayed.  If this variable is zero, Gnus
11315 will never flash any messages, if it is seven (which is the default),
11316 most important messages will be shown, and if it is ten, Gnus won't ever
11317 shut up, but will flash so many messages it will make your head swim.
11318
11319 @item gnus-verbose-backends
11320 @vindex gnus-verbose-backends
11321 This variable works the same way as @code{gnus-verbose}, but it applies
11322 to the Gnus backends instead of Gnus proper.
11323
11324 @item nnheader-max-head-length
11325 @vindex nnheader-max-head-length
11326 When the backends read straight heads of articles, they all try to read
11327 as little as possible.  This variable (default @code{4096}) specifies
11328 the absolute max length the backends will try to read before giving up
11329 on finding a separator line between the head and the body.  If this
11330 variable is @code{nil}, there is no upper read bound.  If it is
11331 @code{t}, the backends won't try to read the articles piece by piece,
11332 but read the entire articles.  This makes sense with some versions of
11333 @code{ange-ftp}. 
11334
11335 @item nnheader-file-name-translation-alist 
11336 @vindex nnheader-file-name-translation-alist 
11337 @cindex file names
11338 @cindex illegal characters in file names
11339 @cindex characters in file names
11340 This is an alist that says how to translate characters in file names.
11341 For instance, if @samp{:} is illegal as a file character in file names
11342 on your system (you OS/2 user you), you could say something like:
11343
11344 @lisp
11345 (setq nnheader-file-name-translation-alist 
11346       '((?: . ?_)))
11347 @end lisp
11348
11349 In fact, this is the default value for this variable on OS/2 and MS
11350 Windows (phooey) systems.
11351
11352 @item gnus-hidden-properties
11353 @vindex gnus-hidden-properties
11354 This is a list of properties to use to hide ``invisible'' text.  It is
11355 @code{(invisible t intangible t)} by default on most systems, which
11356 makes invisible text invisible and intangible.
11357
11358 @item gnus-parse-headers-hook
11359 @vindex gnus-parse-headers-hook
11360 A hook called before parsing headers.  It can be used, for instance, to
11361 gather statistics on the headers fetched, or perhaps you'd like to prune
11362 some headers.  I don't see why you'd want that, though.
11363
11364 @item gnus-shell-command-separator
11365 @vindex gnus-shell-command-separator
11366 String used to separate to shell commands.  The default is @samp{;}. 
11367
11368
11369 @end table
11370
11371
11372 @node The End
11373 @chapter The End
11374
11375 Well, that's the manual---you can get on with your life now.  Keep in
11376 touch.  Say hello to your cats from me.  
11377
11378 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
11379
11380 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
11381
11382 @quotation
11383 @strong{Te Deum}
11384 @sp 1
11385 Not because of victories @*
11386 I sing,@*
11387 having none,@*
11388 but for the common sunshine,@*
11389 the breeze,@*
11390 the largess of the spring.
11391 @sp 1
11392 Not for victory@*
11393 but for the day's work done@*
11394 as well as I was able;@*
11395 not for a seat upon the dais@*
11396 but at the common table.@*
11397 @end quotation
11398
11399
11400 @node Appendices
11401 @chapter Appendices
11402
11403 @menu
11404 * History::                        How Gnus got where it is today.
11405 * Terminology::                    We use really difficult, like, words here.
11406 * Customization::                  Tailoring Gnus to your needs.
11407 * Troubleshooting::                What you might try if things do not work.
11408 * A Programmers Guide to Gnus::    Rilly, rilly technical stuff.
11409 * Emacs for Heathens::             A short introduction to Emacsian terms.
11410 * Frequently Asked Questions::     A question-and-answer session.
11411 @end menu
11412
11413
11414 @node History
11415 @section History
11416
11417 @cindex history
11418 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
11419 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
11420
11421 If you want to investigate the person responsible for this outrage, you
11422 can point your (feh!) web browser to
11423 @file{http://www.ifi.uio.no/~larsi/}.  This is also the primary
11424 distribution point for the new and spiffy versions of Gnus, and is known
11425 as The Site That Destroys Newsrcs And Drives People Mad.
11426
11427 During the first extended alpha period of development, the new Gnus was
11428 called ``(ding) Gnus''.  @dfn{(ding)}, is, of course, short for
11429 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
11430 (Besides, the ``Gnus'' in this abbreviation should probably be
11431 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
11432 appropriate name, don't you think?)
11433
11434 In any case, after spending all that energy on coming up with a new and
11435 spunky name, we decided that the name was @emph{too} spunky, so we
11436 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
11437 ``@sc{gnus}''.  New vs. old.
11438
11439 The first ``proper'' release of Gnus 5 was done in November 1995 when it
11440 was included in the Emacs 19.30 distribution.
11441
11442 In May 1996 the next Gnus generation (aka.  ``September Gnus'') was
11443 released under the name ``Gnus 5.2''.  
11444
11445 On July 28th 1996 work on Red Gnus was begun.
11446
11447 @menu
11448 * Why?::                What's the point of Gnus?
11449 * Compatibility::       Just how compatible is Gnus with @sc{gnus}?
11450 * Conformity::          Gnus tries to conform to all standards.
11451 * Emacsen::             Gnus can be run on a few modern Emacsen.
11452 * Contributors::        Oodles of people.  
11453 * New Features::        Pointers to some of the new stuff in Gnus.
11454 * Newest Features::     Features so new that they haven't been written yet.
11455 @end menu
11456
11457
11458 @node Why?
11459 @subsection Why?
11460
11461 What's the point of Gnus?  
11462
11463 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
11464 newsreader, that lets you do anything you can think of.  That was my
11465 original motivation, but while working on Gnus, it has become clear to
11466 me that this generation of newsreaders really belong in the stone age.
11467 Newsreaders haven't developed much since the infancy of the net.  If the
11468 volume continues to rise with the current rate of increase, all current
11469 newsreaders will be pretty much useless.  How do you deal with
11470 newsgroups that have thousands of new articles each day?  How do you
11471 keep track of millions of people who post?
11472
11473 Gnus offers no real solutions to these questions, but I would very much
11474 like to see Gnus being used as a testing ground for new methods of
11475 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
11476 to separate the newsreader from the backends, Gnus now offers a simple
11477 interface for anybody who wants to write new backends for fetching mail
11478 and news from different sources.  I have added hooks for customizations
11479 everywhere I could imagine useful.  By doing so, I'm inviting every one
11480 of you to explore and invent.
11481
11482 May Gnus never be complete. @kbd{C-u 100 M-x hail-emacs}. 
11483
11484
11485 @node Compatibility
11486 @subsection Compatibility
11487
11488 @cindex compatibility
11489 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
11490 bindings have been kept.  More key bindings have been added, of course,
11491 but only in one or two obscure cases have old bindings been changed.
11492
11493 Our motto is:
11494 @quotation
11495 @cartouche
11496 @center In a cloud bones of steel.
11497 @end cartouche
11498 @end quotation
11499
11500 All commands have kept their names.  Some internal functions have changed
11501 their names.
11502
11503 The @code{gnus-uu} package has changed drastically. @pxref{Decoding
11504 Articles}. 
11505
11506 One major compatibility question is the presence of several summary
11507 buffers.  All variables that are relevant while reading a group are
11508 buffer-local to the summary buffer they belong in.  Although many
11509 important variables have their values copied into their global
11510 counterparts whenever a command is executed in the summary buffer, this
11511 change might lead to incorrect values being used unless you are careful.
11512
11513 All code that relies on knowledge of @sc{gnus} internals will probably
11514 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
11515 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
11516 maintains a hash table that points to the entries in this alist (which
11517 speeds up many functions), and changing the alist directly will lead to
11518 peculiar results.
11519
11520 @cindex hilit19
11521 @cindex highlighting
11522 Old hilit19 code does not work at all.  In fact, you should probably
11523 remove all hilit code from all Gnus hooks
11524 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
11525 Gnus provides various integrated functions for highlighting.  These are
11526 faster and more accurate.  To make life easier for everybody, Gnus will
11527 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
11528 Away!
11529
11530 Packages like @code{expire-kill} will no longer work.  As a matter of
11531 fact, you should probably remove all old @sc{gnus} packages (and other
11532 code) when you start using Gnus.  More likely than not, Gnus already
11533 does what you have written code to make @sc{gnus} do.  (Snicker.)
11534
11535 Even though old methods of doing things are still supported, only the
11536 new methods are documented in this manual.  If you detect a new method of
11537 doing something while reading this manual, that does not mean you have
11538 to stop doing it the old way.
11539
11540 Gnus understands all @sc{gnus} startup files.
11541
11542 @kindex M-x gnus-bug
11543 @findex gnus-bug
11544 @cindex reporting bugs
11545 @cindex bugs
11546 Overall, a casual user who hasn't written much code that depends on
11547 @sc{gnus} internals should suffer no problems.  If problems occur,
11548 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
11549
11550
11551 @node Conformity
11552 @subsection Conformity
11553
11554 No rebels without a clue here, ma'am.  We conform to all standards known
11555 to (wo)man.  Except for those standards and/or conventions we disagree
11556 with, of course.
11557
11558 @table @strong
11559
11560 @item RFC 822
11561 @cindex RFC 822
11562 There are no known breaches of this standard.
11563
11564 @item RFC 1036
11565 @cindex RFC 1036
11566 There are no known breaches of this standard, either.
11567
11568 @item Good Net-Keeping Seal of Approval
11569 @cindex Good Net-Keeping Seal of Approval
11570 Gnus has been through the Seal process and failed.  I think it'll pass
11571 the next inspection.
11572
11573 @item Son-of-RFC 1036
11574 @cindex Son-of-RFC 1036
11575 We do have some breaches to this one.
11576
11577 @table @emph
11578
11579 @item MIME
11580 Gnus does no MIME handling, and this standard-to-be seems to think that
11581 MIME is the bees' knees, so we have major breakage here.
11582
11583 @item X-Newsreader
11584 This is considered to be a ``vanity header'', while I consider it to be
11585 consumer information.  After seeing so many badly formatted articles
11586 coming from @code{tin} and @code{Netscape} I know not to use either of
11587 those for posting articles.  I would not have known that if it wasn't
11588 for the @code{X-Newsreader} header.
11589
11590 @item References
11591 Gnus does line breaking on this header.  I infer from RFC1036 that being
11592 conservative in what you output is not creating 5000-character lines, so
11593 it seems like a good idea to me.  However, this standard-to-be says that
11594 whitespace in the @code{References} header is to be preserved, so...  It
11595 doesn't matter one way or the other to Gnus, so if somebody tells me
11596 what The Way is, I'll change it.  Or not.
11597 @end table
11598
11599 @end table
11600
11601 If you ever notice Gnus acting non-compliantly with regards to the texts
11602 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
11603 know.
11604
11605
11606 @node Emacsen
11607 @subsection Emacsen
11608 @cindex Emacsen
11609 @cindex XEmacs
11610 @cindex Mule
11611 @cindex Emacs
11612
11613 Gnus should work on :
11614
11615 @itemize @bullet 
11616
11617 @item
11618 Emacs 19.30 and up.
11619
11620 @item
11621 XEmacs 19.13 and up.
11622
11623 @item 
11624 Mule versions based on Emacs 19.30 and up.
11625
11626 @end itemize
11627
11628 Gnus will absolutely not work on any Emacsen older than that.  Not
11629 reliably, at least. 
11630
11631 There are some vague differences between Gnus on the various platforms: 
11632
11633 @itemize @bullet
11634
11635 @item
11636 The mouse-face on Gnus lines under Emacs and Mule is delimited to
11637 certain parts of the lines while they cover the entire line under
11638 XEmacs. 
11639
11640 @item 
11641 The same with current-article marking---XEmacs puts an underline under
11642 the entire summary line while Emacs and Mule are nicer and kinder.
11643
11644 @item
11645 XEmacs features more graphics---a logo and a toolbar.
11646
11647 @item
11648 Citation highlighting us better under Emacs and Mule than under XEmacs.
11649
11650 @item
11651 Emacs 19.26-19.28 have tangible hidden headers, which can be a bit
11652 confusing. 
11653
11654 @end itemize
11655
11656
11657 @node Contributors
11658 @subsection Contributors
11659 @cindex contributors
11660
11661 The new Gnus version couldn't have been done without the help of all the
11662 people on the (ding) mailing list.  Every day for over a year I have
11663 gotten billions of nice bug reports from them, filling me with joy,
11664 every single one of them.  Smooches.  The people on the list have been
11665 tried beyond endurance, what with my ``oh, that's a neat idea <type
11666 type>, yup, I'll release it right away <ship off> no wait, that doesn't
11667 work at all <type type>, yup, I'll ship that one off right away <ship
11668 off> no, wait, that absolutely does not work'' policy for releases.
11669 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
11670 ``worser''? ``much worser''?  ``worsest''?)
11671
11672 I would like to take this opportunity to thank the Academy for...  oops,
11673 wrong show.
11674
11675 @itemize @bullet
11676
11677 @item Masanobu @sc{Umeda}
11678 The writer of the original @sc{gnus}.
11679
11680 @item Per Abrahamsen
11681 Custom, scoring, highlighting and @sc{soup} code (as well as numerous
11682 other things).
11683
11684 @item Luis Fernandes
11685 Design and graphics.
11686
11687 @item Wes Hardaker
11688 @file{gnus-picon.el} and the manual section on @dfn{picons}
11689 (@pxref{Picons}). 
11690
11691 @item Brad Miller
11692 @file{gnus-gl.el} and the GroupLens manual section (@pxref{GroupLens}). 
11693
11694 @item Sudish Joseph
11695 Innumerable bug fixes.
11696
11697 @item Ilja Weis
11698 @file{gnus-topic.el}.
11699
11700 @item Steven L. Baur
11701 Lots and lots of bugs detections and fixes.
11702
11703 @item Vladimir Alexiev
11704 The refcard and reference booklets.
11705
11706 @item Felix Lee & JWZ
11707 I stole some pieces from the XGnus distribution by Felix Lee and JWZ.
11708
11709 @item Scott Byer
11710 @file{nnfolder.el} enhancements & rewrite.
11711
11712 @item Peter Mutsaers
11713 Orphan article scoring code.
11714
11715 @item Ken Raeburn
11716 POP mail support.
11717
11718 @item Hallvard B Furuseth
11719 Various bits and pieces, especially dealing with .newsrc files.
11720
11721 @item Brian Edmonds
11722 @file{gnus-bbdb.el}.
11723
11724 @item Ricardo Nassif and Mark Borges
11725 Proof-reading.
11726
11727 @item Kevin Davidson
11728 Came up with the name @dfn{ding}, so blame him.
11729
11730 @end itemize
11731
11732 Peter Arius, Stainless Steel Rat, Ulrik Dickow, Jack Vinson, Daniel
11733 Quinlan, Frank D. Cringle, Geoffrey T. Dairiki, Fabrice Popineau and
11734 Andrew Eskilsson have all contributed code and suggestions.
11735
11736
11737 @node New Features
11738 @subsection New Features
11739 @cindex new features
11740
11741 @itemize @bullet
11742
11743 @item
11744 The look of all buffers can be changed by setting format-like variables
11745 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}). 
11746  
11747 @item 
11748 Local spool and several @sc{nntp} servers can be used at once
11749 (@pxref{Select Methods}).  
11750
11751 @item 
11752 You can combine groups into virtual groups (@pxref{Virtual Groups}).
11753
11754 @item 
11755 You can read a number of different mail formats (@pxref{Getting Mail}).
11756 All the mail backends implement a convenient mail expiry scheme
11757 (@pxref{Expiring Mail}). 
11758
11759 @item
11760 Gnus can use various strategies for gathering threads that have lost
11761 their roots (thereby gathering loose sub-threads into one thread) or it
11762 can go back and retrieve enough headers to build a complete thread
11763 (@pxref{Customizing Threading}).
11764
11765 @item 
11766 Killed groups can be displayed in the group buffer, and you can read
11767 them as well (@pxref{Listing Groups}).
11768
11769 @item 
11770 Gnus can do partial group updates---you do not have to retrieve the
11771 entire active file just to check for new articles in a few groups
11772 (@pxref{The Active File}).
11773
11774 @item 
11775 Gnus implements a sliding scale of subscribedness to groups
11776 (@pxref{Group Levels}).
11777
11778 @item 
11779 You can score articles according to any number of criteria
11780 (@pxref{Scoring}).  You can even get Gnus to find out how to score
11781 articles for you (@pxref{Adaptive Scoring}).
11782
11783 @item 
11784 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
11785 manner, so it should be difficult to lose much data on what you have
11786 read if your machine should go down (@pxref{Auto Save}). 
11787
11788 @item 
11789 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
11790 the @file{.emacs} file.
11791
11792 @item 
11793 You can set the process mark on both groups and articles and perform
11794 operations on all the marked items (@pxref{Process/Prefix}).
11795
11796 @item 
11797 You can grep through a subset of groups and create a group from the
11798 results (@pxref{Kibozed Groups}). 
11799
11800 @item 
11801 You can list subsets of groups according to, well, anything
11802 (@pxref{Listing Groups}). 
11803
11804 @item 
11805 You can browse foreign servers and subscribe to groups from those
11806 servers (@pxref{Browse Foreign Server}). 
11807
11808 @item 
11809 Gnus can fetch articles asynchronously on a second connection to the
11810 server (@pxref{Asynchronous Fetching}).
11811
11812 @item 
11813 You can cache articles locally (@pxref{Article Caching}). 
11814
11815 @item 
11816 The uudecode functions have been expanded and generalized
11817 (@pxref{Decoding Articles}). 
11818
11819 @item
11820 You can still post uuencoded articles, which was a little-known feature
11821 of @sc{gnus}' past (@pxref{Uuencoding and Posting}). 
11822
11823 @item
11824 Fetching parents (and other articles) now actually works without
11825 glitches (@pxref{Finding the Parent}). 
11826
11827 @item
11828 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
11829
11830 @item
11831 Digests (and other files) can be used as the basis for groups
11832 (@pxref{Document Groups}).
11833
11834 @item 
11835 Articles can be highlighted and customized (@pxref{Customizing
11836 Articles}). 
11837
11838 @item 
11839 URLs and other external references can be buttonized (@pxref{Article
11840 Buttons}). 
11841
11842 @item
11843 You can do lots of strange stuff with the Gnus window & frame
11844 configuration (@pxref{Windows Configuration}).
11845
11846 @item
11847 You can click on buttons instead of using the keyboard
11848 (@pxref{Buttons}). 
11849
11850 @item 
11851 Gnus can use NoCeM files to weed out spam (@pxref{NoCeM}). 
11852
11853 @end itemize
11854
11855 This is, of course, just a @emph{short} overview of the @emph{most}
11856 important new features.  No, really.  There are tons more.  Yes, we have
11857 feeping creaturism in full effect, but nothing too gratuitous, I would
11858 hope. 
11859
11860
11861 @node Newest Features
11862 @subsection Newest Features
11863 @cindex todo
11864
11865 Also known as the @dfn{todo list}.  Sure to be implemented before the
11866 next millennium. 
11867
11868 Be afraid.  Be very afraid.
11869
11870 @itemize @bullet
11871 @item
11872 Native @sc{mime} support is something that should be done.  
11873 @item
11874 A better and simpler method for specifying mail composing methods. 
11875 @item
11876 Allow posting through mail-to-news gateways.
11877 @item
11878 Really do unbinhexing.
11879 @end itemize
11880
11881 And much, much, much more.  There is more to come than has already been
11882 implemented.  (But that's always true, isn't it?)
11883
11884 @code{<URL:http://www.ifi.uio.no/~larsi/sgnus/todo>} is where the actual
11885 up-to-the-second todo list is located, so if you're really curious, you
11886 could point your Web browser over that-a-way.
11887
11888
11889 @node Terminology
11890 @section Terminology
11891
11892 @cindex terminology
11893 @table @dfn
11894
11895 @item news
11896 @cindex news
11897 This is what you are supposed to use this thing for---reading news.
11898 News is generally fetched from a nearby @sc{nntp} server, and is
11899 generally publicly available to everybody.  If you post news, the entire
11900 world is likely to read just what you have written, and they'll all
11901 snigger mischievously.  Behind your back.
11902
11903 @item mail
11904 @cindex mail
11905 Everything that's delivered to you personally is mail.  Some news/mail
11906 readers (like Gnus) blur the distinction between mail and news, but
11907 there is a difference.  Mail is private.  News is public.  Mailing is
11908 not posting, and replying is not following up.
11909
11910 @item reply
11911 @cindex reply
11912 Send a mail to the person who has written what you are reading.
11913
11914 @item follow up
11915 @cindex follow up
11916 Post an article to the current newsgroup responding to the article you
11917 are reading.
11918
11919 @item backend
11920 @cindex backend
11921 Gnus gets fed articles from a number of backends, both news and mail
11922 backends.  Gnus does not handle the underlying media, so to speak---this
11923 is all done by the backends.
11924
11925 @item native
11926 @cindex native
11927 Gnus will always use one method (and backend) as the @dfn{native}, or
11928 default, way of getting news.
11929
11930 @item foreign
11931 @cindex foreign
11932 You can also have any number of foreign groups active at the same time.
11933 These are groups that use different backends for getting news.
11934
11935 @item secondary
11936 @cindex secondary
11937 Secondary backends are somewhere half-way between being native and being
11938 foreign, but they mostly act like they are native.
11939
11940 @item article
11941 @cindex article
11942 A nessage that has been posted as news.
11943
11944 @item mail message
11945 @cindex mail message
11946 A message that has been mailed.
11947
11948 @item message 
11949 @cindex message
11950 A mail message or news article
11951
11952 @item head
11953 @cindex head
11954 The top part of a message, where administrative information (etc.) is
11955 put.
11956
11957 @item body
11958 @cindex body
11959 The rest of an article.  Everything that is not in the head is in the
11960 body. 
11961
11962 @item header
11963 @cindex header
11964 A line from the head of an article. 
11965
11966 @item headers
11967 @cindex headers
11968 A collection of such lines, or a collection of heads.  Or even a
11969 collection of @sc{nov} lines.
11970
11971 @item @sc{nov}
11972 @cindex nov
11973 When Gnus enters a group, it asks the backend for the headers of all
11974 unread articles in the group.  Most servers support the News OverView
11975 format, which is more compact and much faster to read and parse than the
11976 normal @sc{head} format.
11977
11978 @item level
11979 @cindex levels
11980 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
11981 that have a lower level are ``more'' subscribed than the groups with a
11982 higher level.  In fact, groups on levels 1-5 are considered
11983 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
11984 are @dfn{killed}.  Commands for listing groups and scanning for new
11985 articles will all use the numeric prefix as @dfn{working level}.
11986
11987 @item killed groups
11988 @cindex killed groups
11989 No information on killed groups is stored or updated, which makes killed
11990 groups much easier to handle than subscribed groups.
11991
11992 @item zombie groups
11993 @cindex zombie groups
11994 Just like killed groups, only slightly less dead.
11995
11996 @item active file
11997 @cindex active file
11998 The news server has to keep track of what articles it carries, and what
11999 groups exist.  All this information in stored in the active file, which
12000 is rather large, as you might surmise.
12001
12002 @item bogus groups
12003 @cindex bogus groups
12004 A group that exists in the @file{.newsrc} file, but isn't known to the
12005 server (i. e.,  it isn't in the active file), is a @emph{bogus group}.
12006 This means that the group probably doesn't exist (any more).
12007
12008 @item server 
12009 @cindex server
12010 A machine than one can connect to and get news (or mail) from.
12011
12012 @item select method
12013 @cindex select method
12014 A structure that specifies the backend, the server and the virtual
12015 server parameters.
12016
12017 @item virtual server
12018 @cindex virtual server
12019 A named select method.  Since a select methods defines all there is to
12020 know about connecting to a (physical) server, taking the who things as a
12021 whole is a virtual server.
12022
12023 @end table
12024
12025
12026 @node Customization
12027 @section Customization
12028 @cindex general customization
12029
12030 All variables are properly documented elsewhere in this manual.  This
12031 section is designed to give general pointers on how to customize Gnus
12032 for some quite common situations.
12033
12034 @menu
12035 * Slow/Expensive Connection:: You run a local Emacs and get the news elsewhere.
12036 * Slow Terminal Connection::  You run a remote Emacs.
12037 * Little Disk Space::         You feel that having large setup files is icky.
12038 * Slow Machine::              You feel like buying a faster machine.
12039 @end menu
12040
12041
12042 @node Slow/Expensive Connection
12043 @subsection Slow/Expensive @sc{nntp} Connection
12044
12045 If you run Emacs on a machine locally, and get your news from a machine
12046 over some very thin strings, you want to cut down on the amount of data
12047 Gnus has to get from the @sc{nntp} server.
12048
12049 @table @code
12050
12051 @item gnus-read-active-file
12052 Set this to @code{nil}, which will inhibit Gnus from requesting the
12053 entire active file from the server.  This file is often v.  large.  You
12054 also have to set @code{gnus-check-new-news} and
12055 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
12056 doesn't suddenly decide to fetch the active file anyway.
12057
12058 @item gnus-nov-is-evil
12059 This one has to be @code{nil}.  If not, grabbing article headers from
12060 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
12061 support @sc{xover}; Gnus will detect this by itself.
12062 @end table
12063
12064
12065 @node Slow Terminal Connection
12066 @subsection Slow Terminal Connection
12067
12068 Let's say you use your home computer for dialing up the system that
12069 runs Emacs and Gnus.  If your modem is slow, you want to reduce the
12070 amount of data that is sent over the wires as much as possible.
12071
12072 @table @code
12073
12074 @item gnus-auto-center-summary
12075 Set this to @code{nil} to inhibit Gnus from re-centering the summary
12076 buffer all the time.  If it is @code{vertical}, do only vertical
12077 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
12078 horizontal and vertical recentering.
12079
12080 @item gnus-visible-headers
12081 Cut down on the headers that are included in the articles to the
12082 minimum.  You can, in fact, make do without them altogether---most of the
12083 useful data is in the summary buffer, anyway.  Set this variable to
12084 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
12085
12086 @item gnus-article-display-hook
12087 Set this hook to all the available hiding commands:
12088 @lisp
12089 (setq gnus-article-display-hook 
12090       '(gnus-article-hide-headers gnus-article-hide-signature
12091         gnus-article-hide-citation))
12092 @end lisp
12093
12094 @item gnus-use-full-window
12095 By setting this to @code{nil}, you can make all the windows smaller.
12096 While this doesn't really cut down much generally, it means that you
12097 have to see smaller portions of articles before deciding that you didn't
12098 want to read them anyway.
12099
12100 @item gnus-thread-hide-subtree
12101 If this is non-@code{nil}, all threads in the summary buffer will be
12102 hidden initially.
12103
12104 @item gnus-updated-mode-lines
12105 If this is @code{nil}, Gnus will not put information in the buffer mode
12106 lines, which might save some time.
12107 @end table
12108
12109
12110 @node Little Disk Space
12111 @subsection Little Disk Space
12112 @cindex disk space
12113
12114 The startup files can get rather large, so you may want to cut their
12115 sizes a bit if you are running out of space.
12116
12117 @table @code
12118
12119 @item gnus-save-newsrc-file
12120 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
12121 only save @file{.newsrc.eld}.  This means that you will not be able to
12122 use any other newsreaders than Gnus.  This variable is @code{t} by
12123 default. 
12124
12125 @item gnus-save-killed-list
12126 If this is @code{nil}, Gnus will not save the list of dead groups.  You
12127 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
12128 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
12129 variable to @code{nil}.  This variable is @code{t} by default.
12130
12131 @end table
12132
12133
12134 @node Slow Machine
12135 @subsection Slow Machine
12136 @cindex slow machine
12137
12138 If you have a slow machine, or are just really impatient, there are a
12139 few things you can do to make Gnus run faster.
12140
12141 Set@code{gnus-check-new-newsgroups} and
12142 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
12143
12144 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
12145 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
12146 summary buffer faster.
12147
12148 Set @code{gnus-article-display-hook} to @code{nil} to make article
12149 processing a bit faster.
12150
12151
12152 @node Troubleshooting
12153 @section Troubleshooting
12154 @cindex troubleshooting
12155
12156 Gnus works @emph{so} well straight out of the box---I can't imagine any
12157 problems, really.
12158
12159 Ahem.
12160
12161 @enumerate
12162
12163 @item
12164 Make sure your computer is switched on.
12165
12166 @item
12167 Make sure that you really load the current Gnus version.  If you have
12168 been running @sc{gnus}, you need to exit Emacs and start it up again before
12169 Gnus will work.
12170
12171 @item
12172 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
12173 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
12174 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
12175 flee}, you have some old @file{.el} files lying around.  Delete these.
12176
12177 @item
12178 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
12179 how-to. 
12180 @end enumerate
12181
12182 If all else fails, report the problem as a bug.
12183
12184 @cindex bugs
12185 @cindex reporting bugs
12186
12187 @kindex M-x gnus-bug
12188 @findex gnus-bug
12189 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
12190 command. @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
12191 me the backtrace.  I will fix bugs, but I can only fix them if you send
12192 me a precise description as to how to reproduce the bug.
12193
12194 You really can never be too detailed in a bug report.  Always use the
12195 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
12196 a 10Kb mail each time you use it, and even if you have sent me your
12197 environment 500 times before.  I don't care.  I want the full info each
12198 time.  
12199
12200 It is also important to remember that I have no memory whatsoever.  If
12201 you send a bug report, and I send you a reply, and then you send back
12202 just ``No, it's not! Moron!'', I will have no idea what you are
12203 insulting me about.  Always over-explain everything.  It's much easier
12204 for all of us---if I don't have all the information I need, I will just
12205 mail you and ask for more info, and everything takes more time.
12206
12207 If the problem you're seeing is very visual, and you can't quite explain
12208 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
12209 it somewhere it can be reached, and include the URL of the picture in
12210 the bug report.a
12211
12212 If you just need help, you are better off asking on
12213 @samp{gnu.emacs.gnus}.  I'm not very helpful.
12214
12215 @cindex gnu.emacs.gnus
12216 @cindex ding mailing list
12217 You can also ask on the ding mailing list---@samp{ding@@ifi.uio.no}.
12218 Write to @samp{ding-request@@ifi.uio.no} to subscribe.
12219
12220
12221 @node A Programmers Guide to Gnus
12222 @section A Programmer's Guide to Gnus
12223
12224 It is my hope that other people will figure out smart stuff that Gnus
12225 can do, and that other people will write those smart things as well.  To
12226 facilitate that I thought it would be a good idea to describe the inner
12227 workings of Gnus.  And some of the not-so-inner workings, while I'm at
12228 it.
12229
12230 You can never expect the internals of a program not to change, but I
12231 will be defining (in some details) the interface between Gnus and its
12232 backends (this is written in stone), the format of the score files
12233 (ditto), data structures (some are less likely to change than others)
12234 and general method of operations.
12235
12236 @menu 
12237 * Backend Interface::        How Gnus communicates with the servers.
12238 * Score File Syntax::        A BNF definition of the score file standard.
12239 * Headers::                  How Gnus stores headers internally.
12240 * Ranges::                   A handy format for storing mucho numbers.
12241 * Group Info::               The group info format.
12242 * Emacs/XEmacs Code::        Gnus can be run under all modern Emacsen.
12243 * Various File Formats::     Formats of files that Gnus use.
12244 @end menu
12245
12246
12247 @node Backend Interface
12248 @subsection Backend Interface
12249
12250 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
12251 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
12252 server is a @dfn{backend} and some @dfn{backend variables}.  As examples
12253 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
12254 examples of the latter we have @code{nntp-port-number} and
12255 @code{nnmbox-directory}.
12256
12257 When Gnus asks for information from a backend---say @code{nntp}---on
12258 something, it will normally include a virtual server name in the
12259 function parameters.  (If not, the backend should use the ``current''
12260 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
12261 server as its only (optional) parameter.  If this virtual server hasn't
12262 been opened, the function should fail.
12263
12264 Note that a virtual server name has no relation to some physical server
12265 name.  Take this example:
12266
12267 @lisp
12268 (nntp "odd-one" 
12269       (nntp-address "ifi.uio.no") 
12270       (nntp-port-number 4324))
12271 @end lisp
12272
12273 Here the virtual server name is @samp{odd-one} while the name of
12274 the physical server is @samp{ifi.uio.no}. 
12275
12276 The backends should be able to switch between several virtual servers.
12277 The standard backends implement this by keeping an alist of virtual
12278 server environments that it pulls down/pushes up when needed.  
12279
12280 There are two groups of interface functions: @dfn{required functions},
12281 which must be present, and @dfn{optional functions}, which Gnus will
12282 always check whether are present before attempting to call.
12283
12284 All these functions are expected to return data in the buffer
12285 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
12286 unfortunately named, but we'll have to live with it.  When I talk about
12287 ``resulting data'', I always refer to the data in that buffer.  When I
12288 talk about ``return value'', I talk about the function value returned by
12289 the function call.
12290
12291 Some backends could be said to be @dfn{server-forming} backends, and
12292 some might be said to not be.  The latter are backends that generally
12293 only operate on one group at a time, and have no concept of ``server''
12294 -- they have a group, and they deliver info on that group and nothing
12295 more.
12296
12297 In the examples and definitions I will refer to the imaginary backend
12298 @code{nnchoke}. 
12299
12300 @cindex @code{nnchoke}
12301
12302 @menu
12303 * Required Backend Functions::        Functions that must be implemented.
12304 * Optional Backend Functions::        Functions that need not be implemented.
12305 * Writing New Backends::              Extending old backends.
12306 @end menu
12307
12308
12309 @node Required Backend Functions
12310 @subsubsection Required Backend Functions
12311
12312 @table @code
12313
12314 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
12315
12316 @var{articles} is either a range of article numbers or a list of
12317 @code{Message-ID}s.  Current backends do not fully support either---only
12318 sequences (lists) of article numbers, and most backends do not support
12319 retrieval of @code{Message-ID}s.  But they should try for both. 
12320
12321 The result data should either be HEADs or NOV lines, and the result
12322 value should either be @code{headers} or @code{nov} to reflect this.
12323 This might later be expanded to @code{various}, which will be a mixture
12324 of HEADs and NOV lines, but this is currently not supported by Gnus.  
12325
12326 If @var{fetch-old} is non-@code{nil} it says to try to fetch "extra
12327 headers, in some meaning of the word.  This is generally done by
12328 fetching (at most) @var{fetch-old} extra headers less than the smallest
12329 article number in @code{articles}, and fill in the gaps as well.  The
12330 presence of this parameter can be ignored if the backend finds it
12331 cumbersome to follow the request.  If this is non-@code{nil} and not a
12332 number, do maximum fetches.
12333
12334 Here's an example HEAD:
12335
12336 @example
12337 221 1056 Article retrieved.
12338 Path: ifi.uio.no!sturles
12339 From: sturles@@ifi.uio.no (Sturle Sunde)
12340 Newsgroups: ifi.discussion
12341 Subject: Re: Something very droll
12342 Date: 27 Oct 1994 14:02:57 +0100
12343 Organization: Dept. of Informatics, University of Oslo, Norway
12344 Lines: 26
12345 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
12346 References: <38jdmq$4qu@@visbur.ifi.uio.no>
12347 NNTP-Posting-Host: holmenkollen.ifi.uio.no
12348 .
12349 @end example
12350
12351 So a @code{headers} return value would imply that there's a number of
12352 these in the data buffer.
12353
12354 Here's a BNF definition of such a buffer:
12355
12356 @example
12357 headers        = *head
12358 head           = error / valid-head
12359 error-message  = [ "4" / "5" ] 2number " " <error message> eol
12360 valid-head     = valid-message *header "." eol
12361 valid-message  = "221 " <number> " Article retrieved." eol
12362 header         = <text> eol
12363 @end example
12364
12365 If the return value is @code{nov}, the data buffer should contain
12366 @dfn{network overview database} lines.  These are basically fields
12367 separated by tabs. 
12368
12369 @example
12370 nov-buffer = *nov-line
12371 nov-line   = 8*9 [ field <TAB> ] eol
12372 field      = <text except TAB>
12373 @end example
12374
12375 For a closer explanation what should be in those fields,
12376 @pxref{Headers}. 
12377
12378
12379 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
12380
12381 @var{server} is here the virtual server name.  @var{definitions} is a
12382 list of @code{(VARIABLE VALUE)} pairs that defines this virtual server. 
12383
12384 If the server can't be opened, no error should be signaled.  The backend
12385 may then choose to refuse further attempts at connecting to this
12386 server.  In fact, it should do so. 
12387
12388 If the server is opened already, this function should return a
12389 non-@code{nil} value.  There should be no data returned.
12390
12391
12392 @item (nnchoke-close-server &optional SERVER)
12393
12394 Close connection to @var{server} and free all resources connected
12395 to it.  Return @code{nil} if the server couldn't be closed for some
12396 reason.
12397
12398 There should be no data returned.
12399
12400
12401 @item (nnchoke-request-close)
12402
12403 Close connection to all servers and free all resources that the backend
12404 have reserved.  All buffers that have been created by that backend
12405 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
12406 function is generally only called when Gnus is shutting down.
12407
12408 There should be no data returned. 
12409
12410
12411 @item (nnchoke-server-opened &optional SERVER)
12412
12413 If @var{server} is the current virtual server, and the connection to the
12414 physical server is alive, then this function should return a
12415 non-@code{nil} vlue.  This function should under no circumstances
12416 attempt to reconnect to a server that is has lost connection to.
12417
12418 There should be no data returned.
12419
12420
12421 @item (nnchoke-status-message &optional SERVER)
12422
12423 This function should return the last error message from @var{server}. 
12424
12425 There should be no data returned.
12426
12427
12428 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
12429
12430 The result data from this function should be the article specified by
12431 @var{article}.  This might either be a @code{Message-ID} or a number.
12432 It is optional whether to implement retrieval by @code{Message-ID}, but
12433 it would be nice if that were possible.
12434
12435 If @var{to-buffer} is non-@code{nil}, the result data should be returned
12436 in this buffer instead of the normal data buffer.  This is to make it
12437 possible to avoid copying large amounts of data from one buffer to
12438 another, and Gnus mainly request articles to be inserted directly into
12439 its article buffer.
12440
12441 If it is at all possible, this function should return a cons cell where
12442 the car is the group name the article was fetched from, and the cdr is
12443 the article number.  This will enable Gnus to find out what the real
12444 group and article numbers are when fetching articles by
12445 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
12446 on successful article retrievement.
12447
12448
12449 @item (nnchoke-open-group GROUP &optional SERVER)
12450
12451 Make @var{group} the current group.  
12452
12453 There should be no data returned by this function.
12454
12455
12456 @item (nnchoke-request-group GROUP &optional SERVER)
12457
12458 Get data on @var{group}.  This function also has the side effect of
12459 making @var{group} the current group. 
12460
12461 Here's an example of some result data and a definition of the same:
12462
12463 @example
12464 211 56 1000 1059 ifi.discussion
12465 @end example
12466
12467 The first number is the status, which should be @code{211}.  Next is the
12468 total number of articles in the group, the lowest article number, the
12469 highest article number, and finally the group name.  Note that the total
12470 number of articles may be less than one might think while just
12471 considering the highest and lowest article numbers, but some articles
12472 may have been canceled.  Gnus just discards the total-number, so
12473 whether one should take the bother to generate it properly (if that is a
12474 problem) is left as an exercise to the reader.
12475
12476 @example
12477 group-status = [ error / info ] eol
12478 error        = [ "4" / "5" ] 2<number> " " <Error message>
12479 info         = "211 " 3* [ <number> " " ] <string>
12480 @end example
12481
12482
12483 @item (nnchoke-close-group GROUP &optional SERVER)
12484
12485 Close @var{group} and free any resources connected to it.  This will be
12486 a no-op on most backends. 
12487
12488 There should be no data returned.
12489
12490
12491 @item (nnchoke-request-list &optional SERVER)
12492
12493 Return a list of all groups available on @var{server}.  And that means
12494 @emph{all}. 
12495
12496 Here's an example from a server that only carries two groups:
12497
12498 @example
12499 ifi.test 0000002200 0000002000 y
12500 ifi.discussion 3324 3300 n
12501 @end example
12502
12503 On each line we have a group name, then the highest article number in
12504 that group, the lowest article number, and finally a flag.
12505
12506 @example
12507 active-file = *active-line
12508 active-line = name " " <number> " " <number> " " flags eol
12509 name        = <string>
12510 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
12511 @end example
12512
12513 The flag says whether the group is read-only (@samp{n}), is moderated
12514 (@samp{m}), is dead (@samp{x}), is aliased to some other group
12515 (@samp{=other-group} or none of the above (@samp{y}). 
12516
12517
12518 @item (nnchoke-request-post &optional SERVER)
12519
12520 This function should post the current buffer.  It might return whether
12521 the posting was successful or not, but that's not required.  If, for
12522 instance, the posting is done asynchronously, it has generally not been
12523 completed by the time this function concludes.  In that case, this
12524 function should set up some kind of sentinel to beep the user loud and
12525 clear if the posting could not be completed.
12526
12527 There should be no result data from this function. 
12528
12529 @end table
12530
12531
12532 @node Optional Backend Functions
12533 @subsubsection Optional Backend Functions
12534
12535 @table @code
12536
12537 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
12538
12539 @var{groups} is a list of groups, and this function should request data
12540 on all those groups.  How it does it is of no concern to Gnus, but it
12541 should attempt to do this in a speedy fashion.
12542
12543 The return value of this function can be either @code{active} or
12544 @code{group}, which says what the format of the result data is.  The
12545 former is in the same format as the data from
12546 @code{nnchoke-request-list}, while the latter is a buffer full of lines
12547 in the same format as @code{nnchoke-request-group} gives.
12548
12549 @example
12550 group-buffer = *active-line / *group-status
12551 @end example
12552
12553
12554 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
12555
12556 A Gnus group info (@pxref{Group Info}) is handed to the backend for
12557 alterations.  This comes in handy if the backend really carries all the
12558 information (as is the case with virtual an imap groups).  This function
12559 may alter the info in any manner it sees fit, and should return the
12560 (altered) group info.  This function may alter the group info
12561 destructively, so no copying is needed before boogeying. 
12562
12563 There should be no result data from this function.
12564
12565
12566 @item (nnchoke-request-type GROUP &optional ARTICLE)
12567
12568 When the user issues commands for ``sending news'' (@kbd{F} in the
12569 summary buffer, for instance), Gnus has to know whether the article the
12570 user is following up is news or mail.  This function should return
12571 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
12572 is mail and @code{unknown} if the type can't be decided.  (The
12573 @var{article} parameter is necessary in @code{nnvirtual} groups which
12574 might very well combine mail groups and news groups.)
12575
12576 There should be no result data from this function.
12577
12578
12579 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
12580
12581 If the user tries to set a mark that the backend doesn't like, this
12582 function may change the mark.  Gnus will use whatever this function
12583 returns as the mark for @var{article} instead of the original
12584 @var{mark}.  If the backend doesn't care, it must return the original
12585 @var{mark}, and not @code{nil} or any other type of garbage.  
12586
12587 The only use for this that I can see is what @code{nnvirtual} does with
12588 it---if a component group is auto-expirable, marking an article as read
12589 in the virtual group should result in the article being marked as
12590 expirable. 
12591
12592 There should be no result data from this function.
12593
12594
12595 @item (nnchoke-request-scan &optional GROUP SERVER)
12596
12597 This function may be called at any time (by Gnus or anything else) to
12598 request that the backend check for incoming articles, in one way or
12599 another.  A mail backend will typically read the spool file or query the
12600 POP server when this function is invoked.  The @var{group} doesn't have
12601 to be heeded---if the backend decides that it is too much work just
12602 scanning for a single group, it may do a total scan of all groups.  It
12603 would be nice, however, to keep things local if that's practical.
12604
12605 There should be no result data from this function.
12606
12607
12608 @item (nnchoke-request-asynchronous GROUP &optional SERVER ARTICLES)
12609
12610 This is a request to fetch articles asynchronously later.
12611 @var{articles} is an alist of @var{(article-number line-number)}.  One
12612 would generally expect that if one later fetches article number 4, for
12613 instance, some sort of asynchronous fetching of the articles after 4
12614 (which might be 5, 6, 7 or 11, 3, 909 depending on the order in that
12615 alist) would be fetched asynchronously, but that is left up to the
12616 backend.  Gnus doesn't care.
12617
12618 There should be no result data from this function.
12619  
12620
12621 @item (nnchoke-request-group-description GROUP &optional SERVER)
12622
12623 The result data from this function should be a description of
12624 @var{group}. 
12625
12626 @example
12627 description-line = name <TAB> description eol
12628 name             = <string>
12629 description      = <text>
12630 @end example
12631
12632 @item (nnchoke-request-list-newsgroups &optional SERVER)
12633
12634 The result data from this function should be the description of all
12635 groups available on the server.
12636
12637 @example
12638 description-buffer = *description-line
12639 @end example
12640
12641
12642 @item (nnchoke-request-newgroups DATE &optional SERVER)
12643
12644 The result data from this function should be all groups that were
12645 created after @samp{date}, which is in normal human-readable date
12646 format.  The data should be in the active buffer format.
12647
12648
12649 @item (nnchoke-request-create-group GROUP &optional SERVER)
12650
12651 This function should create an empty group with name @var{group}.  
12652
12653 There should be no return data.
12654
12655
12656 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
12657
12658 This function should run the expiry process on all articles in the
12659 @var{articles} range (which is currently a simple list of article
12660 numbers.)  It is left up to the backend to decide how old articles
12661 should be before they are removed by this function.  If @var{force} is
12662 non-@code{nil}, all @var{articles} should be deleted, no matter how new
12663 they are. 
12664
12665 This function should return a list of articles that it did not/was not
12666 able to delete.
12667
12668 There should be no result data returned.
12669
12670
12671 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
12672 &optional LAST)
12673
12674 This function should move @var{article} (which is a number) from
12675 @var{group} by calling @var{accept-form}.  
12676
12677 This function should ready the article in question for moving by
12678 removing any header lines it has added to the article, and generally
12679 should ``tidy up'' the article.  Then it should @code{eval}
12680 @var{accept-form} in the buffer where the ``tidy'' article is.  This
12681 will do the actual copying.  If this @code{eval} returns a
12682 non-@code{nil} value, the article should be removed.
12683
12684 If @var{last} is @code{nil}, that means that there is a high likelihood
12685 that there will be more requests issued shortly, so that allows some
12686 optimizations. 
12687
12688 The function should return a cons where the car is the group name and
12689 the cdr is the article number that the article was entered as.
12690
12691 There should be no data returned. 
12692
12693
12694 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
12695
12696 This function takes the current buffer and inserts it into @var{group}.
12697 If @var{last} in @code{nil}, that means that there will be more calls to
12698 this function in short order.
12699
12700 The function should return a cons where the car is the group name and
12701 the cdr is the article number that the article was entered as.
12702
12703 There should be no data returned.
12704
12705
12706 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
12707
12708 This function should remove @var{article} (which is a number) from
12709 @var{group} and insert @var{buffer} there instead.
12710
12711 There should be no data returned.
12712
12713
12714 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
12715
12716 This function should delete @var{group}.  If @var{force}, it should
12717 really delete all the articles in the group, and then delete the group
12718 itself.  (If there is such a thing as ``the group itself''.)
12719
12720 There should be no data returned.
12721
12722
12723 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
12724
12725 This function should rename @var{group} into @var{new-name}.  All
12726 articles that are in @var{group} should move to @var{new-name}.
12727
12728 There should be no data returned.
12729
12730 @end table
12731
12732
12733 @node Writing New Backends
12734 @subsubsection Writing New Backends
12735
12736 The various backends share many similarities.  @code{nnml} is just like
12737 @code{nnspool}, but it allows you to edit the articles on the server.
12738 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
12739 and it doesn't maintain overview databases.  @code{nndir} is just like
12740 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
12741 editing articles.
12742
12743 It would make sense if it were possible to ``inherit'' functions from
12744 backends when writing new backends.  And, indeed, you can do that if you
12745 want to.  (You don't have to if you don't want to, of course.)  
12746
12747 All the backends declare their public variables and functions by using a
12748 package called @code{nnoo}.  
12749
12750 To inherit functions from other backends (and allow other backends to
12751 inherit functions from the current backend), you should use the
12752 following macros:
12753 following. 
12754
12755 @table @code
12756
12757 @item nnoo-declare
12758 This macro declares the first parameter to be a child of the subsequent
12759 parameters.  For instance:
12760
12761 @lisp
12762 (nnoo-declare nndir
12763   nnml nnmh)
12764 @end lisp
12765
12766 @code{nndir} has here declared that it intends to inherit functions from
12767 both @code{nnml} and @code{nnmh}.
12768
12769 @item defvoo
12770 This macro is equivalent to @code{defvar}, but registers the variable as
12771 a public server variable.  Most state-oriented variables should be
12772 declared with @code{defvoo} instead of @code{defvar}.  
12773
12774 In addition to the normal @code{defvar} parameters, it takes a list of
12775 variables in the parent backends to map the variable to when executing
12776 a function in those backends.
12777
12778 @lisp
12779 (defvoo nndir-directory nil
12780   "Where nndir will look for groups."
12781   nnml-current-directory nnmh-current-directory)
12782 @end lisp
12783
12784 This means that @code{nnml-current-directory} will be set to
12785 @code{nndir-directory} when an @code{nnml} function is called on behalf
12786 of @code{nndir}.  (The same with @code{nnmh}.)  
12787
12788 @item nnoo-define-basics
12789 This macro defines some common functions that almost all backends should
12790 have.
12791
12792 @example
12793 (nnoo-define-basics nndir)
12794 @end example
12795
12796 @item deffoo
12797 This macro is just like @code{defun} and takes the same parameters.  In
12798 addition to doing the normal @code{defun} things, it registers the
12799 function as being public so that other backends can inherit it.
12800
12801 @item nnoo-map-functions
12802 This macro allows mapping of functions from the current backend to
12803 functions from the parent backends.
12804
12805 @example
12806 (nnoo-map-functions nndir
12807   (nnml-retrieve-headers 0 nndir-current-group 0 0)
12808   (nnmh-request-article 0 nndir-current-group 0 0))
12809 @end example
12810
12811 This means that when @code{nndir-retrieve-headers} is called, the first,
12812 third, and fourth parameters will be passed on to
12813 @code{nnml-retrieve-headers}, while the second parameter is set to the
12814 value of @code{nndir-current-group}.
12815
12816 @item nnoo-import
12817 This macro allows importing functions from backends.  It should be the
12818 last thing in the source file, since it will only define functions that
12819 haven't already been defined.
12820
12821 @example
12822 (nnoo-import nndir
12823   (nnmh
12824    nnmh-request-list
12825    nnmh-request-newgroups)
12826   (nnml))
12827 @end example
12828
12829 This means that calls to @code{nndir-request-list} should just be passed
12830 on to @code{nnmh-request-list}, while all public functions from
12831 @code{nnml} that haven't been defined in @code{nndir} yet should be
12832 defined now.
12833
12834 @end table
12835
12836 Below is a slightly shortened version of the @code{nndir} backend.
12837
12838 @lisp
12839 ;;; nndir.el --- single directory newsgroup access for Gnus
12840 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
12841
12842 ;;; Code:
12843
12844 (require 'nnheader)
12845 (require 'nnmh)
12846 (require 'nnml)
12847 (require 'nnoo)
12848 (eval-when-compile (require 'cl))
12849
12850 (nnoo-declare nndir
12851   nnml nnmh)
12852
12853 (defvoo nndir-directory nil
12854   "Where nndir will look for groups."
12855   nnml-current-directory nnmh-current-directory)
12856
12857 (defvoo nndir-nov-is-evil nil
12858   "*Non-nil means that nndir will never retrieve NOV headers."
12859   nnml-nov-is-evil)
12860
12861 (defvoo nndir-current-group "" nil nnml-current-group nnmh-current-group)
12862 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
12863 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
12864
12865 (defvoo nndir-status-string "" nil nnmh-status-string)
12866 (defconst nndir-version "nndir 1.0")
12867
12868 ;;; Interface functions.
12869
12870 (nnoo-define-basics nndir)
12871
12872 (deffoo nndir-open-server (server &optional defs)
12873   (setq nndir-directory
12874         (or (cadr (assq 'nndir-directory defs))
12875             server))
12876   (unless (assq 'nndir-directory defs)
12877     (push `(nndir-directory ,server) defs))
12878   (push `(nndir-current-group
12879           ,(file-name-nondirectory (directory-file-name nndir-directory)))
12880         defs)
12881   (push `(nndir-top-directory
12882           ,(file-name-directory (directory-file-name nndir-directory)))
12883         defs)
12884   (nnoo-change-server 'nndir server defs))
12885
12886 (nnoo-map-functions nndir
12887   (nnml-retrieve-headers 0 nndir-current-group 0 0)
12888   (nnmh-request-article 0 nndir-current-group 0 0)
12889   (nnmh-request-group nndir-current-group 0 0)
12890   (nnmh-close-group nndir-current-group 0))
12891
12892 (nnoo-import nndir
12893   (nnmh
12894    nnmh-status-message
12895    nnmh-request-list
12896    nnmh-request-newgroups))
12897
12898 (provide 'nndir)
12899 @end lisp
12900
12901
12902
12903 @node Score File Syntax
12904 @subsection Score File Syntax
12905
12906 Score files are meant to be easily parsable, but yet extremely
12907 mallable.   It was decided that something that had the same read syntax
12908 as an Emacs Lisp list would fit that spec.
12909
12910 Here's a typical score file:
12911
12912 @lisp
12913 (("summary"
12914   ("win95" -10000 nil s)
12915   ("Gnus"))
12916  ("from"
12917   ("Lars" -1000))
12918  (mark -100))
12919 @end lisp
12920
12921 BNF definition of a score file:
12922
12923 @example
12924 score-file       = "" / "(" *element ")"
12925 element          = rule / atom
12926 rule             = string-rule / number-rule / date-rule
12927 string-rule      = "(" quote string-header quote space *string-match ")"
12928 number-rule      = "(" quote number-header quote space *number-match ")"
12929 date-rule        = "(" quote date-header quote space *date-match ")"
12930 quote            = <ascii 34>
12931 string-header    = "subject" / "from" / "references" / "message-id" / 
12932                    "xref" / "body" / "head" / "all" / "followup"
12933 number-header    = "lines" / "chars"
12934 date-header      = "date"
12935 string-match     = "(" quote <string> quote [ "" / [ space score [ "" / 
12936                    space date [ "" / [ space string-match-t ] ] ] ] ] ")"
12937 score            = "nil" / <integer>
12938 date             = "nil" / <natural number>
12939 string-match-t   = "nil" / "s" / "substring" / "S" / "Substring" / 
12940                    "r" / "regex" / "R" / "Regex" /
12941                    "e" / "exact" / "E" / "Exact" /
12942                    "f" / "fuzzy" / "F" / "Fuzzy"
12943 number-match     = "(" <integer> [ "" / [ space score [ "" / 
12944                    space date [ "" / [ space number-match-t ] ] ] ] ] ")"
12945 number-match-t   = "nil" / "=" / "<" / ">" / ">=" / "<="
12946 date-match       = "(" quote <string> quote [ "" / [ space score [ "" / 
12947                    space date [ "" / [ space date-match-t ] ] ] ] ")"
12948 date-match-t     = "nil" / "at" / "before" / "after"
12949 atom             = "(" [ required-atom / optional-atom ] ")"
12950 required-atom    = mark / expunge / mark-and-expunge / files /
12951                    exclude-files / read-only / touched
12952 optional-atom    = adapt / local / eval 
12953 mark             = "mark" space nil-or-number
12954 nil-or-number    = "nil" / <integer>
12955 expunge          = "expunge" space nil-or-number
12956 mark-and-expunge = "mark-and-expunge" space nil-or-number
12957 files            = "files" *[ space <string> ]
12958 exclude-files    = "exclude-files" *[ space <string> ]
12959 read-only        = "read-only" [ space "nil" / space "t" ]
12960 adapt            = "adapt" [ space "nil" / space "t" / space adapt-rule ]
12961 adapt-rule       = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
12962 local            = "local" *[ space "(" <string> space <form> ")" ]
12963 eval             = "eval" space <form>
12964 space            = *[ " " / <TAB> / <NEWLINE> ]
12965 @end example
12966
12967 Any unrecognized elements in a score file should be ignored, but not
12968 discarded.  
12969
12970 As you can see, white space is needed, but the type and amount of white
12971 space is irrelevant.  This means that formatting of the score file is
12972 left up to the programmer---if it's simpler to just spew it all out on
12973 one looong line, then that's ok.
12974
12975 The meaning of the various atoms are explained elsewhere in this
12976 manual. 
12977
12978
12979 @node Headers
12980 @subsection Headers
12981
12982 Gnus uses internally a format for storing article headers that
12983 corresponds to the @sc{nov} format in a mysterious fashion.  One could
12984 almost suspect that the author looked at the @sc{nov} specification and
12985 just shamelessly @emph{stole} the entire thing, and one would be right.
12986
12987 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
12988 RFC1036 to talk about lines in the head of an article (eg.,
12989 @code{From}).  It is used by many people as a synonym for
12990 ``head''---``the header and the body''.  (That should be avoided, in my
12991 opinion.)  And Gnus uses a format internally that it calls ``header'',
12992 which is what I'm talking about here.  This is a 9-element vector,
12993 basically, with each header (ouch) having one slot.
12994
12995 These slots are, in order: @code{number}, @code{subject}, @code{from},
12996 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
12997 @code{xref}.  There are macros for accessing and setting these
12998 slots---they all have predictable names beginning with
12999 @code{mail-header-} and @code{mail-header-set-}, respectively.
13000
13001 The @code{xref} slot is really a @code{misc} slot.  Any extra info will
13002 be put in there.
13003
13004
13005 @node Ranges
13006 @subsection Ranges
13007
13008 @sc{gnus} introduced a concept that I found so useful that I've started
13009 using it a lot and have elaborated on it greatly. 
13010
13011 The question is simple: If you have a large amount of objects that are
13012 identified by numbers (say, articles, to take a @emph{wild} example)
13013 that you want to callify as being ``included'', a normal sequence isn't
13014 very useful.  (A 200,000 length sequence is a bit long-winded.)
13015
13016 The solution is as simple as the question: You just collapse the
13017 sequence. 
13018
13019 @example
13020 (1 2 3 4 5 6 10 11 12)
13021 @end example
13022
13023 is transformed into
13024
13025 @example
13026 ((1 . 6) (10 . 12))
13027 @end example
13028
13029 To avoid having those nasty @samp{(13 . 13)} elements to denote a
13030 lonesome object, a @samp{13} is a valid element:
13031
13032 @example
13033 ((1 . 6) 7 (10 . 12))
13034 @end example
13035
13036 This means that comparing two ranges to find out whether they are equal
13037 is slightly tricky:
13038
13039 @example
13040 ((1 . 5) 7 8 (10 . 12))
13041 @end example
13042
13043 and
13044
13045 @example
13046 ((1 . 5) (7 . 8) (10 . 12))
13047 @end example
13048
13049 are equal.  In fact, any non-descending list is a range:
13050
13051 @example
13052 (1 2 3 4 5)
13053 @end example
13054
13055 is a perfectly valid range, although a pretty long-winded one.  This is
13056 also legal:
13057
13058 @example
13059 (1 . 5)
13060 @end example
13061
13062 and is equal to the previous range.
13063
13064 Here's a BNF definition of ranges.  Of course, one must remember the
13065 semantic requirement that the numbers are non-descending.  (Any number
13066 of repetition of the same number is allowed, but apt to disappear in
13067 range handling.)
13068
13069 @example
13070 range           = simple-range / normal-range
13071 simple-range    = "(" number " . " number ")"
13072 normal-range    = "(" start-contents ")"
13073 contents        = "" / simple-range *[ " " contents ] / 
13074                   number *[ " " contents ]
13075 @end example
13076
13077 Gnus currently uses ranges to keep track of read articles and article
13078 marks.  I plan on implementing a number of range operators in C if The
13079 Powers That Be are willing to let me.  (I haven't asked yet, because I
13080 need to do some more thinking on what operators I need to make life
13081 totally range-based without ever having to convert back to normal
13082 sequences.) 
13083
13084
13085 @node Group Info
13086 @subsection Group Info
13087
13088 Gnus stores all permanent info on groups in a @dfn{group info} list.
13089 This list is from three to six elements (or more) long and exhaustively
13090 describes the group.
13091
13092 Here are two example group infos; one is a very simple group while the
13093 second is a more complex one:
13094
13095 @example
13096 ("no.group" 5 (1 . 54324))
13097
13098 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
13099                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
13100                 (nnml "")
13101                 (auto-expire (to-address "ding@@ifi.uio.no")))
13102 @end example
13103
13104 The first element is the group name as Gnus knows the group; the second
13105 is the group level; the third is the read articles in range format; the
13106 fourth is a list of article marks lists; the fifth is the select method;
13107 and the sixth contains the group parameters.
13108
13109 Here's a BNF definition of the group info format:
13110
13111 @example
13112 info          = "(" group space level space read 
13113                 [ "" / [ space marks-list [ "" / [ space method [ "" /
13114                 space parameters ] ] ] ] ] ")" 
13115 group         = quote <string> quote
13116 level         = <integer in the range of 1 to inf>
13117 read          = range
13118 marks-lists   = nil / "(" *marks ")"
13119 marks         = "(" <string> range ")"
13120 method        = "(" <string> *elisp-forms ")"
13121 parameters    = "(" *elisp-forms ")"
13122 @end example
13123
13124 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
13125 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
13126 in pseudo-BNF.
13127
13128
13129 @node Emacs/XEmacs Code
13130 @subsection Emacs/XEmacs Code
13131 @cindex XEmacs
13132 @cindex Emacsen
13133
13134 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
13135 platforms must be the primary one.  I chose Emacs.  Not because I don't
13136 like XEmacs or Mule, but because it comes first alphabetically.
13137
13138 This means that Gnus will byte-compile under Emacs with nary a warning,
13139 while XEmacs will pump out gigabytes of warnings while byte-compiling.
13140 As I use byte-compilation warnings to help me root out trivial errors in
13141 Gnus, that's very useful.  
13142
13143 I've also consistently used Emacs function interfaces, but have used
13144 Gnusey aliases for the functions.  To take an example:  Emacs defines a
13145 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
13146 function.  I then define a function called @code{gnus-run-at-time} that
13147 takes the same parameters as the Emacs @code{run-at-time}.  When running
13148 Gnus under Emacs, the former function is just an alias for the latter.
13149 However, when running under XEmacs, the former is an alias for the
13150 following function:
13151
13152 @lisp
13153 (defun gnus-xmas-run-at-time (time repeat function &rest args)
13154   (start-itimer
13155    "gnus-run-at-time"
13156    `(lambda ()
13157       (,function ,@@args))
13158    time repeat))
13159 @end lisp
13160
13161 This sort of thing has been done for bunches of functions.  Gnus does
13162 not redefine any native Emacs functions while running under XEmacs---it
13163 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
13164 all over.
13165
13166 Of course, I could have chosen XEmacs as my native platform and done
13167 mapping functions the other way around.  But I didn't.  The performance
13168 hit these indirections impose on Gnus under XEmacs should be slight.
13169
13170
13171 @node Various File Formats
13172 @subsection Various File Formats
13173
13174 @menu
13175 * Active File Format::      Information on articles and groups available.
13176 * Newsgroups File Format::  Group descriptions.
13177 @end menu
13178
13179
13180 @node Active File Format
13181 @subsubsection Active File Format
13182
13183 The active file lists all groups that are available on the server in
13184 question.  It also lists the highest and lowest current article numbers
13185 in each group.  
13186
13187 Here's an excerpt from a typical active file:
13188
13189 @example
13190 soc.motss 296030 293865 y
13191 alt.binaries.pictures.fractals 3922 3913 n
13192 comp.sources.unix 1605 1593 m
13193 comp.binaries.ibm.pc 5097 5089 y
13194 no.general 1000 900 y
13195 @end example
13196
13197 Here's a pseudo-BNF definition of this file:
13198
13199 @example
13200 active      = *group-line
13201 group-line  = group space high-number space low-number space flag <NEWLINE>
13202 group       = <non-white-space string>
13203 space       = " "
13204 high-number = <non-negative integer>
13205 low-number  = <positive integer>
13206 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
13207 @end example
13208
13209
13210 @node Newsgroups File Format
13211 @subsubsection Newsgroups File Format
13212
13213 The newsgroups file lists groups along with their descriptions.  Not all
13214 groups on the server have to be listed,  and not all groups in the file
13215 have to exist on the server.  The file is meant purely as information to
13216 the user.
13217
13218 The format is quite simple; a group name, a tab, and the description.
13219 Here's the definition:
13220
13221 @example
13222 newsgroups    = *line
13223 line          = group tab description <NEWLINE>
13224 group         = <non-white-space string>
13225 tab           = <TAB>
13226 description   = <string>
13227 @end example
13228
13229
13230 @node Emacs for Heathens
13231 @section Emacs for Heathens
13232
13233 Believe it or not, but some people who use Gnus haven't really used
13234 Emacs much before they embarked on their journey on the Gnus Love Boat.
13235 If you are one of those unfortunates whom ``@kbd{M-C-a}'', ``kill the
13236 region'', and ``set @code{gnus-flargblossen} to an alist where the key
13237 is a regexp that is used for matching on the group name'' are magical
13238 phrases with little or no meaning, then this appendix is for you.  If
13239 you are already familiar with Emacs, just ignore this and go fondle your
13240 cat instead.
13241
13242 @menu
13243 * Keystrokes::      Entering text and executing commands.
13244 * Emacs Lisp::      The built-in Emacs programming language.
13245 @end menu
13246
13247
13248 @node Keystrokes
13249 @subsection Keystrokes
13250
13251 @itemize @bullet
13252 @item
13253 Q: What is an experienced Emacs user?
13254
13255 @item 
13256 A: A person who wishes that the terminal had pedals.
13257 @end itemize
13258
13259 Yes, when you use Emacs, you are apt to use the control key, the shift
13260 key and the meta key a lot.  This is very annoying to some people
13261 (notably @code{vi}le users), and the rest of us just love the hell out
13262 of it.  Just give up and submit.  Emacs really does stand for
13263 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
13264 may have heard from other disreputable sources (like the Emacs author).
13265
13266 The shift key is normally located near your pinky fingers, and are
13267 normally used to get capital letters and stuff.  You probably use it all
13268 the time.  The control key is normally marked ``CTRL'' or something like
13269 that.  The meta key is, funnily enough, never marked as such on any
13270 keyboards.  The one I'm currently at has a key that's marked ``Alt'',
13271 which is the meta key on this keyboard.  It's usually located somewhere
13272 to the left hand side of the keyboard, usually on the bottom row.
13273
13274 Now, us Emacs people doesn't say ``press the meta-control-m key'',
13275 because that's just too inconvenient.  We say ``press the @kbd{M-C-m}
13276 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
13277 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
13278 down the control key, and hold it down while you press @kbd{k}''.
13279 ``Press @kbd{M-C-k}'' means ``press down and hold down the meta key and
13280 the control key and then press @kbd{k}''.  Simple, ay?
13281
13282 This is somewhat complicated by the fact that not all keyboards have a
13283 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
13284 means ``press escape, release escape, press @kbd{k}''.  That's much more
13285 work than if you have a meta key, so if that's the case, I respectfully
13286 suggest you get a real keyboard with a meta key.  You can't live without
13287 it.
13288
13289
13290
13291 @node Emacs Lisp
13292 @subsection Emacs Lisp
13293
13294 Emacs is the King of Editors because it's really a Lisp interpreter.
13295 Each and every key you tap runs some Emacs Lisp code snippet, and since
13296 Emacs Lisp is an interpreted language, that means that you can configure
13297 any key to run any arbitrary code.  You just, like, do it.
13298
13299 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
13300 functions.  (These are byte-compiled for speed, but it's still
13301 interpreted.)  If you decide that you don't like the way Gnus does
13302 certain things, it's trivial to have it do something a different way.
13303 (Well, at least if you know how to write Lisp code.)  However, that's
13304 beyond the scope of this manual, so we are simply going to talk about
13305 some common constructs that you normally use in your @file{.emacs} file
13306 to customize Gnus.
13307
13308 If you want to set the variable @code{gnus-florgbnize} to four (4), you
13309 write the following:
13310
13311 @lisp
13312 (setq gnus-florgbnize 4)
13313 @end lisp
13314
13315 This function (really ``special form'') @code{setq} is the one that can
13316 set a variable to some value.  This is really all you need to know.  Now
13317 you can go and fill your @code{.emacs} file with lots of these to change
13318 how Gnus works.
13319
13320 If you have put that thing in your @code{.emacs} file, it will be read
13321 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
13322 start Emacs.  If you want to change the variable right away, simply say
13323 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
13324 previous ``form'', which here is a simple @code{setq} statement.
13325
13326 Go ahead---just try it, if you're located at your Emacs.  After you
13327 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
13328 is the return value of the form you @code{eval}ed.
13329
13330 Some pitfalls:
13331
13332 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
13333 that means:
13334
13335 @lisp
13336 (setq gnus-read-active-file 'some)
13337 @end lisp
13338
13339 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
13340 @samp{nntp.ifi.uio.no}'', that means:
13341
13342 @lisp
13343 (setq gnus-nntp-server "nntp.ifi.uio.no")
13344 @end lisp
13345
13346 So be careful not to mix up strings (the latter) with symbols (the
13347 former).  The manual is unambiguous, but it can be confusing.
13348
13349
13350 @include gnus-faq.texi
13351
13352 @node Index
13353 @chapter Index
13354 @printindex cp
13355
13356 @node Key Index
13357 @chapter Key Index
13358 @printindex ky
13359
13360 @summarycontents
13361 @contents
13362 @bye
13363
13364 @iftex
13365 @iflatex
13366 \end{document}
13367 @end iflatex
13368 @end iftex
13369
13370 @c End:
13371