95e0f3140515d4f5209afeafdf7e4f921c812019
[gnus] / texi / gnus.texi
1 \input texinfo                  @c -*-texinfo-*-
2
3 @setfilename gnus
4 @settitle Red Gnus Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @iftex
9 @finalout
10 @end iftex
11 @setchapternewpage odd
12
13 @iftex
14 @iflatex
15 \documentclass[twoside,a4paper,openright]{book}
16 \usepackage[latin1]{inputenc}
17 % \usepackage{fontenc}
18 % \usepackage{babel}
19 \usepackage{pagestyle}
20 \usepackage{epsfig}
21 % \usepackage{ifitricks}
22 \fontfamily{bembo}\selectfont
23
24 \makeindex
25 \begin{document}
26
27 \newcommand{\gnuschaptername}{}
28 \newcommand{\gnussectionname}{}
29
30 \newcommand{\gnusbackslash}{/}
31
32 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
33 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
34
35 \newcommand{\gnuskindex}[1]{\index{#1}}
36 \newcommand{\gnusindex}[1]{\index{#1}}
37
38 \newcommand{\gnustt}[1]{{\textbf{\textsf{#1}}}}
39 \newcommand{\gnuscode}[1]{\gnustt{#1}}
40 \newcommand{\gnussamp}[1]{``\gnustt{#1}''}
41 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
42 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
43 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
44 \newcommand{\gnusdfn}[1]{\textit{#1}}
45 \newcommand{\gnusi}[1]{\textit{#1}}
46 \newcommand{\gnusstrong}[1]{\textbf{#1}}
47 \newcommand{\gnusemph}[1]{\textit{#1}}
48 \newcommand{\gnusvar}[1]{\textsl{\textsf{#1}}}
49 \newcommand{\gnussc}[1]{\textsc{#1}}
50 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
51 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
52
53 \newcommand{\gnusbullet}{{${\bullet}$}}
54 \newcommand{\gnusdollar}{\$}
55 \newcommand{\gnusampersand}{\&}
56 \newcommand{\gnuspercent}{\%}
57 \newcommand{\gnushash}{\#}
58 \newcommand{\gnushat}{\symbol{"5E}}
59 \newcommand{\gnusunderline}{\symbol{"5F}}
60 \newcommand{\gnustilde}{\symbol{"7E}}
61 \newcommand{\gnusless}{{$<$}}
62 \newcommand{\gnusgreater}{{$>$}}
63
64 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=gnus-head.eps,height=1cm}}}
65 \newcommand{\gnusinteresting}{
66 \marginpar[\hspace{2.5cm}\gnushead]{\gnushead}
67 }
68
69 \newcommand{\gnuschapter}[1]{
70 \renewcommand{\gnussectionname}{}
71 \chapter{#1}
72 \renewcommand{\gnuschaptername}{#1}
73 \thispagestyle{empty}
74 % \epsfig{figure=gnus-herd-\arabic{chapter}.eps,height=15cm}
75 \clearpage
76 }
77
78 \newcommand{\gnusitemx}[1]{\vspace{-\itemsep}\item#1}
79
80 \newcommand{\gnussection}[1]{
81 \renewcommand{\gnussectionname}{#1}
82 \section{#1}
83 }
84
85 \newenvironment{codelist}%
86 {\begin{list}{}{
87 }
88 }{\end{list}}
89
90 \newenvironment{kbdlist}%
91 {\begin{list}{}{
92 \labelwidth=0cm
93 }
94 }{\end{list}}
95
96 \newenvironment{dfnlist}%
97 {\begin{list}{}{
98 }
99 }{\end{list}}
100
101 \newenvironment{stronglist}%
102 {\begin{list}{}{
103 }
104 }{\end{list}}
105
106 \newenvironment{samplist}%
107 {\begin{list}{}{
108 }
109 }{\end{list}}
110
111 \newenvironment{varlist}%
112 {\begin{list}{}{
113 }
114 }{\end{list}}
115
116 \newenvironment{emphlist}%
117 {\begin{list}{}{
118 }
119 }{\end{list}}
120
121 \newpagestyle{gnus}%
122 {
123 {
124 \ifodd\count0
125 {
126 \hspace*{-2ex}
127 \underline{
128 \makebox[\headtextwidth]{
129 \hspace*{-2.3ex}
130 \textbf{\arabic{chapter}.\arabic{section}}
131 \textbf{\gnussectionname\hfill\arabic{page}}
132 }}
133 }
134 \else
135 {
136 \hspace*{-2.25cm}
137 \underline{
138 \hspace*{-2.3ex}
139 \makebox[\headtextwidth]{
140 \textbf{\arabic{page}\hfill\gnuschaptername}
141 }}
142 }
143 \fi
144 }
145 }
146 {
147 \ifodd\count0
148 \mbox{} \hfill 
149 \raisebox{-0.5cm}{\epsfig{figure=gnus-big-logo.eps,height=1cm}}
150 \else
151 \raisebox{-0.5cm}{\epsfig{figure=gnus-big-logo.eps,height=1cm}}
152 \hfill \mbox{}
153 \fi
154 }
155 \pagestyle{gnus}
156
157 @end iflatex
158 @end iftex
159
160 @iftex
161 @iflatex
162 \begin{titlepage}
163 {
164
165 %\addtolength{\oddsidemargin}{-5cm}
166 %\addtolength{\evensidemargin}{-5cm}
167 \parindent=0cm
168 \addtolength{\textheight}{2cm}
169
170 \gnustitle{\gnustitlename}\\
171 \rule{15cm}{1mm}\\
172 \vfill
173 \hspace*{-1cm}\epsfig{figure=gnus-big-logo.eps,height=15cm}
174 \vfill
175 \rule{15cm}{1mm}\\
176 \gnusauthor{by Lars Magne Ingebrigtsen}
177 \newpage
178 }
179
180 \mbox{}
181 \vfill
182
183 \thispagestyle{empty}
184
185 Copyright \copyright{} 1995,96 Free Software Foundation, Inc. 
186
187 Permission is granted to make and distribute verbatim copies of
188 this manual provided the copyright notice and this permission notice
189 are preserved on all copies.
190
191 Permission is granted to copy and distribute modified versions of this
192 manual under the conditions for verbatim copying, provided that the
193 entire resulting derived work is distributed under the terms of a
194 permission notice identical to this one.
195
196 Permission is granted to copy and distribute translations of this manual
197 into another language, under the above conditions for modified versions.
198
199 \newpage
200 \end{titlepage}
201 @end iflatex
202 @end iftex
203
204 @ifinfo
205
206 This file documents Gnus, the GNU Emacs newsreader.
207
208 Copyright (C) 1995,96 Free Software Foundation, Inc.
209
210 Permission is granted to make and distribute verbatim copies of
211 this manual provided the copyright notice and this permission notice
212 are preserved on all copies.
213
214 @ignore
215 Permission is granted to process this file through Tex and print the
216 results, provided the printed document carries copying permission
217 notice identical to this one except for the removal of this paragraph
218 (this paragraph not being relevant to the printed manual).
219
220 @end ignore
221 Permission is granted to copy and distribute modified versions of this
222 manual under the conditions for verbatim copying, provided also that the
223 entire resulting derived work is distributed under the terms of a
224 permission notice identical to this one.
225
226 Permission is granted to copy and distribute translations of this manual
227 into another language, under the above conditions for modified versions.
228 @end ifinfo
229
230 @tex
231
232 @titlepage
233 @title Red Gnus Manual
234
235 @author by Lars Magne Ingebrigtsen
236 @page
237
238 @vskip 0pt plus 1filll
239 Copyright @copyright{} 1995,96 Free Software Foundation, Inc. 
240
241 Permission is granted to make and distribute verbatim copies of
242 this manual provided the copyright notice and this permission notice
243 are preserved on all copies.
244
245 Permission is granted to copy and distribute modified versions of this
246 manual under the conditions for verbatim copying, provided that the
247 entire resulting derived work is distributed under the terms of a
248 permission notice identical to this one.
249
250 Permission is granted to copy and distribute translations of this manual
251 into another language, under the above conditions for modified versions.
252
253 @end titlepage
254 @page
255
256 @end tex
257
258
259 @node Top
260 @top The Red Gnus Newsreader
261
262 @ifinfo
263
264 You can read news (and mail) from within Emacs by using Gnus.  The news
265 can be gotten by any nefarious means you can think of---@sc{nntp}, local
266 spool or your mbox file.  All at the same time, if you want to push your
267 luck.
268
269 @end ifinfo
270
271 @iftex
272
273 @iflatex
274 \thispagestyle{empty}
275 @end iflatex
276
277 Gnus is the advanced, self-documenting, customizable, extensible
278 unreal-time newsreader for GNU Emacs.  
279
280 Oops.  That sounds oddly familiar, so let's start over again to avoid
281 being accused of plagiarism:
282
283 Gnus is a message-reading laboratory.  It will let you look at just
284 about anything as if it were a newsgroup.  You can read mail with it,
285 you can browse directories with it, you can @code{ftp} with it---you can
286 even read news with it!
287
288 Gnus tries to empower people who read news the same way Emacs empowers
289 people who edit text.  Gnus sets no limits to what the user should be
290 allowed to do.  Users are encouraged to extend Gnus to make it behave
291 like they want it to behave.  A program should not control people;
292 people should be empowered to do what they want by using (or abusing)
293 the program.
294
295 @end iftex
296
297
298 @menu
299 * Starting Up::           Finding news can be a pain.
300 * The Group Buffer::      Selecting, subscribing and killing groups.
301 * The Summary Buffer::    Reading, saving and posting articles.
302 * The Article Buffer::    Displaying and handling articles.
303 * Composing Messages::    Information on sending mail and news.
304 * Select Methods::        Gnus reads all messages from various select methods.
305 * Scoring::               Assigning values to articles.
306 * Various::               General purpose settings.
307 * The End::               Farewell and goodbye.
308 * Appendices::            Terminology, Emacs intro, FAQ, History, Internals.
309 * Index::                 Variable, function and concept index.
310 * Key Index::             Key Index.
311 @end menu
312
313
314
315 @node Starting Up
316 @chapter Starting Gnus
317 @cindex starting up
318
319 @kindex M-x gnus
320 @findex gnus
321 If your system administrator has set things up properly, starting Gnus
322 and reading news is extremely easy---you just type @kbd{M-x gnus} in
323 your Emacs. 
324
325 @findex gnus-other-frame
326 @kindex M-x gnus-other-frame
327 If you want to start Gnus in a different frame, you can use the command
328 @kbd{M-x gnus-other-frame} instead.
329
330 If things do not go smoothly at startup, you have to twiddle some
331 variables. 
332
333 @menu
334 * Finding the News::    Choosing a method for getting news.
335 * The First Time::      What does Gnus do the first time you start it?
336 * The Server is Down::  How can I read my mail then?
337 * Slave Gnusii::        You can have more than one Gnus active at a time.
338 * Fetching a Group::    Starting Gnus just to read a group.
339 * New Groups::          What is Gnus supposed to do with new groups?
340 * Startup Files::       Those pesky startup files---@file{.newsrc}.
341 * Auto Save::           Recovering from a crash.
342 * The Active File::     Reading the active file over a slow line Takes Time.
343 * Changing Servers::    You may want to move from one server to another.
344 * Startup Variables::   Other variables you might change.
345 @end menu
346
347
348 @node Finding the News
349 @section Finding the News
350
351 @vindex gnus-select-method
352 @c @head
353 The @code{gnus-select-method} variable says where Gnus should look for
354 news.  This variable should be a list where the first element says
355 @dfn{how} and the second element says @dfn{where}.  This method is your
356 native method.  All groups that are not fetched with this method are
357 foreign groups.
358
359 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
360 you want to get your daily dosage of news from, you'd say:
361
362 @lisp
363 (setq gnus-select-method '(nntp "news.somewhere.edu"))
364 @end lisp
365
366 If you want to read directly from the local spool, say:
367
368 @lisp
369 (setq gnus-select-method '(nnspool ""))
370 @end lisp
371
372 If you can use a local spool, you probably should, as it will almost
373 certainly be much faster.
374
375 @vindex gnus-nntpserver-file
376 @cindex NNTPSERVER
377 @cindex @sc{nntp} server
378 If this variable is not set, Gnus will take a look at the
379 @code{NNTPSERVER} environment variable.  If that variable isn't set,
380 Gnus will see whether @code{gnus-nntpserver-file}
381 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
382 that fails as well, Gnus will will try to use the machine that is
383 running Emacs as an @sc{nntp} server.  That's a long-shot, though.
384
385 @vindex gnus-nntp-server
386 If @code{gnus-nntp-server} is set, this variable will override
387 @code{gnus-select-method}.  You should therefore set
388 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
389
390 @vindex gnus-secondary-servers
391 You can also make Gnus prompt you interactively for the name of an
392 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
393 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
394 in the @code{gnus-secondary-servers} list (if any).  You can also just
395 type in the name of any server you feel like visiting.
396
397 @findex gnus-group-browse-foreign-server
398 @kindex B (Group)
399 However, if you use one @sc{nntp} server regularly and are just
400 interested in a couple of groups from a different server, you would be
401 better served by using the @kbd{B} command in the group buffer.  It will
402 let you have a look at what groups are available, and you can subscribe
403 to any of the groups you want to.  This also makes @file{.newsrc}
404 maintenance much tidier.  @xref{Foreign Groups}.
405
406 @vindex gnus-secondary-select-methods
407 @c @head
408 A slightly different approach to foreign groups is to set the
409 @code{gnus-secondary-select-methods} variable.  The select methods
410 listed in this variable are in many ways just as native as the
411 @code{gnus-select-method} server.  They will also be queried for active
412 files during startup (if that's required), and new newsgroups that
413 appear on these servers will be subscribed (or not) just as native
414 groups are.
415
416 For instance, if you use the @code{nnmbox} backend to read your mail, you
417 would typically set this variable to
418
419 @lisp
420 (setq gnus-secondary-select-methods '((nnmbox "")))
421 @end lisp
422
423
424 @node The First Time
425 @section The First Time
426 @cindex first time usage
427
428 If no startup files exist, Gnus will try to determine what groups should
429 be subscribed by default.
430
431 @vindex gnus-default-subscribed-newsgroups
432 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
433 will subscribe you to just those groups in that list, leaving the rest
434 killed.  Your system administrator should have set this variable to
435 something useful.
436
437 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
438 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is here
439 defined as @dfn{whatever Lars thinks you should read}.)
440
441 You'll also be subscribed to the Gnus documentation group, which should
442 help you with most common problems.  
443
444 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
445 use the normal functions for handling new groups, and not do anything
446 special.
447
448
449 @node The Server is Down
450 @section The Server is Down
451 @cindex server errors
452
453 If the default server is down, Gnus will understandably have some
454 problems starting.  However, if you have some mail groups in addition to
455 the news groups, you may want to start Gnus anyway.
456
457 Gnus, being the trusting sort of program, will ask whether to proceed
458 without a native select method if that server can't be contacted.  This
459 will happen whether the server doesn't actually exist (i.e., you have
460 given the wrong address) or the server has just momentarily taken ill
461 for some reason or other.  If you decide to continue and have no foreign
462 groups, you'll find it difficult to actually do anything in the group
463 buffer.  But, hey, that's your problem.  Blllrph!
464
465 @findex gnus-no-server
466 @kindex M-x gnus-no-server
467 @c @head
468 If you know that the server is definitely down, or you just want to read
469 your mail without bothering with the server at all, you can use the
470 @code{gnus-no-server} command to start Gnus.  That might come in handy
471 if you're in a hurry as well.  This command will not attempt to contact
472 your primary server---instead, it will just activate all groups on level
473 1 and 2.  (You should preferrably keep no native groups on those two
474 levels.) 
475
476
477 @node Slave Gnusii
478 @section Slave Gnusiï
479 @cindex slave
480
481 You might want to run more than one Emacs with more than one Gnus at the
482 same time.  If you are using different @file{.newsrc} files (eg., if you
483 are using the two different Gnusiï to read from two different servers),
484 that is no problem whatsoever.  You just do it.
485
486 The problem appears when you want to run two Gnusiï that use the same
487 @code{.newsrc} file.
488
489 To work around that problem some, we here at the Think-Tank at the Gnus
490 Towers have come up with a new concept: @dfn{Masters} and
491 @dfn{servants}.  (We have applied for a patent on this concept, and have
492 taken out a copyright on those words.  If you wish to use those words in
493 conjunction with each other, you have to send $1 per usage instance to
494 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
495 Applications}) will be much more expensive, of course.)
496
497 Anyways, you start one Gnus up the normal way with @kbd{M-x gnus} (or
498 however you do it).  Each subsequent slave Gnusiï should be started with
499 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
500 files, but instead save @dfn{slave files} that contains information only
501 on what groups have been read in the slave session.  When a master Gnus
502 starts, it will read (and delete) these slave files, incorporating all
503 information from them.  (The slave files will be read in the sequence
504 they were created, so the latest changes will have precedence.)
505
506 Information from the slave files has, of course, precedence over the
507 information in the normal (i. e., master) @code{.newsrc} file.
508
509
510 @node Fetching a Group
511 @section Fetching a Group
512
513 @findex gnus-fetch-group
514 It it sometime convenient to be able to just say ``I want to read this
515 group and I don't care whether Gnus has been started or not''.  This is
516 perhaps more useful for people who write code than for users, but the
517 command @code{gnus-fetch-group} provides this functionality in any case.
518 It takes the group name as a parameter.
519
520
521 @node New Groups
522 @section New Groups
523 @cindex new groups
524
525 @vindex gnus-subscribe-newsgroup-method
526 What Gnus does when it encounters a new group is determined by the
527 @code{gnus-subscribe-newsgroup-method} variable.
528
529 This variable should contain a function.  Some handy pre-fab values
530 are:
531
532 @table @code
533
534 @item gnus-subscribe-zombies
535 @vindex gnus-subscribe-zombies
536 Make all new groups zombies.  You can browse the zombies later (with
537 @kbd{A z}) and either kill them all off properly, or subscribe to them.
538 This is the default.
539
540 @item gnus-subscribe-randomly
541 @vindex gnus-subscribe-randomly
542 Subscribe all new groups randomly.
543
544 @item gnus-subscribe-alphabetically
545 @vindex gnus-subscribe-alphabetically
546 Subscribe all new groups alphabetically.
547
548 @item gnus-subscribe-hierarchically
549 @vindex gnus-subscribe-hierarchically
550 Subscribe all new groups hierarchically.  The difference between this
551 function and @code{gnus-subscribe-alphabetically} is slight.
552 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
553 alphabetical fashion, while this function will enter groups into it's
554 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
555 @samp{comp} hierarchy, this function will not mess that configuration
556 up.  Or something like that.
557
558 @item gnus-subscribe-interactively
559 @vindex gnus-subscribe-interactively
560 Subscribe new groups interactively.  This means that Gnus will ask
561 you about @strong{all} new groups.
562
563 @item gnus-subscribe-killed
564 @vindex gnus-subscribe-killed
565 Kill all new groups.
566
567 @end table
568
569 @vindex gnus-subscribe-hierarchical-interactive
570 A closely related variable is
571 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
572 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
573 hierarchical fashion whether to subscribe to new groups or not.  Gnus
574 will ask you for each sub-hierarchy whether you want to descend the
575 hierarchy or not.  
576
577 One common mistake is to set the variable a few paragraphs above to
578 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
579 will not work.  This is ga-ga.  So don't do it.
580
581 A nice and portable way to control which new newsgroups should be
582 subscribed (or ignored) is to put an @dfn{options} line at the start of
583 the @file{.newsrc} file.  Here's an example:
584
585 @example
586 options -n !alt.all !rec.all sci.all
587 @end example
588
589 @vindex gnus-subscribe-options-newsgroup-method
590 This line obviously belongs to a serious-minded intellectual scientific
591 person (or she may just be plain old boring), because it says that all
592 groups that have names beginning with @samp{alt} and @samp{rec} should
593 be ignored, and all groups with names beginning with @samp{sci} should
594 be subscribed.  Gnus will not use the normal subscription method for
595 subscribing these groups.
596 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
597 variable defaults to @code{gnus-subscribe-alphabetically}.
598
599 @vindex gnus-options-not-subscribe
600 @vindex gnus-options-subscribe
601 If you don't want to mess with your @file{.newsrc} file, you can just
602 set the two variables @code{gnus-options-subscribe} and
603 @code{gnus-options-not-subscribe}.  These two variables do exactly the
604 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
605 and if the the new group matches the former, it will be unconditionally
606 subscribed, and if it matches the latter, it will be ignored.
607
608 @vindex gnus-auto-subscribed-groups
609 Yet another variable that meddles here is
610 @code{gnus-auto-subscribed-groups}.  It works exactly like
611 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
612 thought it would be nice to have two of these.  This variable is more
613 meant for setting some ground rules, while the other variable is used
614 more for user fiddling.  By default this variable makes all new groups
615 that come from mail backends (@code{nnml}, @code{nnbabyl},
616 @code{nnfolder}, @code{nnmbox}, and @code{nnmh}) subscribed.  If you
617 don't like that, just set this variable to @code{nil}.
618
619 @vindex gnus-check-new-newsgroups
620 If you are satisfied that you really never want to see any new groups,
621 you could set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
622 also save you some time at startup.  Even if this variable is
623 @code{nil}, you can always subscribe to the new groups just by pressing
624 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
625 is @code{t} by default.
626
627 Gnus normally determines whether a group is new or not by comparing the
628 list of groups from the active file(s) with the lists of subscribed and
629 dead groups.  This isn't a particularly fast method.  If
630 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
631 server for new groups since the last time.  This is both faster &
632 cheaper.  This also means that you can get rid of the list of killed
633 groups altogether, so you may set @code{gnus-save-killed-list} to
634 @code{nil}, which will save time both at startup, at exit, and all over.
635 Saves disk space, too.  Why isn't this the default, then?
636 Unfortunately, not all servers support this command. 
637
638 I bet I know what you're thinking now: How do I find out whether my
639 server supports @code{ask-server}?  No?  Good, because I don't have a
640 fail-safe answer.  I would suggest just setting this variable to
641 @code{ask-server} and see whether any new groups appear within the next
642 few days.  If any do, then it works.  If any don't, then it doesn't
643 work.  I could write a function to make Gnus guess whether the server
644 supports @code{ask-server}, but it would just be a guess.  So I won't.
645 You could @code{telnet} to the server and say @code{HELP} and see
646 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
647 it does, then it might work.  (But there are servers that lists
648 @samp{NEWGROUPS} without supporting the function properly.)
649
650 This variable can also be a list of select methods.  If so, Gnus will
651 issue an @code{ask-server} command to each of the select methods, and
652 subscribe them (or not) using the normal methods.  This might be handy
653 if you are monitoring a few servers for new groups.  A side effect is
654 that startup will take much longer, so you can meditate while waiting.
655 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
656
657
658 @node Changing Servers
659 @section Changing Servers
660
661 Sometimes it is necessary to move from one @sc{nntp} server to another.
662 This happens very rarely, but perhaps you change jobs, or one server is
663 very flake and you want to use another.  
664
665 Changing the server is pretty easy, right?  You just change
666 @code{gnus-select-method} to point to the new server?  
667
668 @emph{Wrong!}
669
670 Article numbers are not (in any way) kept synchronized between different
671 @sc{nntp} servers, and the only way Gnus keeps track of what articles
672 you have read is by keeping track of article numbers.  So when you
673 change @code{gnus-select-method}, your @file{.newsrc} file becomes
674 worthless.  
675
676 Gnus provides a few functions to attempt to translate a @file{.newsrc}
677 file from one server to another.  They all have one thing in
678 common---they take a looong time to run.  You don't want to use these
679 functions more than absolutely necessary.
680
681 @kindex M-x gnus-change-server
682 @findex gnus-change-server
683 If you have access to both servers, Gnus can request the headers for all
684 the articles you have read and compare @code{Message-ID}s and map
685 reads and article marks.  The @kbd{M-x gnus-change-server} command will
686 do this for all your native groups.  It will prompt for the method you
687 want to move to.
688
689 @kindex M-x gnus-group-move-group-to-server
690 @findex gnus-group-move-group-to-server
691 You can also move individual groups with the @kbd{M-x
692 gnus-group-move-group-to-server} command.  This is useful if you want to
693 move a (foreign) group from one server to another.
694
695 @kindex M-x gnus-group-clear-data-on-native-groups
696 @findex gnus-group-clear-data-on-native-groups
697 If you don't have access to both the old and new server, all your marks
698 and read ranges have become worthless.  You can use the @kbd{M-x
699 gnus-group-clear-data-on-native-groups} command to clear out all data
700 that you have on your native groups.  Use with caution.
701
702
703 @node Startup Files
704 @section Startup Files
705 @cindex startup files
706 @cindex .newsrc
707
708 Now, you all know about the @file{.newsrc} file.  All subscription
709 information is traditionally stored in this file.
710
711 Things got a bit more complicated with @sc{gnus}.  In addition to
712 keeping the @file{.newsrc} file updated, it also used a file called
713 @file{.newsrc.el} for storing all the information that didn't fit into
714 the @file{.newsrc} file.  (Actually, it also duplicated everything in
715 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
716 files was the most recently saved, which enabled people to swap between
717 @sc{gnus} and other newsreaders.
718
719 That was kinda silly, so Gnus went one better: In addition to the
720 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
721 @file{.newsrc.eld}.  It will read whichever of these files that are most
722 recent, but it will never write a @file{.newsrc.el} file.
723
724 @vindex gnus-save-newsrc-file
725 You can turn off writing the @file{.newsrc} file by setting
726 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
727 the file and save some space, as well as making exit from Gnus faster.
728 However, this will make it impossible to use other newsreaders than
729 Gnus.  But hey, who would want to, right?
730
731 @vindex gnus-save-killed-list
732 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
733 will not save the list of killed groups to the startup file.  This will
734 save both time (when starting and quitting) and space (on disk).  It
735 will also means that Gnus has no record of what groups are new or old,
736 so the automatic new groups subscription methods become meaningless.
737 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
738 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
739 Groups}).  This variable can also be a regular expression.  If that's
740 the case, remove all groups that do not match this regexp before
741 saving.  This can be useful in certain obscure situations that involve
742 several servers where not all servers support @code{ask-server}.
743
744 @vindex gnus-startup-file
745 The @code{gnus-startup-file} variable says where the startup files are.
746 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
747 file being whatever that one is with a @samp{.eld} appended.
748
749 @vindex gnus-save-newsrc-hook
750 @vindex gnus-save-quick-newsrc-hook
751 @vindex gnus-save-standard-newsrc-hook
752 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
753 files, while @code{gnus-save-quick-newsrc-hook} is called just before
754 saving the @file{.newsrc.eld} file, and
755 @code{gnus-save-standard-newsrc-hook} is called just before saving the
756 @file{.newsrc} file.  The latter two are commonly used to turn version
757 control on or off.  Version control is off by default when saving the
758 startup files.
759
760 @vindex gnus-init-file
761 When Gnus starts, it will read the @code{gnus-init-file} file, which is
762 @file{~/.gnus.el} by default.  This is a normal Emacs Lisp file and can
763 be used to avoid cluttering your @file{.emacs} file with Gnus stuff.
764
765
766 @node Auto Save
767 @section Auto Save
768 @cindex dribble file
769 @cindex auto-save
770
771 Whenever you do something that changes the Gnus data (reading articles,
772 catching up, killing/subscribing groups), the change is added to a
773 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
774 Emacs way.  If your Emacs should crash before you have saved the
775 @file{.newsrc} files, all changes you have made can be recovered from
776 this file.
777
778 If Gnus detects this file at startup, it will ask the user whether to
779 read it.  The auto save file is deleted whenever the real startup file is
780 saved.
781
782 @vindex gnus-use-dribble-file
783 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
784 maintain a dribble buffer.  The default is @code{t}.
785
786 @vindex gnus-dribble-directory
787 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
788 this variable is @code{nil}, which it is by default, Gnus will dribble
789 into the directory where the @file{.newsrc} file is located.  (This is
790 normally the user's home directory.)  The dribble file will get the same
791 file permissions as the @code{.newsrc} file.
792
793
794 @node The Active File
795 @section The Active File
796 @cindex active file
797 @cindex ignored groups
798
799 When Gnus starts, or indeed whenever it tries to determine whether new
800 articles have arrived, it reads the active file.  This is a very large
801 file that lists all the active groups and articles on the server.
802
803 @vindex gnus-ignored-newsgroups
804 Before examining the active file, Gnus deletes all lines that match the
805 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
806 any groups with bogus names, but you can use this variable to make Gnus
807 ignore hierarchies you aren't ever interested in.  However, this is not
808 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
809 Groups} for an overview of other variables that can be used instead.
810
811 @c This variable is
812 @c @code{nil} by default, and will slow down active file handling somewhat
813 @c if you set it to anything else.
814
815 @vindex gnus-read-active-file
816 @c @head
817 The active file can be rather Huge, so if you have a slow network, you
818 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
819 reading the active file.  This variable is @code{t} by default.
820
821 Gnus will try to make do by getting information just on the groups that
822 you actually subscribe to.
823
824 Note that if you subscribe to lots and lots of groups, setting this
825 variable to @code{nil} will probably make Gnus slower, not faster.  At
826 present, having this variable @code{nil} will slow Gnus down
827 considerably, unless you read news over a 2400 baud modem.  
828
829 This variable can also have the value @code{some}.  Gnus will then
830 attempt to read active info only on the subscribed groups.  On some
831 servers this is quite fast (on sparkling, brand new INN servers that
832 support the @code{LIST ACTIVE group} command), on others this isn't fast
833 at all.  In any case, @code{some} should be faster than @code{nil}, and
834 is certainly faster than @code{t} over slow lines.
835
836 If this variable is @code{nil}, Gnus will ask for group info in total
837 lock-step, which isn't very fast.  If it is @code{some} and you use an
838 @sc{nntp} server, Gnus will pump out commands as fast as it can, and
839 read all the replies in one swoop.  This will normally result in better
840 performance, but if the server does not support the aforementioned
841 @code{LIST ACTIVE group} command, this isn't very nice to the server.
842
843 In any case, if you use @code{some} or @code{nil}, you should definitely
844 kill all groups that you aren't interested in to speed things up.
845
846
847 @node Startup Variables
848 @section Startup Variables
849
850 @table @code
851
852 @item gnus-load-hook
853 @vindex gnus-load-hook
854 A hook that is run while Gnus is being loaded.  Note that this hook will
855 normally be run just once in each Emacs session, no matter how many
856 times you start Gnus.
857
858 @item gnus-startup-hook
859 @vindex gnus-startup-hook
860 A hook that is run after starting up Gnus successfully.
861
862 @item gnus-check-bogus-newsgroups
863 @vindex gnus-check-bogus-newsgroups
864 If non-@code{nil}, Gnus will check for and delete all bogus groups at
865 startup.  A @dfn{bogus group} is a group that you have in your
866 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
867 bogus groups can take quite a while, so to save time and resources it's
868 best to leave this option off, and do the checking for bogus groups once
869 in a while from the group buffer instead (@pxref{Group Maintenance}).
870
871 @item gnus-inhibit-startup-message
872 @vindex gnus-inhibit-startup-message
873 If non-@code{nil}, the startup message won't be displayed.  That way,
874 your boss might not notice that you are reading news instead of doing
875 your job as easily.
876
877 @item gnus-no-groups-message
878 @vindex gnus-no-groups-message
879 Message displayed by Gnus when no groups are available.
880 @end table
881
882
883 @node The Group Buffer
884 @chapter The Group Buffer
885 @cindex group buffer
886
887 The @dfn{group buffer} lists all (or parts) of the available groups.  It
888 is the first buffer shown when Gnus starts, and will never be killed as
889 long as Gnus is active.
890
891 @menu
892 * Group Buffer Format::    Information listed and how you can change it.
893 * Group Maneuvering::      Commands for moving in the group buffer.
894 * Selecting a Group::      Actually reading news.
895 * Subscription Commands::  Unsubscribing, killing, subscribing.
896 * Group Levels::           Levels? What are those, then?
897 * Group Score::            A mechanism for finding out what groups you like.
898 * Marking Groups::         You can mark groups for later processing.
899 * Foreign Groups::         Creating and editing groups.
900 * Group Parameters::       Each group may have different parameters set.
901 * Listing Groups::         Gnus can list various subsets of the groups.
902 * Sorting Groups::         Re-arrange the group order.
903 * Group Maintenance::      Maintaining a tidy @file{.newsrc} file.
904 * Browse Foreign Server::  You can browse a server.  See what it has to offer.
905 * Exiting Gnus::           Stop reading news and get some work done.
906 * Group Topics::           A folding group mode divided into topics.
907 * Misc Group Stuff::       Other stuff that you can to do.
908 @end menu
909
910
911 @node Group Buffer Format
912 @section Group Buffer Format
913 @cindex group buffer format
914
915 @menu 
916 * Group Line Specification::       Deciding how the group buffer is to look.
917 * Group Modeline Specification::   The group buffer modeline.
918 * Group Highlighting::             Having nice colors in the group buffer.
919 @end menu
920
921
922 @node Group Line Specification
923 @subsection Group Line Specification
924
925 The default format of the group buffer is nice and dull, but you can
926 make it as exciting and ugly as you feel like.
927
928 Here's a couple of example group lines:
929
930 @example
931      25: news.announce.newusers
932  *    0: alt.fan.andrea-dworkin
933 @end example
934
935 Quite simple, huh?
936
937 You can see that there are 25 unread articles in
938 @samp{news.announce.newusers}.  There are no unread articles, but some
939 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
940 asterisk at the beginning of the line?)
941
942 @vindex gnus-group-line-format
943 You can change that format to whatever you want by fiddling with the
944 @code{gnus-group-line-format} variable.  This variable works along the
945 lines of a @code{format} specification, which is pretty much the same as
946 a @code{printf} specifications, for those of you who use (feh!) C.
947 @xref{Formatting Variables}. 
948
949 The default value that produced those lines above is 
950 @samp{%M%S%5y: %(%g%)\n}.
951
952 There should always be a colon on the line; the cursor always moves to
953 the colon after performing an operation.  Nothing else is required---not
954 even the group name.  All displayed text is just window dressing, and is
955 never examined by Gnus.  Gnus stores all real information it needs using
956 text properties.
957
958 (Note that if you make a really strange, wonderful, spreadsheet-like
959 layout, everybody will believe you are hard at work with the accounting
960 instead of wasting time reading news.)
961
962 Here's a list of all available format characters:
963
964 @table @samp
965
966 @item M    
967 Only marked articles.
968
969 @item S
970 Whether the group is subscribed.
971
972 @item L    
973 Level of subscribedness.
974
975 @item N
976 Number of unread articles.
977
978 @item I
979 Number of dormant articles.
980
981 @item T
982 Number of ticked articles.
983
984 @item R
985 Number of read articles.
986
987 @item t
988 Estimated total number of articles.  (This is really @var{max-number}
989 minus @var{min-number} plus 1.)
990
991 @item y
992 Number of unread, unticked, non-dormant articles.
993
994 @item i
995 Number of ticked and dormant articles.
996
997 @item g
998 Full group name.
999
1000 @item G
1001 Group name.
1002
1003 @item D
1004 Newsgroup description.
1005
1006 @item o
1007 @samp{m} if moderated.
1008
1009 @item O
1010 @samp{(m)} if moderated.
1011
1012 @item s
1013 Select method.
1014
1015 @item n
1016 Select from where.
1017
1018 @item z
1019 A string that looks like @samp{<%s:%n>} if a foreign select method is
1020 used.
1021
1022 @item P
1023 Indentation based on the level of the topic (@pxref{Group Topics}). 
1024
1025 @item c
1026 @vindex gnus-group-uncollapsed-levels
1027 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1028 variable says how many levels to leave at the end of the group name.
1029 The default is @code{1}.
1030
1031 @item u
1032 User defined specifier.  The next character in the format string should
1033 be a letter.  @sc{gnus} will call the function
1034 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1035 following @samp{%u}.  The function will be passed the current headers as
1036 argument.  The function should return a string, which will be inserted
1037 into the buffer just like information from any other specifier.
1038 @end table
1039
1040 @cindex *
1041 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1042 if no info is available---for instance, if it is a non-activated foreign
1043 group, or a bogus (or semi-bogus) native group.
1044
1045
1046 @node Group Modeline Specification
1047 @subsection Group Modeline Specification
1048
1049 @vindex gnus-group-mode-line-format
1050 The mode line can be changed by setting
1051 @code{gnus-group-mode-line-format} (@pxref{Formatting Variables}).  It
1052 doesn't understand that many format specifiers:
1053
1054 @table @samp
1055 @item S
1056 The native news server.
1057 @item M
1058 The native select method.
1059 @end table
1060
1061
1062 @node Group Highlighting
1063 @subsection Group Highlighting
1064
1065 @vindex gnus-group-highlight
1066 Highlighting in the group buffer is controlled by the
1067 @code{gnus-group-highlight} variable.  This is an alist with elements
1068 that look like @var{(form . face)}.  If @var{form} evaluates to
1069 something non-@code{nil}, the @var{face} will be used on the line.
1070
1071 Here's an example value for this variable that might look nice if the
1072 background is dark:
1073
1074 @lisp
1075 (setq gnus-group-highlight
1076     `(((> unread 200) . 
1077        ,(custom-face-lookup "Red" nil nil t nil nil))
1078       ((and (< level 3) (zerop unread)) . 
1079        ,(custom-face-lookup "SeaGreen" nil nil t nil nil))
1080       ((< level 3) . 
1081        ,(custom-face-lookup "SpringGreen" nil nil t nil nil))
1082       ((zerop unread) . 
1083        ,(custom-face-lookup "SteelBlue" nil nil t nil nil))
1084       (t . 
1085        ,(custom-face-lookup "SkyBlue" nil nil t nil nil))
1086       ))
1087 @end lisp
1088
1089 Variables that are dynamically bound when the forms are evaluated
1090 include:
1091
1092 @table @code
1093 @item group
1094 The group name.
1095 @item unread
1096 The number of unread articles in the group.
1097 @item method
1098 The select method.
1099 @item mailp
1100 Whether the group is a mail group.
1101 @item level
1102 The level of the group.
1103 @item score
1104 The score of the group.
1105 @item ticked 
1106 The number of ticked articles in the group.
1107 @item total
1108 The total number of articles in the group.  Or rather, MAX-NUMBER minus
1109 MIN-NUMBER.
1110 @item topic
1111 When using the topic minor mode, this variable is bound to the current
1112 topic being inserted.
1113 @end table
1114
1115 When the forms are @code{eval}ed, point is at the beginning of the line
1116 of the group in question, so you can use many of the normal Gnus
1117 functions for snarfing info on the group.
1118
1119 @vindex gnus-group-update-hook
1120 @findex gnus-group-highlight-line
1121 @code{gnus-group-update-hook} is called when a group line is changed.
1122 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1123 calls @code{gnus-group-highlight-line} by default.
1124
1125
1126 @node Group Maneuvering
1127 @section Group Maneuvering
1128 @cindex group movement
1129
1130 All movement commands understand the numeric prefix and will behave as
1131 expected, hopefully. 
1132
1133 @table @kbd
1134
1135 @item n
1136 @kindex n (Group)
1137 @findex gnus-group-next-unread-group
1138 Go to the next group that has unread articles
1139 (@code{gnus-group-next-unread-group}).
1140
1141 @item p
1142
1143 @itemx DEL
1144 @kindex DEL (Group)
1145 @kindex p (Group)
1146 @findex gnus-group-prev-unread-group
1147 Go to the previous group group that has unread articles
1148 (@code{gnus-group-prev-unread-group}).
1149
1150 @item N
1151 @kindex N (Group)
1152 @findex gnus-group-next-group
1153 Go to the next group (@code{gnus-group-next-group}).
1154
1155 @item P
1156 @kindex P (Group)
1157 @findex gnus-group-prev-group
1158 Go to the previous group (@code{gnus-group-prev-group}).
1159
1160 @item M-p
1161 @kindex M-p (Group)
1162 @findex gnus-group-next-unread-group-same-level
1163 Go to the next unread group on the same level (or lower)
1164 (@code{gnus-group-next-unread-group-same-level}). 
1165
1166 @item M-n
1167 @kindex M-n (Group)
1168 @findex gnus-group-prev-unread-group-same-level
1169 Go to the previous unread group on the same level (or lower)
1170 (@code{gnus-group-prev-unread-group-same-level}). 
1171 @end table
1172
1173 Three commands for jumping to groups:
1174
1175 @table @kbd
1176
1177 @item j
1178 @kindex j (Group)
1179 @findex gnus-group-jump-to-group
1180 Jump to a group (and make it visible if it isn't already)
1181 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
1182 like living groups.
1183
1184 @item ,
1185 @kindex , (Group)
1186 @findex gnus-group-best-unread-group
1187 Jump to the unread group with the lowest level
1188 (@code{gnus-group-best-unread-group}). 
1189
1190 @item .
1191 @kindex . (Group)
1192 @findex gnus-group-first-unread-group
1193 Jump to the first group with unread articles
1194 (@code{gnus-group-first-unread-group}).  
1195 @end table
1196
1197 @vindex gnus-group-goto-unread
1198 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
1199 commands will move to the next group, not the next unread group.  Even
1200 the commands that say they move to the next unread group.  The default
1201 is @code{t}.
1202
1203
1204 @node Selecting a Group
1205 @section Selecting a Group
1206 @cindex group selection
1207
1208 @table @kbd
1209
1210 @item SPACE
1211 @kindex SPACE (Group)
1212 @findex gnus-group-read-group
1213 Select the current group, switch to the summary buffer and display the
1214 first unread article (@code{gnus-group-read-group}).  If there are no
1215 unread articles in the group, or if you give a non-numerical prefix to
1216 this command, Gnus will offer to fetch all the old articles in this
1217 group from the server.  If you give a numerical prefix @var{N}, Gnus
1218 will fetch @var{N} number of articles.  If @var{N} is positive, fetch
1219 the @var{N} newest articles, if @var{N} is negative, fetch the
1220 @var{abs(N)} oldest articles.
1221
1222 @item RET
1223 @kindex RET (Group)
1224 @findex gnus-group-select-group
1225 Select the current group and switch to the summary buffer
1226 (@code{gnus-group-select-group}).  Takes the same arguments as
1227 @code{gnus-group-read-group}---the only difference is that this command
1228 does not display the first unread article automatically upon group
1229 entry. 
1230
1231 @item M-RET
1232 @kindex M-RET (Group)
1233 @findex gnus-group-quick-select-group
1234 This does the same as the command above, but tries to do it with the
1235 minimum amount off fuzz (@code{gnus-group-quick-select-group}).  No
1236 scoring/killing will be performed, there will be no highlights and no
1237 expunging.  This might be useful if you're in a real hurry and have to
1238 enter some humongous group.
1239
1240 @item M-SPACE
1241 @kindex M-RET (Group)
1242 @findex gnus-group-visible-select-group
1243 This is yet one more command that does the same as the one above, but
1244 this one does it without expunging and hiding dormants
1245 (@code{gnus-group-visible-select-group}).  
1246
1247 @item c
1248 @kindex c (Group)
1249 @findex gnus-group-catchup-current
1250 @vindex gnus-group-catchup-group-hook
1251 Mark all unticked articles in this group as read
1252 (@code{gnus-group-catchup-current}).
1253 @code{gnus-group-catchup-group-hook} is when catching up a group from
1254 the group buffer.
1255
1256 @item C
1257 @kindex C (Group)
1258 @findex gnus-group-catchup-current-all
1259 Mark all articles in this group, even the ticked ones, as read
1260 (@code{gnus-group-catchup-current-all}).   
1261
1262 @item M-c
1263 @kindex M-c (Group)
1264 @findex gnus-group-clear-data
1265 Clear the data from the current group---nix out marks and the list of
1266 read articles (@code{gnus-group-clear-data}).
1267
1268 @item M-x gnus-group-clear-data-on-native-groups
1269 @kindex M-x gnus-group-clear-data-on-native-groups
1270 @findex gnus-group-clear-data-on-native-groups
1271 If you have switced from one @sc{nntp} server to another, all your marks
1272 and read ranges have become worthless.  You can use this command to
1273 clear out all data that you have on your native groups.  Use with
1274 caution. 
1275
1276 @end table
1277
1278 @vindex gnus-large-newsgroup
1279 The @code{gnus-large-newsgroup} variable says what Gnus should consider
1280 to be a big group.  This is 200 by default.  If the group has more
1281 unread articles than this, Gnus will query the user before entering the
1282 group.  The user can then specify how many articles should be fetched
1283 from the server.  If the user specifies a negative number (@code{-n}),
1284 the @code{n} oldest articles will be fetched.  If it is positive, the
1285 @code{n} articles that have arrived most recently will be fetched.
1286
1287 @vindex gnus-select-group-hook
1288 @vindex gnus-auto-select-first
1289 @code{gnus-auto-select-first} control whether any articles are selected
1290 automatically when entering a group.  
1291
1292 @table @code
1293
1294 @item nil
1295 Don't select any articles when entering the group.  Just display the
1296 full summary buffer.
1297
1298 @item t
1299 Select the first unread article when entering the group.  
1300
1301 @item best
1302 Select the most high-scored article in the group when entering the
1303 group. 
1304 @end table
1305         
1306 If you want to prevent automatic selection in some group (say, in a
1307 binary group with Huge articles) you can set this variable to @code{nil}
1308 in @code{gnus-select-group-hook}, which is called when a group is
1309 selected.
1310
1311
1312 @node Subscription Commands
1313 @section Subscription Commands
1314 @cindex subscribing
1315
1316 @table @kbd
1317
1318 @item S t
1319 @itemx u
1320 @kindex S t (Group)
1321 @kindex u (Group)
1322 @findex gnus-group-unsubscribe-current-group
1323 Toggle subscription to the current group
1324 (@code{gnus-group-unsubscribe-current-group}).  
1325
1326 @item S s
1327 @itemx U
1328 @kindex S s (Group)
1329 @kindex U (Group)
1330 @findex gnus-group-unsubscribe-group
1331 Prompt for a group to subscribe, and then subscribe it.  If it was
1332 subscribed already, unsubscribe it instead
1333 (@code{gnus-group-unsubscribe-group}).
1334
1335 @item S k
1336 @itemx C-k
1337 @kindex S k (Group)
1338 @kindex C-k (Group)
1339 @findex gnus-group-kill-group
1340 Kill the current group (@code{gnus-group-kill-group}).
1341
1342 @item S y
1343 @itemx C-y
1344 @kindex S y (Group)
1345 @kindex C-y (Group)
1346 @findex gnus-group-yank-group
1347 Yank the last killed group (@code{gnus-group-yank-group}).
1348
1349 @item C-x C-t
1350 @kindex C-x C-t (Group)
1351 @findex gnus-group-transpose-groups
1352 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
1353 really a subscription command, but you can use it instead of a
1354 kill-and-yank sequence sometimes.
1355
1356 @item S w
1357 @itemx C-w
1358 @kindex S w (Group)
1359 @kindex C-w (Group)
1360 @findex gnus-group-kill-region
1361 Kill all groups in the region (@code{gnus-group-kill-region}). 
1362
1363 @item S z
1364 @kindex S z (Group)
1365 @findex gnus-group-kill-all-zombies
1366 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
1367
1368 @item S C-k
1369 @kindex S C-k (Group)
1370 @findex gnus-group-kill-level
1371 Kill all groups on a certain level (@code{gnus-group-kill-level}).
1372 These groups can't be yanked back after killing, so this command should
1373 be used with some caution.  The only thing where this command comes in
1374 really handy is when you have a @file{.newsrc} with lots of unsubscribed
1375 groups that you want to get rid off.  @kbd{S C-k} on level @code{7} will
1376 kill off all unsubscribed groups that do not have message numbers in the
1377 @file{.newsrc} file.  
1378
1379 @end table
1380
1381 Also @pxref{Group Levels}.
1382
1383
1384 @node Group Levels
1385 @section Group Levels
1386 @cindex group level
1387
1388 All groups have a level of @dfn{subscribedness}.  For instance, if a
1389 group is on level 2, it is more subscribed than a group on level 5.  You
1390 can ask Gnus to just list groups on a given level or lower
1391 (@pxref{Listing Groups}), or to just check for new articles in groups on
1392 a given level or lower (@pxref{Scanning New Messages}).
1393
1394 Remember:  The higher the level of the group, the less important it is. 
1395
1396 @table @kbd
1397
1398 @item S l
1399 @kindex S l (Group)
1400 @findex gnus-group-set-current-level
1401 Set the level of the current group.  If a numeric prefix is given, the
1402 next @var{n} groups will have their levels set.  The user will be
1403 prompted for a level.
1404 @end table
1405
1406 @vindex gnus-level-killed
1407 @vindex gnus-level-zombie
1408 @vindex gnus-level-unsubscribed
1409 @vindex gnus-level-subscribed
1410 Gnus considers groups on between levels 1 and
1411 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
1412 @code{gnus-level-subscribed} (exclusive) and
1413 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
1414 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
1415 (default 8) and @code{gnus-level-killed} to be killed (default 9),
1416 completely dead.  Gnus treats subscribed and unsubscribed groups exactly
1417 the same, but zombie and killed groups have no information on what
1418 articles you have read, etc, stored.  This distinction between dead and
1419 living groups isn't done because it is nice or clever, it is done purely
1420 for reasons of efficiency.
1421
1422 It is recommended that you keep all your mail groups (if any) on quite
1423 low levels (eg. 1 or 2).
1424
1425 If you want to play with the level variables, you should show some care.
1426 Set them once, and don't touch them ever again.  Better yet, don't touch
1427 them at all unless you know exactly what you're doing.
1428
1429 @vindex gnus-level-default-unsubscribed
1430 @vindex gnus-level-default-subscribed
1431 Two closely related variables are @code{gnus-level-default-subscribed}
1432 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
1433 which are the levels that new groups will be put on if they are
1434 (un)subscribed.  These two variables should, of course, be inside the
1435 relevant legal ranges.
1436
1437 @vindex gnus-keep-same-level
1438 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
1439 will only move to groups that are of the same level (or lower).  In
1440 particular, going from the last article in one group to the next group
1441 will go to the next group of the same level (or lower).  This might be
1442 handy if you want to read the most important groups before you read the
1443 rest.
1444
1445 @vindex gnus-group-default-list-level
1446 All groups with a level less than or equal to
1447 @code{gnus-group-default-list-level} will be listed in the group buffer
1448 by default.
1449
1450 @vindex gnus-group-list-inactive-groups
1451 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
1452 groups will be listed along with the unread groups.  This variable is
1453 @code{t} by default.  If it is @code{nil}, inactive groups won't be
1454 listed. 
1455
1456 @vindex gnus-group-use-permanent-levels
1457 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
1458 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
1459 use this level as the ``work'' level.
1460
1461 @vindex gnus-activate-level
1462 Gnus will normally just activate groups that are on level
1463 @code{gnus-activate-level} or less.  If you don't want to activate
1464 unsubscribed groups, for instance, you might set this variable to
1465 @code{5}. 
1466
1467
1468 @node Group Score
1469 @section Group Score
1470 @cindex group score
1471
1472 You would normally keep important groups on high levels, but that scheme
1473 is somewhat restrictive.  Don't you wish you could have Gnus sort the
1474 group buffer according to how often you read groups, perhaps?  Within
1475 reason?  
1476
1477 This is what @dfn{group score} is for.  You can assign a score to each
1478 group.  You can then sort the group buffer based on this score.
1479 Alternatively, you can sort on score and then level.  (Taken together,
1480 the level and the score is called the @dfn{rank} of the group.  A group
1481 that is on level 4 and has a score of 1 has a higher rank than a group
1482 on level 5 that has a score of 300.  (The level is the most significant
1483 part and the score is the least significant part.)
1484
1485 @findex gnus-summary-bubble-group
1486 If you want groups you read often to get higher scores than groups you
1487 read seldom you can add the @code{gnus-summary-bubble-group} function to
1488 the @code{gnus-summary-exit-hook} hook.  This will result (after
1489 sorting) in a bubbling sort of action.  If you want to see that in
1490 action after each summary exit, you can add
1491 @code{gnus-group-sort-groups-by-rank} or
1492 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
1493 slow things down somewhat.
1494
1495
1496 @node Marking Groups
1497 @section Marking Groups
1498 @cindex marking groups
1499
1500 If you want to perform some command on several groups, and they appear
1501 subsequently in the group buffer, you would normally just give a
1502 numerical prefix to the command.  Most group commands will then do your
1503 bidding on those groups.
1504
1505 However, if the groups are not in sequential order, you can still
1506 perform a command on several groups.  You simply mark the groups first
1507 with the process mark and then execute the command.
1508
1509 @table @kbd
1510
1511 @item #
1512 @kindex # (Group)
1513 @itemx M m
1514 @kindex M m (Group)
1515 @findex gnus-group-mark-group
1516 Set the mark on the current group (@code{gnus-group-mark-group}). 
1517
1518 @item M-#
1519 @kindex M-# (Group)
1520 @itemx M u
1521 @kindex M u (Group)
1522 @findex gnus-group-unmark-group
1523 Remove the mark from the current group
1524 (@code{gnus-group-unmark-group}). 
1525
1526 @item M U
1527 @kindex M U (Group)
1528 @findex gnus-group-unmark-all-groups
1529 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}). 
1530
1531 @item M w
1532 @kindex M w (Group)
1533 @findex gnus-group-mark-region
1534 Mark all groups between point and mark (@code{gnus-group-mark-region}). 
1535
1536 @item M b
1537 @kindex M b (Group)
1538 @findex gnus-group-mark-buffer
1539 Mark all groups in the buffer (@code{gnus-group-mark-buffer}). 
1540
1541 @item M r
1542 @kindex M r (Group)
1543 @findex gnus-group-mark-regexp
1544 Mark all groups that match some regular expression
1545 (@code{gnus-group-mark-regexp}).  
1546 @end table
1547
1548 Also @pxref{Process/Prefix}.
1549
1550 @findex gnus-group-universal-argument
1551 If you want to execute some command on all groups that have been marked
1552 with the process mark, you can use the @kbd{M-&}
1553 (@code{gnus-group-universal-argument}) command.  It will prompt you for
1554 the command to be executed.
1555
1556
1557 @node Foreign Groups
1558 @section Foreign Groups
1559
1560 Below are some group mode commands for making and editing general foreign
1561 groups, as well as commands to ease the creation of a few
1562 special-purpose groups.  All these commands insert the newly created
1563 groups under point---@code{gnus-subscribe-newsgroup-method} is not
1564 consulted.
1565
1566 @table @kbd
1567
1568 @item G m
1569 @kindex G m (Group)
1570 @findex gnus-group-make-group
1571 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
1572 for a name, a method and possibly an @dfn{address}.  For an easier way
1573 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
1574
1575 @item G r
1576 @kindex G r (Group)
1577 @findex gnus-group-rename-group
1578 Rename the current group to something else
1579 (@code{gnus-group-rename-group}).  This is legal only on some
1580 groups---mail groups mostly.  This command might very well be quite slow
1581 on some backends.
1582
1583 @item G e
1584 @kindex G e (Group)
1585 @findex gnus-group-edit-group-method
1586 Enter a buffer where you can edit the select method of the current
1587 group (@code{gnus-group-edit-group-method}).
1588
1589 @item G p
1590 @kindex G p (Group)
1591 @findex gnus-group-edit-group-parameters
1592 Enter a buffer where you can edit the group parameters
1593 (@code{gnus-group-edit-group-parameters}). 
1594
1595 @item G E
1596 @kindex G E (Group)
1597 @findex gnus-group-edit-group
1598 Enter a buffer where you can edit the group info
1599 (@code{gnus-group-edit-group}).
1600
1601 @item G d
1602 @kindex G d (Group)
1603 @findex gnus-group-make-directory-group
1604 Make a directory group (@pxref{Directory Groups}).  You will be prompted
1605 for a directory name (@code{gnus-group-make-directory-group}).
1606
1607 @item G h 
1608 @kindex G h (Group)
1609 @findex gnus-group-make-help-group
1610 Make the Gnus help group (@code{gnus-group-make-help-group}).
1611
1612 @item G a
1613 @kindex G a (Group)
1614 @findex gnus-group-make-archive-group
1615 @vindex gnus-group-archive-directory
1616 @vindex gnus-group-recent-archive-directory
1617 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
1618 default a group pointing to the most recent articles will be created
1619 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
1620 group will be created from @code{gnus-group-archive-directory}.
1621
1622 @item G k
1623 @kindex G k (Group)
1624 @findex gnus-group-make-kiboze-group
1625 Make a kiboze group.  You will be prompted for a name, for a regexp to
1626 match groups to be ``included'' in the kiboze group, and a series of
1627 strings to match on headers (@code{gnus-group-make-kiboze-group}).
1628 @xref{Kibozed Groups}
1629
1630 @item G D
1631 @kindex G D (Group)
1632 @findex gnus-group-enter-directory
1633 Read an arbitrary directory as if with were a newsgroup with the
1634 @code{nneething} backend (@code{gnus-group-enter-directory}).
1635 @xref{Anything Groups}. 
1636
1637 @item G f
1638 @kindex G f (Group)
1639 @findex gnus-group-make-doc-group
1640 @cindex ClariNet Briefs
1641 Make a group based on some file or other
1642 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
1643 command, you will be prompted for a file name and a file type.
1644 Currently supported types are @code{babyl}, @code{mbox}, @code{digest},
1645 @code{mmdf}, @code{news}, @code{rnews}, @code{clari-briefs}, and
1646 @code{forward}.  If you run this command without a prefix, Gnus will
1647 guess at the file type.  @xref{Document Groups}.
1648
1649 @item G DEL
1650 @kindex G DEL (Group)
1651 @findex gnus-group-delete-group
1652 This function will delete the current group
1653 (@code{gnus-group-delete-group}).  If given a prefix, this function will
1654 actually delete all the articles in the group, and forcibly remove the
1655 group itself from the face of the Earth.  Use a prefix only if you are
1656 absolutely sure of what you are doing.
1657
1658 @item G V
1659 @kindex G V (Group)
1660 @findex gnus-group-make-empty-virtual
1661 Make a new, fresh, empty @code{nnvirtual} group
1662 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
1663
1664 @item G v
1665 @kindex G v (Group)
1666 @findex gnus-group-add-to-virtual
1667 Add the current group to an @code{nnvirtual} group
1668 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
1669 @end table
1670
1671 @xref{Select Methods} for more information on the various select
1672 methods. 
1673
1674 @vindex gnus-activate-foreign-newsgroups
1675 If the @code{gnus-activate-foreign-newsgroups} is a positive number,
1676 Gnus will check all foreign groups with this level or lower at startup.
1677 This might take quite a while, especially if you subscribe to lots of
1678 groups from different @sc{nntp} servers.
1679
1680
1681 @node Group Parameters
1682 @section Group Parameters
1683 @cindex group parameters
1684
1685 Gnus stores all information on a group in a list that is usually known
1686 as the @dfn{group info}.  This list has from three to six elements.
1687 Here's an example info.
1688
1689 @lisp
1690 ("nnml:mail.ding" 3 ((1 . 232) 244 (256 . 270)) ((tick 246 249))
1691                   (nnml "private") ((to-address . "ding@@ifi.uio.no")))
1692 @end lisp
1693
1694 The first element is the @dfn{group name}, as Gnus knows the group,
1695 anyway.  The second element is the @dfn{subscription level}, which
1696 normally is a small integer.  The third element is a list of ranges of
1697 read articles.  The fourth element is a list of lists of article marks
1698 of various kinds.  The fifth element is the select method (or virtual
1699 server, if you like).  The sixth element is a list of @dfn{group
1700 parameters}, which is what this section is about.
1701
1702 Any of the last three elements may be missing if they are not required.
1703 In fact, the vast majority of groups will normally only have the first
1704 three elements, which saves quite a lot of cons cells.
1705
1706 The group parameters store information local to a particular group:
1707
1708 @table @code
1709 @item to-address
1710 @cindex to-address
1711 If the group parameter list contains an element that looks like
1712 @code{(to-address .  "some@@where.com")}, that address will be used by
1713 the backend when doing followups and posts.  This is primarily useful in
1714 mail groups that represent closed mailing lists---mailing lists where
1715 it's expected that everybody that writes to the mailing list is
1716 subscribed to it.  Since using this parameter ensures that the mail only
1717 goes to the mailing list itself, it means that members won't receive two
1718 copies of your followups.
1719
1720 Using @code{to-address} will actually work whether the group is foreign
1721 or not.  Let's say there's a group on the server that is called
1722 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
1723 the articles from a mail-to-news gateway.  Posting directly to this
1724 group is therefore impossible---you have to send mail to the mailing
1725 list address instead. 
1726
1727 @item to-list
1728 @cindex to-list
1729 If the group parameter list has an element that looks like
1730 @code{(to-list . "some@@where.com")}, that address will be used when
1731 doing a @kbd{a} in any group.  It is totally ignored when doing a
1732 followup---except that if it is present in a news group, you'll get mail
1733 group semantics when doing @kbd{f}.
1734
1735 @item broken-reply-to
1736 @cindex broken-reply-to
1737 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
1738 headers in this group are to be ignored.  This can be useful if you're
1739 reading a mailing list group where the listserv has inserted
1740 @code{Reply-To} headers that point back to the listserv itself.  This is
1741 broken behavior.  So there!
1742
1743 @item to-group
1744 @cindex to-group
1745 If the group parameter list contains an element like @code{(to-group
1746 . "some.group.name")}, all posts will be sent to that group.
1747
1748 @item gcc-self
1749 @cindex gcc-self
1750 If this symbol is present in the group parameter list, new composed
1751 messages will be @code{Gcc}'d to the current group.  
1752
1753 @item auto-expire
1754 @cindex auto-expire
1755 If this symbol is present in the group parameter list, all articles that
1756 are read will be marked as expirable.  For an alternative approach,
1757 @pxref{Expiring Mail}.
1758
1759 @item total-expire
1760 @cindex total-expire
1761 If this symbol is present, all read articles will be put through the
1762 expiry process, even if they are not marked as expirable.  Use with
1763 caution. 
1764
1765 @item expiry-wait
1766 @cindex expiry-wait
1767 @vindex nnmail-expiry-wait-function
1768 If the group parameter has an element that looks like @code{(expiry-wait
1769 . 10)}, this value will override any @code{nnmail-expiry-wait} and
1770 @code{nnmail-expiry-wait-function} when expiring expirable messages.
1771 The value can either be a number of days (not necessarily an integer) or
1772 the symbols @code{never} or @code{immediate}.
1773
1774 @item score-file
1775 @cindex score file group parameter
1776 Elements that look like @code{(score-file . "file")} will make
1777 @file{file} into the current score file for the group in question.  This
1778 means that all score commands you issue will end up in that file. 
1779
1780 @item adapt-file
1781 @cindex adapt file group parameter
1782 Elements that look like @code{(adapt-file . "file")} will make
1783 @file{file} into the current adaptive file for the group in question.
1784 All adaptive score entries will be put into this file.
1785
1786 @item admin-address
1787 When unsubscribing to a mailing list you should never send the
1788 unsubscription notice to the mailing list itself.  Instead, you'd send
1789 messages to the administrative address.  This parameter allows you to
1790 put the admin address somewhere convenient.
1791
1792 @item comment
1793 This parameter allows you to enter a arbitrary comment on the group.
1794
1795 @item @var{(variable form)}
1796 You can use the group parameters to set variables local to the group you
1797 are entering.  Say you want to turn threading off in
1798 @samp{news.answers}.  You'd then put @code{(gnus-show-threads nil)} in
1799 the group parameters of that group.  @code{gnus-show-threads} will be
1800 made into a local variable in the summary buffer you enter, and the form
1801 @code{nil} will be @code{eval}ed there.  
1802
1803 This can also be used as a group-specific hook function, if you'd like.
1804 If you want to hear a beep when you enter the group
1805 @samp{alt.binaries.pictures.furniture}, you could put something like
1806 @code{(dummy-variable (ding))} in the parameters of that group.
1807 @code{dummy-variable} will be set to the result of the @code{(ding)}
1808 form, but who cares?
1809
1810 @end table
1811
1812 Use the @kbd{G p} command to edit group parameters of a group.
1813
1814 Also @xref{Topic Parameters}.
1815
1816
1817 @node Listing Groups
1818 @section Listing Groups
1819 @cindex group listing
1820
1821 These commands all list various slices of the groups that are available.
1822
1823 @table @kbd
1824
1825 @item l
1826 @itemx A s
1827 @kindex A s (Group)
1828 @kindex l (Group)
1829 @findex gnus-group-list-groups
1830 List all groups that have unread articles
1831 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
1832 command will list only groups of level ARG and lower.  By default, it
1833 only lists groups of level five or lower (i.e., just subscribed groups).
1834
1835 @item L
1836 @itemx A u
1837 @kindex A u (Group)
1838 @kindex L (Group)
1839 @findex gnus-group-list-all-groups
1840 List all groups, whether they have unread articles or not
1841 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
1842 this command will list only groups of level ARG and lower.  By default,
1843 it lists groups of level seven or lower (i.e., just subscribed and
1844 unsubscribed groups).
1845
1846 @item A l
1847 @kindex A l (Group)
1848 @findex gnus-group-list-level
1849 List all unread groups on a specific level
1850 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
1851 with no unread articles.
1852
1853 @item A k
1854 @kindex A k (Group)
1855 @findex gnus-group-list-killed
1856 List all killed groups (@code{gnus-group-list-killed}).  If given a
1857 prefix argument, really list all groups that are available, but aren't
1858 currently (un)subscribed.  This could entail reading the active file
1859 from the server.
1860
1861 @item A z
1862 @kindex A z (Group)
1863 @findex gnus-group-list-zombies
1864 List all zombie groups (@code{gnus-group-list-zombies}).
1865
1866 @item A m
1867 @kindex A m (Group)
1868 @findex gnus-group-list-matching
1869 List all unread, subscribed groups with names that match a regexp
1870 (@code{gnus-group-list-matching}). 
1871
1872 @item A M
1873 @kindex A M (Group)
1874 @findex gnus-group-list-all-matching
1875 List groups that match a regexp (@code{gnus-group-list-all-matching}).
1876
1877 @item A A
1878 @kindex A A (Group)
1879 @findex gnus-group-list-active
1880 List absolutely all groups that are in the active file(s) of the
1881 server(s) you are connected to (@code{gnus-group-list-active}).  This
1882 might very well take quite a while.  It might actually be a better idea
1883 to do a @kbd{A m} to list all matching, and just give @samp{.} as the
1884 thing to match on.  Also note that this command may list group that
1885 don't exist (yet)---these will be listed as if they are killed groups.
1886 Take the output with some grains of salt.
1887
1888 @item A a
1889 @kindex A a (Group)
1890 @findex gnus-group-apropos
1891 List all groups that have names that match a regexp
1892 (@code{gnus-group-apropos}).
1893
1894 @item A d
1895 @kindex A d (Group)
1896 @findex gnus-group-description-apropos
1897 List all groups that have names or descriptions that match a regexp
1898 (@code{gnus-group-description-apropos}).
1899
1900 @end table
1901
1902 @vindex gnus-permanently-visible-groups
1903 @cindex visible group parameter
1904 Groups that match the @code{gnus-permanently-visible-groups} regexp will
1905 always be shown, whether they have unread articles or not.  You can also
1906 add the @code{visible} element to the group parameters in question to
1907 get the same effect.
1908
1909 @vindex gnus-list-groups-with-ticked-articles
1910 Groups that have just ticked articles in it are normally listed in the
1911 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
1912 @code{nil}, these groups will be treated just like totally empty
1913 groups.  It is @code{t} by default.
1914
1915
1916 @node Sorting Groups
1917 @section Sorting Groups
1918 @cindex sorting groups
1919
1920 @kindex C-c C-s (Group)
1921 @findex gnus-group-sort-groups
1922 @vindex gnus-group-sort-function
1923 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
1924 group buffer according to the function(s) given by the
1925 @code{gnus-group-sort-function} variable.  Available sorting functions
1926 include: 
1927
1928 @table @code
1929
1930 @item gnus-group-sort-by-alphabet
1931 @findex gnus-group-sort-by-alphabet
1932 Sort the group names alphabetically.  This is the default.
1933
1934 @item gnus-group-sort-by-real-name
1935 @findex gnus-group-sort-by-real-name
1936 Sort the group alphabetically on the real (unprefixed) group names.
1937
1938 @item gnus-group-sort-by-level
1939 @findex gnus-group-sort-by-level
1940 Sort by group level.
1941
1942 @item gnus-group-sort-by-score
1943 @findex gnus-group-sort-by-score
1944 Sort by group score.
1945
1946 @item gnus-group-sort-by-rank
1947 @findex gnus-group-sort-by-rank
1948 Sort by group score and then the group level.  The level and the score
1949 are, when taken together, the group's @dfn{rank}. 
1950
1951 @item gnus-group-sort-by-unread
1952 @findex gnus-group-sort-by-unread
1953 Sort by number of unread articles.
1954
1955 @item gnus-group-sort-by-method
1956 @findex gnus-group-sort-by-method
1957 Sort by alphabetically on the select method.
1958
1959
1960 @end table
1961
1962 @code{gnus-group-sort-function} can also be a list of sorting
1963 functions.  In that case, the most significant sort key function must be
1964 the last one.
1965
1966
1967 There are also a number of commands for sorting directly according to
1968 some sorting criteria:
1969
1970 @table @kbd
1971 @item G S a
1972 @kindex G S a (Group)
1973 @findex gnus-group-sort-groups-by-alphabet
1974 Sort the group buffer alphabetically by group name
1975 (@code{gnus-group-sort-groups-by-alphabet}). 
1976
1977 @item G S u
1978 @kindex G S u (Group)
1979 @findex gnus-group-sort-groups-by-unread
1980 Sort the group buffer by the number of unread articles
1981 (@code{gnus-group-sort-groups-by-unread}).
1982
1983 @item G S l
1984 @kindex G S l (Group)
1985 @findex gnus-group-sort-groups-by-level
1986 Sort the group buffer by group level
1987 (@code{gnus-group-sort-groups-by-level}). 
1988
1989 @item G S v
1990 @kindex G S v (Group)
1991 @findex gnus-group-sort-groups-by-score
1992 Sort the group buffer by group score
1993 (@code{gnus-group-sort-groups-by-score}). 
1994
1995 @item G S r
1996 @kindex G S r (Group)
1997 @findex gnus-group-sort-groups-by-rank
1998 Sort the group buffer by group level
1999 (@code{gnus-group-sort-groups-by-rank}). 
2000
2001 @item G S m
2002 @kindex G S m (Group)
2003 @findex gnus-group-sort-groups-by-method
2004 Sort the group buffer alphabetically by backend name
2005 (@code{gnus-group-sort-groups-by-method}). 
2006
2007 @end table
2008
2009 When given a prefix, all these commands will sort in reverse order. 
2010
2011
2012 @node Group Maintenance
2013 @section Group Maintenance
2014 @cindex bogus groups
2015
2016 @table @kbd
2017 @item b
2018 @kindex b (Group)
2019 @findex gnus-group-check-bogus-groups
2020 Find bogus groups and delete them
2021 (@code{gnus-group-check-bogus-groups}).
2022
2023 @item F
2024 @kindex F (Group)
2025 @findex gnus-find-new-newsgroups
2026 Find new groups and process them (@code{gnus-find-new-newsgroups}).  If
2027 given a prefix, use the @code{ask-server} method to query the server for
2028 new groups.
2029
2030 @item C-c C-x
2031 @kindex C-c C-x (Group)
2032 @findex gnus-group-expire-articles
2033 Run all expirable articles in the current group through the expiry
2034 process (if any) (@code{gnus-group-expire-articles}).
2035
2036 @item C-c M-C-x
2037 @kindex C-c M-C-x (Group)
2038 @findex gnus-group-expire-all-groups
2039 Run all articles in all groups through the expiry process
2040 (@code{gnus-group-expire-all-groups}).
2041
2042 @end table
2043
2044
2045 @node Browse Foreign Server
2046 @section Browse Foreign Server
2047 @cindex foreign servers
2048 @cindex browsing servers
2049
2050 @table @kbd
2051 @item B
2052 @kindex B (Group)
2053 @findex gnus-group-browse-foreign-server
2054 You will be queried for a select method and a server name.  Gnus will
2055 then attempt to contact this server and let you browse the groups there
2056 (@code{gnus-group-browse-foreign-server}).
2057 @end table
2058
2059 @findex gnus-browse-mode
2060 A new buffer with a list of available groups will appear.  This buffer
2061 will be use the @code{gnus-browse-mode}.  This buffer looks a bit
2062 (well, a lot) like a normal group buffer, but with one major difference
2063 - you can't enter any of the groups.  If you want to read any of the
2064 news available on that server, you have to subscribe to the groups you
2065 think may be interesting, and then you have to exit this buffer.  The
2066 new groups will be added to the group buffer, and then you can read them
2067 as you would any other group.
2068
2069 Future versions of Gnus may possibly permit reading groups straight from
2070 the browse buffer.
2071
2072 Here's a list of keystrokes available in the browse mode:
2073
2074 @table @kbd
2075 @item n
2076 @kindex n (Browse)
2077 @findex gnus-group-next-group
2078 Go to the next group (@code{gnus-group-next-group}).
2079
2080 @item p
2081 @kindex p (Browse)
2082 @findex gnus-group-prev-group
2083 Go to the previous group (@code{gnus-group-prev-group}).
2084
2085 @item SPACE
2086 @kindex SPACE (Browse)
2087 @findex gnus-browse-read-group
2088 Enter the current group and display the first article
2089 (@code{gnus-browse-read-group}). 
2090
2091 @item RET
2092 @kindex RET (Browse)
2093 @findex gnus-browse-select-group
2094 Enter the current group (@code{gnus-browse-select-group}). 
2095
2096 @item u
2097 @kindex u (Browse)
2098 @findex gnus-browse-unsubscribe-current-group
2099 Unsubscribe to the current group, or, as will be the case here,
2100 subscribe to it (@code{gnus-browse-unsubscribe-current-group}). 
2101
2102 @item l
2103 @itemx q
2104 @kindex q (Browse)
2105 @kindex l (Browse)
2106 @findex gnus-browse-exit
2107 Exit browse mode (@code{gnus-browse-exit}).
2108
2109 @item ?
2110 @kindex ? (Browse)
2111 @findex gnus-browse-describe-briefly
2112 Describe browse mode briefly (well, there's not much to describe, is
2113 there) (@code{gnus-browse-describe-briefly}).
2114 @end table
2115
2116
2117 @node Exiting Gnus
2118 @section Exiting Gnus
2119 @cindex exiting Gnus
2120
2121 Yes, Gnus is ex(c)iting.
2122
2123 @table @kbd
2124 @item z
2125 @kindex z (Group)
2126 @findex gnus-group-suspend
2127 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
2128 but it kills all buffers except the Group buffer.  I'm not sure why this
2129 is a gain, but then who am I to judge?
2130
2131 @item q
2132 @kindex q (Group)
2133 @findex gnus-group-exit
2134 Quit Gnus (@code{gnus-group-exit}).
2135
2136 @item Q
2137 @kindex Q (Group)
2138 @findex gnus-group-quit
2139 Quit Gnus without saving any startup files (@code{gnus-group-quit}).
2140 @end table
2141
2142 @vindex gnus-exit-gnus-hook
2143 @vindex gnus-suspend-gnus-hook
2144 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
2145 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
2146 @code{gnus-after-exiting-gnus-hook} is called as the final item when
2147 exiting Gnus.
2148
2149 @findex gnus-unload
2150 @cindex unloading
2151 If you wish to completely unload Gnus and all its adherents, you can use
2152 the @code{gnus-unload} command.  This command is also very handy when
2153 trying to customize meta-variables.
2154
2155 Note:
2156
2157 @quotation
2158 Miss Lisa Cannifax, while sitting in English class, feels her feet go
2159 numbly heavy and herself fall into a hazy trance as the boy sitting
2160 behind her drew repeated lines with his pencil across the back of her
2161 plastic chair.
2162 @end quotation
2163
2164
2165 @node Group Topics
2166 @section Group Topics
2167 @cindex topics
2168
2169 If you read lots and lots of groups, it might be convenient to group
2170 them hierarchically according to topics.  You put your Emacs groups over
2171 here, your sex groups over there, and the rest (what, two groups or so?)
2172 you put in some misc section that you never bother with anyway.  You can
2173 even group the Emacs sex groups as a sub-topic to either the Emacs
2174 groups or the sex groups---or both!  Go wild!
2175
2176 @findex gnus-topic-mode
2177 @kindex t (Group)
2178 To get this @emph{fab} functionality you simply turn on (ooh!) the
2179 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
2180 is a toggling command.)
2181
2182 Go ahead, just try it.  I'll still be here when you get back.  La de
2183 dum...  Nice tune, that...  la la la...  What, you're back? Yes, and now
2184 press @kbd{l}.  There.  All your groups are now listed under
2185 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
2186 bothered?
2187
2188 If you want this permanently enabled, you should add that minor mode to
2189 the hook for the group mode:
2190
2191 @lisp
2192 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
2193 @end lisp
2194
2195 @menu 
2196 * Topic Variables::    How to customize the topics the Lisp Way.
2197 * Topic Commands::     Interactive E-Z commands.
2198 * Topic Topology::     A map of the world.
2199 * Topic Parameters::   Parameters that apply to all groups in a topic.
2200 @end menu
2201
2202
2203 @node Topic Variables
2204 @subsection Topic Variables
2205 @cindex topic variables
2206
2207 Now, if you select a topic, if will fold/unfold that topic, which is
2208 really neat, I think.
2209
2210 @vindex gnus-topic-line-format
2211 The topic lines themselves are created according to the
2212 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
2213 Legal elements are:
2214
2215 @table @samp
2216 @item i
2217 Indentation.
2218 @item n
2219 Topic name.
2220 @item v
2221 Visibility.
2222 @item l
2223 Level.
2224 @item g
2225 Number of groups in the topic.
2226 @item a
2227 Number of unread articles in the topic.
2228 @item A 
2229 Number of unread articles in the topic and all its subtopics. 
2230 @end table
2231
2232 @vindex gnus-topic-indent-level
2233 Each sub-topic (and the groups in the sub-topics) will be indented with
2234 @code{gnus-topic-indent-level} times the topic level number of spaces.
2235 The default is @code{2}.
2236
2237 @vindex gnus-topic-mode-hook
2238 @code{gnus-topic-mode-hook} is called in topic minor mode buffers. 
2239
2240
2241 @node Topic Commands
2242 @subsection Topic Commands
2243 @cindex topic commands
2244
2245 When the topic minor mode is turned on, a new @kbd{T} submap will be
2246 available.  In addition, a few of the standard keys change their
2247 definitions slightly.
2248
2249 @table @kbd
2250
2251 @item T n
2252 @kindex T n (Topic)
2253 @findex gnus-topic-create-topic
2254 Prompt for a new topic name and create it 
2255 (@code{gnus-topic-create-topic}). 
2256
2257 @item T m
2258 @kindex T m (Topic)
2259 @findex gnus-topic-move-group
2260 Move the current group to some other topic
2261 (@code{gnus-topic-move-group}).  This command understands the
2262 process/prefix convention (@pxref{Process/Prefix}).
2263
2264 @item T c
2265 @kindex T c (Topic)
2266 @findex gnus-topic-copy-group
2267 Copy the current group to some other topic
2268 (@code{gnus-topic-copy-group}).  This command understands the
2269 process/prefix convention (@pxref{Process/Prefix}).
2270
2271 @item T D
2272 @kindex T D (Topic)
2273 @findex gnus-topic-remove-group
2274 Remove a group from the current topic (@code{gnus-topic-remove-group}).
2275 This command understands the process/prefix convention
2276 (@pxref{Process/Prefix}).
2277
2278 @item T M
2279 @kindex T M (Topic)
2280 @findex gnus-topic-move-matching
2281 Move all groups that match some regular expression to a topic
2282 (@code{gnus-topic-move-matching}). 
2283
2284 @item T C
2285 @kindex T C (Topic)
2286 @findex gnus-topic-copy-matching
2287 Copy all groups that match some regular expression to a topic
2288 (@code{gnus-topic-copy-matching}). 
2289
2290 @item T #
2291 @kindex T # (Topic)
2292 @findex gnus-topic-mark-topic
2293 Mark all groups in the current topic with the process mark
2294 (@code{gnus-topic-mark-topic}). 
2295
2296 @item T M-#
2297 @kindex T M-# (Topic)
2298 @findex gnus-topic-unmark-topic
2299 Remove the process mark from all groups in the current topic
2300 (@code{gnus-topic-unmark-topic}). 
2301
2302 @item RET
2303 @kindex RET (Topic)
2304 @findex gnus-topic-select-group
2305 @itemx SPACE
2306 Either select a group or fold a topic (@code{gnus-topic-select-group}).
2307 When you perform this command on a group, you'll enter the group, as
2308 usual.  When done on a topic line, the topic will be folded (if it was
2309 visible) or unfolded (if it was folded already).  So it's basically a
2310 toggling command on topics.  In addition, if you give a numerical
2311 prefix, group on that level (and lower) will be displayed.
2312
2313 @item T TAB
2314 @kindex T TAB (Topic)
2315 @findex gnus-topic-indent
2316 ``Indent'' the current topic so that it becomes a sub-topic of the
2317 previous topic (@code{gnus-topic-indent}).  If given a prefix,
2318 ``un-indent'' the topic instead.
2319
2320 @item C-k
2321 @kindex C-k (Topic)
2322 @findex gnus-topic-kill-group
2323 Kill a group or topic (@code{gnus-topic-kill-group}).  
2324
2325 @item C-y
2326 @kindex C-y (Topic)
2327 @findex gnus-topic-yank-group
2328 Yank the previously killed group or topic (@code{gnus-topic-yank-group}).
2329 Note that all topics will be yanked before all groups.
2330
2331 @item T r
2332 @kindex T r (Topic)
2333 @findex gnus-topic-rename
2334 Rename a topic (@code{gnus-topic-rename}). 
2335
2336 @item T DEL
2337 @kindex T DEL (Topic)
2338 @findex gnus-topic-delete
2339 Delete an empty topic (@code{gnus-topic-delete}). 
2340
2341 @item A T
2342 @kindex A T (Topic)
2343 @findex gnus-topic-list-active
2344 List all groups that Gnus knows about in a topics-ified way
2345 (@code{gnus-topic-list-active}).
2346
2347 @item G p
2348 @kindex G p (Topic)
2349 @findex gnus-topic-edit-parameters
2350 @cindex group parameters
2351 @cindex topic parameters
2352 @cindex parameters
2353 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
2354 @xref{Topic Parameters}.
2355
2356 @end table
2357
2358
2359 @node Topic Topology
2360 @subsection Topic Topology
2361 @cindex topic topology
2362 @cindex topology
2363
2364 So, let's have a look at an example group buffer:
2365
2366 @example
2367 Gnus
2368   Emacs -- I wuw it!
2369      3: comp.emacs
2370      2: alt.religion.emacs
2371     Naughty Emacs
2372      452: alt.sex.emacs
2373        0: comp.talk.emacs.recovery
2374   Misc
2375      8: comp.binaries.fractals
2376     13: comp.sources.unix
2377 @end example
2378
2379 So, here we have one top-level topic, two topics under that, and one
2380 sub-topic under one of the sub-topics.  (There is always just one (1)
2381 top-level topic).  This topology can be expressed as follows:
2382
2383 @lisp
2384 (("Gnus" visible)
2385  (("Emacs -- I wuw it!" visible) 
2386   (("Naughty Emacs" visible)))
2387  (("Misc" visible)))
2388 @end lisp
2389
2390 @vindex gnus-topic-topology
2391 This is in fact how the variable @code{gnus-topic-topology} would look
2392 for the display above.  That variable is saved in the @file{.newsrc.eld}
2393 file, and shouldn't be messed with manually---unless you really want
2394 to.  Since this variable is read from the @file{.newsrc.eld} file,
2395 setting it in any other startup files will have no effect.  
2396
2397 This topology shows what topics are sub-topics of what topics (right),
2398 and which topics are visible.  Two settings are currently
2399 allowed---@code{visible} and @code{invisible}.
2400
2401
2402 @node Topic Parameters
2403 @subsection Topic Parameters
2404
2405 All groups in a topic will inherit group parameters from the parent (and
2406 ancestor) topic parameters.  All legal group parameters are legal topic
2407 parameters (@pxref{Group Parameters}).  
2408
2409 Group parameters (of course) override topic parameters, and topic
2410 parameters in sub-topics override topic parameters in super-topics.  You
2411 know.  Normal inheretance rules.  (@dfn{Rules} is here a noun, not a
2412 verb, although you may feel free to disagree with me here.)
2413
2414 @example
2415 Gnus
2416   Emacs
2417      3: comp.emacs
2418      2: alt.religion.emacs
2419    452: alt.sex.emacs
2420     Relief
2421      452: alt.sex.emacs
2422        0: comp.talk.emacs.recovery
2423   Misc
2424      8: comp.binaries.fractals
2425     13: comp.sources.unix
2426    452: alt.sex.emacs
2427 @end example
2428
2429 Now, the @samp{Emacs} topic has the topic parameter 
2430 @code{(score-file . "emacs.SCORE")}; the @samp{Relief} topic has the topic
2431 parameter @code{(score-file . "relief.SCORE")}; and the @samp{Misc}
2432 topic has the topic parameter @code{(score-file . "emacs.SCORE")}.  In
2433 addition, @samp{alt.religion.emacs} has the group parameter
2434 @code{(score-file . "religion.SCORE")}.
2435
2436 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
2437 will get the @file{relief.SCORE} home score file.  If you enter the same
2438 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
2439 score file.  If you enter @samp{alt.religion.emacs}, you'll get the
2440 @file{religion.SCORE} home score file.  
2441
2442 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
2443 there are some problems, especially with the @code{total-expiry}
2444 parameter.  Say you have a mail group in two topics; one with
2445 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
2446 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
2447 of these topics you mean to expire articles from, so anything may
2448 happen.  In fact, I hereby declare that it is @dfn{undefined} what
2449 happens.  You just have to be careful if you do stuff like that.
2450
2451
2452 @node Misc Group Stuff
2453 @section Misc Group Stuff
2454
2455 @menu
2456 * Scanning New Messages:: Asking Gnus to see whether new messages have arrived.
2457 * Group Information::     Information and help on groups and Gnus.
2458 * File Commands::         Reading and writing the Gnus files.
2459 @end menu
2460
2461 @table @kbd
2462
2463 @item ^
2464 @kindex ^ (Group)
2465 @findex gnus-group-enter-server-mode
2466 Enter the server buffer (@code{gnus-group-enter-server-mode}). @xref{The
2467 Server Buffer}.
2468
2469 @item a
2470 @kindex a (Group)
2471 @findex gnus-group-post-news
2472 Post an article to a group (@code{gnus-group-post-news}).  The current
2473 group name will be used as the default.
2474
2475 @item m
2476 @kindex m (Group)
2477 @findex gnus-group-mail
2478 Mail a message somewhere (@code{gnus-group-mail}).
2479
2480 @end table
2481
2482 Variables for the group buffer:
2483
2484 @table @code
2485
2486 @item gnus-group-mode-hook
2487 @vindex gnus-group-mode-hook
2488 @code{gnus-group-mode-hook} is called after the group buffer has been
2489 created. 
2490
2491 @item gnus-group-prepare-hook
2492 @vindex gnus-group-prepare-hook
2493 @code{gnus-group-prepare-hook} is called after the group buffer is
2494 generated.  It may be used to modify the buffer in some strange,
2495 unnatural way.
2496
2497 @item gnus-permanently-visible-groups
2498 @vindex gnus-permanently-visible-groups
2499 Groups matching this regexp will always be listed in the group buffer,
2500 whether they are empty or not.
2501
2502 @end table
2503
2504
2505 @node Scanning New Messages
2506 @subsection Scanning New Messages
2507 @cindex new messages
2508 @cindex scanning new news
2509
2510 @table @kbd
2511
2512 @item g
2513 @kindex g (Group)
2514 @findex gnus-group-get-new-news
2515 Check the server(s) for new articles.  If the numerical prefix is used,
2516 this command will check only groups of level @var{arg} and lower
2517 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
2518 command will force a total rereading of the active file(s) from the
2519 backend(s).
2520
2521 @item M-g
2522 @kindex M-g (Group)
2523 @findex gnus-group-get-new-news-this-group
2524 @vindex gnus-goto-next-group-when-activating
2525 Check whether new articles have arrived in the current group
2526 (@code{gnus-group-get-new-news-this-group}).  The
2527 @code{gnus-goto-next-group-when-activating} variable controls whether
2528 this command is to move point to the next group or not.  It is @code{t}
2529 by default.
2530
2531 @findex gnus-activate-all-groups
2532 @cindex activating groups
2533 @item C-c M-g
2534 @kindex C-c M-g (Group)
2535 Activate absolutely all groups (@code{gnus-activate-all-groups}). 
2536
2537 @item R
2538 @kindex R (Group)
2539 @cindex restarting
2540 @findex gnus-group-restart
2541 Restart Gnus (@code{gnus-group-restart}).
2542
2543 @end table
2544
2545 @vindex gnus-get-new-news-hook
2546 @code{gnus-get-new-news-hook} is run just before checking for new news. 
2547
2548 @vindex gnus-after-getting-new-news-hook
2549 @code{gnus-after-getting-new-news-hook} is run after checking for new
2550 news.
2551
2552
2553 @node Group Information
2554 @subsection Group Information
2555 @cindex group information
2556 @cindex information on groups
2557
2558 @table @kbd
2559
2560 @item M-f
2561 @kindex M-f (Group)
2562 @findex gnus-group-fetch-faq
2563 @cindex FAQ
2564 @cindex ange-ftp
2565 Try to fetch the FAQ for the current group
2566 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
2567 @code{gnus-group-faq-directory}, which is usually a directory on a
2568 remote machine.  @code{ange-ftp} will be used for fetching the file.
2569
2570 @item D
2571 @kindex D (Group)
2572 @cindex describing groups
2573 @cindex group description
2574 @findex gnus-group-describe-group
2575 Describe the current group (@code{gnus-group-describe-group}).  If given
2576 a prefix, force Gnus to re-read the description from the server.
2577
2578 @item M-d
2579 @kindex M-d (Group)
2580 @findex gnus-group-describe-all-groups
2581 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
2582 prefix, force Gnus to re-read the description file from the server.
2583
2584 @item V
2585 @kindex V (Group)
2586 @cindex version
2587 @findex gnus-version
2588 Display current Gnus version numbers (@code{gnus-version}).
2589
2590 @item ?
2591 @kindex ? (Group)
2592 @findex gnus-group-describe-briefly
2593 Give a very short help message (@code{gnus-group-describe-briefly}).
2594
2595 @item C-c C-i
2596 @kindex C-c C-i (Group)
2597 @cindex info
2598 @cindex manual
2599 @findex gnus-info-find-node
2600 Go to the Gnus info node (@code{gnus-info-find-node}).
2601 @end table
2602
2603
2604 @node File Commands
2605 @subsection File Commands
2606 @cindex file commands
2607
2608 @table @kbd
2609
2610 @item r
2611 @kindex r (Group)
2612 @findex gnus-group-read-init-file
2613 @vindex gnus-init-file
2614 @cindex reading init file
2615 Read the init file (@code{gnus-init-file}, which defaults to
2616 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
2617
2618 @item s
2619 @kindex s (Group)
2620 @findex gnus-group-save-newsrc
2621 @cindex saving .newsrc
2622 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
2623 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
2624 file(s) whether Gnus thinks it is necessary or not.
2625
2626 @c @item Z
2627 @c @kindex Z (Group)
2628 @c @findex gnus-group-clear-dribble
2629 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
2630
2631 @end table
2632
2633
2634 @node The Summary Buffer
2635 @chapter The Summary Buffer
2636 @cindex summary buffer
2637
2638 A line for each article is displayed in the summary buffer.  You can
2639 move around, read articles, post articles and reply to articles.
2640
2641 @menu
2642 * Summary Buffer Format::       Deciding how the summary buffer is to look.
2643 * Summary Maneuvering::         Moving around the summary buffer.
2644 * Choosing Articles::           Reading articles.
2645 * Paging the Article::          Scrolling the current article.
2646 * Reply Followup and Post::     Posting articles.
2647 * Canceling and Superseding::   ``Whoops, I shouldn't have called him that.''
2648 * Marking Articles::            Marking articles as read, expirable, etc.
2649 * Limiting::                    You can limit the summary buffer.
2650 * Threading::                   How threads are made.
2651 * Sorting::                     How articles and threads are sorted.
2652 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
2653 * Article Caching::             You may store articles in a cache.
2654 * Persistent Articles::         Making articles expiry-resistant.
2655 * Article Backlog::             Having already read articles hang around.
2656 * Saving Articles::             Ways of customizing article saving.
2657 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
2658 * Article Treatment::           The article buffer can be mangled at will.
2659 * Summary Sorting::             Sorting the summary buffer in various ways.
2660 * Finding the Parent::          No child support? Get the parent.
2661 * Alternative Approaches::      Reading using non-default summaries.
2662 * Tree Display::                A more visual display of threads.
2663 * Mail Group Commands::         Some commands can only be used in mail groups.
2664 * Various Summary Stuff::       What didn't fit anywhere else.
2665 * Exiting the Summary Buffer::  Returning to the Group buffer.
2666 * Crosspost Handling::          How crossposted articles are dealt with.
2667 * Duplicate Suppression::       An alternative when crosspost handling fails.
2668 @end menu
2669
2670
2671 @node Summary Buffer Format
2672 @section Summary Buffer Format
2673 @cindex summary buffer format
2674
2675 @menu
2676 * Summary Buffer Lines::     You can specify how summary lines should look.
2677 * Summary Buffer Mode Line:: You can say how the mode line should look.
2678 * Summary Highlighting::     Making the summary buffer all pretty and nice.
2679 @end menu
2680
2681 @findex mail-extract-address-components
2682 @findex gnus-extract-address-components
2683 @vindex gnus-extract-address-components
2684 Gnus will use the value of the @code{gnus-extract-address-components}
2685 variable as a function for getting the name and address parts of a
2686 @code{From} header.  Two pre-defined function exist:
2687 @code{gnus-extract-address-components}, which is the default, quite
2688 fast, and too simplistic solution; and
2689 @code{mail-extract-address-components}, which works very nicely, but is
2690 slower.  The default function will return the wrong answer in 5% of the
2691 cases.  If this is unacceptable to you, use the other function instead.
2692
2693 @vindex gnus-summary-same-subject
2694 @code{gnus-summary-same-subject} is a string indicating that the current
2695 article has the same subject as the previous.  This string will be used
2696 with those specs that require it.  The default is @samp{}.
2697
2698
2699 @node Summary Buffer Lines
2700 @subsection Summary Buffer Lines
2701
2702 @vindex gnus-summary-line-format
2703 You can change the format of the lines in the summary buffer by changing
2704 the @code{gnus-summary-line-format} variable.  It works along the same
2705 lines a a normal @code{format} string, with some extensions
2706 (@pxref{Formatting Variables}).
2707
2708 The default string is @samp{%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n}.
2709
2710 The following format specification characters are understood:
2711
2712 @table @samp
2713 @item N 
2714 Article number.
2715 @item S
2716 Subject string.
2717 @item s
2718 Subject if the article is the root or the previous article had a
2719 different subject, @code{gnus-summary-same-subject} otherwise.
2720 (@code{gnus-summary-same-subject} defaults to @samp{}.)
2721 @item F
2722 Full @code{From} header.
2723 @item n
2724 The name (from the @code{From} header).
2725 @item a
2726 The name (from the @code{From} header).  This differs from the @code{n}
2727 spec in that it uses @code{gnus-extract-address-components}, which is
2728 slower, but may be more thorough.
2729 @item A
2730 The address (from the @code{From} header).  This works the same way as
2731 the @code{a} spec.
2732 @item L
2733 Number of lines in the article.
2734 @item c
2735 Number of characters in the article.
2736 @item I
2737 Indentation based on thread level (@pxref{Customizing Threading}).
2738 @item T
2739 Nothing if the article is a root and lots of spaces if it isn't (it
2740 pushes everything after it off the screen).
2741 @item \[
2742 Opening bracket, which is normally @samp{\[}, but can also be @samp{<}
2743 for adopted articles (@pxref{Customizing Threading}).
2744 @item \]
2745 Closing bracket, which is normally @samp{\]}, but can also be @samp{>}
2746 for adopted articles.
2747 @item >
2748 One space for each thread level.
2749 @item <
2750 Twenty minus thread level spaces.
2751 @item U
2752 Unread.
2753 @item R
2754 Replied.
2755 @item i
2756 Score as a number.
2757 @item z
2758 @vindex gnus-summary-zcore-fuzz
2759 Zcore, @samp{+} if above the default level and @samp{-} if below the
2760 default level.  If the difference between
2761 @code{gnus-summary-default-level} and the score is less than
2762 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
2763 @item V
2764 Total thread score.
2765 @item x
2766 @code{Xref}.
2767 @item D
2768 @code{Date}.
2769 @item d
2770 The @code{Date} in @code{YY-MMM} format.
2771 @item o
2772 The @code{Date} in @code{YYYYMMDDTHHMMSS} format.
2773 @item M
2774 @code{Message-ID}.
2775 @item r
2776 @code{References}.
2777 @item t
2778 Number of articles in the current sub-thread.  Using this spec will slow
2779 down summary buffer generation somewhat.
2780 @item e
2781 A single character will be displayed if the article has any children. 
2782 @item P
2783 The line number.
2784 @item u
2785 User defined specifier.  The next character in the format string should
2786 be a letter.  @sc{gnus} will call the function
2787 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
2788 following @samp{%u}.  The function will be passed the current header as
2789 argument.  The function should return a string, which will be inserted
2790 into the summary just like information from any other summary specifier.
2791 @end table
2792
2793 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
2794 have to be handled with care.  For reasons of efficiency, Gnus will
2795 compute what column these characters will end up in, and ``hard-code''
2796 that.  This means that it is illegal to have these specs after a
2797 variable-length spec.  Well, you might not be arrested, but your summary
2798 buffer will look strange, which is bad enough.
2799
2800 The smart choice is to have these specs as far to the left as possible.
2801 (Isn't that the case with everything, though?  But I digress.)
2802
2803 This restriction may disappear in later versions of Gnus.
2804
2805
2806 @node Summary Buffer Mode Line
2807 @subsection Summary Buffer Mode Line
2808
2809 @vindex gnus-summary-mode-line-format
2810 You can also change the format of the summary mode bar.  Set
2811 @code{gnus-summary-mode-line-format} to whatever you like.  Here are the
2812 elements you can play with:
2813
2814 @table @samp
2815 @item G
2816 Group name.
2817 @item p
2818 Unprefixed group name.
2819 @item A
2820 Current article number.
2821 @item V
2822 Gnus version.
2823 @item U
2824 Number of unread articles in this group.
2825 @item e
2826 Number of unselected articles in this group.
2827 @item Z
2828 A string with the number of unread and unselected articles represented
2829 either as @samp{<%U(+%u) more>} if there are both unread and unselected
2830 articles, and just as @samp{<%U more>} if there are just unread articles
2831 and no unselected ones.
2832 @item g
2833 Shortish group name.  For instance, @samp{rec.arts.anime} will be
2834 shortened to @samp{r.a.anime}. 
2835 @item S
2836 Subject of the current article.
2837 @item u
2838 Used-defined spec.
2839 @item s
2840 Name of the current score file.
2841 @item d
2842 Number of dormant articles.
2843 @item t
2844 Number of ticked articles.
2845 @item r
2846 Number of articles that have been marked as read in this session. 
2847 @item E
2848 Number of articles expunged by the score files.
2849 @end table
2850
2851
2852 @node Summary Highlighting
2853 @subsection Summary Highlighting
2854
2855 @table @code
2856
2857 @item gnus-visual-mark-article-hook
2858 @vindex gnus-visual-mark-article-hook
2859 This hook is run after selecting an article.  It is meant to be used for
2860 highlighting the article in some way.  It is not run if
2861 @code{gnus-visual} is @code{nil}.
2862
2863 @item gnus-summary-update-hook
2864 @vindex gnus-summary-update-hook
2865 This hook is called when a summary line is changed.  It is not run if
2866 @code{gnus-visual} is @code{nil}.
2867
2868 @item gnus-summary-selected-face
2869 @vindex gnus-summary-selected-face
2870 This is the face (or @dfn{font} as some people call it) that is used to
2871 highlight the current article in the summary buffer.
2872
2873 @item gnus-summary-highlight
2874 @vindex gnus-summary-highlight
2875 Summary lines are highlighted according to this variable, which is a
2876 list where the elements are on the format @code{(FORM . FACE)}.  If you
2877 would, for instance, like ticked articles to be italic and high-scored
2878 articles to be bold, you could set this variable to something like
2879 @lisp
2880 (((eq mark gnus-ticked-mark) . italic)
2881  ((> score default) . bold))
2882 @end lisp
2883 As you may have guessed, if @var{FORM} returns a non-@code{nil} value,
2884 @var{FACE} will be applied to the line.
2885 @end table
2886
2887
2888 @node Summary Maneuvering
2889 @section Summary Maneuvering
2890 @cindex summary movement
2891
2892 All the straight movement commands understand the numeric prefix and
2893 behave pretty much as you'd expect. 
2894
2895 None of these commands select articles.
2896
2897 @table @kbd
2898 @item G M-n
2899 @itemx M-n
2900 @kindex M-n (Summary)
2901 @kindex G M-n (Summary)
2902 @findex gnus-summary-next-unread-subject
2903 Go to the next summary line of an unread article
2904 (@code{gnus-summary-next-unread-subject}). 
2905
2906 @item G M-p
2907 @itemx M-p
2908 @kindex M-p (Summary)
2909 @kindex G M-p (Summary)
2910 @findex gnus-summary-prev-unread-subject
2911 Go to the previous summary line of an unread article
2912 (@code{gnus-summary-prev-unread-subject}). 
2913
2914 @item G j
2915 @itemx j
2916 @kindex j (Summary)
2917 @kindex G j (Summary)
2918 @findex gnus-summary-goto-article
2919 Ask for an article number and then go that article
2920 (@code{gnus-summary-goto-article}). 
2921
2922 @item G g
2923 @kindex G g (Summary)
2924 @findex gnus-summary-goto-subject
2925 Ask for an article number and then go the summary line of that article
2926 (@code{gnus-summary-goto-subject}).
2927 @end table
2928
2929 If Gnus asks you to press a key to confirm going to the next group, you
2930 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
2931 buffer, searching for the next group to read without actually returning
2932 to the group buffer.
2933
2934 Variables related to summary movement:
2935
2936 @table @code
2937
2938 @vindex gnus-auto-select-next
2939 @item gnus-auto-select-next
2940 If you are at the end of the group and issue one of the movement
2941 commands, Gnus will offer to go to the next group.  If this variable is
2942 @code{t} and the next group is empty, Gnus will exit summary mode and
2943 return to the group buffer.  If this variable is neither @code{t} nor
2944 @code{nil}, Gnus will select the next group, no matter whether it has
2945 any unread articles or not.  As a special case, if this variable is
2946 @code{quietly}, Gnus will select the next group without asking for
2947 confirmation.  If this variable is @code{almost-quietly}, the same will
2948 happen only if you are located on the last article in the group.
2949 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
2950 command will go to the next group without confirmation.  Also
2951 @pxref{Group Levels}.
2952
2953 @item gnus-auto-select-same
2954 @vindex gnus-auto-select-same
2955 If non-@code{nil}, all the movement commands will try to go to the next
2956 article with the same subject as the current.  (@dfn{Same} here might
2957 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
2958 for details (@pxref{Customizing Threading}).)  This variable is not
2959 particularly useful if you use a threaded display.
2960
2961 @item gnus-summary-check-current
2962 @vindex gnus-summary-check-current
2963 If non-@code{nil}, all the ``unread'' movement commands will not proceed
2964 to the next (or previous) article if the current article is unread.
2965 Instead, they will choose the current article.
2966
2967 @item gnus-auto-center-summary
2968 @vindex gnus-auto-center-summary
2969 If non-@code{nil}, Gnus will keep the point in the summary buffer
2970 centered at all times.  This makes things quite tidy, but if you have a
2971 slow network connection, or simply do not like this un-Emacsism, you can
2972 set this variable to @code{nil} to get the normal Emacs scrolling
2973 action.  This will also inhibit horizontal re-centering of the summary
2974 buffer, which might make it more inconvenient to read extremely long
2975 threads.
2976
2977 @end table
2978
2979
2980 @node Choosing Articles
2981 @section Choosing Articles
2982 @cindex selecting articles
2983
2984 None of the following movement commands understand the numeric prefix,
2985 and they all select and display an article.
2986
2987 @table @kbd
2988 @item SPACE
2989 @kindex SPACE (Summary)
2990 @findex gnus-summary-next-page
2991 Select the current article, or, if that one's read already, the next
2992 unread article (@code{gnus-summary-next-page}).
2993
2994 @item G n
2995 @itemx n
2996 @kindex n (Summary)
2997 @kindex G n (Summary)
2998 @findex gnus-summary-next-unread-article
2999 Go to next unread article (@code{gnus-summary-next-unread-article}).
3000
3001 @item G p
3002 @itemx p
3003 @kindex p (Summary)
3004 @findex gnus-summary-prev-unread-article
3005 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
3006
3007 @item G N
3008 @itemx N
3009 @kindex N (Summary)
3010 @kindex G N (Summary)
3011 @findex gnus-summary-next-article
3012 Go to the next article (@code{gnus-summary-next-article}).
3013
3014 @item G P
3015 @itemx P
3016 @kindex P (Summary)
3017 @kindex G P (Summary)
3018 @findex gnus-summary-prev-article
3019 Go to the previous article (@code{gnus-summary-prev-article}).
3020
3021 @item G C-n
3022 @kindex G C-n (Summary)
3023 @findex gnus-summary-next-same-subject
3024 Go to the next article with the same subject
3025 (@code{gnus-summary-next-same-subject}). 
3026
3027 @item G C-p
3028 @kindex G C-p (Summary)
3029 @findex gnus-summary-prev-same-subject
3030 Go to the previous article with the same subject
3031 (@code{gnus-summary-prev-same-subject}). 
3032
3033 @item G f
3034 @itemx .
3035 @kindex G f  (Summary)
3036 @kindex .  (Summary)
3037 @findex gnus-summary-first-unread-article
3038 Go to the first unread article
3039 (@code{gnus-summary-first-unread-article}).
3040
3041 @item G b
3042 @itemx ,
3043 @kindex G b (Summary)
3044 @kindex , (Summary)
3045 @findex gnus-summary-best-unread-article
3046 Go to the article with the highest score
3047 (@code{gnus-summary-best-unread-article}). 
3048
3049 @item G l
3050 @itemx l
3051 @kindex l (Summary)
3052 @kindex G l (Summary)
3053 @findex gnus-summary-goto-last-article
3054 Go to the previous article read (@code{gnus-summary-goto-last-article}).
3055
3056 @item G p
3057 @kindex G p (Summary)
3058 @findex gnus-summary-pop-article
3059 Pop an article off the summary history and go to this article
3060 (@code{gnus-summary-pop-article}).  This command differs from the
3061 command above in that you can pop as many previous articles off the
3062 history as you like.
3063 @end table
3064
3065 Some variables that are relevant for moving and selecting articles:
3066
3067 @table @code
3068 @item gnus-auto-extend-newsgroup
3069 @vindex gnus-auto-extend-newsgroup
3070 All the movement commands will try to go to the previous (or next)
3071 article, even if that article isn't displayed in the Summary buffer if
3072 this variable is non-@code{nil}.  Gnus will then fetch the article from
3073 the server and display it in the article buffer.
3074
3075 @item gnus-select-article-hook
3076 @vindex gnus-select-article-hook
3077 This hook is called whenever an article is selected.  By default it
3078 exposes any threads hidden under the selected article.
3079
3080 @item gnus-mark-article-hook
3081 @vindex gnus-mark-article-hook
3082 @findex gnus-summary-mark-unread-as-read
3083 @findex gnus-summary-mark-read-and-unread-as-read
3084 @findex gnus-unread-mark
3085 This hook is called whenever an article is selected.  It is intended to
3086 be used for marking articles as read.  The default value is
3087 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
3088 mark of almost any article you read to @code{gnus-unread-mark}.  The
3089 only articles not affected by this function are ticked, dormant, and
3090 expirable articles.  If you'd instead like to just have unread articles
3091 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
3092 instead.  It will leave marks like @code{gnus-low-score-mark},
3093 @code{gnus-del-mark} (and so on) alone.
3094
3095 @end table
3096
3097
3098 @node Paging the Article
3099 @section Scrolling the Article
3100 @cindex article scrolling
3101
3102 @table @kbd
3103
3104 @item SPACE
3105 @kindex SPACE (Summary)
3106 @findex gnus-summary-next-page
3107 Pressing @kbd{SPACE} will scroll the current article forward one page,
3108 or, if you have come to the end of the current article, will choose the
3109 next article (@code{gnus-summary-next-page}).
3110
3111 @item DEL
3112 @kindex DEL (Summary)
3113 @findex gnus-summary-prev-page
3114 Scroll the current article back one page (@code{gnus-summary-prev-page}). 
3115
3116 @item RET
3117 @kindex RET (Summary)
3118 @findex gnus-summary-scroll-up
3119 Scroll the current article one line forward
3120 (@code{gnus-summary-scroll-up}).
3121
3122 @item A g
3123 @itemx g
3124 @kindex A g (Summary)
3125 @kindex g (Summary)
3126 @findex gnus-summary-show-article
3127 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
3128 given a prefix, fetch the current article, but don't run any of the
3129 article treatment functions.  This will give you a ``raw'' article, just
3130 the way it came from the server.
3131
3132 @item A <
3133 @itemx <
3134 @kindex < (Summary)
3135 @kindex A < (Summary)
3136 @findex gnus-summary-beginning-of-article
3137 Scroll to the beginning of the article
3138 (@code{gnus-summary-beginning-of-article}).
3139
3140 @item A >
3141 @itemx >
3142 @kindex > (Summary)
3143 @kindex A > (Summary)
3144 @findex gnus-summary-end-of-article
3145 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
3146
3147 @item A s 
3148 @kindex A s (Summary)
3149 @findex gnus-summary-isearch-article
3150 Perform an isearch in the article buffer
3151 (@code{gnus-summary-isearch-article}). 
3152
3153 @end table
3154
3155
3156 @node Reply Followup and Post
3157 @section Reply, Followup and Post
3158
3159 @menu
3160 * Summary Mail Commands::            Sending mail.
3161 * Summary Post Commands::            Sending news.
3162 @end menu
3163
3164
3165 @node Summary Mail Commands
3166 @subsection Summary Mail Commands
3167 @cindex mail
3168 @cindex composing mail
3169
3170 Commands for composing a mail message:
3171
3172 @table @kbd
3173
3174 @item S r
3175 @itemx r
3176 @kindex S r (Summary)
3177 @kindex r (Summary)
3178 @findex gnus-summary-reply
3179 Mail a reply to the author of the current article
3180 (@code{gnus-summary-reply}). 
3181
3182 @item S R
3183 @itemx R
3184 @kindex R (Summary)
3185 @kindex S R (Summary)
3186 @findex gnus-summary-reply-with-original
3187 Mail a reply to the author of the current article and include the
3188 original message (@code{gnus-summary-reply-with-original}).  This
3189 command uses the process/prefix convention.
3190
3191 @item S o m
3192 @kindex S o m (Summary)
3193 @findex gnus-summary-mail-forward
3194 Forward the current article to some other person
3195 (@code{gnus-summary-mail-forward}). 
3196
3197 @item S o p
3198 @kindex S o p (Summary)
3199 @findex gnus-summary-post-forward
3200 Forward the current article to a newsgroup
3201 (@code{gnus-summary-post-forward}).
3202
3203 @item S m
3204 @itemx m
3205 @kindex m (Summary)
3206 @kindex S m (Summary)
3207 @findex gnus-summary-mail-other-window
3208 Send a mail to some other person
3209 (@code{gnus-summary-mail-other-window}).
3210
3211 @item S D b
3212 @kindex S D b (Summary)
3213 @findex gnus-summary-resend-bounced-mail
3214 @cindex bouncing mail
3215 If you have sent a mail, but the mail was bounced back to you for some
3216 reason (wrong address, transient failure), you can use this command to
3217 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
3218 will be popped into a mail buffer where you can edit the headers before
3219 sending the mail off again.  If you give a prefix to this command, and
3220 the bounced mail is a reply to some other mail, Gnus will try to fetch
3221 that mail and display it for easy perusal of its headers.  This might
3222 very well fail, though.
3223
3224 @item S D r
3225 @kindex S D r (Summary)
3226 @findex gnus-summary-resend-message
3227 Not to be confused with the previous command,
3228 @code{gnus-summary-resend-message} will prompt you for an address to
3229 send the current message off to, and then send it to that place.  The
3230 headers of the message won't be altered---but lots of headers that say
3231 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
3232 means that you actually send a mail to someone that has a @code{To}
3233 header that (probably) points to yourself.  This will confuse people.
3234 So, natcherly you'll only do that if you're really eVIl.  
3235
3236 This command is mainly used if you have several accounts and want to
3237 ship a mail to a different account of yours.  (If you're both
3238 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
3239 to the @code{root} account, you may want to resend it to
3240 @code{postmaster}.  Ordnung muss sein!
3241
3242 @item S O m
3243 @kindex S O m (Summary)
3244 @findex gnus-uu-digest-mail-forward
3245 Digest the current series and forward the result using mail
3246 (@code{gnus-uu-digest-mail-forward}).  This command uses the
3247 process/prefix convention (@pxref{Process/Prefix}). 
3248
3249 @item S O p
3250 @kindex S O p (Summary)
3251 @findex gnus-uu-digest-post-forward
3252 Digest the current series and forward the result to a newsgroup
3253 (@code{gnus-uu-digest-mail-forward}).  
3254
3255 @item S M-c
3256 @kindex S M-c (Summary)
3257 @findex gnus-summary-mail-crosspost-complaint
3258 @cindex crossposting
3259 @cindex excessive crossposting
3260 Send a complaint about excessive crossposting to the author of the
3261 current article (@code{gnus-summary-mail-crosspost-complaint}).  
3262
3263 @findex gnus-crosspost-complaint
3264 This command is provided as a way to fight back agains the current
3265 crossposting pandemic that's sweeping Usenet.  It will compose a reply
3266 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
3267 command understands the process/prefix convention
3268 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
3269
3270 @end table
3271
3272
3273 @node Summary Post Commands
3274 @subsection Summary Post Commands
3275 @cindex post
3276 @cindex composing news
3277
3278 Commands for posting an article:
3279
3280 @table @kbd
3281 @item S p
3282 @itemx a
3283 @kindex a (Summary)
3284 @kindex S p (Summary)
3285 @findex gnus-summary-post-news
3286 Post an article to the current group
3287 (@code{gnus-summary-post-news}).
3288
3289 @item S f
3290 @itemx f
3291 @kindex f (Summary)
3292 @kindex S f (Summary)
3293 @findex gnus-summary-followup
3294 Post a followup to the current article (@code{gnus-summary-followup}).
3295
3296 @item S F
3297 @itemx F
3298 @kindex S F (Summary)
3299 @kindex F (Summary)
3300 @findex gnus-summary-followup-with-original
3301 Post a followup to the current article and include the original message
3302 (@code{gnus-summary-followup-with-original}).   This command uses the
3303 process/prefix convention.
3304
3305 @item S u
3306 @kindex S u (Summary)
3307 @findex gnus-uu-post-news
3308 Uuencode a file, split it into parts, and post it as a series
3309 (@code{gnus-uu-post-news}). (@pxref{Uuencoding and Posting}). 
3310 @end table
3311
3312
3313 @node Canceling and Superseding
3314 @section Canceling Articles
3315 @cindex canceling articles
3316 @cindex superseding articles
3317
3318 Have you ever written something, and then decided that you really,
3319 really, really wish you hadn't posted that?
3320
3321 Well, you can't cancel mail, but you can cancel posts.
3322
3323 @findex gnus-summary-cancel-article
3324 @kindex C (Summary)
3325 Find the article you wish to cancel (you can only cancel your own
3326 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
3327 c} (@code{gnus-summary-cancel-article}).  Your article will be
3328 canceled---machines all over the world will be deleting your article. 
3329
3330 Be aware, however, that not all sites honor cancels, so your article may
3331 live on here and there, while most sites will delete the article in
3332 question.
3333
3334 If you discover that you have made some mistakes and want to do some
3335 corrections, you can post a @dfn{superseding} article that will replace
3336 your original article.
3337
3338 @findex gnus-summary-supersede-article
3339 @kindex S (Summary)
3340 Go to the original article and press @kbd{S s}
3341 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
3342 where you can edit the article all you want before sending it off the
3343 usual way.
3344
3345 The same goes for superseding as for canceling, only more so: Some
3346 sites do not honor superseding.  On those sites, it will appear that you
3347 have posted almost the same article twice.
3348
3349 If you have just posted the article, and change your mind right away,
3350 there is a trick you can use to cancel/supersede the article without
3351 waiting for the article to appear on your site first.  You simply return
3352 to the post buffer (which is called @code{*post-buf*}).  There you will
3353 find the article you just posted, with all the headers intact.  Change
3354 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
3355 header by substituting one of those words for @code{Message-ID}.  Then
3356 just press @kbd{C-c C-c} to send the article as you would do normally.
3357 The previous article will be canceled/superseded.
3358
3359 Just remember, kids: There is no 'c' in 'supersede'.
3360
3361
3362 @node Marking Articles
3363 @section Marking Articles
3364 @cindex article marking
3365 @cindex article ticking
3366 @cindex marks
3367
3368 There are several marks you can set on an article. 
3369
3370 You have marks that decide the @dfn{readedness} (whoo, neato-keano
3371 neologism ohoy!) of the article.  Alphabetic marks generally mean
3372 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
3373
3374 In addition, you also have marks that do not affect readedness.
3375
3376 @menu
3377 * Unread Articles::      Marks for unread articles.
3378 * Read Articles::        Marks for read articles.
3379 * Other Marks::          Marks that do not affect readedness.
3380 @end menu
3381
3382 @ifinfo
3383 There's a plethora of commands for manipulating these marks:
3384 @end ifinfo
3385
3386 @menu
3387 * Setting Marks::           How to set and remove marks.
3388 * Setting Process Marks::   How to mark articles for later processing.
3389 @end menu
3390
3391
3392 @node Unread Articles
3393 @subsection Unread Articles
3394
3395 The following marks mark articles as unread, in one form or other.
3396
3397 @vindex gnus-dormant-mark
3398 @vindex gnus-ticked-mark
3399 @table @samp
3400 @item !
3401 @dfn{Ticked articles} are articles that will remain visible always.  If
3402 you see an article that you find interesting, or you want to put off
3403 reading it, or replying to it, until sometime later, you'd typically
3404 tick it.  However, articles can be expired, so if you want to keep an
3405 article forever, you'll have to save it.  Ticked articles have a
3406 @samp{!} (@code{gnus-ticked-mark}) in the first column.
3407
3408 @item ?
3409 @vindex gnus-dormant-mark
3410 A @dfn{dormant} article is marked with a @samp{?}
3411 (@code{gnus-dormant-mark}), and will only appear in the summary buffer
3412 if there are followups to it.
3413
3414 @item SPACE
3415 @vindex gnus-unread-mark
3416 An @dfn{unread} article is marked with a @samp{SPACE}
3417 (@code{gnus-unread-mark}).  These are articles that haven't been read at
3418 all yet.
3419 @end table
3420
3421
3422 @node Read Articles
3423 @subsection Read Articles
3424 @cindex expirable mark
3425
3426 All the following marks mark articles as read.
3427
3428 @table @samp
3429
3430 @item r
3431 @vindex gnus-del-mark
3432 Articles that are marked as read.  They have a @samp{r}
3433 (@code{gnus-del-mark}) in the first column.  These are articles that the
3434 user has marked as read more or less manually.
3435
3436 @item R
3437 @vindex gnus-read-mark
3438 Articles that are actually read are marked with @samp{R}
3439 (@code{gnus-read-mark}). 
3440
3441 @item O
3442 @vindex gnus-ancient-mark
3443 Articles that were marked as read in previous sessions are now
3444 @dfn{old} and marked with @samp{O} (@code{gnus-ancient-mark}). 
3445
3446 @item K
3447 @vindex gnus-killed-mark
3448 Marked as killed (@code{gnus-killed-mark}).
3449
3450 @item X
3451 @vindex gnus-kill-file-mark
3452 Marked as killed by kill files (@code{gnus-kill-file-mark}).
3453
3454 @item Y
3455 @vindex gnus-low-score-mark
3456 Marked as read by having a too low score (@code{gnus-low-score-mark}).
3457
3458 @item C
3459 @vindex gnus-catchup-mark
3460 Marked as read by a catchup (@code{gnus-catchup-mark}).
3461
3462 @item G
3463 @vindex gnus-canceled-mark
3464 Canceled article (@code{gnus-canceled-mark})
3465
3466 @item F
3467 @vindex gnus-souped-mark
3468 @sc{SOUP}ed article (@code{gnus-souped-mark}).  @xref{SOUP}
3469
3470 @item Q
3471 @vindex gnus-sparse-mark
3472 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
3473 Threading} 
3474
3475 @item M
3476 @vindex gnus-duplicate-mark
3477 Article marked as read by duplicate suppression
3478 (@code{gnus-duplicated-mark}).  @xref{Duplicate Suppression}
3479
3480 @end table
3481
3482 All these marks just mean that the article is marked as read, really.
3483 They are interpreted differently by the adaptive scoring scheme,
3484 however.
3485
3486 One more special mark, though:
3487
3488 @table @samp
3489 @item E
3490 @vindex gnus-expirable-mark
3491 You can also mark articles as @dfn{expirable} (or have them marked as
3492 such automatically).  That doesn't make much sense in normal groups,
3493 because a user does not control the expiring of news articles, but in
3494 mail groups, for instance, articles that are marked as @dfn{expirable}
3495 can be deleted by Gnus at any time.  Expirable articles are marked with
3496 @samp{E} (@code{gnus-expirable-mark}).
3497 @end table
3498
3499
3500 @node Other Marks
3501 @subsection Other Marks
3502 @cindex process mark
3503 @cindex bookmarks
3504
3505 There are some marks that have nothing to do with whether the article is
3506 read or not.
3507
3508 @itemize @bullet
3509
3510 @item 
3511 You can set a bookmark in the current article.  Say you are reading a
3512 long thesis on cats' urinary tracts, and have to go home for dinner
3513 before you've finished reading the thesis.  You can then set a bookmark
3514 in the article, and Gnus will jump to this bookmark the next time it
3515 encounters the article.
3516
3517 @item
3518 @vindex gnus-replied-mark
3519 All articles that you have replied to or made a followup to (i.e., have
3520 answered) will be marked with an @samp{A} in the second column
3521 (@code{gnus-replied-mark}).
3522
3523 @item 
3524 @vindex gnus-cached-mark
3525 Articles that are stored in the article cache will be marked with an
3526 @samp{*} in the second column (@code{gnus-cached-mark}).
3527
3528 @item 
3529 @vindex gnus-saved-mark
3530 Articles that are ``saved'' (in some manner or other; not necessarily
3531 religiously) are marked with an @samp{S} in the second column
3532 (@code{gnus-saved-mark}.
3533
3534 @item 
3535 @vindex gnus-not-empty-thread-mark
3536 @vindex gnus-empty-thread-mark
3537 It the @samp{%e} spec is used, the presence of threads or not will be
3538 marked with @code{gnus-not-empty-thread-mark} and
3539 @code{gnus-empty-thread-mark} in the third column, respectively.
3540
3541 @item 
3542 @vindex gnus-process-mark
3543 Finally we have the @dfn{process mark} (@code{gnus-process-mark}.  A
3544 variety of commands react to the presence of the process mark.  For
3545 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
3546 all articles that have been marked with the process mark.  Articles
3547 marked with the process mark have a @samp{#} in the second column.
3548
3549 @end itemize
3550
3551 You might have noticed that most of these ``non-readedness'' marks
3552 appear in the second column by default.  So if you have a cached, saved,
3553 replied article that you have process-marked, what will that look like?
3554
3555 Nothing much.  The precedence rules go as follows: process -> cache ->
3556 replied -> saved.  So if the article is in the cache and is replied,
3557 you'll only see the cache mark and not the replied mark.
3558
3559
3560 @node Setting Marks
3561 @subsection Setting Marks
3562 @cindex setting marks
3563
3564 All the marking commands understand the numeric prefix.
3565
3566 @table @kbd
3567 @item M t
3568 @itemx !
3569 @kindex ! (Summary)
3570 @kindex M t (Summary)
3571 @findex gnus-summary-tick-article-forward
3572 Tick the current article (@code{gnus-summary-tick-article-forward}).
3573
3574 @item M ?
3575 @itemx ?
3576 @kindex ? (Summary)
3577 @kindex M ? (Summary)
3578 @findex gnus-summary-mark-as-dormant
3579 Mark the current article as dormant
3580 (@code{gnus-summary-mark-as-dormant}).
3581
3582 @item M d
3583 @itemx d
3584 @kindex M d (Summary)
3585 @kindex d (Summary)
3586 @findex gnus-summary-mark-as-read-forward
3587 Mark the current article as read
3588 (@code{gnus-summary-mark-as-read-forward}).
3589
3590 @item D
3591 @kindex D (Summary)
3592 @findex gnus-summary-mark-as-read-backward
3593 Mark the current article as read and move point to the previous line
3594 (@code{gnus-summary-mark-as-read-backward}).
3595
3596 @item M k
3597 @itemx k
3598 @kindex k (Summary)
3599 @kindex M k (Summary)
3600 @findex gnus-summary-kill-same-subject-and-select
3601 Mark all articles that have the same subject as the current one as read,
3602 and then select the next unread article
3603 (@code{gnus-summary-kill-same-subject-and-select}).
3604
3605 @item M K
3606 @itemx C-k
3607 @kindex M K (Summary)
3608 @kindex C-k (Summary)
3609 @findex gnus-summary-kill-same-subject
3610 Mark all articles that have the same subject as the current one as read
3611 (@code{gnus-summary-kill-same-subject}).  
3612
3613 @item M C
3614 @kindex M C (Summary)
3615 @findex gnus-summary-catchup
3616 Mark all unread articles in the group as read
3617 (@code{gnus-summary-catchup}).
3618
3619 @item M C-c
3620 @kindex M C-c (Summary)
3621 @findex gnus-summary-catchup-all
3622 Mark all articles in the group as read---even the ticked and dormant
3623 articles (@code{gnus-summary-catchup-all}).
3624
3625 @item M H
3626 @kindex M H (Summary)
3627 @findex gnus-summary-catchup-to-here
3628 Catchup the current group to point
3629 (@code{gnus-summary-catchup-to-here}). 
3630
3631 @item C-w
3632 @kindex C-w (Summary)
3633 @findex gnus-summary-mark-region-as-read
3634 Mark all articles between point and mark as read
3635 (@code{gnus-summary-mark-region-as-read}). 
3636
3637 @item M V k
3638 @kindex M V k (Summary)
3639 @findex gnus-summary-kill-below
3640 Kill all articles with scores below the default score (or below the
3641 numeric prefix) (@code{gnus-summary-kill-below}).
3642
3643 @item M c
3644 @itemx M-u
3645 @kindex M c (Summary)
3646 @kindex M-u (Summary)
3647 @findex gnus-summary-clear-mark-forward
3648 Clear all readedness-marks from the current article
3649 (@code{gnus-summary-clear-mark-forward}).
3650
3651 @item M e
3652 @itemx E
3653 @kindex M e (Summary)
3654 @kindex E (Summary)
3655 @findex gnus-summary-mark-as-expirable
3656 Mark the current article as expirable
3657 (@code{gnus-summary-mark-as-expirable}).
3658
3659 @item M b
3660 @kindex M b (Summary)
3661 @findex gnus-summary-set-bookmark
3662 Set a bookmark in the current article
3663 (@code{gnus-summary-set-bookmark}).
3664
3665 @item M B
3666 @kindex M B (Summary)
3667 @findex gnus-summary-remove-bookmark
3668 Remove the bookmark from the current article
3669 (@code{gnus-summary-remove-bookmark}).
3670
3671 @item M V c
3672 @kindex M V c (Summary)
3673 @findex gnus-summary-clear-above
3674 Clear all marks from articles with scores over the default score (or
3675 over the numeric prefix) (@code{gnus-summary-clear-above}).
3676
3677 @item M V u
3678 @kindex M V u (Summary)
3679 @findex gnus-summary-tick-above
3680 Tick all articles with scores over the default score (or over the
3681 numeric prefix) (@code{gnus-summary-tick-above}).
3682
3683 @item M V m
3684 @kindex M V m (Summary)
3685 @findex gnus-summary-mark-above
3686 Prompt for a mark, and mark all articles with scores over the default
3687 score (or over the numeric prefix) with this mark
3688 (@code{gnus-summary-clear-above}).
3689 @end table
3690
3691 @vindex gnus-summary-goto-unread
3692 The @code{gnus-summary-goto-unread} variable controls what action should
3693 be taken after setting a mark.  If non-@code{nil}, point will move to
3694 the next/previous unread article.  If @code{nil}, point will just move
3695 one line up or down.  As a special case, if this variable is
3696 @code{never}, all the marking commands as well as other commands (like
3697 @kbd{SPACE}) will move to the next article, whether it is unread or not.
3698 The default is @code{t}.
3699
3700
3701 @node Setting Process Marks
3702 @subsection Setting Process Marks
3703 @cindex setting process marks
3704
3705 @table @kbd
3706
3707 @item M P p
3708 @itemx #
3709 @kindex # (Summary)
3710 @kindex M P p (Summary)
3711 @findex gnus-summary-mark-as-processable
3712 Mark the current article with the process mark
3713 (@code{gnus-summary-mark-as-processable}). 
3714 @findex gnus-summary-unmark-as-processable
3715
3716 @item M P u 
3717 @itemx M-#
3718 @kindex M P u (Summary)
3719 @kindex M-# (Summary)
3720 Remove the process mark, if any, from the current article
3721 (@code{gnus-summary-unmark-as-processable}).
3722
3723 @item M P U
3724 @kindex M P U (Summary)
3725 @findex gnus-summary-unmark-all-processable
3726 Remove the process mark from all articles
3727 (@code{gnus-summary-unmark-all-processable}). 
3728
3729 @item M P R
3730 @kindex M P R (Summary)
3731 @findex gnus-uu-mark-by-regexp
3732 Mark articles by a regular expression (@code{gnus-uu-mark-by-regexp}). 
3733
3734 @item M P r
3735 @kindex M P r (Summary)
3736 @findex gnus-uu-mark-region
3737 Mark articles in region (@code{gnus-uu-mark-region}).
3738
3739 @item M P t
3740 @kindex M P t (Summary)
3741 @findex gnus-uu-mark-thread
3742 Mark all articles in the current (sub)thread
3743 (@code{gnus-uu-mark-thread}).
3744
3745 @item M P T
3746 @kindex M P T (Summary)
3747 @findex gnus-uu-unmark-thread
3748 Unmark all articles in the current (sub)thread
3749 (@code{gnus-uu-unmark-thread}).
3750
3751 @item M P v
3752 @kindex M P v (Summary)
3753 @findex gnus-uu-mark-over
3754 Mark all articles that have a score above the prefix argument
3755 (@code{gnus-uu-mark-over}).
3756
3757 @item M P s
3758 @kindex M P s (Summary)
3759 @findex gnus-uu-mark-series
3760 Mark all articles in the current series (@code{gnus-uu-mark-series}).
3761
3762 @item M P S
3763 @kindex M P S (Summary)
3764 @findex gnus-uu-mark-sparse
3765 Mark all series that have already had some articles marked
3766 (@code{gnus-uu-mark-sparse}).
3767
3768 @item M P a
3769 @kindex M P a (Summary)
3770 @findex gnus-uu-mark-all
3771 Mark all articles in series order (@code{gnus-uu-mark-series}).
3772
3773 @item M P b
3774 @kindex M P b (Summary)
3775 @findex gnus-uu-mark-buffer
3776 Mark all articles in the buffer in the order they appear
3777 (@code{gnus-uu-mark-buffer}). 
3778
3779 @item M P k
3780 @kindex M P k (Summary)
3781 @findex gnus-summary-kill-process-mark
3782 Push the current process mark set onto the stack and unmark all articles
3783 (@code{gnus-summary-kill-process-mark}).
3784
3785 @item M P y
3786 @kindex M P y (Summary)
3787 @findex gnus-summary-yank-process-mark
3788 Pop the previous process mark set from the stack and restore it
3789 (@code{gnus-summary-yank-process-mark}).
3790
3791 @item M P w
3792 @kindex M P w (Summary)
3793 @findex gnus-summary-save-process-mark
3794 Push the current process mark set onto the stack
3795 (@code{gnus-summary-save-process-mark}).
3796
3797 @end table
3798
3799
3800 @node Limiting
3801 @section Limiting
3802 @cindex limiting
3803
3804 It can be convenient to limit the summary buffer to just show some
3805 subset of the articles currently in the group.  The effect most limit
3806 commands have is to remove a few (or many) articles from the summary
3807 buffer. 
3808
3809 @table @kbd
3810
3811 @item / /
3812 @itemx / s
3813 @kindex / / (Summary)
3814 @findex gnus-summary-limit-to-subject
3815 Limit the summary buffer to articles that match some subject
3816 (@code{gnus-summary-limit-to-subject}). 
3817
3818 @item / a
3819 @kindex / a (Summary)
3820 @findex gnus-summary-limit-to-author
3821 Limit the summary buffer to articles that match some author
3822 (@code{gnus-summary-limit-to-author}).
3823
3824 @item / u
3825 @itemx x
3826 @kindex / u (Summary)
3827 @kindex x (Summary)
3828 @findex gnus-summary-limit-to-unread
3829 Limit the summary buffer to articles that are not marked as read
3830 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
3831 buffer to articles that are strictly unread.  This means that ticked and
3832 dormant articles will also be excluded.
3833
3834 @item / m
3835 @kindex / m (Summary)
3836 @findex gnus-summary-limit-to-marks
3837 Ask for a mark and then limit to all articles that have not been marked
3838 with that mark (@code{gnus-summary-limit-to-marks}).
3839
3840 @item / n
3841 @kindex / n (Summary)
3842 @findex gnus-summary-limit-to-articles
3843 Limit the summary buffer to the current article
3844 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
3845 convention (@pxref{Process/Prefix}).
3846
3847 @item / w
3848 @kindex / w (Summary)
3849 @findex gnus-summary-pop-limit
3850 Pop the previous limit off the stack and restore it
3851 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
3852 the stack.
3853
3854 @item / v
3855 @kindex / v (Summary)
3856 @findex gnus-summary-limit-to-score
3857 Limit the summary buffer to articles that have a score at or above some
3858 score (@code{gnus-summary-limit-to-score}).
3859
3860 @item / E
3861 @itemx M S
3862 @kindex M S (Summary)
3863 @kindex / E (Summary)
3864 @findex gnus-summary-limit-include-expunged
3865 Display all expunged articles
3866 (@code{gnus-summary-limit-include-expunged}). 
3867
3868 @item / D
3869 @kindex / D (Summary)
3870 @findex gnus-summary-limit-include-dormant
3871 Display all dormant articles (@code{gnus-summary-limit-include-dormant}).
3872
3873 @item / d
3874 @kindex / d (Summary)
3875 @findex gnus-summary-limit-exclude-dormant
3876 Hide all dormant articles (@code{gnus-summary-limit-exclude-dormant}).
3877
3878 @item / c
3879 @kindex / c (Summary)
3880 @findex gnus-summary-limit-exclude-childless-dormant
3881 Hide all dormant articles that have no children
3882 (@code{gnus-summary-limit-exclude-childless-dormant}). 
3883
3884 @item / C
3885 @kindex / C (Summary)
3886 @findex gnus-summary-limit-mark-excluded-as-read
3887 Mark all excluded unread articles as read
3888 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
3889 also mark excluded ticked and dormant articles as read.
3890
3891 @end table
3892
3893
3894 @node Threading
3895 @section Threading
3896 @cindex threading
3897 @cindex article threading
3898
3899 Gnus threads articles by default.  @dfn{To thread} is to put replies to
3900 articles directly after the articles they reply to---in a hierarchical
3901 fashion.
3902
3903 @menu
3904 * Customizing Threading::     Variables you can change to affect the threading.
3905 * Thread Commands::           Thread based commands in the summary buffer.
3906 @end menu
3907
3908
3909 @node Customizing Threading
3910 @subsection Customizing Threading
3911 @cindex customizing threading
3912 @cindex <
3913 @cindex >
3914
3915 @table @code
3916
3917 @item gnus-show-threads
3918 @vindex gnus-show-threads
3919 If this variable is @code{nil}, no threading will be done, and all of
3920 the rest of the variables here will have no effect.  Turning threading
3921 off will speed group selection up a bit, but it is sure to make reading
3922 slower and more awkward.
3923
3924 @item gnus-fetch-old-headers
3925 @vindex gnus-fetch-old-headers
3926 If non-@code{nil}, Gnus will attempt to build old threads by fetching
3927 more old headers---headers to articles that are marked as read.  If you
3928 would like to display as few summary lines as possible, but still
3929 connect as many loose threads as possible, you should set this variable
3930 to @code{some} or a number.  If you set it to a number, no more than
3931 that number of extra old headers will be fetched.  In either case,
3932 fetching old headers only works if the backend you are using carries
3933 overview files---this would normally be @code{nntp}, @code{nnspool} and
3934 @code{nnml}.  Also remember that if the root of the thread has been
3935 expired by the server, there's not much Gnus can do about that.
3936
3937 @item gnus-build-sparse-threads
3938 @vindex gnus-build-sparse-threads
3939 Fetching old headers can be slow.  A low-rent similar effect can be
3940 gotten by setting this variable to @code{some}.  Gnus will then look at
3941 the complete @code{References} headers of all articles and try to string
3942 articles that belong in the same thread together.  This will leave
3943 @dfn{gaps} in the threading display where Gnus guesses that an article
3944 is missing from the thread.  (These gaps appear like normal summary
3945 lines.  If you select a gap, Gnus will try to fetch the article in
3946 question.)  If this variable is @code{t}, Gnus will display all these
3947 ``gaps'' without regard for whether they are useful for completing the
3948 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
3949 off sparse leaf nodes that don't lead anywhere.  This variable is
3950 @code{nil} by default.
3951
3952 @item gnus-summary-gather-subject-limit
3953 @vindex gnus-summary-gather-subject-limit
3954 Loose threads are gathered by comparing subjects of articles.  If this
3955 variable is @code{nil}, Gnus requires an exact match between the
3956 subjects of the loose threads before gathering them into one big
3957 super-thread.  This might be too strict a requirement, what with the
3958 presence of stupid newsreaders that chop off long subjects lines.  If
3959 you think so, set this variable to, say, 20 to require that only the
3960 first 20 characters of the subjects have to match.  If you set this
3961 variable to a really low number, you'll find that Gnus will gather
3962 everything in sight into one thread, which isn't very helpful.
3963
3964 @cindex fuzzy article gathering
3965 If you set this variable to the special value @code{fuzzy}, Gnus will
3966 use a fuzzy string comparison algorithm on the subjects.
3967
3968 @item gnus-simplify-subject-fuzzy-regexp
3969 @vindex gnus-simplify-subject-fuzzy-regexp
3970 This can either be a regular expression or list of regular expressions
3971 that match strings that will be removed from subjects if fuzzy subject
3972 simplification is used.
3973
3974 @item gnus-simplify-ignored-prefixes
3975 @vindex gnus-simplify-ignored-prefixes
3976 If you set @code{gnus-summary-gather-subject-limit} to something as low
3977 as 10, you might consider setting this variable to something sensible:
3978
3979 @c Written by Michael Ernst <mernst@cs.rice.edu>
3980 @lisp
3981 (setq gnus-simplify-ignored-prefixes
3982       (concat 
3983        "\\`\\[?\\("
3984        (mapconcat 'identity
3985                   '("looking"
3986                      "wanted" "followup" "summary\\( of\\)?"
3987                      "help" "query" "problem" "question" 
3988                      "answer" "reference" "announce"
3989                      "How can I" "How to" "Comparison of"
3990                      ;; ...
3991                      )
3992                   "\\|")
3993                   "\\)\\s *\\("
3994                   (mapconcat 'identity
3995                              '("for" "for reference" "with" "about")
3996                              "\\|")
3997                   "\\)?\\]?:?[ \t]*"))
3998 @end lisp
3999
4000 All words that match this regexp will be removed before comparing two
4001 subjects. 
4002
4003 @item gnus-summary-gather-exclude-subject
4004 @vindex gnus-summary-gather-exclude-subject
4005 Since loose thread gathering is done on subjects only, that might lead
4006 to many false hits, especially with certain common subjects like
4007 @samp{} and @samp{(none)}.  To make the situation slightly better,
4008 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
4009 what subjects should be excluded from the gathering process.  The
4010 default is @samp{^ *$\\|^(none)$}.  
4011
4012 @item gnus-summary-thread-gathering-function
4013 @vindex gnus-summary-thread-gathering-function
4014 Gnus gathers threads by looking at @code{Subject} headers.  This means
4015 that totally unrelated articles may end up in the same ``thread'', which
4016 is confusing.  An alternate approach is to look at all the
4017 @code{Message-ID}s in all the @code{References} headers to find matches.
4018 This will ensure that no gathered threads ever includes unrelated
4019 articles, but it's also means that people who have posted with broken
4020 newsreaders won't be gathered properly.  The choice is yours---plague or
4021 cholera:
4022
4023 @table @code
4024 @item gnus-gather-threads-by-subject
4025 @findex gnus-gather-threads-by-subject
4026 This function is the default gathering function and looks at
4027 @code{Subject}s exclusively.
4028
4029 @item gnus-gather-threads-by-references
4030 @findex gnus-gather-threads-by-references
4031 This function looks at @code{References} headers exclusively.
4032 @end table
4033
4034 If you want to test gathering by @code{References}, you could say
4035 something like:
4036
4037 @lisp
4038 (setq gnus-summary-thread-gathering-function
4039       'gnus-gather-threads-by-references)
4040 @end lisp
4041
4042 @item gnus-summary-make-false-root
4043 @vindex gnus-summary-make-false-root
4044 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
4045 and create a dummy root at the top.  (Wait a minute.  Root at the top?
4046 Yup.)  Loose subtrees occur when the real root has expired, or you've
4047 read or killed the root in a previous session.
4048
4049 When there is no real root of a thread, Gnus will have to fudge
4050 something.  This variable says what fudging method Gnus should use.
4051 There are four possible values:
4052
4053 @cindex adopting articles
4054
4055 @table @code
4056
4057 @item adopt
4058 Gnus will make the first of the orphaned articles the parent.  This
4059 parent will adopt all the other articles.  The adopted articles will be
4060 marked as such by pointy brackets (@samp{<>}) instead of the standard
4061 square brackets (@samp{[]}).  This is the default method.
4062
4063 @item dummy
4064 @vindex gnus-summary-dummy-line-format
4065 Gnus will create a dummy summary line that will pretend to be the
4066 parent.  This dummy line does not correspond to any real article, so
4067 selecting it will just select the first real article after the dummy
4068 article.  @code{gnus-summary-dummy-line-format} is used to specify the
4069 format of the dummy roots.  It accepts only one format spec:  @samp{S},
4070 which is the subject of the article.  @xref{Formatting Variables}.
4071
4072 @item empty
4073 Gnus won't actually make any article the parent, but simply leave the
4074 subject field of all orphans except the first empty.  (Actually, it will
4075 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
4076 Buffer Format}).)
4077
4078 @item none
4079 Don't make any article parent at all.  Just gather the threads and
4080 display them after one another.
4081
4082 @item nil
4083 Don't gather loose threads.
4084 @end table
4085
4086 @item gnus-thread-hide-subtree
4087 @vindex gnus-thread-hide-subtree
4088 If non-@code{nil}, all threads will be hidden when the summary buffer is
4089 generated.
4090
4091 @item gnus-thread-hide-killed
4092 @vindex gnus-thread-hide-killed
4093 if you kill a thread and this variable is non-@code{nil}, the subtree
4094 will be hidden.
4095
4096 @item gnus-thread-ignore-subject
4097 @vindex gnus-thread-ignore-subject
4098 Sometimes somebody changes the subject in the middle of a thread.  If
4099 this variable is non-@code{nil}, the subject change is ignored.  If it
4100 is @code{nil}, which is the default, a change in the subject will result
4101 in a new thread.
4102
4103 @item gnus-thread-indent-level
4104 @vindex gnus-thread-indent-level
4105 This is a number that says how much each sub-thread should be indented.
4106 The default is @code{4}.
4107 @end table
4108
4109
4110 @node Thread Commands
4111 @subsection Thread Commands
4112 @cindex thread commands
4113
4114 @table @kbd
4115
4116 @item T k
4117 @itemx M-C-k
4118 @kindex T k (Summary)
4119 @kindex M-C-k (Summary)
4120 @findex gnus-summary-kill-thread
4121 Mark all articles in the current sub-thread as read
4122 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
4123 remove all marks instead.  If the prefix argument is negative, tick
4124 articles instead.
4125
4126 @item T l
4127 @itemx M-C-l
4128 @kindex T l (Summary)
4129 @kindex M-C-l (Summary)
4130 @findex gnus-summary-lower-thread
4131 Lower the score of the current thread
4132 (@code{gnus-summary-lower-thread}). 
4133
4134 @item T i
4135 @kindex T i (Summary)
4136 @findex gnus-summary-raise-thread
4137 Increase the score of the current thread
4138 (@code{gnus-summary-raise-thread}).
4139
4140 @item T #
4141 @kindex T # (Summary)
4142 @findex gnus-uu-mark-thread
4143 Set the process mark on the current thread
4144 (@code{gnus-uu-mark-thread}).
4145
4146 @item T M-#
4147 @kindex T M-# (Summary)
4148 @findex gnus-uu-unmark-thread
4149 Remove the process mark from the current thread
4150 (@code{gnus-uu-unmark-thread}).
4151
4152 @item T T
4153 @kindex T T (Summary)
4154 @findex gnus-summary-toggle-threads
4155 Toggle threading (@code{gnus-summary-toggle-threads}).
4156
4157 @item T s
4158 @kindex T s (Summary)
4159 @findex gnus-summary-show-thread
4160 Expose the thread hidden under the current article, if any
4161 (@code{gnus-summary-show-thread}).
4162
4163 @item T h
4164 @kindex T h (Summary)
4165 @findex gnus-summary-hide-thread
4166 Hide the current (sub)thread (@code{gnus-summary-hide-thread}).
4167
4168 @item T S
4169 @kindex T S (Summary)
4170 @findex gnus-summary-show-all-threads
4171 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
4172
4173 @item T H
4174 @kindex T H (Summary)
4175 @findex gnus-summary-hide-all-threads
4176 Hide all threads (@code{gnus-summary-hide-all-threads}).
4177
4178 @item T t
4179 @kindex T t (Summary)
4180 @findex gnus-summary-rethread-current
4181 Re-thread the thread the current article is part of
4182 (@code{gnus-summary-rethread-current}).  This works even when the
4183 summary buffer is otherwise unthreaded.
4184
4185 @item T ^
4186 @kindex T ^ (Summary)
4187 @findex gnus-summary-reparent-thread
4188 Make the current article the child of the marked (or previous) article
4189 (@code{gnus-summary-reparent-thread}.
4190
4191 @end table
4192
4193 The following commands are thread movement commands.  They all
4194 understand the numeric prefix.
4195
4196 @table @kbd
4197
4198 @item T n
4199 @kindex T n (Summary)
4200 @findex gnus-summary-next-thread
4201 Go to the next thread (@code{gnus-summary-next-thread}).
4202
4203 @item T p
4204 @kindex T p (Summary)
4205 @findex gnus-summary-prev-thread
4206 Go to the previous thread (@code{gnus-summary-prev-thread}).
4207
4208 @item T d
4209 @kindex T d (Summary)
4210 @findex gnus-summary-down-thread
4211 Descend the thread (@code{gnus-summary-down-thread}).
4212
4213 @item T u
4214 @kindex T u (Summary)
4215 @findex gnus-summary-up-thread
4216 Ascend the thread (@code{gnus-summary-up-thread}).
4217
4218 @item T o
4219 @kindex T o (Summary)
4220 @findex gnus-summary-top-thread
4221 Go to the top of the thread (@code{gnus-summary-top-thread}).
4222 @end table
4223
4224 @vindex gnus-thread-operation-ignore-subject 
4225 If you ignore subject while threading, you'll naturally end up with
4226 threads that have several different subjects in them.  If you then issue
4227 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
4228 wish to kill the entire thread, but just those parts of the thread that
4229 have the same subject as the current article.  If you like this idea,
4230 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If is
4231 is non-@code{nil} (which it is by default), subjects will be ignored
4232 when doing thread commands.  If this variable is @code{nil}, articles in
4233 the same thread with different subjects will not be included in the
4234 operation in question.  If this variable is @code{fuzzy}, only articles
4235 that have subjects that are fuzzily equal will be included.
4236
4237
4238 @node Sorting
4239 @section Sorting
4240
4241 @findex gnus-thread-sort-by-total-score
4242 @findex gnus-thread-sort-by-date
4243 @findex gnus-thread-sort-by-score
4244 @findex gnus-thread-sort-by-subject
4245 @findex gnus-thread-sort-by-author
4246 @findex gnus-thread-sort-by-number
4247 @vindex gnus-thread-sort-functions
4248 If you are using a threaded summary display, you can sort the threads by
4249 setting @code{gnus-thread-sort-functions}, which is a list of functions.
4250 By default, sorting is done on article numbers.  Ready-made sorting
4251 predicate functions include @code{gnus-thread-sort-by-number},
4252 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
4253 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score}, and
4254 @code{gnus-thread-sort-by-total-score}.
4255
4256 Each function takes two threads and return non-@code{nil} if the first
4257 thread should be sorted before the other.  Note that sorting really is
4258 normally done by looking only at the roots of each thread.  If you use
4259 more than one function, the primary sort key should be the last function
4260 in the list.  You should probably always include
4261 @code{gnus-thread-sort-by-number} in the list of sorting
4262 functions---preferably first.  This will ensure that threads that are
4263 equal with respect to the other sort criteria will be displayed in
4264 ascending article order.
4265
4266 If you would like to sort by score, then by subject, and finally by
4267 number, you could do something like:
4268
4269 @lisp
4270 (setq gnus-thread-sort-functions 
4271       '(gnus-thread-sort-by-number
4272         gnus-thread-sort-by-subject
4273         gnus-thread-sort-by-score))
4274 @end lisp
4275
4276 The threads that have highest score will be displayed first in the
4277 summary buffer.  When threads have the same score, they will be sorted
4278 alphabetically.  The threads that have the same score and the same
4279 subject will be sorted by number, which is (normally) the sequence in
4280 which the articles arrived.
4281
4282 If you want to sort by score and then reverse arrival order, you could
4283 say something like:
4284
4285 @lisp
4286 (setq gnus-thread-sort-functions
4287       '((lambda (t1 t2) 
4288           (not (gnus-thread-sort-by-number t1 t2)))
4289         gnus-thread-sort-by-score))
4290 @end lisp
4291
4292 @vindex gnus-thread-score-function
4293 The function in the @code{gnus-thread-score-function} variable (default
4294 @code{+}) is used for calculating the total score of a thread.  Useful
4295 functions might be @code{max}, @code{min}, or squared means, or whatever
4296 tickles your fancy.
4297
4298 @findex gnus-article-sort-functions
4299 @findex gnus-article-sort-by-date
4300 @findex gnus-article-sort-by-score
4301 @findex gnus-article-sort-by-subject
4302 @findex gnus-article-sort-by-author
4303 @findex gnus-article-sort-by-number
4304 If you are using an unthreaded display for some strange reason or other,
4305 you have to fiddle with the @code{gnus-article-sort-functions} variable.
4306 It is very similar to the @code{gnus-thread-sort-functions}, except that
4307 is uses slightly different functions for article comparison.  Available
4308 sorting predicate functions are @code{gnus-article-sort-by-number},
4309 @code{gnus-article-sort-by-author}, @code{gnus-article-sort-by-subject},
4310 @code{gnus-article-sort-by-date}, and @code{gnus-article-sort-by-score}.
4311
4312 If you want to sort an unthreaded summary display by subject, you could
4313 say something like:
4314
4315 @lisp
4316 (setq gnus-article-sort-functions 
4317       '(gnus-article-sort-by-number
4318         gnus-article-sort-by-subject))
4319 @end lisp
4320
4321
4322
4323 @node Asynchronous Fetching
4324 @section Asynchronous Article Fetching
4325 @cindex asynchronous article fetching
4326
4327 If you read your news from an @sc{nntp} server that's far away, the
4328 network latencies may make reading articles a chore.  You have to wait
4329 for a while after pressing @kbd{n} to go to the next article before the
4330 article appears.  Why can't Gnus just go ahead and fetch the article
4331 while you are reading the previous one? Why not, indeed.
4332
4333 First, some caveats.  There are some pitfalls to using asynchronous
4334 article fetching, especially the way Gnus does it.  
4335
4336 Let's say you are reading article 1, which is short, and article 2 is
4337 quite long, and you are not interested in reading that.  Gnus does not
4338 know this, so it goes ahead and fetches article 2.  You decide to read
4339 article 3, but since Gnus is in the process of fetching article 2, the
4340 connection is blocked.
4341
4342 To avoid these situations, Gnus will open two (count 'em two)
4343 connections to the server.  Some people may think this isn't a very nice
4344 thing to do, but I don't see any real alternatives.  Setting up that
4345 extra connection takes some time, so Gnus startup will be slower.
4346
4347 Gnus will fetch more articles than you will read.  This will mean that
4348 the link between your machine and the @sc{nntp} server will become more
4349 loaded than if you didn't use article pre-fetch.  The server itself will
4350 also become more loaded---both with the extra article requests, and the
4351 extra connection.
4352
4353 Ok, so now you know that you shouldn't really use this thing...  unless
4354 you really want to.
4355
4356 @vindex gnus-asynchronous
4357 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
4358 happen automatically.
4359
4360 @vindex nntp-async-number
4361 You can control how many articles that are to be pre-fetched by setting
4362 @code{nntp-async-number}.  This is five by default, which means that when
4363 you read an article in the group, @code{nntp} will pre-fetch the next
4364 five articles.  If this variable is @code{t}, @code{nntp} will pre-fetch
4365 all the articles that it can without bound.  If it is @code{nil}, no
4366 pre-fetching will be made.
4367
4368 @vindex gnus-asynchronous-article-function
4369 You may wish to create some sort of scheme for choosing which articles
4370 that @code{nntp} should consider as candidates for pre-fetching.  For
4371 instance, you may wish to pre-fetch all articles with high scores, and
4372 not pre-fetch low-scored articles.  You can do that by setting the
4373 @code{gnus-asynchronous-article-function}, which will be called with an
4374 alist where the keys are the article numbers.  Your function should
4375 return an alist where the articles you are not interested in have been
4376 removed.  You could also do sorting on article score and the like. 
4377
4378
4379 @node Article Caching
4380 @section Article Caching
4381 @cindex article caching
4382 @cindex caching
4383
4384 If you have an @emph{extremely} slow @sc{nntp} connection, you may
4385 consider turning article caching on.  Each article will then be stored
4386 locally under your home directory.  As you may surmise, this could
4387 potentially use @emph{huge} amounts of disk space, as well as eat up all
4388 your inodes so fast it will make your head swim.  In vodka.
4389
4390 Used carefully, though, it could be just an easier way to save articles.
4391
4392 @vindex gnus-use-long-file-name
4393 @vindex gnus-cache-directory
4394 @vindex gnus-use-cache
4395 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
4396 all articles that are ticked or marked as dormant will then be copied
4397 over to your local cache (@code{gnus-cache-directory}).  Whether this
4398 cache is flat or hierarchal is controlled by the
4399 @code{gnus-use-long-file-name} variable, as usual.
4400
4401 When re-select a ticked or dormant article, it will be fetched from the
4402 cache instead of from the server.  As articles in your cache will never
4403 expire, this might serve as a method of saving articles while still
4404 keeping them where they belong.  Just mark all articles you want to save
4405 as dormant, and don't worry.
4406
4407 When an article is marked as read, is it removed from the cache.
4408
4409 @vindex gnus-cache-remove-articles
4410 @vindex gnus-cache-enter-articles
4411 The entering/removal of articles from the cache is controlled by the
4412 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
4413 variables.  Both are lists of symbols.  The first is @code{(ticked
4414 dormant)} by default, meaning that ticked and dormant articles will be
4415 put in the cache.  The latter is @code{(read)} by default, meaning that
4416 articles that are marked as read are removed from the cache.  Possibly
4417 symbols in these two lists are @code{ticked}, @code{dormant},
4418 @code{unread} and @code{read}.
4419
4420 @findex gnus-jog-cache
4421 So where does the massive article-fetching and storing come into the
4422 picture?  The @code{gnus-jog-cache} command will go through all
4423 subscribed newsgroups, request all unread articles, and store them in
4424 the cache.  You should only ever, ever ever ever, use this command if 1)
4425 your connection to the @sc{nntp} server is really, really, really slow
4426 and 2) you have a really, really, really huge disk.  Seriously.
4427
4428 @vindex gnus-uncacheable-groups
4429 It is likely that you do not want caching on some groups.  For instance,
4430 if your @code{nnml} mail is located under your home directory, it makes no
4431 sense to cache it somewhere else under your home directory.  Unless you
4432 feel that it's neat to use twice as much space.  To limit the caching,
4433 you could set the @code{gnus-uncacheable-groups} regexp to
4434 @samp{^nnml}, for instance.  This variable is @code{nil} by
4435 default.
4436
4437 @findex gnus-cache-generate-nov-databases
4438 @findex gnus-cache-generate-active
4439 @vindex gnus-cache-active-file
4440 The cache stores information on what articles it contains in its active
4441 file (@code{gnus-cache-active-file}).  If this file (or any other parts
4442 of the cache) becomes all messed up for some reason or other, Gnus
4443 offers two functions that will try to set things right.  @kbd{M-x
4444 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
4445 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
4446 file.
4447
4448
4449 @node Persistent Articles
4450 @section Persistent Articles
4451 @cindex persistent articles
4452
4453 Closely related to article caching, we have @dfn{persistent articles}.
4454 In fact, it's just a different way of looking at caching, and much more
4455 useful in my opinion.
4456
4457 Say you're reading a newsgroup, and you happen on to some valuable gem
4458 that you want to keep and treasure forever.  You'd normally just save it
4459 (using one of the many saving commands) in some file.  The problem with
4460 that is that it's just, well, yucky.  Ideally you'd prefer just having
4461 the article remain in the group where you found it forever; untouched by
4462 the expiry going on at the news server.
4463
4464 This is what a @dfn{persistent article} is---an article that just won't
4465 be deleted.  It's implemented using the normal cache functions, but
4466 you use two explicit commands for managing persistent articles:
4467
4468 @table @kbd
4469
4470 @item *
4471 @kindex * (Summary)
4472 @findex gnus-cache-enter-article
4473 Make the current article persistent (@code{gnus-cache-enter-article}). 
4474
4475 @item M-*
4476 @kindex M-* (Summary)
4477 @findex gnus-cache-remove-article
4478 Remove the current article from the persistent articles
4479 (@code{gnus-cache-remove-article}).  This will normally delete the
4480 article. 
4481 @end table
4482
4483 Both these commands understand the process/prefix convention. 
4484
4485 To avoid having all ticked articles (and stuff) entered into the cache,
4486 you should set @code{gnus-use-cache} to @code{passive} if you're just
4487 interested in persistent articles:
4488
4489 @lisp
4490 (setq gnus-use-cache 'passive)
4491 @end lisp
4492
4493
4494 @node Article Backlog
4495 @section Article Backlog
4496 @cindex backlog
4497 @cindex article backlog
4498
4499 If you have a slow connection, but the idea of using caching seems
4500 unappealing to you (and it is, really), you can help the situation some
4501 by switching on the @dfn{backlog}.  This is where Gnus will buffer
4502 already read articles so that it doesn't have to re-fetch articles
4503 you've already read.  This only helps if you are in the habit of
4504 re-selecting articles you've recently read, of course.  If you never do
4505 that, turning the backlog on will slow Gnus down a little bit, and
4506 increase memory usage some.
4507
4508 @vindex gnus-keep-backlog
4509 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
4510 at most @var{n} old articles in a buffer for later re-fetching.  If this
4511 variable is non-@code{nil} and is not a number, Gnus will store
4512 @emph{all} read articles, which means that your Emacs will grow without
4513 bound before exploding and taking your machine down with you.  I put
4514 that in there just to keep y'all on your toes.  
4515
4516 This variable is @code{nil} by default.
4517
4518
4519 @node Saving Articles
4520 @section Saving Articles
4521 @cindex saving articles
4522
4523 Gnus can save articles in a number of ways.  Below is the documentation
4524 for saving articles in a fairly straight-forward fashion (i.e., little
4525 processing of the article is done before it is saved).  For a different
4526 approach (uudecoding, unsharing) you should use @code{gnus-uu}
4527 (@pxref{Decoding Articles}).
4528
4529 @vindex gnus-save-all-headers
4530 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
4531 unwanted headers before saving the article.
4532
4533 @vindex gnus-saved-headers
4534 If the preceding variable is @code{nil}, all headers that match the
4535 @code{gnus-saved-headers} regexp will be kept, while the rest will be
4536 deleted before saving.
4537
4538 @table @kbd
4539
4540 @item O o
4541 @itemx o
4542 @kindex O o (Summary)
4543 @kindex o (Summary)
4544 @findex gnus-summary-save-article
4545 Save the current article using the default article saver
4546 (@code{gnus-summary-save-article}). 
4547
4548 @item O m
4549 @kindex O m (Summary)
4550 @findex gnus-summary-save-article-mail
4551 Save the current article in mail format
4552 (@code{gnus-summary-save-article-mail}). 
4553
4554 @item O r
4555 @kindex O r (Summary)
4556 @findex gnus-summary-save-article-rmail
4557 Save the current article in rmail format
4558 (@code{gnus-summary-save-article-rmail}). 
4559
4560 @item O f
4561 @kindex O f (Summary)
4562 @findex gnus-summary-save-article-file
4563 Save the current article in plain file format
4564 (@code{gnus-summary-save-article-file}). 
4565
4566 @item O b
4567 @kindex O b (Summary)
4568 @findex gnus-summary-save-article-body-file
4569 Save the current article body in plain file format
4570 (@code{gnus-summary-save-article-body-file}). 
4571
4572 @item O h
4573 @kindex O h (Summary)
4574 @findex gnus-summary-save-article-folder
4575 Save the current article in mh folder format
4576 (@code{gnus-summary-save-article-folder}). 
4577
4578 @item O v
4579 @kindex O v (Summary)
4580 @findex gnus-summary-save-article-vm
4581 Save the current article in a VM folder
4582 (@code{gnus-summary-save-article-vm}).
4583
4584 @item O p
4585 @kindex O p (Summary)
4586 @findex gnus-summary-pipe-output
4587 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
4588 the current article to a process (@code{gnus-summary-pipe-output}).
4589 @end table
4590
4591 @vindex gnus-prompt-before-saving
4592 All these commands use the process/prefix convention
4593 (@pxref{Process/Prefix}).  If you save bunches of articles using these
4594 functions, you might get tired of being prompted for files to save each
4595 and every article in.  The prompting action is controlled by
4596 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
4597 default, giving you that excessive prompting action you know and
4598 loathe.  If you set this variable to @code{t} instead, you'll be prompted
4599 just once for each series of articles you save.  If you like to really
4600 have Gnus do all your thinking for you, you can even set this variable
4601 to @code{nil}, which means that you will never be prompted for files to
4602 save articles in.  Gnus will simply save all the articles in the default
4603 files. 
4604
4605
4606 @vindex gnus-default-article-saver
4607 You can customize the @code{gnus-default-article-saver} variable to make
4608 Gnus do what you want it to.  You can use any of the four ready-made
4609 functions below, or you can create your own.
4610
4611 @table @code
4612
4613 @item gnus-summary-save-in-rmail
4614 @findex gnus-summary-save-in-rmail
4615 @vindex gnus-rmail-save-name
4616 @findex gnus-plain-save-name
4617 This is the default format, @dfn{babyl}.  Uses the function in the
4618 @code{gnus-rmail-save-name} variable to get a file name to save the
4619 article in.  The default is @code{gnus-plain-save-name}.
4620
4621 @item gnus-summary-save-in-mail
4622 @findex gnus-summary-save-in-mail
4623 @vindex gnus-mail-save-name
4624 Save in a Unix mail (mbox) file.  Uses the function in the
4625 @code{gnus-mail-save-name} variable to get a file name to save the
4626 article in.  The default is @code{gnus-plain-save-name}.
4627
4628 @item gnus-summary-save-in-file
4629 @findex gnus-summary-save-in-file
4630 @vindex gnus-file-save-name
4631 @findex gnus-numeric-save-name
4632 Append the article straight to an ordinary file.  Uses the function in
4633 the @code{gnus-file-save-name} variable to get a file name to save the
4634 article in.  The default is @code{gnus-numeric-save-name}.
4635
4636 @item gnus-summary-save-body-in-file
4637 @findex gnus-summary-save-body-in-file
4638 Append the article body to an ordinary file.  Uses the function in the
4639 @code{gnus-file-save-name} variable to get a file name to save the
4640 article in.  The default is @code{gnus-numeric-save-name}.
4641
4642 @item gnus-summary-save-in-folder
4643 @findex gnus-summary-save-in-folder
4644 @findex gnus-folder-save-name
4645 @findex gnus-Folder-save-name
4646 @vindex gnus-folder-save-name
4647 @cindex rcvstore
4648 @cindex MH folders
4649 Save the article to an MH folder using @code{rcvstore} from the MH
4650 library.  Uses the function in the @code{gnus-folder-save-name} variable
4651 to get a file name to save the article in.  The default is
4652 @code{gnus-folder-save-name}, but you can also use
4653 @code{gnus-Folder-save-name}.  The former creates capitalized names, and
4654 the latter does not.
4655
4656 @item gnus-summary-save-in-vm
4657 @findex gnus-summary-save-in-vm
4658 Save the article in a VM folder.  You have to have the VM mail
4659 reader to use this setting.
4660 @end table
4661
4662 @vindex gnus-article-save-directory
4663 All of these functions, except for the last one, will save the article
4664 in the @code{gnus-article-save-directory}, which is initialized from the
4665 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
4666 default. 
4667
4668 As you can see above, the functions use different functions to find a
4669 suitable name of a file to save the article in.  Below is a list of
4670 available functions that generate names:
4671
4672 @table @code
4673
4674 @item gnus-Numeric-save-name
4675 @findex gnus-Numeric-save-name
4676 Generates file names that look like @file{~/News/Alt.andrea-dworkin/45}.
4677
4678 @item gnus-numeric-save-name
4679 @findex gnus-numeric-save-name
4680 Generates file names that look like @file{~/News/alt.andrea-dworkin/45}.
4681
4682 @item gnus-Plain-save-name
4683 @findex gnus-Plain-save-name
4684 Generates file names that look like @file{~/News/Alt.andrea-dworkin}.
4685
4686 @item gnus-plain-save-name
4687 @findex gnus-plain-save-name
4688 Generates file names that look like @file{~/News/alt.andrea-dworkin}.
4689 @end table
4690
4691 @vindex gnus-split-methods
4692 You can have Gnus suggest where to save articles by plonking a regexp into
4693 the @code{gnus-split-methods} alist.  For instance, if you would like to
4694 save articles related to Gnus in the file @file{gnus-stuff}, and articles
4695 related to VM in @code{vm-stuff}, you could set this variable to something
4696 like:
4697
4698 @lisp
4699 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
4700  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
4701  (my-choosing-function "../other-dir/my-stuff")
4702  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
4703 @end lisp
4704
4705 We see that this is a list where each element is a list that has two
4706 elements---the @dfn{match} and the @dfn{file}.  The match can either be
4707 a string (in which case it is used as a regexp to match on the article
4708 head); it can be a symbol (which will be called as a function with the
4709 group name as a parameter); or it can be a list (which will be
4710 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
4711 the @dfn{file} will be used as a default prompt.  In addition, the
4712 result of the operation itself will be used if the function or form
4713 called returns a string or a list of strings.
4714
4715 You basically end up with a list of file names that might be used when
4716 saving the current article.  (All ``matches'' will be used.)  You will
4717 then be prompted for what you really want to use as a name, with file
4718 name completion over the results from applying this variable.
4719
4720 This variable is @code{((gnus-article-archive-name))} by default, which
4721 means that Gnus will look at the articles it saves for an
4722 @code{Archive-name} line and use that as a suggestion for the file
4723 name. 
4724
4725 @vindex gnus-use-long-file-name
4726 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
4727 @code{nil}, all the preceding functions will replace all periods
4728 (@samp{.}) in the group names with slashes (@samp{/})---which means that
4729 the functions will generate hierarchies of directories instead of having
4730 all the files in the toplevel directory
4731 (@file{~/News/alt/andrea-dworkin} instead of
4732 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
4733 on most systems.  However, for historical reasons, this is @code{nil} on
4734 Xenix and usg-unix-v machines by default.
4735
4736 This function also affects kill and score file names.  If this variable
4737 is a list, and the list contains the element @code{not-score}, long file
4738 names will not be used for score files, if it contains the element
4739 @code{not-save}, long file names will not be used for saving, and if it
4740 contains the element @code{not-kill}, long file names will not be used
4741 for kill files.
4742
4743 If you'd like to save articles in a hierarchy that looks something like
4744 a spool, you could
4745
4746 @lisp
4747 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
4748 (setq gnus-default-article-save 'gnus-summary-save-in-file) ; no encoding
4749 @end lisp
4750
4751 Then just save with @kbd{o}.  You'd then read this hierarchy with
4752 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
4753 the toplevel directory as the argument (@file{~/News/}).  Then just walk
4754 around to the groups/directories with @code{nneething}.
4755
4756
4757 @node Decoding Articles
4758 @section Decoding Articles
4759 @cindex decoding articles
4760
4761 Sometime users post articles (or series of articles) that have been
4762 encoded in some way or other.  Gnus can decode them for you.
4763
4764 @menu 
4765 * Uuencoded Articles::    Uudecode articles.
4766 * Shared Articles::       Unshar articles.
4767 * PostScript Files::      Split PostScript.
4768 * Decoding Variables::    Variables for a happy decoding.
4769 * Viewing Files::         You want to look at the result of the decoding?
4770 @end menu
4771
4772 All these functions use the process/prefix convention
4773 (@pxref{Process/Prefix}) for finding out what articles to work on, with
4774 the extension that a ``single article'' means ``a single series''.  Gnus
4775 can find out by itself what articles belong to a series, decode all the
4776 articles and unpack/view/save the resulting file(s).
4777
4778 Gnus guesses what articles are in the series according to the following
4779 simplish rule: The subjects must be (nearly) identical, except for the
4780 last two numbers of the line.  (Spaces are largely ignored, however.)
4781
4782 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
4783 will find all the articles that match the regexp @samp{^cat.gif
4784 ([0-9]+/[0-9]+).*$}.  
4785
4786 Subjects that are nonstandard, like @samp{cat.gif (2/3) Part 6 of a
4787 series}, will not be properly recognized by any of the automatic viewing
4788 commands, and you have to mark the articles manually with @kbd{#}.
4789
4790
4791 @node Uuencoded Articles
4792 @subsection Uuencoded Articles
4793 @cindex uudecode
4794 @cindex uuencoded articles
4795
4796 @table @kbd
4797
4798 @item X u
4799 @kindex X u (Summary)
4800 @findex gnus-uu-decode-uu
4801 Uudecodes the current series (@code{gnus-uu-decode-uu}).
4802
4803 @item X U
4804 @kindex X U (Summary)
4805 @findex gnus-uu-decode-uu-and-save
4806 Uudecodes and saves the current series
4807 (@code{gnus-uu-decode-uu-and-save}).
4808
4809 @item X v u
4810 @kindex X v u (Summary)
4811 @findex gnus-uu-decode-uu-view
4812 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
4813
4814 @item X v U
4815 @kindex X v U (Summary)
4816 @findex gnus-uu-decode-uu-and-save-view
4817 Uudecodes, views and saves the current series
4818 (@code{gnus-uu-decode-uu-and-save-view}). 
4819 @end table
4820
4821 Remember that these all react to the presence of articles marked with
4822 the process mark.  If, for instance, you'd like to decode and save an
4823 entire newsgroup, you'd typically do @kbd{M P a}
4824 (@code{gnus-uu-mark-all}) and then @kbd{X U}
4825 (@code{gnus-uu-decode-uu-and-save}).
4826
4827 All this is very much different from how @code{gnus-uu} worked with
4828 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
4829 the sun.  This version of @code{gnus-uu} generally assumes that you mark
4830 articles in some way (@pxref{Setting Process Marks}) and then press
4831 @kbd{X u}.
4832
4833 @vindex gnus-uu-notify-files
4834 Note: When trying to decode articles that have names matching
4835 @code{gnus-uu-notify-files}, which is hard-coded to
4836 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
4837 automatically post an article on @samp{comp.unix.wizards} saying that
4838 you have just viewed the file in question.  This feature can't be turned
4839 off.
4840
4841
4842 @node Shared Articles
4843 @subsection Shared Articles
4844 @cindex unshar
4845 @cindex shared articles
4846
4847 @table @kbd
4848
4849 @item X s
4850 @kindex X s (Summary)
4851 @findex gnus-uu-decode-unshar
4852 Unshars the current series (@code{gnus-uu-decode-unshar}).
4853
4854 @item X S
4855 @kindex X S (Summary)
4856 @findex gnus-uu-decode-unshar-and-save
4857 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
4858
4859 @item X v s
4860 @kindex X v s (Summary)
4861 @findex gnus-uu-decode-unshar-view
4862 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
4863
4864 @item X v S
4865 @kindex X v S (Summary)
4866 @findex gnus-uu-decode-unshar-and-save-view
4867 Unshars, views and saves the current series
4868 (@code{gnus-uu-decode-unshar-and-save-view}). 
4869 @end table
4870
4871
4872 @node PostScript Files
4873 @subsection PostScript Files
4874 @cindex PostScript
4875
4876 @table @kbd
4877
4878 @item X p
4879 @kindex X p (Summary)
4880 @findex gnus-uu-decode-postscript
4881 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
4882
4883 @item X P
4884 @kindex X P (Summary)
4885 @findex gnus-uu-decode-postscript-and-save
4886 Unpack and save the current PostScript series
4887 (@code{gnus-uu-decode-postscript-and-save}).
4888
4889 @item X v p
4890 @kindex X v p (Summary)
4891 @findex gnus-uu-decode-postscript-view
4892 View the current PostScript series
4893 (@code{gnus-uu-decode-postscript-view}).
4894
4895 @item X v P
4896 @kindex X v P (Summary)
4897 @findex gnus-uu-decode-postscript-and-save-view
4898 View and save the current PostScript series
4899 (@code{gnus-uu-decode-postscript-and-save-view}). 
4900 @end table
4901
4902
4903 @node Decoding Variables
4904 @subsection Decoding Variables
4905
4906 Adjective, not verb.
4907
4908 @menu 
4909 * Rule Variables::          Variables that say how a file is to be viewed.
4910 * Other Decode Variables::  Other decode variables.
4911 * Uuencoding and Posting::  Variables for customizing uuencoding.
4912 @end menu
4913
4914
4915 @node Rule Variables
4916 @subsubsection Rule Variables
4917 @cindex rule variables
4918
4919 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
4920 variables are on the form
4921   
4922 @lisp
4923       (list '(regexp1 command2)
4924             '(regexp2 command2)
4925             ...)
4926 @end lisp
4927
4928 @table @code
4929
4930 @item gnus-uu-user-view-rules
4931 @vindex gnus-uu-user-view-rules
4932 @cindex sox
4933 This variable is consulted first when viewing files.  If you wish to use,
4934 for instance, @code{sox} to convert an @samp{.au} sound file, you could
4935 say something like:
4936 @lisp
4937        (setq gnus-uu-user-view-rules
4938          (list '(\"\\\\.au$\" \"sox %s -t .aiff > /dev/audio\")))
4939 @end lisp
4940
4941 @item gnus-uu-user-view-rules-end
4942 @vindex gnus-uu-user-view-rules-end
4943 This variable is consulted if Gnus couldn't make any matches from the
4944 user and default view rules.
4945
4946 @item gnus-uu-user-archive-rules
4947 @vindex gnus-uu-user-archive-rules
4948 This variable can be used to say what commands should be used to unpack
4949 archives.
4950 @end table
4951
4952
4953 @node Other Decode Variables
4954 @subsubsection Other Decode Variables
4955
4956 @table @code
4957 @vindex gnus-uu-grabbed-file-functions
4958
4959 @item gnus-uu-grabbed-file-functions
4960 All functions in this list will be called right each file has been
4961 successfully decoded---so that you can move or view files right away,
4962 and don't have to wait for all files to be decoded before you can do
4963 anything.  Ready-made functions you can put in this list are:
4964
4965 @table @code
4966
4967 @item gnus-uu-grab-view
4968 @findex gnus-uu-grab-view
4969 View the file.
4970
4971 @item gnus-uu-grab-move
4972 @findex gnus-uu-grab-move
4973 Move the file (if you're using a saving function.)
4974 @end table
4975
4976 @item gnus-uu-ignore-files-by-name
4977 @vindex gnus-uu-ignore-files-by-name
4978 Files with name matching this regular expression won't be viewed.
4979
4980 @item gnus-uu-ignore-files-by-type
4981 @vindex gnus-uu-ignore-files-by-type
4982 Files with a @sc{mime} type matching this variable won't be viewed.
4983 Note that Gnus tries to guess what type the file is based on the name.
4984 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
4985 kludgey.
4986
4987 @item gnus-uu-tmp-dir
4988 @vindex gnus-uu-tmp-dir
4989 Where @code{gnus-uu} does its work.
4990
4991 @item gnus-uu-do-not-unpack-archives
4992 @vindex gnus-uu-do-not-unpack-archives
4993 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
4994 looking for files to display.
4995
4996 @item gnus-uu-view-and-save
4997 @vindex gnus-uu-view-and-save
4998 Non-@code{nil} means that the user will always be asked to save a file
4999 after viewing it.
5000
5001 @item gnus-uu-ignore-default-view-rules
5002 @vindex gnus-uu-ignore-default-view-rules
5003 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
5004 rules.
5005
5006 @item gnus-uu-ignore-default-archive-rules
5007 @vindex gnus-uu-ignore-default-archive-rules
5008 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
5009 unpacking commands.
5010
5011 @item gnus-uu-kill-carriage-return
5012 @vindex gnus-uu-kill-carriage-return
5013 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
5014 from articles.
5015
5016 @item gnus-uu-unmark-articles-not-decoded
5017 @vindex gnus-uu-unmark-articles-not-decoded
5018 Non-@code{nil} means that @code{gnus-uu} will mark articles that were
5019 unsuccessfully decoded as unread.
5020
5021 @item gnus-uu-correct-stripped-uucode
5022 @vindex gnus-uu-correct-stripped-uucode
5023 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
5024 uuencoded files that have had trailing spaces deleted.
5025
5026 @item gnus-uu-view-with-metamail
5027 @vindex gnus-uu-view-with-metamail
5028 @cindex metamail
5029 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
5030 commands defined by the rule variables and just fudge a @sc{mime}
5031 content type based on the file name.  The result will be fed to
5032 @code{metamail} for viewing.
5033
5034 @item gnus-uu-save-in-digest
5035 @vindex gnus-uu-save-in-digest
5036 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
5037 decoding, will save in digests.  If this variable is @code{nil},
5038 @code{gnus-uu} will just save everything in a file without any
5039 embellishments.  The digesting almost conforms to RFC1153---no easy way
5040 to specify any meaningful volume and issue numbers were found, so I
5041 simply dropped them.
5042
5043 @end table
5044
5045
5046 @node Uuencoding and Posting
5047 @subsubsection Uuencoding and Posting
5048
5049 @table @code
5050
5051 @item gnus-uu-post-include-before-composing
5052 @vindex gnus-uu-post-include-before-composing
5053 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
5054 before you compose the article.  If this variable is @code{t}, you can
5055 either include an encoded file with @kbd{C-c C-i} or have one included
5056 for you when you post the article.
5057
5058 @item gnus-uu-post-length
5059 @vindex gnus-uu-post-length
5060 Maximum length of an article.  The encoded file will be split into how
5061 many articles it takes to post the entire file.
5062
5063 @item gnus-uu-post-threaded
5064 @vindex gnus-uu-post-threaded
5065 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
5066 thread.  This may not be smart, as no other decoder I have seen are able
5067 to follow threads when collecting uuencoded articles.  (Well, I have
5068 seen one package that does that---@code{gnus-uu}, but somehow, I don't
5069 think that counts...) Default is @code{nil}.
5070
5071 @item gnus-uu-post-separate-description
5072 @vindex gnus-uu-post-separate-description
5073 Non-@code{nil} means that the description will be posted in a separate
5074 article.  The first article will typically be numbered (0/x).  If this
5075 variable is @code{nil}, the description the user enters will be included
5076 at the beginning of the first article, which will be numbered (1/x).
5077 Default is @code{t}.
5078
5079 @end table
5080
5081
5082 @node Viewing Files
5083 @subsection Viewing Files
5084 @cindex viewing files
5085 @cindex pseudo-articles
5086
5087 After decoding, if the file is some sort of archive, Gnus will attempt
5088 to unpack the archive and see if any of the files in the archive can be
5089 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
5090 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
5091 uncompress and de-tar the main file, and then view the two pictures.
5092 This unpacking process is recursive, so if the archive contains archives
5093 of archives, it'll all be unpacked.
5094
5095 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
5096 extracted file into the summary buffer.  If you go to these
5097 ``articles'', you will be prompted for a command to run (usually Gnus
5098 will make a suggestion), and then the command will be run.
5099
5100 @vindex gnus-view-pseudo-asynchronously
5101 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
5102 until the viewing is done before proceeding.
5103
5104 @vindex gnus-view-pseudos
5105 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
5106 the pseudo-articles into the summary buffer, but view them
5107 immediately.  If this variable is @code{not-confirm}, the user won't even
5108 be asked for a confirmation before viewing is done.
5109
5110 @vindex gnus-view-pseudos-separately 
5111 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
5112 pseudo-article will be created for each file to be viewed.  If
5113 @code{nil}, all files that use the same viewing command will be given as
5114 a list of parameters to that command.
5115
5116 @vindex gnus-insert-pseudo-articles
5117 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
5118 pseudo-articles when decoding.  It is @code{t} by default.
5119
5120 So; there you are, reading your @emph{pseudo-articles} in your
5121 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
5122 Why isn't anything real anymore? How did we get here?
5123
5124
5125 @node Article Treatment
5126 @section Article Treatment
5127
5128 Reading through this huge manual, you may have quite forgotten that the
5129 object of newsreaders are to actually, like, read what people have
5130 written.  Reading articles.  Unfortunately, people are quite bad at
5131 writing, so there are tons of functions and variables to make reading
5132 these articles easier.
5133
5134 @menu
5135 * Article Highlighting::    You want to make the article look like fruit salad.
5136 * Article Hiding::          You also want to make certain info go away.
5137 * Article Washing::         Lots of way-neat functions to make life better.
5138 * Article Buttons::         Click on URLs, Message-IDs, addresses and the like.
5139 * Article Date::            Grumble, UT!
5140 * Article Signature::       What is a signature?
5141 @end menu
5142
5143
5144 @node Article Highlighting
5145 @subsection Article Highlighting
5146 @cindex highlight
5147
5148 Not only do you want your article buffer to look like fruit salad, but
5149 you want it to look like technicolor fruit salad.
5150
5151 @table @kbd
5152
5153 @item W H a
5154 @kindex W H a (Summary)
5155 @findex gnus-article-highlight
5156 Highlight the current article (@code{gnus-article-highlight}).
5157
5158 @item W H h
5159 @kindex W H h (Summary)
5160 @findex gnus-article-highlight-headers
5161 @vindex gnus-header-face-alist
5162 Highlight the headers (@code{gnus-article-highlight-headers}).  The
5163 highlighting will be done according to the @code{gnus-header-face-alist}
5164 variable, which is a list where each element has the form @var{(regexp
5165 name content)}.  @var{regexp} is a regular expression for matching the
5166 header, @var{name} is the face used for highlighting the header name and
5167 @var{content} is the face for highlighting the header value.  The first
5168 match made will be used.  Note that @var{regexp} shouldn't have @samp{^}
5169 prepended---Gnus will add one.
5170
5171 @item W H c
5172 @kindex W H c (Summary)
5173 @findex gnus-article-highlight-citation
5174 Highlight cited text (@code{gnus-article-highlight-citation}). 
5175
5176 Some variables to customize the citation highlights:
5177
5178 @table @code
5179 @vindex gnus-cite-parse-max-size
5180
5181 @item gnus-cite-parse-max-size
5182 If the article size if bigger than this variable (which is 25000 by
5183 default), no citation highlighting will be performed.  
5184
5185 @item gnus-cite-prefix-regexp
5186 @vindex gnus-cite-prefix-regexp
5187 Regexp matching the longest possible citation prefix on a line. 
5188
5189 @item gnus-cite-max-prefix
5190 @vindex gnus-cite-max-prefix
5191 Maximum possible length for a citation prefix (default 20).
5192
5193 @item gnus-cite-face-list
5194 @vindex gnus-cite-face-list
5195 List of faces used for highlighting citations.  When there are citations
5196 from multiple articles in the same message, Gnus will try to give each
5197 citation from each article its own face.  This should make it easier to
5198 see who wrote what.
5199
5200 @item gnus-supercite-regexp
5201 @vindex gnus-supercite-regexp
5202 Regexp matching normal Supercite attribution lines.  
5203
5204 @item gnus-supercite-secondary-regexp
5205 @vindex gnus-supercite-secondary-regexp
5206 Regexp matching mangled Supercite attribution lines.
5207
5208 @item gnus-cite-minimum-match-count
5209 @vindex gnus-cite-minimum-match-count
5210 Minimum number of identical prefixes we have to see before we believe
5211 that it's a citation.
5212
5213 @item gnus-cite-attribution-prefix
5214 @vindex gnus-cite-attribution-prefix
5215 Regexp matching the beginning of an attribution line.
5216
5217 @item gnus-cite-attribution-suffix
5218 @vindex gnus-cite-attribution-suffix
5219 Regexp matching the end of an attribution line.
5220
5221 @item gnus-cite-attribution-face
5222 @vindex gnus-cite-attribution-face
5223 Face used for attribution lines.  It is merged with the face for the
5224 cited text belonging to the attribution.
5225
5226 @end table
5227
5228
5229 @item W H s
5230 @kindex W H s (Summary)
5231 @vindex gnus-signature-separator
5232 @vindex gnus-signature-face
5233 @findex gnus-article-highlight-signature
5234 Highlight the signature (@code{gnus-article-highlight-signature}).
5235 Everything after @code{gnus-signature-separator} (@pxref{Article
5236 Signature}) in an article will be considered a signature and will be
5237 highlighted with @code{gnus-signature-face}, which is @code{italic} by
5238 default.
5239
5240 @end table
5241
5242
5243 @node Article Hiding
5244 @subsection Article Hiding
5245 @cindex article hiding
5246
5247 Or rather, hiding certain things in each article.  There usually is much
5248 too much cruft in most articles.  
5249
5250 @table @kbd
5251
5252 @item W W a
5253 @kindex W W a (Summary)
5254 @findex gnus-article-hide
5255 Do maximum hiding on the summary buffer (@kbd{gnus-article-hide}). 
5256
5257 @item W W h
5258 @kindex W W h (Summary)
5259 @findex gnus-article-hide-headers
5260 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
5261 Headers}. 
5262
5263 @item W W b
5264 @kindex W W b (Summary)
5265 @findex gnus-article-hide-boring-headers
5266 Hide headers that aren't particularly interesting
5267 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
5268
5269 @item W W s
5270 @kindex W W s (Summary)
5271 @findex gnus-article-hide-signature
5272 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
5273 Signature}. 
5274
5275 @item W W p
5276 @kindex W W p (Summary)
5277 @findex gnus-article-hide-pgp
5278 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}). 
5279
5280 @item W W P
5281 @kindex W W P (Summary)
5282 @findex gnus-article-hide-pem
5283 Hide @sc{pem} (privacy enhavnced hessages) gruft
5284 (@code{gnus-article-hide-pem}).
5285
5286 @item W W c
5287 @kindex W W c (Summary)
5288 @findex gnus-article-hide-citation
5289 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
5290 customizing the hiding:
5291
5292 @table @code
5293
5294 @item gnus-cite-hide-percentage
5295 @vindex gnus-cite-hide-percentage
5296 If the cited text is of a bigger percentage than this variable (default
5297 50), hide the cited text.
5298
5299 @item gnus-cite-hide-absolute
5300 @vindex gnus-cite-hide-absolute
5301 The cited text must be have at least this length (default 10) before it
5302 is hidden.
5303
5304 @item gnus-cited-text-button-line-format
5305 @vindex gnus-cited-text-button-line-format
5306 Gnus adds buttons show where the cited text has been hidden, and to
5307 allow toggle hiding the text.  The format of the variable is specified
5308 by this format-like variable (@pxref{Formatting Variables}).  These
5309 specs are legal:
5310
5311 @table @samp
5312 @item b
5313 Start point of the hidden text.
5314 @item e
5315 End point of the hidden text.
5316 @item l
5317 Length of the hidden text.
5318 @end table
5319
5320 @item gnus-cited-lines-visible
5321 @vindex gnus-cited-lines-visible
5322 The number of lines at the beginning of the cited text to leave shown. 
5323
5324 @end table
5325
5326 @item W W C
5327 @kindex W W C (Summary)
5328 @findex gnus-article-hide-citation-in-followups
5329 Hide cited text in articles that aren't roots
5330 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
5331 useful as an interactive command, but might be a handy function to stick
5332 in @code{gnus-article-display-hook} (@pxref{Customizing Articles}). 
5333
5334 @end table
5335
5336 All these ``hiding'' commands are toggles, but if you give a negative
5337 prefix to these commands, they will show what they have previously
5338 hidden.  If you give a positive prefix, they will always hide.
5339
5340 Also @pxref{Article Highlighting} for further variables for
5341 citation customization.
5342
5343
5344 @node Article Washing
5345 @subsection Article Washing
5346 @cindex washing
5347 @cindex article washing
5348
5349 We call this ``article washing'' for a really good reason.  Namely, the
5350 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
5351
5352 @dfn{Washing} is defined by us as ``changing something from something to
5353 something else'', but normally results in something looking better.
5354 Cleaner, perhaps.
5355
5356 @table @kbd
5357
5358 @item W l
5359 @kindex W l (Summary)
5360 @findex gnus-summary-stop-page-breaking
5361 Remove page breaks from the current article
5362 (@code{gnus-summary-stop-page-breaking}).
5363
5364 @item W r
5365 @kindex W r (Summary)
5366 @findex gnus-summary-caesar-message
5367 Do a Caesar rotate (rot13) on the article buffer
5368 (@code{gnus-summary-caesar-message}). 
5369
5370 @item W t
5371 @kindex W t (Summary)
5372 @findex gnus-summary-toggle-header
5373 Toggle whether to display all headers in the article buffer
5374 (@code{gnus-summary-toggle-header}). 
5375
5376 @item W v
5377 @kindex W v (Summary)
5378 @findex gnus-summary-verbose-header
5379 Toggle whether to display all headers in the article buffer permanently
5380 (@code{gnus-summary-verbose-header}).
5381
5382 @item W m
5383 @kindex W m (Summary)
5384 @findex gnus-summary-toggle-mime
5385 Toggle whether to run the article through @sc{mime} before displaying
5386 (@code{gnus-summary-toggle-mime}).
5387
5388 @item W o
5389 @kindex W o (Summary)
5390 @findex gnus-article-treat-overstrike
5391 Treat overstrike (@code{gnus-article-treat-overstrike}).
5392
5393 @item W w
5394 @kindex W w (Summary)
5395 @findex gnus-article-fill-cited-article
5396 Do word wrap (@code{gnus-article-fill-cited-article}).  If you use this
5397 function in @code{gnus-article-display-hook}, it should be run fairly
5398 late and certainly after any highlighting.
5399
5400 @item W c
5401 @kindex W c (Summary)
5402 @findex gnus-article-remove-cr
5403 Remove CR (@code{gnus-article-remove-cr}).
5404
5405 @item W L
5406 @kindex W L (Summary)
5407 @findex gnus-article-remove-trailing-blank-lines
5408 Remove all blank lines at the end of the article
5409 (@code{gnus-article-remove-trailing-blank-lines}).
5410
5411 @item W q
5412 @kindex W q (Summary)
5413 @findex gnus-article-de-quoted-unreadable
5414 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
5415
5416 @item W f
5417 @kindex W f (Summary)
5418 @cindex x-face
5419 @findex gnus-article-display-x-face
5420 @findex gnus-article-x-face-command
5421 @vindex gnus-article-x-face-command
5422 @vindex gnus-article-x-face-too-ugly
5423 Look for and display any X-Face headers
5424 (@code{gnus-article-display-x-face}).  The command executed by this
5425 function is given by the @code{gnus-article-x-face-command} variable.
5426 If this variable is a string, this string will be executed in a
5427 sub-shell.  If it is a function, this function will be called with the
5428 face as the argument.  If the @code{gnus-article-x-face-too-ugly} (which
5429 is a regexp) matches the @code{From} header, the face will not be shown.
5430 The default action under Emacs is to fork off an @code{xv} to view the
5431 face; under XEmacs the default action is to display the face before the
5432 @code{From} header.  (It's nicer if XEmacs has been compiled with X-Face
5433 support---that will make display somewhat faster.  If there's no native
5434 X-Face support, Gnus will try to convert the @code{X-Face} header using
5435 external programs from the @code{pbmplus} package and friends.)  If you
5436 want to have this function in the display hook, it should probably come
5437 last.
5438
5439 @item W b
5440 @kindex W b (Summary)
5441 @findex gnus-article-add-buttons
5442 Add clickable buttons to the article (@code{gnus-article-add-buttons}). 
5443
5444 @item W B
5445 @kindex W B (Summary)
5446 @findex gnus-article-add-buttons-to-head
5447 Add clickable buttons to the article headers
5448 (@code{gnus-article-add-buttons-to-head}).  
5449
5450 @end table
5451
5452
5453 @node Article Buttons
5454 @subsection Article Buttons
5455 @cindex buttons
5456
5457 People often include references to other stuff in articles, and it would
5458 be nice if Gnus could just fetch whatever it is that people talk about
5459 with the minimum of fuzz.
5460
5461 Gnus adds @dfn{buttons} to certain standard references by default:
5462 Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
5463 two variables, one that handles article bodies and one that handles
5464 article heads:
5465
5466 @table @code
5467
5468 @item gnus-button-alist
5469 @vindex gnus-button-alist
5470 This is an alist where each entry has this form:
5471
5472 @lisp
5473 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
5474 @end lisp
5475
5476 @table @var
5477
5478 @item regexp
5479 All text that match this regular expression will be considered an
5480 external reference.  Here's a typical regexp that match embedded URLs:
5481 @samp{<URL:\\([^\n\r>]*\\)>}. 
5482
5483 @item button-par
5484 Gnus has to know which parts of the match is to be highlighted.  This is
5485 a number that says what sub-expression of the regexp that is to be
5486 highlighted.  If you want it all highlighted, you use @code{0} here.
5487
5488 @item use-p
5489 This form will be @code{eval}ed, and if the result is non-@code{nil},
5490 this is considered a match.  This is useful if you want extra sifting to
5491 avoid false matches.
5492
5493 @item function
5494 This function will be called when you click on this button.
5495
5496 @item data-par
5497 As with @var{button-par}, this is a sub-expression number, but this one
5498 says which part of the match is to be sent as data to @var{function}. 
5499
5500 @end table
5501
5502 So the full entry for buttonizing URLs is then
5503
5504 @lisp
5505 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
5506 @end lisp
5507
5508 @item gnus-header-button-alist
5509 @vindex gnus-header-button-alist
5510 This is just like the other alist, except that it is applied to the
5511 article head only, and that each entry has an additional element that is
5512 used to say what headers to apply the buttonize coding to:
5513
5514 @lisp
5515 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
5516 @end lisp
5517
5518 @var{header} is a regular expression.
5519
5520 @item gnus-button-url-regexp
5521 @vindex gnus-button-url-regexp
5522 A regular expression that matches embedded URLs.  It is used in the
5523 default values of the variables above.
5524
5525 @item gnus-article-button-face
5526 @vindex gnus-article-button-face
5527 Face used on bottons.
5528
5529 @item gnus-article-mouse-face
5530 @vindex gnus-article-mouse-face
5531 Face is used when the mouse cursor is over a button.
5532
5533 @end table
5534
5535
5536 @node Article Date
5537 @subsection Article Date
5538
5539 The date is most likely generated in some obscure timezone you've never
5540 heard of, so it's quite nice to be able to find out what the time was
5541 when the article was sent.
5542
5543 @table @kbd
5544
5545 @item W T u
5546 @kindex W T u (Summary)
5547 @findex gnus-article-date-ut
5548 Display the date in UT (aka. GMT, aka ZULU)
5549 (@code{gnus-article-date-ut}). 
5550
5551 @item W T l
5552 @kindex W T l (Summary)
5553 @findex gnus-article-date-local
5554 Display the date in the local timezone (@code{gnus-article-date-local}).
5555
5556 @item W T e
5557 @kindex W T e (Summary)
5558 @findex gnus-article-date-lapsed
5559 Say how much time has (e)lapsed between the article was posted and now
5560 (@code{gnus-article-date-lapsed}).
5561
5562 @item W T o
5563 @kindex W T o (Summary)
5564 @findex gnus-article-date-original
5565 Display the original date (@code{gnus-article-date-original}).  This can
5566 be useful if you normally use some other conversion function and is
5567 worried that it might be doing something totally wrong.  Say, claiming
5568 that the article was posted in 1854.  Although something like that is
5569 @emph{totally} impossible.  Don't you trust me? *titter*
5570
5571 @end table
5572
5573
5574 @node Article Signature
5575 @subsection Article Signature
5576 @cindex signatures
5577 @cindex article signature
5578
5579 @vindex gnus-signature-separator
5580 Each article is divided into two parts---the head and the body.  The
5581 body can be divided into a signature part and a text part.  The variable
5582 that says what is to be considered a signature is
5583 @code{gnus-signature-separator}.  This is normally the standard
5584 @samp{"^-- $"} as mandated by son-of-RFC 1036.  However, many people use
5585 non-standard signature separators, so this variable can also be a list
5586 of regular expressions to be tested, one by one.  (Searches are done
5587 from the end of the body towards the beginning.)  One likely value is:
5588
5589 @lisp
5590 (setq gnus-signature-separator
5591       '("^-- $"         ; The standard
5592         "^-- *$"        ; A common mangling
5593         "^-------*$"    ; Many people just use a looong 
5594                         ; line of dashes.  Shame!
5595         "^ *--------*$" ; Double-shame!
5596         "^________*$"   ; Underscores are also popular
5597         "^========*$")) ; Pervert!
5598 @end lisp
5599
5600 The more permissive you are, the more likely it is that you'll get false
5601 positives.
5602
5603 @vindex gnus-signature-limit
5604 @code{gnus-signature-limit} provides a limit to what is considered a
5605 signature. 
5606
5607 @enumerate
5608 @item 
5609 If it is an integer, no signature may be longer (in characters) than
5610 that integer.
5611 @item 
5612 If it is a floating point number, no signature may be longer (in lines)
5613 than that number.
5614 @item 
5615 If it is a function, the function will be called without any parameters,
5616 and if it returns @code{nil}, there is no signature in the buffer.
5617 @item
5618 If it is a string, it will be used as a regexp.  If it matches, the text
5619 in question is not a signature.
5620 @end enumerate
5621
5622 This variable can also be a list where the elements may be of the types
5623 listed above.  
5624
5625
5626 @node Summary Sorting
5627 @section Summary Sorting
5628 @cindex summary sorting
5629
5630 You can have the summary buffer sorted in various ways, even though I
5631 can't really see why you'd want that.
5632
5633 @table @kbd
5634
5635 @item C-c C-s C-n
5636 @kindex C-c C-s C-n (Summary)
5637 @findex gnus-summary-sort-by-number
5638 Sort by article number (@code{gnus-summary-sort-by-number}).
5639
5640 @item C-c C-s C-a
5641 @kindex C-c C-s C-a (Summary)
5642 @findex gnus-summary-sort-by-author
5643 Sort by author (@code{gnus-summary-sort-by-author}).
5644
5645 @item C-c C-s C-s
5646 @kindex C-c C-s C-s (Summary)
5647 @findex gnus-summary-sort-by-subject
5648 Sort by subject (@code{gnus-summary-sort-by-subject}).
5649
5650 @item C-c C-s C-d
5651 @kindex C-c C-s C-d (Summary)
5652 @findex gnus-summary-sort-by-date
5653 Sort by date (@code{gnus-summary-sort-by-date}).
5654
5655 @item C-c C-s C-i
5656 @kindex C-c C-s C-i (Summary)
5657 @findex gnus-summary-sort-by-score
5658 Sort by score (@code{gnus-summary-sort-by-score}).
5659 @end table
5660
5661 These functions will work both when you use threading and when you don't
5662 use threading.  In the latter case, all summary lines will be sorted,
5663 line by line.  In the former case, sorting will be done on a
5664 root-by-root basis, which might not be what you were looking for.  To
5665 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
5666 Commands}).
5667
5668
5669 @node Finding the Parent
5670 @section Finding the Parent
5671 @cindex parent articles
5672 @cindex referring articles
5673
5674 @findex gnus-summary-refer-parent-article
5675 @kindex ^ (Summary)
5676 If you'd like to read the parent of the current article, and it is not
5677 displayed in the summary buffer, you might still be able to.  That is,
5678 if the current group is fetched by @sc{nntp}, the parent hasn't expired
5679 and the @code{References} in the current article are not mangled, you
5680 can just press @kbd{^} or @kbd{A r}
5681 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
5682 you'll get the parent.  If the parent is already displayed in the
5683 summary buffer, point will just move to this article.
5684
5685 @findex gnus-summary-refer-references
5686 @kindex A R (Summary)
5687 You can have Gnus fetch all articles mentioned in the @code{References}
5688 header of the article by pushing @kbd{A R}
5689 (@code{gnus-summary-refer-references}). 
5690
5691 @findex gnus-summary-refer-article
5692 @kindex M-^ (Summary)
5693 You can also ask the @sc{nntp} server for an arbitrary article, no
5694 matter what group it belongs to.  @kbd{M-^}
5695 (@code{gnus-summary-refer-article}) will ask you for a
5696 @code{Message-ID}, which is one of those long thingies that look
5697 something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You have to get
5698 it all exactly right.  No fuzzy searches, I'm afraid.
5699
5700 @vindex gnus-refer-article-method
5701 If the group you are reading is located on a backend that does not
5702 support fetching by @code{Message-ID} very well (like @code{nnspool}),
5703 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
5704 would, perhaps, be best if the @sc{nntp} server you consult is the same
5705 as the one that keeps the spool you are reading from updated, but that's
5706 not really necessary.
5707
5708 Most of the mail backends support fetching by @code{Message-ID}, but do
5709 not do a particularly excellent job of it.  That is, @code{nnmbox} and
5710 @code{nnbabyl} are able to locate articles from any groups, while
5711 @code{nnml} and @code{nnfolder} are only able to locate articles that
5712 have been posted to the current group.  (Anything else would be too time
5713 consuming.)  @code{nnmh} does not support this at all.
5714
5715
5716 @node Alternative Approaches
5717 @section Alternative Approaches
5718
5719 Different people like to read news using different methods.  This being
5720 Gnus, we offer a small selection of minor modes for the summary buffers.
5721
5722 @menu
5723 * Pick and Read::               First mark articles and then read them.
5724 * Binary Groups::               Auto-decode all articles.
5725 @end menu
5726
5727
5728 @node Pick and Read
5729 @subsection Pick and Read
5730 @cindex pick and read
5731
5732 Some newsreaders (like @code{nn} and, uhm, @code{nn}) use a two-phased
5733 reading interface.  The user first marks the articles she wants to read
5734 from a summary buffer.  Then she starts reading the articles with just
5735 an article buffer displayed.
5736
5737 @findex gnus-pick-mode
5738 @kindex M-x gnus-pick-mode
5739 Gnus provides a summary buffer minor mode that allows
5740 this---@code{gnus-pick-mode}.  This basically means that a few process
5741 mark commands become one-keystroke commands to allow easy marking, and
5742 it makes one additional command for switching to the summary buffer
5743 available. 
5744
5745 Here are the available keystrokes when using pick mode:
5746
5747 @table @kbd
5748 @item .
5749 @kindex . (Pick)
5750 @findex gnus-summary-mark-as-processable
5751 Pick the article on the current line
5752 (@code{gnus-summary-mark-as-processable}).  If given a numerical prefix,
5753 go to the article on that line and pick that article.  (The line number
5754 is normally displayed on the beginning of the summary pick lines.)
5755
5756 @item SPACE
5757 @kindex SPACE (Pick)
5758 @findex gnus-pick-next-page
5759 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
5760 at the end of the buffer, start reading the picked articles.
5761
5762 @item u
5763 @kindex u (Pick)
5764 @findex gnus-summary-unmark-as-processable
5765 Unpick the article (@code{gnus-summary-unmark-as-processable}). 
5766
5767 @item U
5768 @kindex U (Pick)
5769 @findex gnus-summary-unmark-all-processable
5770 Unpick all articles (@code{gnus-summary-unmark-all-processable}). 
5771
5772 @item t
5773 @kindex t (Pick)
5774 @findex gnus-uu-mark-thread
5775 Pick the thread (@code{gnus-uu-mark-thread}). 
5776
5777 @item T
5778 @kindex T (Pick)
5779 @findex gnus-uu-unmark-thread
5780 Unpick the thread (@code{gnus-uu-unmark-thread}). 
5781
5782 @item r
5783 @kindex r (Pick)
5784 @findex gnus-uu-mark-region
5785 Pick the region (@code{gnus-uu-mark-region}). 
5786
5787 @item R
5788 @kindex R (Pick)
5789 @findex gnus-uu-unmark-region
5790 Unpick the region (@code{gnus-uu-unmark-region}). 
5791
5792 @item e
5793 @kindex e (Pick)
5794 @findex gnus-uu-mark-by-regexp
5795 Pick articles that match a regexp (@code{gnus-uu-mark-by-regexp}). 
5796
5797 @item E
5798 @kindex E (Pick)
5799 @findex gnus-uu-unmark-by-regexp
5800 Unpick articles that match a regexp (@code{gnus-uu-unmark-by-regexp}). 
5801
5802 @item b
5803 @kindex b (Pick)
5804 @findex gnus-uu-mark-buffer
5805 Pick the buffer (@code{gnus-uu-mark-buffer}). 
5806
5807 @item B
5808 @kindex B (Pick)
5809 @findex gnus-uu-unmark-buffer
5810 Unpick the buffer (@code{gnus-uu-unmark-buffer}). 
5811
5812 @item RET
5813 @kindex RET (Pick)
5814 @findex gnus-pick-start-reading
5815 @vindex gnus-pick-display-summary
5816 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
5817 given a prefix, mark all unpicked articles as read first.  If
5818 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
5819 will still be visible when you are reading.
5820
5821 @end table
5822
5823 If this sounds like a good idea to you, you could say:
5824
5825 @lisp
5826 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
5827 @end lisp
5828
5829 @vindex gnus-pick-mode-hook
5830 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
5831
5832 @vindex gnus-mark-unpicked-articles-as-read
5833 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
5834 all unpicked articles as read.  The default is @code{nil}.
5835
5836 @vindex gnus-summary-pick-line-format
5837 The summary line format in pick mode is slightly different than the
5838 standard format.  At the beginning of each line the line number is
5839 displayed.  The pick mode line format is controlled by the
5840 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
5841 Variables}).  It accepts the same format specs that
5842 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}). 
5843
5844
5845 @node Binary Groups
5846 @subsection Binary Groups
5847 @cindex binary groups
5848
5849 @findex gnus-binary-mode
5850 @kindex M-x gnus-binary-mode
5851 If you spend much time in binary groups, you may grow tired of hitting
5852 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
5853 is a minor mode for summary buffers that makes all ordinary Gnus article
5854 selection functions uudecode series of articles and display the result
5855 instead of just displaying the articles the normal way.  
5856
5857 @kindex g (Binary)
5858 @findex gnus-binary-show-article
5859 In fact, the only way to see the actual articles if you have turned this
5860 mode on is the @kbd{g} command (@code{gnus-binary-show-article}). 
5861
5862 @vindex gnus-binary-mode-hook
5863 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
5864
5865
5866 @node Tree Display
5867 @section Tree Display
5868 @cindex trees
5869
5870 @vindex gnus-use-trees
5871 If you don't like the normal Gnus summary display, you might try setting
5872 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
5873 additional @dfn{tree buffer}.  You can execute all summary mode commands
5874 in the tree buffer.  
5875
5876 There are a few variables to customize the tree display, of course:
5877
5878 @table @code
5879 @item gnus-tree-mode-hook
5880 @vindex gnus-tree-mode-hook
5881 A hook called in all tree mode buffers.
5882
5883 @item gnus-tree-mode-line-format
5884 @vindex gnus-tree-mode-line-format
5885 A format string for the mode bar in the tree mode buffers.  The default
5886 is @samp{Gnus: %%b [%A] %Z}.  For a list of legal specs, @pxref{Summary
5887 Buffer Mode Line}. 
5888
5889 @item gnus-selected-tree-face
5890 @vindex gnus-selected-tree-face
5891 Face used for highlighting the selected article in the tree buffer.  The
5892 default is @code{modeline}.
5893
5894 @item gnus-tree-line-format
5895 @vindex gnus-tree-line-format
5896 A format string for the tree nodes.  The name is a bit of a misnomer,
5897 though---it doesn't define a line, but just the node.  The default value
5898 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
5899 the name of the poster.  It is vital that all nodes are of the same
5900 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
5901
5902 Legal specs are:
5903
5904 @table @samp
5905 @item n
5906 The name of the poster.
5907 @item f
5908 The @code{From} header.
5909 @item N
5910 The number of the article.
5911 @item [
5912 The opening bracket.
5913 @item ] 
5914 The closing bracket.
5915 @item s
5916 The subject.
5917 @end table
5918
5919 @xref{Formatting Variables}.
5920
5921 Variables related to the display are:
5922
5923 @table @code
5924 @item gnus-tree-brackets
5925 @vindex gnus-tree-brackets
5926 This is used for differentiating between ``real'' articles and
5927 ``sparse'' articles.  The format is @var{((real-open . real-close)
5928 (sparse-open . sparse-close) (dummy-open . dummy-close))}, and the
5929 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}))}.
5930
5931 @item gnus-tree-parent-child-edges
5932 @vindex gnus-tree-parent-child-edges
5933 This is a list that contains the characters used for connecting parent
5934 nodes to their children.  The default is @code{(?- ?\\ ?|)}. 
5935
5936 @end table
5937
5938 @item gnus-tree-minimize-window
5939 @vindex gnus-tree-minimize-window
5940 If this variable is non-@code{nil}, Gnus will try to keep the tree
5941 buffer as small as possible to allow more room for the other Gnus
5942 windows.  If this variable is a number, the tree buffer will never be
5943 higher than that number.  The default is @code{t}.
5944
5945 @item gnus-generate-tree-function
5946 @vindex gnus-generate-tree-function
5947 @findex gnus-generate-horizontal-tree
5948 @findex gnus-generate-vertical-tree
5949 The function that actually generates the thread tree.  Two predefined
5950 functions are available: @code{gnus-generate-horizontal-tree} and
5951 @code{gnus-generate-vertical-tree} (which is the default).
5952
5953 @end table
5954
5955 Here's and example from a horizontal tree buffer:
5956
5957 @example
5958 @{***@}-(***)-[odd]-[Gun]
5959      |     \[Jan]
5960      |     \[odd]-[Eri]
5961      |     \(***)-[Eri]
5962      |           \[odd]-[Paa]
5963      \[Bjo]
5964      \[Gun]
5965      \[Gun]-[Jor]
5966 @end example
5967
5968 Here's the same thread displayed in a vertical tree buffer:
5969
5970 @example
5971 @{***@}
5972   |--------------------------\-----\-----\
5973 (***)                         [Bjo] [Gun] [Gun]
5974   |--\-----\-----\                          |
5975 [odd] [Jan] [odd] (***)                   [Jor]
5976   |           |     |--\
5977 [Gun]       [Eri] [Eri] [odd]
5978                           |
5979                         [Paa]
5980 @end example
5981
5982
5983 @node Mail Group Commands
5984 @section Mail Group Commands
5985 @cindex mail group commands
5986
5987 Some commands only make sense in mail groups.  If these commands are
5988 illegal in the current group, they will raise a hell and let you know.
5989
5990 All these commands (except the expiry and edit commands) use the
5991 process/prefix convention (@pxref{Process/Prefix}).
5992
5993 @table @kbd
5994
5995 @item B e
5996 @kindex B e (Summary)
5997 @findex gnus-summary-expire-articles
5998 Expire all expirable articles in the group
5999 (@code{gnus-summary-expire-articles}).
6000
6001 @item B M-C-e
6002 @kindex B M-C-e (Summary)
6003 @findex gnus-summary-expire-articles-now
6004 Expunge all the expirable articles in the group
6005 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
6006 articles that are eligible for expiry in the current group will
6007 disappear forever into that big @file{/dev/null} in the sky.
6008
6009 @item B DEL
6010 @kindex B DEL (Summary)
6011 @findex gnus-summary-delete-article
6012 Delete the mail article.  This is ``delete'' as in ``delete it from your
6013 disk forever and ever, never to return again.'' Use with caution.
6014 (@code{gnus-summary-delete-article}).
6015
6016 @item B m
6017 @kindex B m (Summary)
6018 @cindex move mail
6019 @findex gnus-summary-move-article
6020 Move the article from one mail group to another
6021 (@code{gnus-summary-move-article}). 
6022
6023 @item B c
6024 @kindex B c (Summary)
6025 @cindex copy mail
6026 @findex gnus-summary-copy-article
6027 Copy the article from one group (mail group or not) to a mail group
6028 (@code{gnus-summary-copy-article}).
6029
6030 @item B C
6031 @kindex B C (Summary)
6032 @cindex crosspost mail
6033 @findex gnus-summary-crosspost-article
6034 Crosspost the current article to some other group
6035 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
6036 the article in the other group, and the Xref headers of the article will
6037 be properly updated.
6038
6039 @item B i
6040 @kindex B i (Summary)
6041 @findex gnus-summary-import-article
6042 Import an arbitrary file into the current mail newsgroup
6043 (@code{gnus-summary-import-article}).  You will be prompted for a file
6044 name, a @code{From} header and a @code{Subject} header.
6045
6046 @item B r
6047 @kindex B r (Summary)
6048 @findex gnus-summary-respool-article
6049 Respool the mail article (@code{gnus-summary-move-article}).
6050
6051 @item B w
6052 @itemx e
6053 @kindex B w (Summary)
6054 @kindex e (Summary)
6055 @findex gnus-summary-edit-article
6056 @kindex C-c C-c (Article)
6057 Edit the current article (@code{gnus-summary-edit-article}).  To finish
6058 editing and make the changes permanent, type @kbd{C-c C-c}
6059 (@kbd{gnus-summary-edit-article-done}).
6060
6061 @item B q
6062 @kindex B q (Summary)
6063 @findex gnus-summary-respool-query
6064 If you want to re-spool an article, you might be curious as to what group
6065 the article will end up in before you do the re-spooling.  This command
6066 will tell you (@code{gnus-summary-respool-query}). 
6067 @end table
6068
6069 @vindex gnus-move-split-methods
6070 @cindex moving articles
6071 If you move (or copy) articles regularly, you might wish to have Gnus
6072 suggest where to put the articles.  @code{gnus-move-split-methods} is a
6073 variable that uses the same syntax as @code{gnus-split-methods}
6074 (@pxref{Saving Articles}).  You may customize that variable to create
6075 suggestions you find reasonable.
6076
6077
6078 @node Various Summary Stuff
6079 @section Various Summary Stuff
6080
6081 @menu
6082 * Summary Group Information::         Information oriented commands.
6083 * Searching for Articles::            Multiple article commands.
6084 * Really Various Summary Commands::   Those pesky non-conformant commands.
6085 @end menu
6086
6087 @table @code
6088 @vindex gnus-summary-mode-hook
6089 @item gnus-summary-mode-hook
6090 This hook is called when creating a summary mode buffer.
6091
6092 @vindex gnus-summary-generate-hook
6093 @item gnus-summary-generate-hook
6094 This is called as the last thing before doing the threading and the
6095 generation of the summary buffer.  It's quite convenient for customizing
6096 the threading variables based on what data the newsgroup has.  This hook
6097 is called from the summary buffer after most summary buffer variables
6098 has been set.
6099
6100 @vindex gnus-summary-prepare-hook
6101 @item gnus-summary-prepare-hook
6102 Is is called after the summary buffer has been generated.  You might use
6103 it to, for instance, highlight lines or modify the look of the buffer in
6104 some other ungodly manner.  I don't care.
6105
6106 @end table
6107
6108
6109 @node Summary Group Information
6110 @subsection Summary Group Information
6111
6112 @table @kbd
6113
6114 @item H f
6115 @kindex H f (Summary)
6116 @findex gnus-summary-fetch-faq
6117 @vindex gnus-group-faq-directory
6118 Try to fetch the FAQ (list of frequently asked questions) for the
6119 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
6120 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
6121 on a remote machine.  This variable can also be a list of directories.
6122 In that case, giving a prefix to this command will allow you to choose
6123 between the various sites.  @code{ange-ftp} probably will be used for
6124 fetching the file.
6125
6126 @item H d
6127 @kindex H d (Summary)
6128 @findex gnus-summary-describe-group
6129 Give a brief description of the current group
6130 (@code{gnus-summary-describe-group}).  If given a prefix, force
6131 rereading the description from the server.
6132
6133 @item H h
6134 @kindex H h (Summary)
6135 @findex gnus-summary-describe-briefly
6136 Give a very brief description of the most important summary keystrokes
6137 (@code{gnus-summary-describe-briefly}). 
6138
6139 @item H i
6140 @kindex H i (Summary)
6141 @findex gnus-info-find-node
6142 Go to the Gnus info node (@code{gnus-info-find-node}).
6143 @end table
6144
6145
6146 @node Searching for Articles
6147 @subsection Searching for Articles
6148
6149 @table @kbd
6150
6151 @item M-s
6152 @kindex M-s (Summary)
6153 @findex gnus-summary-search-article-forward
6154 Search through all subsequent articles for a regexp
6155 (@code{gnus-summary-search-article-forward}). 
6156
6157 @item M-r
6158 @kindex M-r (Summary)
6159 @findex gnus-summary-search-article-backward
6160 Search through all previous articles for a regexp
6161 (@code{gnus-summary-search-article-backward}). 
6162
6163 @item &
6164 @kindex & (Summary)
6165 @findex gnus-summary-execute-command
6166 This command will prompt you for a header field, a regular expression to
6167 match on this field, and a command to be executed if the match is made
6168 (@code{gnus-summary-execute-command}).
6169
6170 @item M-&
6171 @kindex M-& (Summary)
6172 @findex gnus-summary-universal-argument
6173 Perform any operation on all articles that have been marked with
6174 the process mark (@code{gnus-summary-universal-argument}).
6175 @end table
6176
6177
6178 @node Really Various Summary Commands
6179 @subsection Really Various Summary Commands
6180
6181 @table @kbd
6182
6183 @item C-d
6184 @kindex C-d (Summary)
6185 @findex gnus-summary-enter-digest-group
6186 If the current article is a collection of other articles (for instance,
6187 a digest), you might use this command to enter a group based on the that
6188 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
6189 guess what article type is currently displayed unless you give a prefix
6190 to this command, which forces a ``digest'' interpretation.  Basically,
6191 whenever you see a message that is a collection of other messages on
6192 some format, you @kbd{C-d} and read these messages in a more convenient
6193 fashion.
6194
6195 @item M-C-d
6196 @kindex M-C-d (Summary)
6197 @findex gnus-summary-read-document
6198 This command is very similar to the one above, but lets you gather
6199 several documents into one biiig group
6200 (@code{gnus-summary-read-document}).  It does this by opening several
6201 @code{nndoc} groups for each document, and then opening an
6202 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
6203 command understands the process/prefix convention
6204 (@pxref{Process/Prefix}). 
6205
6206 @item C-t
6207 @kindex C-t (Summary)
6208 @findex gnus-summary-toggle-truncation
6209 Toggle truncation of summary lines (@code{gnus-summary-toggle-truncation}).
6210
6211 @item =
6212 @kindex = (Summary)
6213 @findex gnus-summary-expand-window
6214 Expand the summary buffer window (@code{gnus-summary-expand-window}).
6215 If given a prefix, force an @code{article} window configuration. 
6216 @end table
6217
6218
6219 @node Exiting the Summary Buffer
6220 @section Exiting the Summary Buffer
6221 @cindex summary exit
6222 @cindex exiting groups
6223
6224 Exiting from the summary buffer will normally update all info on the
6225 group and return you to the group buffer. 
6226
6227 @table @kbd
6228
6229 @item Z Z
6230 @itemx q
6231 @kindex Z Z (Summary)
6232 @kindex q (Summary)
6233 @findex gnus-summary-exit
6234 @vindex gnus-summary-exit-hook
6235 @vindex gnus-summary-prepare-exit-hook
6236 Exit the current group and update all information on the group
6237 (@code{gnus-summary-exit}). @code{gnus-summary-prepare-exit-hook} is
6238 called before doing much of the exiting, and calls
6239 @code{gnus-summary-expire-articles} by default.
6240 @code{gnus-summary-exit-hook} is called after finishing the exiting
6241 process. 
6242
6243 @item Z E
6244 @itemx Q
6245 @kindex Z E (Summary)
6246 @kindex Q (Summary)
6247 @findex gnus-summary-exit-no-update
6248 Exit the current group without updating any information on the group
6249 (@code{gnus-summary-exit-no-update}).
6250
6251 @item Z c
6252 @itemx c
6253 @kindex Z c (Summary)
6254 @kindex c (Summary)
6255 @findex gnus-summary-catchup-and-exit
6256 Mark all unticked articles in the group as read and then exit
6257 (@code{gnus-summary-catchup-and-exit}).
6258
6259 @item Z C
6260 @kindex Z C (Summary)
6261 @findex gnus-summary-catchup-all-and-exit
6262 Mark all articles, even the ticked ones, as read and then exit
6263 (@code{gnus-summary-catchup-all-and-exit}).
6264
6265 @item Z n
6266 @kindex Z n (Summary)
6267 @findex gnus-summary-catchup-and-goto-next-group
6268 Mark all articles as read and go to the next group
6269 (@code{gnus-summary-catchup-and-goto-next-group}). 
6270
6271 @item Z R
6272 @kindex Z R (Summary)
6273 @findex gnus-summary-reselect-current-group
6274 Exit this group, and then enter it again
6275 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
6276 all articles, both read and unread.
6277
6278 @item Z G
6279 @itemx M-g
6280 @kindex Z G (Summary)
6281 @kindex M-g (Summary)
6282 @findex gnus-summary-rescan-group
6283 Exit the group, check for new articles in the group, and select the
6284 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
6285 articles, both read and unread.
6286
6287 @item Z N
6288 @kindex Z N (Summary)
6289 @findex gnus-summary-next-group
6290 Exit the group and go to the next group
6291 (@code{gnus-summary-next-group}). 
6292
6293 @item Z P
6294 @kindex Z P (Summary)
6295 @findex gnus-summary-prev-group
6296 Exit the group and go to the previous group
6297 (@code{gnus-summary-prev-group}). 
6298 @end table
6299
6300 @vindex gnus-exit-group-hook
6301 @code{gnus-exit-group-hook} is called when you exit the current
6302 group.  
6303
6304 @findex gnus-summary-wake-up-the-dead
6305 @findex gnus-dead-summary-mode
6306 @vindex gnus-kill-summary-on-exit
6307 If you're in the habit of exiting groups, and then changing your mind
6308 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
6309 If you do that, Gnus won't kill the summary buffer when you exit it.
6310 (Quelle surprise!)  Instead it will change the name of the buffer to
6311 something like @samp{*Dead Summary ... *} and install a minor mode
6312 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
6313 buffer, you'll find that all keys are mapped to a function called
6314 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
6315 summary buffer will result in a live, normal summary buffer.  
6316
6317 There will never be more than one dead summary buffer at any one time. 
6318
6319 @vindex gnus-use-cross-reference
6320 The data on the current group will be updated (which articles you have
6321 read, which articles you have replied to, etc.) when you exit the
6322 summary buffer.  If the @code{gnus-use-cross-reference} variable is
6323 @code{t} (which is the default), articles that are cross-referenced to
6324 this group and are marked as read, will also be marked as read in the
6325 other subscribed groups they were cross-posted to.  If this variable is
6326 neither @code{nil} nor @code{t}, the article will be marked as read in
6327 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
6328
6329
6330 @node Crosspost Handling
6331 @section Crosspost Handling
6332
6333 @cindex velveeta
6334 @cindex spamming
6335 Marking cross-posted articles as read ensures that you'll never have to
6336 read the same article more than once.  Unless, of course, somebody has
6337 posted it to several groups separately.  Posting the same article to
6338 several groups (not cross-posting) is called @dfn{spamming}, and you are
6339 by law required to send nasty-grams to anyone who perpetrates such a
6340 heinous crime.  You may want to try NoCeM handling to filter out spam
6341 (@pxref{NoCeM}). 
6342
6343 Remember: Cross-posting is kinda ok, but posting the same article
6344 separately to several groups is not.  Massive cross-posting (aka.
6345 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
6346 @code{gnus-summary-mail-crosspost-complaint} command to complain about
6347 excessive crossposting (@pxref{Summary Mail Commands}).
6348
6349 @cindex cross-posting
6350 @cindex Xref
6351 @cindex @sc{nov}
6352 One thing that may cause Gnus to not do the cross-posting thing
6353 correctly is if you use an @sc{nntp} server that supports @sc{xover}
6354 (which is very nice, because it speeds things up considerably) which
6355 does not include the @code{Xref} header in its @sc{nov} lines.  This is
6356 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
6357 even with @sc{xover} by registering the @code{Xref} lines of all
6358 articles you actually read, but if you kill the articles, or just mark
6359 them as read without reading them, Gnus will not get a chance to snoop
6360 the @code{Xref} lines out of these articles, and will be unable to use
6361 the cross reference mechanism.
6362
6363 @cindex LIST overview.fmt
6364 @cindex overview.fmt
6365 To check whether your @sc{nntp} server includes the @code{Xref} header
6366 in its overview files, try @samp{telnet your.nntp.server nntp},
6367 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
6368 overview.fmt}.  This may not work, but if it does, and the last line you
6369 get does not read @samp{Xref:full}, then you should shout and whine at
6370 your news admin until she includes the @code{Xref} header in the
6371 overview files.
6372
6373 @vindex gnus-nov-is-evil
6374 If you want Gnus to get the @code{Xref}s right all the time, you have to
6375 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
6376 considerably.
6377
6378 C'est la vie.
6379
6380 For an alternative approach, @xref{Duplicate Suppression}.
6381
6382
6383 @node Duplicate Suppression
6384 @section Duplicate Suppression
6385
6386 By default, Gnus tries to make sure that you don't have to read the same
6387 article more than once by utilizing the crossposing mechanism
6388 (@pxref{Crosspost Handling}).  However, that simple and efficient
6389 approach may not work satisfactorily for some users for various
6390 reasons.  
6391
6392 @enumerate
6393 @item 
6394 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
6395 is evil and not very common.
6396
6397 @item 
6398 The @sc{nntp} server may fail to include the @code{Xref} header in the
6399 @file{.overview} data bases.  This is evil and all too common, alas.
6400
6401 @item
6402 You may be reading the same group (or several related groups) from
6403 different @sc{nntp} servers.
6404
6405 @item
6406 You may be getting mail that duplicates articles posted to groups.
6407 @end enumerate
6408
6409 I'm sure there are other situations that @code{Xref} handling fails as
6410 well, but these four are the most common situations.
6411
6412 If, and only if, @code{Xref} handling fails for you, then you may
6413 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
6414 will remember the @code{Message-ID}s of all articles you have read or
6415 otherwise marked as read, and then, as if by magic, mark them as read
6416 all subsequent times you see them---in @emph{all} groups.  Using this
6417 mechanism is quite likely to be somewhat inefficient, but not overly
6418 so.  It's certainly preferrable to reading the same articles more than
6419 once.
6420
6421 Duplicate suppression is not a very subtle instrument.  It's more like a
6422 sledge hammer than anything else.  It works in a very simple
6423 fashion---if you have marked an article as read, it adds this Message-ID
6424 to a cache.  The next time it sees this Message-ID, it will mark the
6425 article as read the the @samp{M} mark.  It doesn't care what group it
6426 saw the article in.
6427
6428 @table @code
6429 @item gnus-suppress-duplicates
6430 @vindex gnus-suppress-duplicates
6431 If non-@code{nil}, suppress duplicates.
6432
6433 @item gnus-save-duplicate-list
6434 @vindex gnus-save-duplicate-list
6435 If non-@code{nil}, save the list of duplicates to a file.  This will
6436 make startup and shutdown take longer, so the default is @code{nil}.
6437 However, this means that only duplicate articles that is read in a
6438 single Gnus session are suppressed.  
6439
6440 @item gnus-duplicate-list-length
6441 @vindex gnus-duplicate-list-length
6442 This variables says how many @code{Message-ID}s to keep in the duplicate
6443 suppression list.  The default is 10000.  
6444
6445 @item gnus-duplicate-file
6446 @vindex gnus-duplicate-file
6447 The name of the file to store the duplicate suppression list.  The
6448 default is @file{~/News/suppression}.
6449 @end table
6450
6451 If you have a tendency to stop and start Gnus often, setting
6452 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
6453 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
6454 the other hand, saving the list makes startup and shutdown much slower,
6455 so that means that if you stop and start Gnus often, you should set
6456 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
6457 to you to figure out, I think.
6458
6459
6460 @node The Article Buffer
6461 @chapter The Article Buffer
6462 @cindex article buffer
6463
6464 The articles are displayed in the article buffer, of which there is only
6465 one.  All the summary buffers share the same article buffer unless you
6466 tell Gnus otherwise.
6467
6468 @menu
6469 * Hiding Headers::        Deciding what headers should be displayed.
6470 * Using MIME::            Pushing articles through @sc{mime} before reading them.
6471 * Customizing Articles::  Tailoring the look of the articles.
6472 * Article Keymap::        Keystrokes available in the article buffer
6473 * Misc Article::          Other stuff.
6474 @end menu
6475
6476
6477 @node Hiding Headers
6478 @section Hiding Headers
6479 @cindex hiding headers
6480 @cindex deleting headers
6481
6482 The top section of each article is the @dfn{head}.  (The rest is the
6483 @dfn{body}, but you may have guessed that already.)
6484
6485 @vindex gnus-show-all-headers
6486 There is a lot of useful information in the head: the name of the person
6487 who wrote the article, the date it was written and the subject of the
6488 article.  That's well and nice, but there's also lots of information
6489 most people do not want to see---what systems the article has passed
6490 through before reaching you, the @code{Message-ID}, the
6491 @code{References}, etc. ad nauseum---and you'll probably want to get rid
6492 of some of those lines.  If you want to keep all those lines in the
6493 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
6494
6495 Gnus provides you with two variables for sifting headers:
6496
6497 @table @code
6498
6499 @item gnus-visible-headers
6500 @vindex gnus-visible-headers
6501 If this variable is non-@code{nil}, it should be a regular expression
6502 that says what headers you wish to keep in the article buffer.  All
6503 headers that do not match this variable will be hidden.
6504
6505 For instance, if you only want to see the name of the person who wrote
6506 the article and the subject, you'd say:
6507
6508 @lisp
6509 (setq gnus-visible-headers "^From:\\|^Subject:")
6510 @end lisp
6511
6512 This variable can also be a list of regexps to match headers that are to
6513 remain visible.
6514
6515 @item gnus-ignored-headers
6516 @vindex gnus-ignored-headers
6517 This variable is the reverse of @code{gnus-visible-headers}.  If this
6518 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
6519 should be a regular expression that matches all lines that you want to
6520 hide.  All lines that do not match this variable will remain visible.
6521
6522 For instance, if you just want to get rid of the @code{References} line
6523 and the @code{Xref} line, you might say:
6524
6525 @lisp
6526 (setq gnus-ignored-headers "^References:\\|^Xref:")
6527 @end lisp
6528
6529 This variable can also be a list of regexps to match headers that are to
6530 be removed.
6531
6532 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
6533 variable will have no effect.
6534
6535 @end table
6536
6537 @vindex gnus-sorted-header-list
6538 Gnus can also sort the headers for you.  (It does this by default.)  You
6539 can control the sorting by setting the @code{gnus-sorted-header-list}
6540 variable.  It is a list of regular expressions that says in what order
6541 the headers are to be displayed.
6542
6543 For instance, if you want the name of the author of the article first,
6544 and then the subject, you might say something like:
6545
6546 @lisp
6547 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
6548 @end lisp
6549
6550 Any headers that are to remain visible, but are not listed in this
6551 variable, will be displayed in random order after all the headers that
6552 are listed in this variable.
6553
6554 @findex gnus-article-hide-boring-headers
6555 @vindex gnus-article-display-hook
6556 @vindex gnus-boring-article-headers
6557 You can hide further boring headers by entering
6558 @code{gnus-article-hide-boring-headers} into
6559 @code{gnus-article-display-hook}.  What this function does depends on
6560 the @code{gnus-boring-article-headers} variable.  It's a list, but this
6561 list doesn't actually contain header names.  Instead is lists various
6562 @dfn{boring conditions} that Gnus can check and remove from sight.
6563
6564 These conditions are:
6565 @table @code
6566 @item empty
6567 Remove all empty headers.
6568 @item newsgroups
6569 Remove the @code{Newsgroups} header if it only contains the current group
6570 name. 
6571 @item followup-to
6572 Remove the @code{Followup-To} header if it is identical to the
6573 @code{Newsgroups} header.
6574 @item reply-to
6575 Remove the @code{Reply-To} header if it lists the same address as the
6576 @code{From} header.
6577 @item date
6578 Remove the @code{Date} header if the article is less than three days
6579 old. 
6580 @end table
6581
6582 To include the four first elements, you could say something like;
6583
6584 @lisp
6585 (setq gnus-boring-article-headers 
6586       '(empty newsgroups followup-to reply-to))
6587 @end lisp
6588
6589 This is also the default value for this variable.
6590
6591
6592 @node Using MIME
6593 @section Using @sc{mime}
6594 @cindex @sc{mime}
6595
6596 Mime is a standard for waving your hands through the air, aimlessly,
6597 while people stand around yawning.
6598
6599 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
6600 while all newsreaders die of fear.
6601
6602 @sc{mime} may specify what character set the article uses, the encoding
6603 of the characters, and it also makes it possible to embed pictures and
6604 other naughty stuff in innocent-looking articles.
6605
6606 @vindex gnus-show-mime
6607 @vindex gnus-show-mime-method
6608 @vindex gnus-strict-mime
6609 @findex metamail-buffer
6610 Gnus handles @sc{mime} by shoving the articles through
6611 @code{gnus-show-mime-method}, which is @code{metamail-buffer} by
6612 default.  Set @code{gnus-show-mime} to @code{t} if you want to use
6613 @sc{mime} all the time.  However, if @code{gnus-strict-mime} is
6614 non-@code{nil}, the @sc{mime} method will only be used if there are
6615 @sc{mime} headers in the article.
6616
6617 It might be best to just use the toggling functions from the summary
6618 buffer to avoid getting nasty surprises. (For instance, you enter the
6619 group @samp{alt.sing-a-long} and, before you know it, @sc{mime} has
6620 decoded the sound file in the article and some horrible sing-a-long song
6621 comes streaming out out your speakers, and you can't find the volume
6622 button, because there isn't one, and people are starting to look at you,
6623 and you try to stop the program, but you can't, and you can't find the
6624 program to control the volume, and everybody else in the room suddenly
6625 decides to look at you disdainfully, and you'll feel rather stupid.)
6626
6627 Any similarity to real events and people is purely coincidental.  Ahem.
6628
6629
6630 @node Customizing Articles
6631 @section Customizing Articles
6632 @cindex article customization
6633
6634 @vindex gnus-article-display-hook
6635 The @code{gnus-article-display-hook} is called after the article has
6636 been inserted into the article buffer.  It is meant to handle all
6637 treatment of the article before it is displayed. 
6638
6639 @findex gnus-article-maybe-highlight
6640 By default it contains @code{gnus-article-hide-headers},
6641 @code{gnus-article-treat-overstrike}, and
6642 @code{gnus-article-maybe-highlight}, but there are thousands, nay
6643 millions, of functions you can put in this hook.  For an overview of
6644 functions @pxref{Article Highlighting}, @pxref{Article Hiding},
6645 @pxref{Article Washing}, @pxref{Article Buttons} and @pxref{Article
6646 Date}.
6647
6648 You can, of course, write your own functions.  The functions are called
6649 from the article buffer, and you can do anything you like, pretty much.
6650 There is no information that you have to keep in the buffer---you can
6651 change everything.  However, you shouldn't delete any headers.  Instead
6652 make them invisible if you want to make them go away.
6653
6654
6655 @node Article Keymap
6656 @section Article Keymap
6657
6658 Most of the keystrokes in the summary buffer can also be used in the
6659 article buffer.  They should behave as if you typed them in the summary
6660 buffer, which means that you don't actually have to have a summary
6661 buffer displayed while reading.  You can do it all from the article
6662 buffer.
6663
6664 A few additional keystrokes are available:
6665
6666 @table @kbd
6667
6668 @item SPACE
6669 @kindex SPACE (Article)
6670 @findex gnus-article-next-page
6671 Scroll forwards one page (@code{gnus-article-next-page}).
6672
6673 @item DEL
6674 @kindex DEL (Article)
6675 @findex gnus-article-prev-page
6676 Scroll backwards one page (@code{gnus-article-prev-page}).
6677
6678 @item C-c ^
6679 @kindex C-c ^ (Article)
6680 @findex gnus-article-refer-article
6681 If point is in the neighborhood of a @code{Message-ID} and you press
6682 @kbd{r}, Gnus will try to get that article from the server
6683 (@code{gnus-article-refer-article}).
6684
6685 @item C-c C-m
6686 @kindex C-c C-m (Article)
6687 @findex gnus-article-mail
6688 Send a reply to the address near point (@code{gnus-article-mail}).  If
6689 given a prefix, include the mail.
6690
6691 @item s
6692 @kindex s (Article)
6693 @findex gnus-article-show-summary
6694 Reconfigure the buffers so that the summary buffer becomes visible
6695 (@code{gnus-article-show-summary}).
6696
6697 @item ?
6698 @kindex ? (Article)
6699 @findex gnus-article-describe-briefly
6700 Give a very brief description of the available keystrokes
6701 (@code{gnus-article-describe-briefly}). 
6702
6703 @item TAB
6704 @kindex TAB (Article)
6705 @findex gnus-article-next-button
6706 Go to the next button, if any (@code{gnus-article-next-button}.  This
6707 only makes sense if you have buttonizing turned on.
6708
6709 @item M-TAB
6710 @kindex M-TAB (Article)
6711 @findex gnus-article-prev-button
6712 Go to the previous button, if any (@code{gnus-article-prev-button}.  
6713
6714 @end table
6715
6716
6717 @node Misc Article
6718 @section Misc Article
6719
6720 @table @code
6721
6722 @item gnus-single-article-buffer
6723 @vindex gnus-single-article-buffer
6724 If non-@code{nil}, use the same article buffer for all the groups.
6725 (This is the default.)  If @code{nil}, each group will have its own
6726 article buffer.
6727
6728 @vindex gnus-article-prepare-hook
6729 @item gnus-article-prepare-hook
6730 This hook is called right after the article has been inserted into the
6731 article buffer.  It is mainly intended for functions that do something
6732 depending on the contents; it should probably not be used for changing
6733 the contents of the article buffer.
6734
6735 @vindex gnus-article-display-hook
6736 @item gnus-article-display-hook
6737 This hook is called as the last thing when displaying an article, and is
6738 intended for modifying the contents of the buffer, doing highlights,
6739 hiding headers, and the like.
6740
6741 @item gnus-article-mode-hook
6742 @vindex gnus-article-mode-hook
6743 Hook called in article mode buffers.
6744
6745 @vindex gnus-article-mode-line-format
6746 @item gnus-article-mode-line-format
6747 This variable is a format string along the same lines as
6748 @code{gnus-summary-mode-line-format}.  It accepts the same
6749 format specifications as that variable, with one extension:
6750
6751 @table @samp
6752 @item w
6753 The @dfn{wash status} of the article.  This is a short string with one
6754 character for each possible article wash operation that may have been
6755 performed. 
6756 @end table
6757
6758 @vindex gnus-break-pages
6759
6760 @item gnus-break-pages
6761 Controls whether @dfn{page breaking} is to take place.  If this variable
6762 is non-@code{nil}, the articles will be divided into pages whenever a
6763 page delimiter appears in the article.  If this variable is @code{nil},
6764 paging will not be done.
6765
6766 @item gnus-page-delimiter
6767 @vindex gnus-page-delimiter
6768 This is the delimiter mentioned above.  By default, it is @samp{^L}
6769 (form linefeed).
6770 @end table
6771
6772
6773 @node Composing Messages
6774 @chapter Composing Messages
6775 @cindex reply
6776 @cindex followup
6777 @cindex post
6778
6779 @kindex C-c C-c (Post)
6780 All commands for posting and mailing will put you in a message buffer
6781 where you can edit the article all you like, before you send the article
6782 by pressing @kbd{C-c C-c}.  @xref{Top, , Top, message, The Message
6783 Manual}.  If you are in a foreign news group, and you wish to post the
6784 article using the foreign server, you can give a prefix to @kbd{C-c C-c}
6785 to make Gnus try to post using the foreign server.
6786
6787 @menu 
6788 * Mail::                 Mailing and replying.
6789 * Post::                 Posting and following up.
6790 * Posting Server::       What server should you post via?
6791 * Mail and Post::        Mailing and posting at the same time.
6792 * Archived Messages::    Where Gnus stores the messages you've sent.
6793 @c * Posting Styles::       An easier way to configure some key elements.
6794 @c * Drafts::               Postponing messages and rejected messages.
6795 @c * Rejected Articles::    What happens if the server doesn't like your article?
6796 @end menu
6797
6798 Also see @pxref{Canceling and Superseding} for information on how to
6799 remove articles you shouldn't have posted.
6800
6801
6802 @node Mail
6803 @section Mail
6804
6805 Variables for customizing outgoing mail:
6806
6807 @table @code
6808 @item gnus-uu-digest-headers
6809 @vindex gnus-uu-digest-headers
6810 List of regexps to match headers included in digested messages.  The
6811 headers will be included in the sequence they are matched.
6812
6813 @end table
6814
6815
6816 @node Post
6817 @section Post
6818
6819 Variables for composing news articles:
6820
6821 @table @code
6822 @item gnus-sent-message-ids-file
6823 @vindex gnus-sent-message-ids-file
6824 Gnus will keep a @code{Message-ID} history file of all the mails it has
6825 sent.  If it discovers that it has already sent a mail, it will ask the
6826 user whether to re-send the mail.  (This is primarily useful when
6827 dealing with @sc{soup} packets and the like where one is apt to sent the
6828 same packet multiple times.)  This variable says what the name of this
6829 history file is.  It is @file{~/News/Sent-Message-IDs} by default.  Set
6830 this variable to @code{nil} if you don't want Gnus to keep a history
6831 file.
6832
6833 @item gnus-sent-message-ids-length
6834 @vindex gnus-sent-message-ids-length
6835 This variable says how many @code{Message-ID}s to keep in the history
6836 file.  It is 1000 by default.
6837
6838 @end table
6839
6840
6841 @node Posting Server
6842 @section Posting Server
6843
6844 When you press those magical @kbd{C-c C-c} keys to ship off your latest
6845 (extremely intelligent, of course) article, where does it go?
6846
6847 Thank you for asking.  I hate you.
6848
6849 @vindex gnus-post-method
6850
6851 It can be quite complicated.  Normally, Gnus will use the same native
6852 server.  However.  If your native server doesn't allow posting, just
6853 reading, you probably want to use some other server to post your
6854 (extremely intelligent and fabulously interesting) articles.  You can
6855 then set the @code{gnus-post-method} to some other method:
6856
6857 @lisp
6858 (setq gnus-post-method '(nnspool ""))
6859 @end lisp
6860
6861 Now, if you've done this, and then this server rejects your article, or
6862 this server is down, what do you do then?  To override this variable you
6863 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
6864 the ``current'' server for posting.
6865
6866 If you give a zero prefix (i. e., @kbd{C-u 0 C-c C-c}) to that command,
6867 Gnus will prompt you for what method to use for posting.  
6868
6869 You can also set @code{gnus-post-method} to a list of select methods.
6870 If that's the case, Gnus will always prompt you for what method to use
6871 for posting. 
6872
6873
6874 @node Mail and Post
6875 @section Mail and Post
6876
6877 Here's a list of variables that are relevant to both mailing and
6878 posting:
6879
6880 @table @code
6881 @item gnus-mailing-list-groups
6882 @findex gnus-mailing-list-groups
6883 @cindex mailing lists
6884
6885 If your news server offers groups that are really mailing lists that are
6886 gatewayed to the @sc{nntp} server, you can read those groups without
6887 problems, but you can't post/followup to them without some difficulty.
6888 One solution is to add a @code{to-address} to the group parameters
6889 (@pxref{Group Parameters}).  An easier thing to do is set the
6890 @code{gnus-mailing-list-groups} to a regexp that match the groups that
6891 really are mailing lists.  Then, at least, followups to the mailing
6892 lists will work most of the time.  Posting to these groups (@kbd{a}) is
6893 still a pain, though.
6894
6895 @end table
6896
6897 You may want to do spell-checking on messages that you send out.  Or, if
6898 you don't want to spell-check by hand, you could add automatic
6899 spell-checking via the @code{ispell} package:
6900
6901 @cindex ispell
6902 @findex ispell-message
6903 @lisp
6904 (add-hook 'message-send-hook 'ispell-message) 
6905 @end lisp
6906
6907
6908 @node Archived Messages
6909 @section Archived Messages
6910 @cindex archived messages
6911 @cindex sent messages
6912
6913 Gnus provides a few different methods for storing the mail you send.
6914 The default method is to use the @dfn{archive virtual server} to store
6915 the mail.  If you want to disable this completely, you should set
6916 @code{gnus-message-archive-group} to @code{nil}.
6917
6918 @vindex gnus-message-archive-method
6919 @code{gnus-message-archive-method} says what virtual server Gnus is to
6920 use to store sent messages.  It is @code{(nnfolder "archive"
6921 (nnfolder-directory "~/Mail/archive/"))} by default, but you can use any
6922 mail select method (@code{nnml}, @code{nnmbox}, etc.).  However,
6923 @code{nnfolder} is a quite likeable select method for doing this sort of
6924 thing.  If you don't like the default directory chosen, you could say
6925 something like:
6926
6927 @lisp
6928 (setq gnus-message-archive-method
6929       '(nnfolder "archive" 
6930                  (nnfolder-inhibit-expiry t)
6931                  (nnfolder-active-file "~/News/sent-mail/active")
6932                  (nnfolder-directory "~/News/sent-mail/")))
6933 @end lisp
6934
6935 @vindex gnus-message-archive-group
6936 @cindex Gcc
6937 Gnus will insert @code{Gcc} headers in all outgoing messages that point
6938 to one or more group(s) on that server.  Which group to use is
6939 determined by the @code{gnus-message-archive-group} variable.  
6940
6941 This variable can be:
6942
6943 @itemize @bullet
6944 @item a string
6945 Messages will be saved in that group.
6946 @item a list of strings
6947 Messages will be saved in all those groups.
6948 @item an alist of regexps, functions and forms
6949 When a key ``matches'', the result is used.
6950 @item @code{nil}
6951 No message archiving will take place.  This is the default.
6952 @end itemize
6953
6954 Let's illustrate:
6955
6956 Just saving to a single group called @samp{MisK}:
6957 @lisp
6958 (setq gnus-message-archive-group "MisK")
6959 @end lisp
6960
6961 Saving to two groups, @samp{MisK} and @samp{safe}:
6962 @lisp
6963 (setq gnus-message-archive-group '("MisK" "safe"))
6964 @end lisp
6965
6966 Save to different groups based on what group you are in:
6967 @lisp
6968 (setq gnus-message-archive-group 
6969       '(("^alt" "sent-to-alt")
6970         ("mail" "sent-to-mail")
6971         (".*" "sent-to-misc")))
6972 @end lisp
6973
6974 More complex stuff:
6975 @lisp
6976 (setq gnus-message-archive-group 
6977       '((if (message-news-p)
6978             "misc-news" 
6979           "misc-mail")))
6980 @end lisp       
6981
6982 How about storing all news messages in one file, but storing all mail
6983 messages in one file per month:
6984
6985 @lisp
6986 (setq gnus-message-archive-group
6987       '((if (message-news-p)
6988             "misc-news" 
6989           (concat "mail." (format-time-string 
6990                            "%Y-%m" (current-time))))))
6991 @end lisp
6992
6993 Now, when you send a message off, it will be stored in the appropriate
6994 group.  (If you want to disable storing for just one particular message,
6995 you can just remove the @code{Gcc} header that has been inserted.)  The
6996 archive group will appear in the group buffer the next time you start
6997 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
6998 enter it and read the articles in it just like you'd read any other
6999 group.  If the group gets really big and annoying, you can simply rename
7000 if (using @kbd{G r} in the group buffer) to something
7001 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
7002 continue to be stored in the old (now empty) group.
7003
7004 That's the default method of archiving sent mail.  Gnus also offers two
7005 other variables for the people who don't like the default method.  In
7006 that case you should set @code{gnus-message-archive-group} to
7007 @code{nil}; this will disable archiving.
7008
7009 XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
7010 use a different value for @code{gnus-message-archive-group} there.
7011
7012
7013 @table @code
7014 @item gnus-outgoing-message-group 
7015 @vindex gnus-outgoing-message-group 
7016 All outgoing messages will be put in this group.  If you want to store
7017 all your outgoing mail and articles in the group @samp{nnml:archive},
7018 you set this variable to that value.  This variable can also be a list of
7019 group names.
7020
7021 If you want to have greater control over what group to put each
7022 message in, you can set this variable to a function that checks the
7023 current newsgroup name and then returns a suitable group name (or list
7024 of names).
7025 @end table
7026
7027
7028 @c @node Posting Styles
7029 @c @section Posting Styles
7030 @c @cindex posting styles
7031 @c @cindex styles
7032 @c 
7033 @c All them variables, they make my head swim.  
7034 @c 
7035 @c So what if you want a different @code{Organization} and signature based
7036 @c on what groups you post to?  And you post both from your home machine
7037 @c and your work machine, and you want different @code{From} lines, and so
7038 @c on? 
7039 @c 
7040 @c @vindex gnus-posting-styles
7041 @c One way to do stuff like that is to write clever hooks that change the
7042 @c variables you need to have changed.  That's a bit boring, so somebody
7043 @c came up with the bright idea of letting the user specify these things in
7044 @c a handy alist.  Here's an example of a @code{gnus-posting-styles}
7045 @c variable: 
7046 @c 
7047 @c @lisp
7048 @c ((".*" 
7049 @c   (signature . "Peace and happiness")
7050 @c   (organization . "What me?"))
7051 @c  ("^comp" 
7052 @c   (signature . "Death to everybody"))
7053 @c  ("comp.emacs.i-love-it" 
7054 @c   (organization . "Emacs is it")))
7055 @c @end lisp
7056 @c 
7057 @c As you might surmise from this example, this alist consists of several
7058 @c @dfn{styles}.  Each style will be applicable if the first element
7059 @c ``matches'', in some form or other.  The entire alist will be iterated
7060 @c over, from the beginning towards the end, and each match will be
7061 @c applied, which means that attributes in later styles that match override
7062 @c the same attributes in earlier matching styles.  So
7063 @c @samp{comp.programming.literate} will have the @samp{Death to everybody}
7064 @c signature and the @samp{What me?} @code{Organization} header.
7065 @c 
7066 @c The first element in each style is called the @code{match}.  If it's a
7067 @c string, then Gnus will try to regexp match it against the group name.
7068 @c If it's a function symbol, that function will be called with no
7069 @c arguments.  If it's a variable symbol, then the variable will be
7070 @c referenced.  If it's a list, then that list will be @code{eval}ed.  In
7071 @c any case, if this returns a non-@code{nil} value, then the style is said
7072 @c to @dfn{match}.
7073 @c 
7074 @c Each style may contain a arbitrary amount of @dfn{attributes}.  Each
7075 @c attribute consists of a @var{(name . value)} pair.  The attribute name
7076 @c can be one of @code{signature}, @code{organization} or @code{from}.  The
7077 @c attribute name can also be a string.  In that case, this will be used as
7078 @c a header name, and the value will be inserted in the headers of the
7079 @c article.
7080 @c 
7081 @c The attribute value can be a string (used verbatim), a function (the
7082 @c return value will be used), a variable (its value will be used) or a
7083 @c list (it will be @code{eval}ed and the return value will be used).
7084 @c 
7085 @c So here's a new example:
7086 @c 
7087 @c @lisp
7088 @c (setq gnus-posting-styles
7089 @c       '((".*" 
7090 @c           (signature . "~/.signature") 
7091 @c           (from . "user@@foo (user)")
7092 @c           ("X-Home-Page" . (getenv "WWW_HOME"))
7093 @c           (organization . "People's Front Against MWM"))
7094 @c         ("^rec.humor" 
7095 @c           (signature . my-funny-signature-randomizer))
7096 @c         ((equal (system-name) "gnarly")
7097 @c           (signature . my-quote-randomizer))
7098 @c         (posting-from-work-p
7099 @c           (signature . "~/.work-signature")
7100 @c           (from . "user@@bar.foo (user)")
7101 @c           (organization . "Important Work, Inc"))
7102 @c         ("^nn.+:" 
7103 @c           (signature . "~/.mail-signature"))))
7104 @c @end lisp
7105
7106 @c @node Drafts
7107 @c @section Drafts
7108 @c @cindex drafts
7109 @c 
7110 @c If you are writing a message (mail or news) and suddenly remember that
7111 @c you have a steak in the oven (or some pesto in the food processor, you
7112 @c craazy vegetarians), you'll probably wish there was a method to save the
7113 @c message you are writing so that you can continue editing it some other
7114 @c day, and send it when you feel its finished.
7115 @c 
7116 @c Well, don't worry about it.  Whenever you start composing a message of
7117 @c some sort using the Gnus mail and post commands, the buffer you get will
7118 @c automatically associate to an article in a special @dfn{draft} group.
7119 @c If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
7120 @c article will be saved there.  (Auto-save files also go to the draft
7121 @c group.) 
7122 @c 
7123 @c @cindex nndraft
7124 @c @vindex gnus-draft-group-directory
7125 @c The draft group is a special group (which is implemented as an
7126 @c @code{nndraft} group, if you absolutely have to know) called
7127 @c @samp{nndraft:drafts}.  The variable @code{gnus-draft-group-directory}
7128 @c controls both the name of the group and the location---the leaf element
7129 @c in the path will be used as the name of the group.  What makes this
7130 @c group special is that you can't tick any articles in it or mark any
7131 @c articles as read---all articles in the group are permanently unread.
7132 @c 
7133 @c If the group doesn't exist, it will be created and you'll be subscribed
7134 @c to it.
7135 @c 
7136 @c @findex gnus-dissociate-buffer-from-draft
7137 @c @kindex C-c M-d (Mail)
7138 @c @kindex C-c M-d (Post)
7139 @c @findex gnus-associate-buffer-with-draft
7140 @c @kindex C-c C-d (Mail)
7141 @c @kindex C-c C-d (Post)
7142 @c If you're writing some super-secret message that you later want to
7143 @c encode with PGP before sending, you may wish to turn the auto-saving
7144 @c (and association with the draft group) off.  You never know who might be
7145 @c interested in reading all your extremely valuable and terribly horrible
7146 @c and interesting secrets.  The @kbd{C-c M-d}
7147 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
7148 @c If you change your mind and want to turn the auto-saving back on again,
7149 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
7150 @c 
7151 @c @vindex gnus-use-draft
7152 @c To leave association with the draft group off by default, set
7153 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default. 
7154 @c 
7155 @c @findex gnus-summary-send-draft
7156 @c @kindex S D c (Summary)
7157 @c When you want to continue editing the article, you simply enter the
7158 @c draft group and push @kbd{S D c} (@code{gnus-summary-send-draft}) to do
7159 @c that.  You will be placed in a buffer where you left off.
7160 @c 
7161 @c Rejected articles will also be put in this draft group (@pxref{Rejected
7162 @c Articles}).
7163 @c 
7164 @c @findex gnus-summary-send-all-drafts
7165 @c If you have lots of rejected messages you want to post (or mail) without
7166 @c doing further editing, you can use the @kbd{S D a} command
7167 @c (@code{gnus-summary-send-all-drafts}).  This command understands the
7168 @c process/prefix convention (@pxref{Process/Prefix}).  
7169 @c 
7170 @c 
7171 @c @node Rejected Articles
7172 @c @section Rejected Articles
7173 @c @cindex rejected articles
7174 @c 
7175 @c Sometimes a news server will reject an article.  Perhaps the server
7176 @c doesn't like your face.  Perhaps it just feels miserable.  Perhaps
7177 @c @emph{there be demons}.  Perhaps you have included too much cited text.
7178 @c Perhaps the disk is full.  Perhaps the server is down.
7179 @c 
7180 @c These situations are, of course, totally beyond the control of Gnus.
7181 @c (Gnus, of course, loves the way you look, always feels great, has angels
7182 @c fluttering around inside of it, doesn't care about how much cited text
7183 @c you include, never runs full and never goes down.)  So Gnus saves these
7184 @c articles until some later time when the server feels better.
7185 @c 
7186 @c The rejected articles will automatically be put in a special draft group
7187 @c (@pxref{Drafts}).  When the server comes back up again, you'd then
7188 @c typically enter that group and send all the articles off.
7189 @c 
7190
7191 @node Select Methods
7192 @chapter Select Methods
7193 @cindex foreign groups
7194 @cindex select methods
7195
7196 A @dfn{foreign group} is a group that is not read by the usual (or
7197 default) means.  It could be, for instance, a group from a different
7198 @sc{nntp} server, it could be a virtual group, or it could be your own
7199 personal mail group.
7200
7201 A foreign group (or any group, really) is specified by a @dfn{name} and
7202 a @dfn{select method}.  To take the latter first, a select method is a
7203 list where the first element says what backend to use (eg. @code{nntp},
7204 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
7205 name}.  There may be additional elements in the select method, where the
7206 value may have special meaning for the backend in question.
7207
7208 One could say that a select method defines a @dfn{virtual server}---so
7209 we do just that (@pxref{The Server Buffer}).
7210
7211 The @dfn{name} of the group is the name the backend will recognize the
7212 group as.
7213
7214 For instance, the group @samp{soc.motss} on the @sc{nntp} server
7215 @samp{some.where.edu} will have the name @samp{soc.motss} and select
7216 method @code{(nntp "some.where.edu")}.  Gnus will call this group, in
7217 all circumstances, @samp{nntp+some.where.edu:soc.motss}, even though the
7218 @code{nntp} backend just knows this group as @samp{soc.motss}.
7219
7220 The different methods all have their peculiarities, of course.
7221
7222 @menu
7223 * The Server Buffer::     Making and editing virtual servers.
7224 * Getting News::          Reading USENET news with Gnus.
7225 * Getting Mail::          Reading your personal mail with Gnus.
7226 * Other Sources::         Reading directories, files, SOUP packets.
7227 * Combined Groups::       Combining groups into one group.
7228 @end menu
7229
7230
7231 @node The Server Buffer
7232 @section The Server Buffer
7233
7234 Traditionally, a @dfn{server} is a machine or a piece of software that
7235 one connects to, and then requests information from.  Gnus does not
7236 connect directly to any real servers, but does all transactions through
7237 one backend or other.  But that's just putting one layer more between
7238 the actual media and Gnus, so we might just as well say that each
7239 backend represents a virtual server.
7240
7241 For instance, the @code{nntp} backend may be used to connect to several
7242 different actual @sc{nntp} servers, or, perhaps, to many different ports
7243 on the same actual @sc{nntp} server.  You tell Gnus which backend to
7244 use, and what parameters to set by specifying a @dfn{select method}.
7245
7246 These select methods specifications can sometimes become quite
7247 complicated---say, for instance, that you want to read from the
7248 @sc{nntp} server @samp{news.funet.fi} on port number @code{13}, which
7249 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
7250 Anyways, if you had to specify that for each group that used this
7251 server, that would be too much work, so Gnus offers a way of naming
7252 select methods, which is what you do in the server buffer.
7253
7254 To enter the server buffer, user the @kbd{^}
7255 (@code{gnus-group-enter-server-mode}) command in the group buffer.
7256
7257 @menu
7258 * Server Buffer Format::      You can customize the look of this buffer.
7259 * Server Commands::           Commands to manipulate servers.
7260 * Example Methods::           Examples server specifications.
7261 * Creating a Virtual Server:: An example session.
7262 * Servers and Methods::       You can use server names as select methods.
7263 * Unavailable Servers::       Some servers you try to contact may be down.
7264 @end menu
7265
7266 @vindex gnus-server-mode-hook
7267 @code{gnus-server-mode-hook} is run when creating the server buffer.
7268
7269
7270 @node Server Buffer Format
7271 @subsection Server Buffer Format
7272 @cindex server buffer format
7273
7274 @vindex gnus-server-line-format
7275 You can change the look of the server buffer lines by changing the
7276 @code{gnus-server-line-format} variable.  This is a @code{format}-like
7277 variable, with some simple extensions:
7278
7279 @table @samp
7280
7281 @item h 
7282 How the news is fetched---the backend name.
7283
7284 @item n
7285 The name of this server.
7286
7287 @item w
7288 Where the news is to be fetched from---the address.
7289
7290 @item s
7291 The opened/closed/denied status of the server.
7292 @end table
7293
7294 @vindex gnus-server-mode-line-format
7295 The mode line can also be customized by using the
7296 @code{gnus-server-mode-line-format} variable.  The following specs are
7297 understood: 
7298
7299 @table @samp
7300 @item S
7301 Server name.
7302
7303 @item M
7304 Server method.
7305 @end table
7306
7307 Also @pxref{Formatting Variables}.
7308
7309
7310 @node Server Commands
7311 @subsection Server Commands
7312 @cindex server commands
7313
7314 @table @kbd
7315
7316 @item a
7317 @kindex a (Server)
7318 @findex gnus-server-add-server
7319 Add a new server (@code{gnus-server-add-server}).
7320
7321 @item e
7322 @kindex e (Server)
7323 @findex gnus-server-edit-server
7324 Edit a server (@code{gnus-server-edit-server}).
7325
7326 @item SPACE
7327 @kindex SPACE (Server)
7328 @findex gnus-server-read-server
7329 Browse the current server (@code{gnus-server-read-server}).
7330
7331 @item q
7332 @kindex q (Server)
7333 @findex gnus-server-exit
7334 Return to the group buffer (@code{gnus-server-exit}).
7335
7336 @item k
7337 @kindex k (Server)
7338 @findex gnus-server-kill-server
7339 Kill the current server (@code{gnus-server-kill-server}).
7340
7341 @item y
7342 @kindex y (Server)
7343 @findex gnus-server-yank-server
7344 Yank the previously killed server (@code{gnus-server-yank-server}).
7345
7346 @item c
7347 @kindex c (Server)
7348 @findex gnus-server-copy-server
7349 Copy the current server (@code{gnus-server-copy-server}).
7350
7351 @item l
7352 @kindex l (Server)
7353 @findex gnus-server-list-servers
7354 List all servers (@code{gnus-server-list-servers}).
7355
7356 @end table
7357
7358
7359 @node Example Methods
7360 @subsection Example Methods
7361
7362 Most select methods are pretty simple and self-explanatory: 
7363
7364 @lisp
7365 (nntp "news.funet.fi")
7366 @end lisp
7367
7368 Reading directly from the spool is even simpler:
7369
7370 @lisp
7371 (nnspool "")
7372 @end lisp
7373
7374 As you can see, the first element in a select method is the name of the
7375 backend, and the second is the @dfn{address}, or @dfn{name}, if you
7376 will. 
7377
7378 After these two elements, there may be a arbitrary number of
7379 @var{(variable form)} pairs.
7380
7381 To go back to the first example---imagine that you want to read from
7382 port @code{15} from that machine.  This is what the select method should
7383 look like then:
7384
7385 @lisp
7386 (nntp "news.funet.fi" (nntp-port-number 15))
7387 @end lisp
7388
7389 You should read the documentation to each backend to find out what
7390 variables are relevant, but here's an @code{nnmh} example. 
7391
7392 @code{nnmh} is a mail backend that reads a spool-like structure.  Say
7393 you have two structures that you wish to access: One is your private
7394 mail spool, and the other is a public one.  Here's the possible spec for
7395 you private mail:
7396
7397 @lisp
7398 (nnmh "private" (nnmh-directory "~/private/mail/"))
7399 @end lisp
7400
7401 (This server is then called @samp{private}, but you may have guessed
7402 that.)
7403
7404 Here's the method for a public spool:
7405
7406 @lisp
7407 (nnmh "public" 
7408       (nnmh-directory "/usr/information/spool/") 
7409       (nnmh-get-new-mail nil))
7410 @end lisp
7411
7412
7413 @node Creating a Virtual Server
7414 @subsection Creating a Virtual Server
7415
7416 If you're saving lots of articles in the cache by using persistent
7417 articles, you may want to create a virtual server to read the cache.
7418
7419 First you need to add a new server.  The @kbd{a} command does that.  It
7420 would probably be best to use @code{nnspool} to read the cache.  You
7421 could also use @code{nnml} or @code{nnmh}, though.
7422
7423 Type @kbd{a nnspool RET cache RET}.
7424
7425 You should now have a brand new @code{nnspool} virtual server called
7426 @samp{cache}.  You now need to edit it to have the right definitions.
7427 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
7428 will contain the following:
7429
7430 @lisp
7431 (nnspool "cache")
7432 @end lisp
7433
7434 Change that to:
7435
7436 @lisp
7437 (nnspool "cache"
7438          (nnspool-spool-directory "~/News/cache/")
7439          (nnspool-nov-directory "~/News/cache/")
7440          (nnspool-active-file "~/News/cache/active"))
7441 @end lisp
7442
7443 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
7444 @kbd{RET} over this virtual server, you should be entered into a browse
7445 buffer, and you should be able to enter any of the groups displayed.
7446
7447
7448 @node Servers and Methods
7449 @subsection Servers and Methods
7450
7451 Wherever you would normally use a select method
7452 (eg. @code{gnus-secondary-select-method}, in the group select method,
7453 when browsing a foreign server) you can use a virtual server name
7454 instead.  This could potentially save lots of typing.  And it's nice all
7455 over.
7456
7457
7458 @node Unavailable Servers
7459 @subsection Unavailable Servers
7460
7461 If a server seems to be unreachable, Gnus will mark that server as
7462 @code{denied}.  That means that any subsequent attempt to make contact
7463 with that server will just be ignored.  ``It can't be opened,'' Gnus
7464 will tell you, without making the least effort to see whether that is
7465 actually the case or not.
7466
7467 That might seem quite naughty, but it does make sense most of the time.
7468 Let's say you have 10 groups subscribed to the server
7469 @samp{nepholococcygia.com}.  This server is located somewhere quite far
7470 away from you, the machine is quite, so it takes 1 minute just to find
7471 out that it refuses connection from you today.  If Gnus were to attempt
7472 to do that 10 times, you'd be quite annoyed, so Gnus won't attempt to do
7473 that.  Once it has gotten a single ``connection refused'', it will
7474 regard that server as ``down''.
7475
7476 So, what happens if the machine was only feeling unwell temporarily?
7477 How do you test to see whether the machine has come up again?
7478
7479 You jump to the server buffer (@pxref{The Server Buffer}) and poke it
7480 with the following commands:
7481
7482 @table @kbd
7483
7484 @item O
7485 @kindex O (Server)
7486 @findex gnus-server-open-server
7487 Try to establish connection to the server on the current line
7488 (@code{gnus-server-open-server}).
7489
7490 @item C
7491 @kindex C (Server)
7492 @findex gnus-server-close-server
7493 Close the connection (if any) to the server
7494 (@code{gnus-server-close-server}).
7495
7496 @item D
7497 @kindex D (Server)
7498 @findex gnus-server-deny-server
7499 Mark the current server as unreachable
7500 (@code{gnus-server-deny-server}). 
7501
7502 @item M-o
7503 @kindex M-o (Server)
7504 @findex gnus-server-open-all-servers
7505 Open the connections to all servers in the buffer
7506 (@code{gnus-server-open-all-servers}). 
7507
7508 @item M-c
7509 @kindex M-c (Server)
7510 @findex gnus-server-close-all-servers
7511 Close the connections to all servers in the buffer
7512 (@code{gnus-server-close-all-servers}). 
7513
7514 @item R
7515 @kindex R (Server)
7516 @findex gnus-server-remove-denials
7517 Remove all marks to whether Gnus was denied connection from all servers
7518 (@code{gnus-server-remove-denials}). 
7519
7520 @end table
7521
7522
7523 @node Getting News
7524 @section Getting News
7525 @cindex reading news
7526 @cindex news backends
7527
7528 A newsreader is normally used for reading news.  Gnus currently provides
7529 only two methods of getting news---it can read from an @sc{nntp} server,
7530 or it can read from a local spool.
7531
7532 @menu
7533 * NNTP::               Reading news from an @sc{nntp} server.
7534 * News Spool::         Reading news from the local spool.
7535 @end menu
7536
7537
7538 @node NNTP
7539 @subsection @sc{nntp}
7540 @cindex nntp
7541
7542 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
7543 You just specify @code{nntp} as method and the address of the @sc{nntp}
7544 server as the, uhm, address.
7545
7546 If the @sc{nntp} server is located at a non-standard port, setting the
7547 third element of the select method to this port number should allow you
7548 to connect to the right port.  You'll have to edit the group info for
7549 that (@pxref{Foreign Groups}).
7550
7551 The name of the foreign group can be the same as a native group.  In
7552 fact, you can subscribe to the same group from as many different servers
7553 you feel like.  There will be no name collisions.
7554
7555 The following variables can be used to create a virtual @code{nntp}
7556 server: 
7557
7558 @table @code
7559
7560 @item nntp-server-opened-hook
7561 @vindex nntp-server-opened-hook
7562 @cindex @sc{mode reader}
7563 @cindex authinfo
7564 @cindex authentification
7565 @cindex nntp authentification
7566 @findex nntp-send-authinfo
7567 @findex nntp-send-mode-reader
7568 @code{nntp-server-opened-hook} is run after a connection has been made.
7569 It can be used to send commands to the @sc{nntp} server after it has
7570 been contacted.  By default is sends the command @code{MODE READER} to
7571 the server with the @code{nntp-send-mode-reader} function.  Another
7572 popular function is @code{nntp-send-authinfo}, which will prompt you for
7573 an @sc{nntp} password and stuff.
7574
7575 @item nntp-server-action-alist 
7576 @vindex nntp-server-action-alist 
7577 This is an list of regexps to match on server types and actions to be
7578 taken when matches are made.  For instance, if you want Gnus to beep
7579 every time you connect to innd, you could say something like:
7580
7581 @lisp
7582 (setq nntp-server-action-alist
7583       '(("innd" (ding))))
7584 @end lisp
7585
7586 You probably don't want to do that, though.
7587
7588 The default value is
7589
7590 @lisp
7591   '(("nntpd 1\\.5\\.11t" 
7592      (remove-hook 'nntp-server-opened-hook nntp-send-mode-reader)))
7593 @end lisp
7594
7595 This ensures that Gnus doesn't send the @code{MODE READER} command to
7596 nntpd 1.5.11t, since that command chokes that server, I've been told. 
7597
7598 @item nntp-maximum-request
7599 @vindex nntp-maximum-request
7600 If the @sc{nntp} server doesn't support @sc{nov} headers, this backend
7601 will collect headers by sending a series of @code{head} commands.  To
7602 speed things up, the backend sends lots of these commands without
7603 waiting for reply, and then reads all the replies.  This is controlled
7604 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
7605 your network is buggy, you should set this to 1.
7606
7607 @item nntp-connection-timeout
7608 @vindex nntp-connection-timeout
7609 If you have lots of foreign @code{nntp} groups that you connect to
7610 regularly, you're sure to have problems with @sc{nntp} servers not
7611 responding properly, or being too loaded to reply within reasonable
7612 time.  This is can lead to awkward problems, which can be helped
7613 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
7614 that says how many seconds the @code{nntp} backend should wait for a
7615 connection before giving up.  If it is @code{nil}, which is the default,
7616 no timeouts are done.
7617
7618 @item nntp-command-timeout
7619 @vindex nntp-command-timeout
7620 @cindex PPP connections
7621 @cindex dynamic IP addresses
7622 If you're running Gnus on a machine that has a dynamically assigned
7623 address, Gnus may become confused.  If the address of your machine
7624 changes after connecting to the @sc{nntp} server, Gnus will simply sit
7625 waiting forever for replies from the server.  To help with this
7626 unfortunate problem, you can set this command to a number.  Gnus will
7627 then, if it sits waiting longer than that number of seconds for a reply
7628 from the server, shut down the connection, start a new one, and resend
7629 the command.  This should hopefully be transparent to the user.  A
7630 likely number is 30 seconds. 
7631
7632 @item nntp-retry-on-break
7633 @vindex nntp-retry-on-break
7634 If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
7635 hangs.  This will have much the same effect as the command timeout
7636 described above.
7637
7638 @item nntp-server-hook
7639 @vindex nntp-server-hook
7640 This hook is run as the last step when connecting to an @sc{nntp}
7641 server.
7642
7643 @findex nntp-open-rlogin
7644 @findex nntp-open-network-stream
7645 @item nntp-open-server-function
7646 @vindex nntp-open-server-function
7647 This function is used to connect to the remote system.  Two pre-made
7648 functions are @code{nntp-open-network-stream}, which is the default, and
7649 simply connects to some port or other on the remote system.  The other
7650 is @code{nntp-open-rlogin}, which does an rlogin on the remote system,
7651 and then does a telnet to the @sc{nntp} server available there.
7652
7653 @item nntp-rlogin-parameters
7654 @vindex nntp-rlogin-parameters
7655 If you use @code{nntp-open-rlogin} as the
7656 @code{nntp-open-server-function}, this list will be used as the
7657 parameter list given to @code{rsh}.
7658
7659 @item nntp-end-of-line
7660 @vindex nntp-end-of-line
7661 String to use as end-of-line markers when talking to the @sc{nntp}
7662 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
7663 using @code{rlogin} to talk to the server.
7664
7665 @item nntp-rlogin-user-name
7666 @vindex nntp-rlogin-user-name
7667 User name on the remote system when using the @code{rlogin} connect
7668 function. 
7669
7670 @item nntp-address
7671 @vindex nntp-address
7672 The address of the remote system running the @sc{nntp} server.
7673
7674 @item nntp-port-number
7675 @vindex nntp-port-number
7676 Port number to connect to when using the @code{nntp-open-network-stream}
7677 connect function.
7678
7679 @item nntp-buggy-select
7680 @vindex nntp-buggy-select
7681 Set this to non-@code{nil} if your select routine is buggy.
7682
7683 @item nntp-nov-is-evil 
7684 @vindex nntp-nov-is-evil 
7685 If the @sc{nntp} server does not support @sc{nov}, you could set this
7686 variable to @code{t}, but @code{nntp} usually checks whether @sc{nov}
7687 can be used automatically.
7688
7689 @item nntp-xover-commands
7690 @vindex nntp-xover-commands
7691 @cindex nov
7692 @cindex XOVER
7693 List of strings that are used as commands to fetch @sc{nov} lines from a
7694 server.  The default value of this variable is @code{("XOVER"
7695 "XOVERVIEW")}. 
7696
7697 @item nntp-nov-gap
7698 @vindex nntp-nov-gap
7699 @code{nntp} normally sends just one big request for @sc{nov} lines to
7700 the server.  The server responds with one huge list of lines.  However,
7701 if you have read articles 2-5000 in the group, and only want to read
7702 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
7703 lines that you do not want, and will not use.  This variable says how
7704 big a gap between two consecutive articles is allowed to be before the
7705 @code{XOVER} request is split into several request.  Note that if your
7706 network is fast, setting this variable to a really small number means
7707 that fetching will probably be slower.  If this variable is @code{nil},
7708 @code{nntp} will never split requests.
7709
7710 @item nntp-prepare-server-hook
7711 @vindex nntp-prepare-server-hook
7712 A hook run before attempting to connect to an @sc{nntp} server.
7713
7714 @item nntp-async-number
7715 @vindex nntp-async-number
7716 How many articles should be pre-fetched when in asynchronous mode.  If
7717 this variable is @code{t}, @code{nntp} will pre-fetch all the articles
7718 that it can without bound.  If it is @code{nil}, no pre-fetching will be
7719 made.
7720
7721 @item nntp-warn-about-losing-connection
7722 @vindex nntp-warn-about-losing-connection
7723 If this variable is non-@code{nil}, some noise will be made when a
7724 server closes connection.
7725
7726 @end table
7727
7728
7729 @node News Spool
7730 @subsection News Spool
7731 @cindex nnspool
7732 @cindex news spool
7733
7734 Subscribing to a foreign group from the local spool is extremely easy,
7735 and might be useful, for instance, to speed up reading groups like
7736 @samp{alt.binaries.pictures.furniture}.
7737
7738 Anyways, you just specify @code{nnspool} as the method and @samp{} (or
7739 anything else) as the address.
7740
7741 If you have access to a local spool, you should probably use that as the
7742 native select method (@pxref{Finding the News}).  It is normally faster
7743 than using an @code{nntp} select method, but might not be.  It depends.
7744 You just have to try to find out what's best at your site.
7745
7746 @table @code
7747
7748 @item nnspool-inews-program
7749 @vindex nnspool-inews-program
7750 Program used to post an article.
7751
7752 @item nnspool-inews-switches
7753 @vindex nnspool-inews-switches
7754 Parameters given to the inews program when posting an article. 
7755
7756 @item nnspool-spool-directory
7757 @vindex nnspool-spool-directory
7758 Where @code{nnspool} looks for the articles.  This is normally
7759 @file{/usr/spool/news/}.
7760
7761 @item nnspool-nov-directory 
7762 @vindex nnspool-nov-directory 
7763 Where @code{nnspool} will look for @sc{nov} files.  This is normally
7764 @file{/usr/spool/news/over.view/}.
7765
7766 @item nnspool-lib-dir
7767 @vindex nnspool-lib-dir
7768 Where the news lib dir is (@file{/usr/lib/news/} by default).
7769
7770 @item nnspool-active-file
7771 @vindex nnspool-active-file
7772 The path of the active file.
7773
7774 @item nnspool-newsgroups-file
7775 @vindex nnspool-newsgroups-file
7776 The path of the group descriptions file.
7777
7778 @item nnspool-history-file
7779 @vindex nnspool-history-file
7780 The path of the news history file.
7781
7782 @item nnspool-active-times-file
7783 @vindex nnspool-active-times-file
7784 The path of the active date file.
7785
7786 @item nnspool-nov-is-evil
7787 @vindex nnspool-nov-is-evil
7788 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
7789 that it finds.
7790
7791 @item nnspool-sift-nov-with-sed
7792 @vindex nnspool-sift-nov-with-sed
7793 @cindex sed
7794 If non-@code{nil}, which is the default, use @code{sed} to get the
7795 relevant portion from the overview file.  If nil, @code{nnspool} will
7796 load the entire file into a buffer and process it there.
7797
7798 @end table
7799
7800
7801 @node Getting Mail
7802 @section Getting Mail
7803 @cindex reading mail
7804 @cindex mail
7805
7806 Reading mail with a newsreader---isn't that just plain WeIrD? But of
7807 course.
7808
7809 @menu
7810 * Getting Started Reading Mail:: A simple cookbook example.
7811 * Splitting Mail::               How to create mail groups.
7812 * Mail Backend Variables::       Variables for customizing mail handling.
7813 * Fancy Mail Splitting::         Gnus can do hairy splitting of incoming mail.
7814 * Mail and Procmail::            Reading mail groups that procmail create.
7815 * Incorporating Old Mail::       What about the old mail you have?
7816 * Expiring Mail::                Getting rid of unwanted mail.
7817 * Duplicates::                   Dealing with duplicated mail.
7818 * Not Reading Mail::             Using mail backends for reading other files.
7819 * Choosing a Mail Backend::      Gnus can read a variety of mail formats.
7820 @end menu
7821
7822
7823 @node Getting Started Reading Mail
7824 @subsection Getting Started Reading Mail
7825
7826 It's quite easy to use Gnus to read your new mail.  You just plonk the
7827 mail backend of your choice into @code{gnus-secondary-select-methods},
7828 and things will happen automatically.
7829
7830 For instance, if you want to use @code{nnml} (which is a one file per
7831 mail backend), you could put the following in your @file{.gnus} file:
7832
7833 @lisp
7834 (setq gnus-secondary-select-methods
7835       '((nnml "private")))
7836 @end lisp
7837
7838 Now, the next time you start Gnus, this backend will be queried for new
7839 articles, and it will move all the messages in your spool file to its
7840 directory, which is @code{~/Mail/} by default.  The new group that will
7841 be created (@samp{mail.misc}) will be subscribed, and you can read it
7842 like any other group.
7843
7844 You will probably want to split the mail into several groups, though:
7845
7846 @lisp
7847 (setq nnmail-split-methods
7848   '(("junk" "^From:.*Lars Ingebrigtsen")
7849     ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
7850     ("other" "")))
7851 @end lisp
7852
7853 This will result in three new mail groups being created:
7854 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
7855 mail that doesn't fit into the first two groups will be placed in the
7856 latter group.
7857
7858 This should be sufficient for reading mail with Gnus.  You might want to
7859 give the other sections in this part of the manual a perusal, though,
7860 especially @pxref{Choosing a Mail Backend} and @pxref{Expiring Mail}. 
7861
7862
7863 @node Splitting Mail
7864 @subsection Splitting Mail
7865 @cindex splitting mail
7866 @cindex mail splitting
7867
7868 @vindex nnmail-split-methods
7869 The @code{nnmail-split-methods} variable says how the incoming mail is
7870 to be split into groups.
7871
7872 @lisp
7873 (setq nnmail-split-methods
7874   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
7875     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
7876     ("mail.other" "")))
7877 @end lisp
7878
7879 This variable is a list of lists, where the first element of each of
7880 these lists is the name of the mail group (they do not have to be called
7881 something beginning with @samp{mail}, by the way), and the second
7882 element is a regular expression used on the header of each mail to
7883 determine if it belongs in this mail group.
7884
7885 The second element can also be a function.  In that case, it will be
7886 called narrowed to the headers with the first element of the rule as the
7887 argument.  It should return a non-@code{nil} value if it thinks that the
7888 mail belongs in that group.
7889
7890 The last of these groups should always be a general one, and the regular
7891 expression should @emph{always} be @samp{} so that it matches any
7892 mails that haven't been matched by any of the other regexps.
7893
7894 If you like to tinker with this yourself, you can set this variable to a
7895 function of your choice.  This function will be called without any
7896 arguments in a buffer narrowed to the headers of an incoming mail
7897 message.  The function should return a list of groups names that it
7898 thinks should carry this mail message.
7899
7900 Note that the mail backends are free to maul the poor, innocent
7901 incoming headers all they want to.  They all add @code{Lines} headers;
7902 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
7903 @code{From<SPACE>} line to something else.
7904
7905 @vindex nnmail-crosspost
7906 The mail backends all support cross-posting.  If several regexps match,
7907 the mail will be ``cross-posted'' to all those groups.
7908 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
7909 that no articles are crossposted to the general (@samp{}) group.
7910
7911 @vindex nnmail-crosspost-link-function
7912 @cindex crosspost
7913 @cindex links
7914 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
7915 the crossposted articles.  However, not all files systems support hard
7916 links.  If that's the case for you, set
7917 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
7918 variable is @code{add-name-to-file} by default.)  
7919
7920 Gnus gives you all the opportunity you could possibly want for shooting
7921 yourself in the foot.  Let's say you create a group that will contain
7922 all the mail you get from your boss.  And then you accidentally
7923 unsubscribe from the group.  Gnus will still put all the mail from your
7924 boss in the unsubscribed group, and so, when your boss mails you ``Have
7925 that report ready by Monday or you're fired!'', you'll never see it and,
7926 come Tuesday, you'll still believe that you're gainfully employed while
7927 you really should be out collecting empty bottles to save up for next
7928 month's rent money.
7929
7930
7931 @node Mail Backend Variables
7932 @subsection Mail Backend Variables
7933
7934 These variables are (for the most part) pertinent to all the various
7935 mail backends.
7936
7937 @table @code
7938 @vindex nnmail-read-incoming-hook
7939 @item nnmail-read-incoming-hook
7940 The mail backends all call this hook after reading new mail.  You can
7941 use this hook to notify any mail watch programs, if you want to.
7942
7943 @vindex nnmail-spool-file
7944 @item nnmail-spool-file
7945 @cindex POP mail
7946 @cindex MAILHOST
7947 @cindex movemail
7948 @vindex nnmail-pop-password
7949 @vindex nnmail-pop-password-required
7950 The backends will look for new mail in this file.  If this variable is
7951 @code{nil}, the mail backends will never attempt to fetch mail by
7952 themselves.  If you are using a POP mail server and your name is
7953 @samp{larsi}, you should set this variable to @samp{po:larsi}.  If
7954 your name is not @samp{larsi}, you should probably modify that
7955 slightly, but you may have guessed that already, you smart & handsome
7956 devil!  You can also set this variable to @code{pop}, and Gnus will try
7957 to figure out the POP mail string by itself.  In any case, Gnus will
7958 call @code{movemail} which will contact the POP server named in the
7959 @code{MAILHOST} environment variable.  If the POP server needs a
7960 password, you can either set @code{nnmail-pop-password-required} to
7961 @code{t} and be prompted for the password, or set
7962 @code{nnmail-pop-password} to the password itself.
7963
7964 When you use a mail backend, Gnus will slurp all your mail from your
7965 inbox and plonk it down in your home directory.  Gnus doesn't move any
7966 mail if you're not using a mail backend---you have to do a lot of magic
7967 invocations first.  At the time when you have finished drawing the
7968 pentagram, lightened the candles, and sacrificed the goat, you really
7969 shouldn't be too surprised when Gnus moves your mail.
7970
7971 @vindex nnmail-use-procmail
7972 @vindex nnmail-procmail-suffix
7973 @item nnmail-use-procmail
7974 If non-@code{nil}, the mail backends will look in
7975 @code{nnmail-procmail-directory} for incoming mail.  All the files in
7976 that directory that have names ending in @code{nnmail-procmail-suffix}
7977 will be considered incoming mailboxes, and will be searched for new
7978 mail.
7979
7980 @vindex nnmail-crash-box
7981 @item nnmail-crash-box
7982 When the mail backends read a spool file, it is first moved to this
7983 file, which is @file{~/.gnus-crash-box} by default.  If this file
7984 already exists, it will always be read (and incorporated) before any
7985 other spool files.
7986
7987 @vindex nnmail-prepare-incoming-hook
7988 @item nnmail-prepare-incoming-hook
7989 This is run in a buffer that holds all the new incoming mail, and can be
7990 used for, well, anything, really.
7991
7992 @vindex nnmail-pre-get-new-mail-hook
7993 @vindex nnmail-post-get-new-mail-hook
7994 @item nnmail-pre-get-new-mail-hook
7995 @itemx nnmail-post-get-new-mail-hook
7996 These are two useful hooks executed when treating new incoming
7997 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
7998 starting to handle the new mail) and
7999 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
8000 is done).  Here's and example of using these two hooks to change the
8001 default file modes the new mail files get:
8002
8003 @lisp
8004 (add-hook 'gnus-pre-get-new-mail-hook 
8005           (lambda () (set-default-file-modes 511)))
8006
8007 (add-hook 'gnus-post-get-new-mail-hook 
8008           (lambda () (set-default-file-modes 551)))
8009 @end lisp
8010
8011 @item nnmail-tmp-directory
8012 @vindex nnmail-tmp-directory
8013 This variable says where to move the incoming mail to while processing
8014 it.  This is usually done in the same directory that the mail backend
8015 inhabits (i.e., @file{~/Mail/}), but if this variable is non-@code{nil},
8016 it will be used instead.
8017
8018 @item nnmail-movemail-program
8019 @vindex nnmail-movemail-program
8020 This program is executed to move mail from the user's inbox to her home
8021 directory.  The default is @samp{movemail}.
8022
8023 @item nnmail-delete-incoming
8024 @vindex nnmail-delete-incoming
8025 @cindex incoming mail files
8026 @cindex deleting incoming files
8027 If non-@code{nil}, the mail backends will delete the temporary incoming
8028 file after splitting mail into the proper groups.  This is @code{nil} by
8029 default for reasons of security.
8030
8031 Since Red Gnus is an alpha release, it is to be expected to lose mail.
8032 (No Gnus release since (ding) Gnus 0.10 (or something like that) have
8033 lost mail, I think, but that's not the point.)  By not deleting the
8034 Incoming* files, one can be sure to not lose mail -- if Gnus totally
8035 whacks out, one can always recover what was lost.
8036
8037 Delete the @file{Incoming*} files at will.
8038
8039 @item nnmail-use-long-file-names
8040 @vindex nnmail-use-long-file-names
8041 If non-@code{nil}, the mail backends will use long file and directory
8042 names.  Groups like @samp{mail.misc} will end up in directories like
8043 @file{mail.misc/}.  If it is @code{nil}, the same group will end up in
8044 @file{mail/misc/}.
8045
8046 @item nnmail-delete-file-function
8047 @vindex nnmail-delete-file-function
8048 @findex delete-file
8049 Function called to delete files.  It is @code{delete-file} by default. 
8050
8051 @end table
8052
8053
8054 @node Fancy Mail Splitting
8055 @subsection Fancy Mail Splitting
8056 @cindex mail splitting
8057 @cindex fancy mail splitting
8058
8059 @vindex nnmail-split-fancy
8060 @findex nnmail-split-fancy
8061 If the rather simple, standard method for specifying how to split mail
8062 doesn't allow you to do what you want, you can set
8063 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
8064 play with the @code{nnmail-split-fancy} variable. 
8065
8066 Let's look at an example value of this variable first:
8067
8068 @lisp
8069 ;; Messages from the mailer daemon are not crossposted to any of
8070 ;; the ordinary groups.  Warnings are put in a separate group
8071 ;; from real errors.
8072 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
8073                    "mail.misc"))
8074    ;; Non-error messages are crossposted to all relevant
8075    ;; groups, but we don't crosspost between the group for the
8076    ;; (ding) list and the group for other (ding) related mail.
8077    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
8078          ("subject" "ding" "ding.misc"))
8079       ;; Other mailing lists...
8080       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
8081       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
8082       ;; People...
8083       (any "larsi@@ifi\\.uio\\.no" "people.Lars Magne Ingebrigtsen"))
8084    ;; Unmatched mail goes to the catch all group.
8085    "misc.misc"))")
8086 @end lisp
8087
8088 This variable has the format of a @dfn{split}.  A split is a (possibly)
8089 recursive structure where each split may contain other splits.  Here are
8090 the four possible split syntaxes:
8091
8092 @table @dfn
8093
8094 @item GROUP 
8095 If the split is a string, that will be taken as a group name. 
8096
8097 @item (FIELD VALUE SPLIT)
8098 If the split is a list, and the first element is a string, then that
8099 means that if header FIELD (a regexp) contains VALUE (also a regexp),
8100 then store the message as specified by SPLIT.
8101
8102 @item (| SPLIT...)
8103 If the split is a list, and the first element is @code{|} (vertical
8104 bar), then process each SPLIT until one of them matches.  A SPLIT is
8105 said to match if it will cause the mail message to be stored in one or
8106 more groups.
8107
8108 @item (& SPLIT...)
8109 If the split is a list, and the first element is @code{&}, then process
8110 all SPLITs in the list.
8111 @end table
8112
8113 In these splits, FIELD must match a complete field name.  VALUE must
8114 match a complete word according to the fundamental mode syntax table.
8115 You can use @code{.*} in the regexps to match partial field names or
8116 words.
8117
8118 @vindex nnmail-split-abbrev-alist
8119 FIELD and VALUE can also be lisp symbols, in that case they are expanded
8120 as specified by the variable @code{nnmail-split-abbrev-alist}.  This is
8121 an alist of cons cells, where the car of the cells contains the key, and
8122 the cdr contains a string.
8123
8124 @vindex nnmail-split-fancy-syntax-table
8125 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
8126 when all this splitting is performed.
8127
8128
8129 @node Mail and Procmail
8130 @subsection Mail and Procmail
8131 @cindex procmail
8132
8133 @cindex slocal
8134 @cindex elm
8135 Many people use @code{procmail} (or some other mail filter program or
8136 external delivery agent---@code{slocal}, @code{elm}, etc) to split
8137 incoming mail into groups.  If you do that, you should set
8138 @code{nnmail-spool-file} to @code{procmail} to ensure that the mail
8139 backends never ever try to fetch mail by themselves.
8140
8141 This also means that you probably don't want to set
8142 @code{nnmail-split-methods} either, which has some, perhaps, unexpected
8143 side effects.
8144
8145 When a mail backend is queried for what groups it carries, it replies
8146 with the contents of that variable, along with any groups it has figured
8147 out that it carries by other means.  None of the backends (except
8148 @code{nnmh}) actually go out to the disk and check what groups actually
8149 exist.  (It's not trivial to distinguish between what the user thinks is
8150 a basis for a newsgroup and what is just a plain old file or directory.)
8151
8152 This means that you have to tell Gnus (and the backends) what groups
8153 exist by hand.
8154
8155 Let's take the @code{nnmh} backend as an example. 
8156
8157 The folders are located in @code{nnmh-directory}, say, @file{~/Mail/}.
8158 There are three folders, @file{foo}, @file{bar} and @file{mail.baz}.
8159
8160 Go to the group buffer and type @kbd{G m}.  When prompted, answer
8161 @samp{foo} for the name and @samp{nnmh} for the method.  Repeat
8162 twice for the two other groups, @samp{bar} and @samp{mail.baz}.  Be sure
8163 to include all your mail groups.
8164
8165 That's it.  You are now set to read your mail.  An active file for this
8166 method will be created automatically.
8167
8168 @vindex nnmail-procmail-suffix
8169 @vindex nnmail-procmail-directory
8170 If you use @code{nnfolder} or any other backend that store more than a
8171 single article in each file, you should never have procmail add mails to
8172 the file that Gnus sees.  Instead, procmail should put all incoming mail
8173 in @code{nnmail-procmail-directory}.  To arrive at the file name to put
8174 the incoming mail in, append @code{nnmail-procmail-suffix} to the group
8175 name.  The mail backends will read the mail from these files.
8176
8177 @vindex nnmail-resplit-incoming
8178 When Gnus reads a file called @file{mail.misc.spool}, this mail will be
8179 put in the @code{mail.misc}, as one would expect.  However, if you want
8180 Gnus to split the mail the normal way, you could set
8181 @code{nnmail-resplit-incoming} to @code{t}.
8182
8183 @vindex nnmail-keep-last-article
8184 If you use @code{procmail} to split things directory into an @code{nnmh}
8185 directory (which you shouldn't do), you should set
8186 @code{nnmail-keep-last-article} to non-@code{nil} to prevent Gnus from
8187 ever expiring the final article in a mail newsgroup.  This is quite,
8188 quite important.
8189
8190
8191 @node Incorporating Old Mail
8192 @subsection Incorporating Old Mail
8193
8194 Most people have lots of old mail stored in various file formats.  If
8195 you have set up Gnus to read mail using one of the spiffy Gnus mail
8196 backends, you'll probably wish to have that old mail incorporated into
8197 your mail groups.
8198
8199 Doing so can be quite easy.
8200
8201 To take an example: You're reading mail using @code{nnml}
8202 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
8203 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
8204 file filled with important, but old, mail.  You want to move it into
8205 your @code{nnml} groups.
8206
8207 Here's how:
8208
8209 @enumerate
8210 @item
8211 Go to the group buffer.
8212
8213 @item 
8214 Type `G f' and give the path of the mbox file when prompted to create an
8215 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
8216
8217 @item 
8218 Type `SPACE' to enter the newly created group.
8219
8220 @item
8221 Type `M P b' to process-mark all articles in this group (@pxref{Setting
8222 Process Marks}).
8223
8224 @item 
8225 Type `B r' to respool all the process-marked articles, and answer
8226 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
8227 @end enumerate
8228
8229 All the mail messages in the mbox file will now also be spread out over
8230 all your @code{nnml} groups.  Try entering them and check whether things
8231 have gone without a glitch.  If things look ok, you may consider
8232 deleting the mbox file, but I wouldn't do that unless I was absolutely
8233 sure that all the mail has ended up where it should be.
8234
8235 Respooling is also a handy thing to do if you're switching from one mail
8236 backend to another.  Just respool all the mail in the old mail groups
8237 using the new mail backend.
8238
8239
8240 @node Expiring Mail
8241 @subsection Expiring Mail
8242 @cindex article expiry
8243
8244 Traditional mail readers have a tendency to remove mail articles when
8245 you mark them as read, in some way.  Gnus takes a fundamentally
8246 different approach to mail reading.
8247
8248 Gnus basically considers mail just to be news that has been received in
8249 a rather peculiar manner.  It does not think that it has the power to
8250 actually change the mail, or delete any mail messages.  If you enter a
8251 mail group, and mark articles as ``read'', or kill them in some other
8252 fashion, the mail articles will still exist on the system.  I repeat:
8253 Gnus will not delete your old, read mail.  Unless you ask it to, of
8254 course.
8255
8256 To make Gnus get rid of your unwanted mail, you have to mark the
8257 articles as @dfn{expirable}.  This does not mean that the articles will
8258 disappear right away, however.  In general, a mail article will be
8259 deleted from your system if, 1) it is marked as expirable, AND 2) it is
8260 more than one week old.  If you do not mark an article as expirable, it
8261 will remain on your system until hell freezes over.  This bears
8262 repeating one more time, with some spurious capitalizations: IF you do
8263 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
8264
8265 @vindex gnus-auto-expirable-newsgroups
8266 You do not have to mark articles as expirable by hand.  Groups that
8267 match the regular expression @code{gnus-auto-expirable-newsgroups} will
8268 have all articles that you read marked as expirable automatically.  All
8269 articles that are marked as expirable have an @samp{E} in the first
8270 column in the summary buffer.
8271
8272 Let's say you subscribe to a couple of mailing lists, and you want the
8273 articles you have read to disappear after a while:
8274
8275 @lisp
8276 (setq gnus-auto-expirable-newsgroups 
8277       "mail.nonsense-list\\|mail.nice-list")
8278 @end lisp
8279
8280 Another way to have auto-expiry happen is to have the element
8281 @code{auto-expire} in the group parameters of the group. 
8282
8283 @vindex nnmail-expiry-wait
8284 The @code{nnmail-expiry-wait} variable supplies the default time an
8285 expirable article has to live.  The default is seven days.  
8286
8287 Gnus also supplies a function that lets you fine-tune how long articles
8288 are to live, based on what group they are in.  Let's say you want to
8289 have one month expiry period in the @samp{mail.private} group, a one day
8290 expiry period in the @samp{mail.junk} group, and a six day expiry period
8291 everywhere else:
8292
8293 @vindex nnmail-expiry-wait-function
8294 @lisp
8295 (setq nnmail-expiry-wait-function
8296       (lambda (group)
8297        (cond ((string= group "mail.private")
8298                31)
8299              ((string= group "mail.junk")
8300                1)
8301              ((string= group "important")
8302                'never)
8303              (t
8304                6))))
8305 @end lisp
8306
8307 The group names that this function is fed are ``unadorned'' group
8308 names---no @samp{nnml:} prefixes and the like.
8309
8310 The @code{nnmail-expiry-wait} variable and
8311 @code{nnmail-expiry-wait-function} function can be either a number (not
8312 necessarily an integer) or the symbols @code{immediate} or
8313 @code{never}.  
8314
8315 You can also use the @code{expiry-wait} group parameter to selectively
8316 change the expiry period (@pxref{Group Parameters}).
8317
8318 @vindex nnmail-keep-last-article
8319 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
8320 expire the final article in a mail newsgroup.  This is to make life
8321 easier for procmail users.
8322
8323 @vindex gnus-total-expirable-newsgroups
8324 By the way, that line up there about Gnus never expiring non-expirable
8325 articles is a lie.  If you put @code{total-expire} in the group
8326 parameters, articles will not be marked as expirable, but all read
8327 articles will be put through the expiry process.  Use with extreme
8328 caution.  Even more dangerous is the
8329 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
8330 this regexp will have all read articles put through the expiry process,
8331 which means that @emph{all} old mail articles in the groups in question
8332 will be deleted after a while.  Use with extreme caution, and don't come
8333 crying to me when you discover that the regexp you used matched the
8334 wrong group and all your important mail has disappeared.  Be a
8335 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
8336 with!  So there!
8337
8338
8339 @node Duplicates
8340 @subsection Duplicates
8341
8342 @vindex nnmail-treat-duplicates
8343 @vindex nnmail-message-id-cache-length
8344 @vindex nnmail-message-id-cache-file
8345 @cindex duplicate mails
8346 If you are a member of a couple of mailing list, you will sometime
8347 receive two copies of the same mail.  This can be quite annoying, so
8348 @code{nnmail} checks for and treats any duplicates it might find.  To do
8349 this, it keeps a cache of old @code{Message-ID}s -
8350 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
8351 default.  The approximate maximum number of @code{Message-ID}s stored
8352 there is controlled by the @code{nnmail-message-id-cache-length}
8353 variable, which is 1000 by default. (So 1000 @code{Message-ID}s will be
8354 stored.) If all this sounds scary to you, you can set
8355 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
8356 default), and @code{nnmail} won't delete duplicate mails.  Instead it
8357 will generate a brand new @code{Message-ID} for the mail and insert a
8358 warning into the head of the mail saying that it thinks that this is a
8359 duplicate of a different message.  
8360
8361 This variable can also be a function.  If that's the case, the function
8362 will be called from a buffer narrowed to the message in question with
8363 the @code{Message-ID} as a parameter.  The function must return either
8364 @code{nil}, @code{warn}, or @code{delete}.
8365
8366 You can turn this feature off completely by setting the variable to
8367 @code{nil}.
8368
8369 If you want all the duplicate mails to be put into a special
8370 @dfn{duplicates} group, you could do that using the normal mail split
8371 methods:
8372
8373 @lisp
8374 (setq nnmail-split-fancy
8375       '(| ;; Messages duplicates go to a separate group.
8376           ("gnus-warning" "duplication of message" "duplicate")
8377           ;; Message from daemons, postmaster, and the like to another.
8378           (any mail "mail.misc")
8379           ;; Other rules.
8380           [ ... ] ))
8381 @end lisp
8382
8383 Or something like:
8384 @lisp
8385 (setq nnmail-split-methods 
8386       '(("duplicates" "^Gnus-Warning:")
8387         ;; Other rules.
8388         [...]))
8389 @end lisp
8390
8391 Here's a neat feature: If you know that the recipient reads her mail
8392 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
8393 @code{delete}, you can send her as many insults as you like, just by
8394 using a @code{Message-ID} of a mail that you know that she's already
8395 received.  Think of all the fun!  She'll never see any of it!  Whee!
8396
8397
8398 @node Not Reading Mail
8399 @subsection Not Reading Mail
8400
8401 If you start using any of the mail backends, they have the annoying
8402 habit of assuming that you want to read mail with them.  This might not
8403 be unreasonable, but it might not be what you want.
8404
8405 If you set @code{nnmail-spool-file} to @code{nil}, none of the backends
8406 will ever attempt to read incoming mail, which should help.
8407
8408 @vindex nnbabyl-get-new-mail
8409 @vindex nnmbox-get-new-mail
8410 @vindex nnml-get-new-mail
8411 @vindex nnmh-get-new-mail
8412 @vindex nnfolder-get-new-mail
8413 This might be too much, if, for instance, you are reading mail quite
8414 happily with @code{nnml} and just want to peek at some old @sc{rmail}
8415 file you have stashed away with @code{nnbabyl}.  All backends have
8416 variables called backend-@code{get-new-mail}.  If you want to disable
8417 the @code{nnbabyl} mail reading, you edit the virtual server for the
8418 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
8419
8420 All the mail backends will call @code{nn}*@code{-prepare-save-mail-hook}
8421 narrowed to the article to be saved before saving it when reading
8422 incoming mail.
8423
8424
8425 @node Choosing a Mail Backend
8426 @subsection Choosing a Mail Backend
8427
8428 Gnus will read the mail spool when you activate a mail group.  The mail
8429 file is first copied to your home directory.  What happens after that
8430 depends on what format you want to store your mail in.
8431
8432 @menu
8433 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
8434 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
8435 * Mail Spool::                  Store your mail in a private spool?
8436 * MH Spool::                    An mhspool-like backend.
8437 * Mail Folders::                Having one file for each group.
8438 @end menu
8439
8440
8441 @node Unix Mail Box
8442 @subsubsection Unix Mail Box
8443 @cindex nnmbox
8444 @cindex unix mail box
8445
8446 @vindex nnmbox-active-file
8447 @vindex nnmbox-mbox-file
8448 The @dfn{nnmbox} backend will use the standard Un*x mbox file to store
8449 mail.  @code{nnmbox} will add extra headers to each mail article to say
8450 which group it belongs in.
8451
8452 Virtual server settings:
8453
8454 @table @code
8455 @item nnmbox-mbox-file
8456 @vindex nnmbox-mbox-file
8457 The name of the mail box in the user's home directory. 
8458
8459 @item nnmbox-active-file
8460 @vindex nnmbox-active-file
8461 The name of the active file for the mail box.
8462
8463 @item nnmbox-get-new-mail
8464 @vindex nnmbox-get-new-mail
8465 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
8466 into groups.
8467 @end table
8468
8469
8470 @node Rmail Babyl
8471 @subsubsection Rmail Babyl
8472 @cindex nnbabyl
8473 @cindex rmail mbox
8474
8475 @vindex nnbabyl-active-file
8476 @vindex nnbabyl-mbox-file
8477 The @dfn{nnbabyl} backend will use a babyl mail box (aka. @dfn{rmail
8478 mbox}) to store mail. @code{nnbabyl} will add extra headers to each mail
8479 article to say which group it belongs in.
8480
8481 Virtual server settings:
8482
8483 @table @code
8484 @item nnbabyl-mbox-file
8485 @vindex nnbabyl-mbox-file
8486 The name of the rmail mbox file.
8487
8488 @item nnbabyl-active-file
8489 @vindex nnbabyl-active-file
8490 The name of the active file for the rmail box.
8491
8492 @item nnbabyl-get-new-mail
8493 @vindex nnbabyl-get-new-mail
8494 If non-@code{nil}, @code{nnbabyl} will read incoming mail. 
8495 @end table
8496
8497
8498 @node Mail Spool
8499 @subsubsection Mail Spool
8500 @cindex nnml
8501 @cindex mail @sc{nov} spool
8502
8503 The @dfn{nnml} spool mail format isn't compatible with any other known
8504 format.  It should be used with some caution.
8505
8506 @vindex nnml-directory
8507 If you use this backend, Gnus will split all incoming mail into files;
8508 one file for each mail, and put the articles into the correct
8509 directories under the directory specified by the @code{nnml-directory}
8510 variable.  The default value is @file{~/Mail/}.
8511
8512 You do not have to create any directories beforehand; Gnus will take
8513 care of all that.
8514
8515 If you have a strict limit as to how many files you are allowed to store
8516 in your account, you should not use this backend.  As each mail gets its
8517 own file, you might very well occupy thousands of inodes within a few
8518 weeks.  If this is no problem for you, and it isn't a problem for you
8519 having your friendly systems administrator walking around, madly,
8520 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
8521 know that this is probably the fastest format to use.  You do not have
8522 to trudge through a big mbox file just to read your new mail.
8523
8524 @code{nnml} is probably the slowest backend when it comes to article
8525 splitting.  It has to create lots of files, and it also generates
8526 @sc{nov} databases for the incoming mails.  This makes is the fastest
8527 backend when it comes to reading mail.
8528
8529 Virtual server settings:
8530
8531 @table @code
8532 @item nnml-directory
8533 @vindex nnml-directory
8534 All @code{nnml} directories will be placed under this directory. 
8535
8536 @item nnml-active-file
8537 @vindex nnml-active-file
8538 The active file for the @code{nnml} server.
8539
8540 @item nnml-newsgroups-file
8541 @vindex nnml-newsgroups-file
8542 The @code{nnml} group descriptions file.  @xref{Newsgroups File
8543 Format}. 
8544
8545 @item nnml-get-new-mail
8546 @vindex nnml-get-new-mail
8547 If non-@code{nil}, @code{nnml} will read incoming mail.
8548
8549 @item nnml-nov-is-evil
8550 @vindex nnml-nov-is-evil
8551 If non-@code{nil}, this backend will ignore any @sc{nov} files.  
8552
8553 @item nnml-nov-file-name
8554 @vindex nnml-nov-file-name
8555 The name of the @sc{nov} files.  The default is @file{.overview}. 
8556
8557 @item nnml-prepare-save-mail-hook
8558 @vindex nnml-prepare-save-mail-hook
8559 Hook run narrowed to an article before saving.
8560
8561 @end table
8562
8563 @findex nnml-generate-nov-databases
8564 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
8565 you can do a complete update by typing @kbd{M-x
8566 nnml-generate-nov-databases}.  This command will trawl through the
8567 entire @code{nnml} hierarchy, looking at each and every article, so it
8568 might take a while to complete.
8569
8570
8571 @node MH Spool
8572 @subsubsection MH Spool
8573 @cindex nnmh
8574 @cindex mh-e mail spool
8575
8576 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
8577 @sc{nov} databases and it doesn't keep an active file.  This makes
8578 @code{nnmh} a @emph{much} slower backend than @code{nnml}, but it also
8579 makes it easier to write procmail scripts for.
8580
8581 Virtual server settings:
8582
8583 @table @code
8584 @item nnmh-directory
8585 @vindex nnmh-directory
8586 All @code{nnmh} directories will be located under this directory.
8587
8588 @item nnmh-get-new-mail
8589 @vindex nnmh-get-new-mail
8590 If non-@code{nil}, @code{nnmh} will read incoming mail.
8591
8592 @item nnmh-be-safe
8593 @vindex nnmh-be-safe
8594 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
8595 sure that the articles in the folder are actually what Gnus thinks they
8596 are.  It will check date stamps and stat everything in sight, so
8597 setting this to @code{t} will mean a serious slow-down.  If you never
8598 use anything but Gnus to read the @code{nnmh} articles, you do not have
8599 to set this variable to @code{t}.
8600 @end table
8601
8602
8603 @node Mail Folders
8604 @subsubsection Mail Folders
8605 @cindex nnfolder
8606 @cindex mbox folders
8607 @cindex mail folders
8608
8609 @code{nnfolder} is a backend for storing each mail group in a separate
8610 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
8611 will add extra headers to keep track of article numbers and arrival
8612 dates.
8613
8614 Virtual server settings:
8615
8616 @table @code
8617 @item nnfolder-directory
8618 @vindex nnfolder-directory
8619 All the @code{nnfolder} mail boxes will be stored under this directory. 
8620
8621 @item nnfolder-active-file
8622 @vindex nnfolder-active-file
8623 The name of the active file.
8624
8625 @item nnfolder-newsgroups-file
8626 @vindex nnfolder-newsgroups-file
8627 The name of the group descriptions file.  @xref{Newsgroups File Format}.
8628
8629 @item nnfolder-get-new-mail
8630 @vindex nnfolder-get-new-mail
8631 If non-@code{nil}, @code{nnfolder} will read incoming mail.
8632 @end table
8633
8634 @findex nnfolder-generate-active-file
8635 @kindex M-x nnfolder-generate-active-file
8636 If you have lots of @code{nnfolder}-like files you'd like to read with
8637 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
8638 command to make @code{nnfolder} aware of all likely files in
8639 @code{nnfolder-directory}.
8640
8641
8642 @node Other Sources
8643 @section Other Sources
8644
8645 Gnus can do more than just read news or mail.  The methods described
8646 below allow Gnus to view directories and files as if they were
8647 newsgroups.
8648
8649 @menu
8650 * Directory Groups::      You can read a directory as if it was a newsgroup.
8651 * Anything Groups::       Dired?  Who needs dired?
8652 * Document Groups::       Single files can be the basis of a group.
8653 * SOUP::                  Reading @sc{SOUP} packets ``offline''.
8654 * Mail-To-News Gateways:: Posting articles via mail-to-news gateways.
8655 @end menu
8656
8657
8658 @node Directory Groups
8659 @subsection Directory Groups
8660 @cindex nndir
8661 @cindex directory groups
8662
8663 If you have a directory that has lots of articles in separate files in
8664 it, you might treat it as a newsgroup.  The files have to have numerical
8665 names, of course.
8666
8667 This might be an opportune moment to mention @code{ange-ftp}, that most
8668 wonderful of all wonderful Emacs packages.  When I wrote @code{nndir}, I
8669 didn't think much about it---a backend to read directories.  Big deal.
8670
8671 @code{ange-ftp} changes that picture dramatically.  For instance, if you
8672 enter @file{"/ftp.hpc.uh.edu:/pub/emacs/ding-list/"} as the the
8673 directory name, ange-ftp will actually allow you to read this directory
8674 over at @samp{sina} as a newsgroup.  Distributed news ahoy!
8675
8676 @code{nndir} will use @sc{nov} files if they are present.
8677
8678 @code{nndir} is a ``read-only'' backend---you can't delete or expire
8679 articles with this method.  You can use @code{nnmh} or @code{nnml} for
8680 whatever you use @code{nndir} for, so you could switch to any of those
8681 methods if you feel the need to have a non-read-only @code{nndir}.
8682
8683
8684 @node Anything Groups
8685 @subsection Anything Groups
8686 @cindex nneething
8687
8688 From the @code{nndir} backend (which reads a single spool-like
8689 directory), it's just a hop and a skip to @code{nneething}, which
8690 pretends that any arbitrary directory is a newsgroup.  Strange, but
8691 true.
8692
8693 When @code{nneething} is presented with a directory, it will scan this
8694 directory and assign article numbers to each file.  When you enter such
8695 a group, @code{nneething} must create ``headers'' that Gnus can use.
8696 After all, Gnus is a newsreader, in case you're
8697 forgetting. @code{nneething} does this in a two-step process.  First, it
8698 snoops each file in question.  If the file looks like an article (i.e.,
8699 the first few lines look like headers), it will use this as the head.
8700 If this is just some arbitrary file without a head (eg. a C source
8701 file), @code{nneething} will cobble up a header out of thin air.  It
8702 will use file ownership, name and date and do whatever it can with these
8703 elements.
8704
8705 All this should happen automatically for you, and you will be presented
8706 with something that looks very much like a newsgroup.  Totally like a
8707 newsgroup, to be precise.  If you select an article, it will be displayed
8708 in the article buffer, just as usual.
8709
8710 If you select a line that represents a directory, Gnus will pop you into
8711 a new summary buffer for this @code{nneething} group.  And so on.  You can
8712 traverse the entire disk this way, if you feel like, but remember that
8713 Gnus is not dired, really, and does not intend to be, either.
8714
8715 There are two overall modes to this action---ephemeral or solid.  When
8716 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
8717 will not store information on what files you have read, and what files
8718 are new, and so on.  If you create a solid @code{nneething} group the
8719 normal way with @kbd{G m}, Gnus will store a mapping table between
8720 article numbers and file names, and you can treat this group like any
8721 other groups.  When you activate a solid @code{nneething} group, you will
8722 be told how many unread articles it contains, etc., etc.
8723
8724 Some variables:
8725
8726 @table @code
8727 @item nneething-map-file-directory
8728 @vindex nneething-map-file-directory
8729 All the mapping files for solid @code{nneething} groups will be stored
8730 in this directory, which defaults to @file{~/.nneething/}.
8731
8732 @item nneething-exclude-files
8733 @vindex nneething-exclude-files
8734 All files that match this regexp will be ignored.  Nice to use to exclude
8735 auto-save files and the like, which is what it does by default.
8736
8737 @item nneething-map-file
8738 @vindex nneething-map-file
8739 Name of the map files.
8740 @end table
8741
8742
8743 @node Document Groups
8744 @subsection Document Groups
8745 @cindex nndoc
8746 @cindex documentation group
8747 @cindex help group
8748
8749 @code{nndoc} is a cute little thing that will let you read a single file
8750 as a newsgroup.  Several files types are supported:
8751
8752 @table @code
8753 @cindex babyl
8754 @cindex rmail mbox
8755
8756 @item babyl
8757 The babyl (rmail) mail box.
8758 @cindex mbox
8759 @cindex Unix mbox
8760
8761 @item mbox
8762 The standard Unix mbox file.
8763
8764 @cindex MMDF mail box
8765 @item mmdf
8766 The MMDF mail box format.
8767
8768 @item news
8769 Several news articles appended into a file.
8770
8771 @item rnews
8772 @cindex rnews batch files
8773 The rnews batch transport format.
8774 @cindex forwarded messages
8775
8776 @item forward
8777 Forwarded articles.
8778
8779 @item mime-digest
8780 @cindex digest
8781 @cindex MIME digest
8782 @cindex 1153 digest
8783 @cindex RFC 1153 digest
8784 @cindex RFC 341 digest
8785 MIME (RFC 1341) digest format.
8786
8787 @item standard-digest
8788 The standard (RFC 1153) digest format.
8789
8790 @item slack-digest
8791 Non-standard digest format---matches most things, but does it badly. 
8792 @end table
8793
8794 You can also use the special ``file type'' @code{guess}, which means
8795 that @code{nndoc} will try to guess what file type it is looking at.
8796 @code{digest} means that @code{nndoc} should guess what digest type the
8797 file is.
8798
8799 @code{nndoc} will not try to change the file or insert any extra headers into
8800 it---it will simply, like, let you use the file as the basis for a
8801 group.  And that's it.
8802
8803 If you have some old archived articles that you want to insert into your
8804 new & spiffy Gnus mail backend, @code{nndoc} can probably help you with
8805 that.  Say you have an old @file{RMAIL} file with mail that you now want
8806 to split into your new @code{nnml} groups.  You look at that file using
8807 @code{nndoc} (using the @kbd{G f} command in the group buffer
8808 (@pxref{Foreign Groups})), set the process mark on all the articles in
8809 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
8810 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
8811 file is now also stored in lots of @code{nnml} directories, and you can
8812 delete that pesky @file{RMAIL} file.  If you have the guts!
8813
8814 Virtual server variables:
8815
8816 @table @code
8817 @item nndoc-article-type
8818 @vindex nndoc-article-type
8819 This should be one of @code{mbox}, @code{babyl}, @code{digest},
8820 @code{mmdf}, @code{forward}, @code{news}, @code{rnews},
8821 @code{mime-digest}, @code{clari-briefs}, or @code{guess}.
8822
8823 @item nndoc-post-type
8824 @vindex nndoc-post-type
8825 This variable says whether Gnus is to consider the group a news group or
8826 a mail group.  There are two legal values:  @code{mail} (the default)
8827 and @code{news}.
8828 @end table
8829
8830 @menu
8831 * Document Server Internals::   How to add your own document types.
8832 @end menu
8833
8834
8835 @node Document Server Internals
8836 @subsubsection Document Server Internals
8837
8838 Adding new document types to be recognized by @code{nndoc} isn't
8839 difficult.  You just have to whip up a definition of what the document
8840 looks like, write a predicate function to recognize that document type,
8841 and then hook into @code{nndoc}.
8842
8843 First, here's an example document type definition:
8844
8845 @example
8846 (mmdf 
8847  (article-begin .  "^\^A\^A\^A\^A\n")
8848  (body-end .  "^\^A\^A\^A\^A\n"))
8849 @end example
8850
8851 The definition is simply a unique @dfn{name} followed by a series of
8852 regexp pseudo-variable settings.  Below are the possible
8853 variables---don't be daunted by the number of variables; most document
8854 types can be defined with very few settings:
8855
8856 @table @code
8857 @item first-article
8858 If present, @code{nndoc} will skip past all text until it finds
8859 something that match this regexp.  All text before this will be
8860 totally ignored. 
8861
8862 @item article-begin
8863 This setting has to be present in all document type definitions.  It
8864 says what the beginning of each article looks like.
8865
8866 @item head-begin-function
8867 If present, this should be a function that moves point to the head of
8868 the article.
8869
8870 @item nndoc-head-begin
8871 If present, this should be a regexp that matches the head of the
8872 article. 
8873
8874 @item nndoc-head-end
8875 This should match the end of the head of the article.  It defaults to
8876 @samp{"^$"}---the empty line.
8877
8878 @item body-begin-function
8879 If present, this function should move point to the beginning of the body
8880 of the article.
8881
8882 @item body-begin
8883 This should match the beginning of the body of the article.  It defaults
8884 to @samp{^\n}.
8885
8886 @item body-end-function
8887 If present, this function should move point to the end of the body of
8888 the article.
8889
8890 @item body-end
8891 If present, this should match the end of the body of the article.
8892
8893 @item nndoc-file-end
8894 If present, this should match the end of the file.  All text after this
8895 regexp will be totally ignored. 
8896
8897 @end table
8898
8899 So, using these variables @code{nndoc} is able to dissect a document
8900 file into a series of articles, each with a head and a body.  However, a
8901 few more variables are needed since not all document types are all that
8902 news-like---variables needed to transform the head or the body into
8903 something that's palatable for Gnus:
8904
8905 @table @code
8906 @item prepare-body-function
8907 If present, this function will be called when requesting an article.  It
8908 will be called with point at the start of the body, and is useful if the
8909 document has encoded some parts of its contents. 
8910
8911 @item article-transform-function
8912 If present, this function is called when requesting an article.  It's
8913 meant to be used how more wide-ranging transformation of both head and
8914 body of the article.
8915
8916 @item generate-head-function
8917 If present, this function is called to generate a head that Gnus can
8918 understand.  It is called with the article number as a parameter, and is
8919 expected to generate a nice head for the article in question.  It is
8920 called when requesting the headers of all articles.
8921
8922 @end table
8923
8924 Let's look at the most complicated example I can come up with---standard
8925 digests:
8926
8927 @example
8928 (standard-digest
8929  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
8930  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
8931  (prepare-body-function . nndoc-unquote-dashes)
8932  (body-end-function . nndoc-digest-body-end)
8933  (head-end . "^ ?$")
8934  (body-begin . "^ ?\n")
8935  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
8936  (subtype digest guess))
8937 @end example
8938
8939 We see that all text before a 70-width line of dashes is ignored; all
8940 text after a line that starts with that @samp{^End of} is also ignored;
8941 each article begins with a 30-width line of dashes; the line separating
8942 the head from the body may contain a single spcae; and that the body is
8943 run through @code{nndoc-unquote-dashes} before being delivered.
8944
8945 To hook your own document definition into @code{nndoc}, use the
8946 @code{nndoc-add-type} function.  It takes two parameters---the first is
8947 the definition itself and the second (optional) parameter says where in
8948 the document type definition alist to put this definition.  The alist is
8949 traversed sequentially, and @code{nndoc-TYPE-type-p} is called for each
8950 type.  So @code{nndoc-mmdf-type-p} is called to see whether a document
8951 is of @code{mmdf} type, and so on.  These type predicates should return
8952 @code{nil} if the document is not of the correct type; @code{t} if it is
8953 of the correct type; and a number if the document might be of the
8954 correct type.  A high number means high probability; a low number means
8955 low probability with @samp{0} being the lowest legal number.
8956
8957
8958 @node SOUP
8959 @subsection SOUP
8960 @cindex SOUP
8961 @cindex offline
8962
8963 In the PC world people often talk about ``offline'' newsreaders.  These
8964 are thingies that are combined reader/news transport monstrosities.
8965 With built-in modem programs.  Yecchh!
8966
8967 Of course, us Unix Weenie types of human beans use things like
8968 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
8969 transport things like Ghod intended.  And then we just use normal
8970 newsreaders.  
8971
8972 However, it can sometimes be convenient to do something a that's a bit
8973 easier on the brain if you have a very slow modem, and you're not really
8974 that interested in doing things properly.  
8975
8976 A file format called @sc{soup} has been developed for transporting news
8977 and mail from servers to home machines and back again.  It can be a bit
8978 fiddly.
8979
8980 @enumerate
8981
8982 @item
8983 You log in on the server and create a @sc{soup} packet.  You can either
8984 use a dedicated @sc{soup} thingie, or you can use Gnus to create the
8985 packet with the @kbd{O s} command.
8986
8987 @item 
8988 You transfer the packet home.  Rail, boat, car or modem will do fine.
8989
8990 @item
8991 You put the packet in your home directory.
8992
8993 @item
8994 You fire up Gnus using the @code{nnsoup} backend as the native server.
8995
8996 @item
8997 You read articles and mail and answer and followup to the things you
8998 want.
8999
9000 @item 
9001 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
9002 packet.
9003
9004 @item 
9005 You transfer this packet to the server.  
9006
9007 @item
9008 You use Gnus to mail this packet out with the @kbd{G s s} command.
9009
9010 @item
9011 You then repeat until you die.
9012
9013 @end enumerate
9014
9015 So you basically have a bipartite system---you use @code{nnsoup} for
9016 reading and Gnus for packing/sending these @sc{soup} packets.
9017
9018 @menu
9019 * SOUP Commands::     Commands for creating and sending @sc{soup} packets
9020 * SOUP Groups::       A backend for reading @sc{soup} packets.
9021 * SOUP Replies::      How to enable @code{nnsoup} to take over mail and news.
9022 @end menu
9023
9024
9025 @node SOUP Commands
9026 @subsubsection SOUP Commands
9027
9028 @table @kbd
9029 @item G s b
9030 @kindex G s b (Group)
9031 @findex gnus-group-brew-soup
9032 Pack all unread articles in the current group
9033 (@code{gnus-group-brew-soup}).  This command understands the
9034 process/prefix convention.
9035
9036 @item G s w
9037 @kindex G s w (Group)
9038 @findex gnus-soup-save-areas
9039 Save all data files (@code{gnus-soup-save-areas}).
9040
9041 @item G s s
9042 @kindex G s s (Group)
9043 @findex gnus-soup-send-replies
9044 Send all replies from the replies packet
9045 (@code{gnus-soup-send-replies}). 
9046
9047 @item G s p
9048 @kindex G s p (Group)
9049 @findex gnus-soup-pack-packet
9050 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}). 
9051
9052 @item G s r
9053 @kindex G s r (Group)
9054 @findex nnsoup-pack-replies
9055 Pack all replies into a replies packet (@code{nnsoup-pack-replies}). 
9056
9057 @item O s
9058 @kindex O s (Summary)
9059 @findex gnus-soup-add-article
9060 This summary-mode command adds the current article to a @sc{soup} packet
9061 (@code{gnus-soup-add-article}).  It understands the process/prefix
9062 convention. 
9063
9064 @end table
9065
9066
9067 There are a few variables to customize where Gnus will put all these
9068 thingies:  
9069
9070 @table @code
9071
9072 @item gnus-soup-directory
9073 @vindex gnus-soup-directory
9074 Directory where Gnus will save intermediate files while composing
9075 @sc{soup} packets.  The default is @file{~/SoupBrew/}. 
9076
9077 @item gnus-soup-replies-directory
9078 @vindex gnus-soup-replies-directory
9079 This is what Gnus will use as a temporary directory while sending our
9080 reply packets.  The default is @file{~/SoupBrew/SoupReplies/}. 
9081
9082 @item gnus-soup-prefix-file
9083 @vindex gnus-soup-prefix-file
9084 Name of the file where Gnus stores the last used prefix.  The default is
9085 @samp{gnus-prefix}. 
9086
9087 @item gnus-soup-packer
9088 @vindex gnus-soup-packer
9089 A format string command for packing a @sc{soup} packet.  The default is
9090 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}. 
9091
9092 @item gnus-soup-unpacker
9093 @vindex gnus-soup-unpacker
9094 Format string command for unpacking a @sc{soup} packet.  The default is
9095 @samp{gunzip -c %s | tar xvf -}.
9096
9097 @item gnus-soup-packet-directory
9098 @vindex gnus-soup-packet-directory
9099 Where Gnus will look for reply packets.  The default is @file{~/}. 
9100
9101 @item gnus-soup-packet-regexp
9102 @vindex gnus-soup-packet-regexp
9103 Regular expression matching @sc{soup} reply packets in
9104 @code{gnus-soup-packet-directory}. 
9105
9106 @end table
9107  
9108
9109 @node SOUP Groups
9110 @subsubsection @sc{soup} Groups
9111 @cindex nnsoup
9112
9113 @code{nnsoup} is the backend for reading @sc{soup} packets.  It will
9114 read incoming packets, unpack them, and put them in a directory where
9115 you can read them at leisure.
9116
9117 These are the variables you can use to customize its behavior:
9118
9119 @table @code
9120
9121 @item nnsoup-tmp-directory
9122 @vindex nnsoup-tmp-directory
9123 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
9124 directory.  (@file{/tmp/} by default.)  
9125
9126 @item nnsoup-directory
9127 @vindex nnsoup-directory
9128 @code{nnsoup} then moves each message and index file to this directory.
9129 The default is @file{~/SOUP/}.
9130
9131 @item nnsoup-replies-directory 
9132 @vindex nnsoup-replies-directory 
9133 All replies will stored in this directory before being packed into a
9134 reply packet.  The default is @file{~/SOUP/replies/"}.
9135
9136 @item nnsoup-replies-format-type
9137 @vindex nnsoup-replies-format-type
9138 The @sc{soup} format of the replies packets.  The default is @samp{?n}
9139 (rnews), and I don't think you should touch that variable.  I probably
9140 shouldn't even have documented it.  Drats!  Too late!
9141
9142 @item nnsoup-replies-index-type
9143 @vindex nnsoup-replies-index-type
9144 The index type of the replies packet.  The is @samp{?n}, which means
9145 ``none''.  Don't fiddle with this one either!
9146
9147 @item nnsoup-active-file
9148 @vindex nnsoup-active-file
9149 Where @code{nnsoup} stores lots of information.  This is not an ``active
9150 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
9151 this file or mess it up in any way, you're dead.  The default is
9152 @file{~/SOUP/active}.
9153
9154 @item nnsoup-packer
9155 @vindex nnsoup-packer
9156 Format string command for packing a reply @sc{soup} packet.  The default
9157 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}. 
9158
9159 @item nnsoup-unpacker
9160 @vindex nnsoup-unpacker
9161 Format string command for unpacking incoming @sc{soup} packets.  The
9162 default is @samp{gunzip -c %s | tar xvf -}. 
9163
9164 @item nnsoup-packet-directory
9165 @vindex nnsoup-packet-directory
9166 Where @code{nnsoup} will look for incoming packets.  The default is
9167 @file{~/}.  
9168
9169 @item nnsoup-packet-regexp
9170 @vindex nnsoup-packet-regexp
9171 Regular expression matching incoming @sc{soup} packets.  The default is
9172 @samp{Soupout}. 
9173
9174 @end table
9175
9176
9177 @node SOUP Replies
9178 @subsubsection SOUP Replies
9179
9180 Just using @code{nnsoup} won't mean that your postings and mailings end
9181 up in @sc{soup} reply packets automagically.  You have to work a bit
9182 more for that to happen.
9183
9184 @findex nnsoup-set-variables
9185 The @code{nnsoup-set-variables} command will set the appropriate
9186 variables to ensure that all your followups and replies end up in the
9187 @sc{soup} system.
9188
9189 In specific, this is what it does:
9190
9191 @lisp
9192 (setq message-send-news-function 'nnsoup-request-post)
9193 (setq message-send-mail-function 'nnsoup-request-mail)
9194 @end lisp
9195
9196 And that's it, really.  If you only want news to go into the @sc{soup}
9197 system you just use the first line.  If you only want mail to be
9198 @sc{soup}ed you use the second.
9199
9200
9201 @node Mail-To-News Gateways
9202 @subsection Mail-To-News Gateways
9203 @cindex mail-to-news gateways
9204 @cindex gateways
9205
9206 If your local @code{nntp} server doesn't allow posting, for some reason
9207 or other, you can post using one of the numerous mail-to-news gateways.
9208 The @code{nngateway} backend provides the interface.
9209
9210 Note that you can't read anything from this backend---it can only be
9211 used to post with.
9212
9213 Server variables:
9214
9215 @table @code
9216 @item nngateway-address 
9217 @vindex nngateway-address 
9218 This is the address of the mail-to-news gateway.
9219
9220 @item nngateway-header-transformation
9221 @vindex nngateway-header-transformation
9222 News headers have often have to be transformed in some odd way or other
9223 for the mail-to-news gateway to accept it.  This variable says what 
9224 transformation should be called, and defaults to
9225 @code{nngateway-simple-header-transformation}.  The function is called
9226 narrowed to the headers to be transformed and with one parameter---the
9227 gateway address.
9228
9229 This default function just inserts a new @code{To} header based on the
9230 @code{Newsgroups} header and the gateway address---an article with this
9231 @code{Newsgroups} header:
9232
9233 @example
9234 Newsgroups: alt.religion.emacs
9235 @end example
9236
9237 will get this @code{From} header inserted:
9238
9239 @example
9240 To: alt-religion-emacs@@GATEWAY
9241 @end example
9242
9243 @end table
9244
9245 So, to use this, simply say something like:
9246
9247 @lisp
9248 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
9249 @end lisp
9250
9251
9252 @node Combined Groups
9253 @section Combined Groups
9254
9255 Gnus allows combining a mixture of all the other group types into bigger
9256 groups.
9257
9258 @menu
9259 * Virtual Groups::     Combining articles from many groups.
9260 * Kibozed Groups::     Looking through parts of the newsfeed for articles.
9261 @end menu
9262
9263
9264 @node Virtual Groups
9265 @subsection Virtual Groups
9266 @cindex nnvirtual
9267 @cindex virtual groups
9268
9269 An @dfn{nnvirtual group} is really nothing more than a collection of
9270 other groups.
9271
9272 For instance, if you are tired of reading many small group, you can
9273 put them all in one big group, and then grow tired of reading one
9274 big, unwieldy group.  The joys of computing!
9275
9276 You specify @code{nnvirtual} as the method.  The address should be a
9277 regexp to match component groups.
9278
9279 All marks in the virtual group will stick to the articles in the
9280 component groups.  So if you tick an article in a virtual group, the
9281 article will also be ticked in the component group from whence it came.
9282 (And vice versa---marks from the component groups will also be shown in
9283 the virtual group.)
9284
9285 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
9286 newsgroups into one, big, happy newsgroup:
9287
9288 @lisp
9289 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
9290 @end lisp
9291
9292 The component groups can be native or foreign; everything should work
9293 smoothly, but if your computer explodes, it was probably my fault.
9294
9295 Collecting the same group from several servers might actually be a good
9296 idea if users have set the Distribution header to limit distribution.
9297 If you would like to read @samp{soc.motss} both from a server in Japan
9298 and a server in Norway, you could use the following as the group regexp:
9299
9300 @example
9301 "^nntp+some.server.jp:soc.motss$\\|^nntp+some.server.no:soc.motss$"
9302 @end example
9303
9304 This should work kinda smoothly---all articles from both groups should
9305 end up in this one, and there should be no duplicates.  Threading (and
9306 the rest) will still work as usual, but there might be problems with the
9307 sequence of articles.  Sorting on date might be an option here
9308 (@pxref{Selecting a Group}.
9309
9310 One limitation, however---all groups that are included in a virtual
9311 group has to be alive (i.e., subscribed or unsubscribed).  Killed or
9312 zombie groups can't be component groups for @code{nnvirtual} groups.
9313
9314 @vindex nnvirtual-always-rescan
9315 If the @code{nnvirtual-always-rescan} is non-@code{nil},
9316 @code{nnvirtual} will always scan groups for unread articles when
9317 entering a virtual group.  If this variable is @code{nil} (which is the
9318 default) and you read articles in a component group after the virtual
9319 group has been activated, the read articles from the component group
9320 will show up when you enter the virtual group.  You'll also see this
9321 effect if you have two virtual groups that contain the same component
9322 group.  If that's the case, you should set this variable to @code{t}.
9323 Or you can just tap @code{M-g} on the virtual group every time before
9324 you enter it---it'll have much the same effect.
9325
9326
9327 @node Kibozed Groups
9328 @subsection Kibozed Groups
9329 @cindex nnkiboze
9330 @cindex kibozing
9331
9332 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
9333 the news feed''.  @code{nnkiboze} is a backend that will do this for
9334 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
9335 with useless requests!  Oh happiness!
9336
9337 @kindex G k (Group)
9338 To create a kibozed group, use the @kbd{G k} command in the group
9339 buffer. 
9340
9341 The address field of the @code{nnkiboze} method is, as with
9342 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
9343 @code{nnkiboze} group.  There most similarities between @code{nnkiboze}
9344 and @code{nnvirtual} ends.
9345
9346 In addition to this regexp detailing component groups, an @code{nnkiboze} group
9347 must have a score file to say what articles that are to be included in
9348 the group (@pxref{Scoring}).
9349
9350 @kindex M-x nnkiboze-generate-groups
9351 @findex nnkiboze-generate-groups
9352 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
9353 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
9354 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
9355 all the articles in all the components groups and run them through the
9356 scoring process to determine if there are any articles in the groups
9357 that are to be part of the @code{nnkiboze} groups.
9358
9359 Please limit the number of component groups by using restrictive
9360 regexps.  Otherwise your sysadmin may become annoyed with you, and the
9361 @sc{nntp} site may throw you off and never let you back in again.
9362 Stranger things have happened.
9363
9364 @code{nnkiboze} component groups do not have to be alive---they can be dead,
9365 and they can be foreign.  No restrictions.
9366
9367 @vindex nnkiboze-directory
9368 The generation of an @code{nnkiboze} group means writing two files in
9369 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
9370 contains the @sc{nov} header lines for all the articles in the group,
9371 and the other is an additional @file{.newsrc} file to store information
9372 on what groups that have been searched through to find component
9373 articles.
9374
9375 Articles that are marked as read in the @code{nnkiboze} group will have their
9376 @sc{nov} lines removed from the @sc{nov} file.
9377
9378
9379 @node Scoring
9380 @chapter Scoring
9381 @cindex scoring
9382
9383 Other people use @dfn{kill files}, but we here at Gnus Towers like
9384 scoring better than killing, so we'd rather switch than fight.  They do
9385 something completely different as well, so sit up straight and pay
9386 attention!
9387
9388 @vindex gnus-summary-mark-below
9389 All articles have a default score (@code{gnus-summary-default-score}),
9390 which is 0 by default.  This score may be raised or lowered either
9391 interactively or by score files.  Articles that have a score lower than
9392 @code{gnus-summary-mark-below} are marked as read.
9393
9394 Gnus will read any @dfn{score files} that apply to the current group
9395 before generating the summary buffer.
9396
9397 There are several commands in the summary buffer that insert score
9398 entries based on the current article.  You can, for instance, ask Gnus to
9399 lower or increase the score of all articles with a certain subject.
9400
9401 There are two sorts of scoring entries: Permanent and temporary.
9402 Temporary score entries are self-expiring entries.  Any entries that are
9403 temporary and have not been used for, say, a week, will be removed
9404 silently to help keep the sizes of the score files down.
9405
9406 @menu 
9407 * Summary Score Commands::   Adding score entries for the current group.
9408 * Group Score Commands::     General score commands.
9409 * Score Variables::          Customize your scoring.  (My, what terminology).
9410 * Score File Format::        What a score file may contain.
9411 * Score File Editing::       You can edit score files by hand as well.
9412 * Adaptive Scoring::         Big Sister Gnus @emph{knows} what you read.
9413 * Home Score File::          How to say where new score entries are to go.
9414 * Followups To Yourself::    Having Gnus notice when people answer you.
9415 * Scoring Tips::             How to score effectively.
9416 * Reverse Scoring::          That problem child of old is not problem.
9417 * Global Score Files::       Earth-spanning, ear-splitting score files.
9418 * Kill Files::               They are still here, but they can be ignored.
9419 * GroupLens::                Getting predictions on what you like to read.
9420 * Advanced Scoring::         Using logical expressions to build score rules.
9421 * Score Decays::             It can be useful to let scores wither away.
9422 @end menu
9423
9424
9425 @node Summary Score Commands
9426 @section Summary Score Commands
9427 @cindex score commands
9428
9429 The score commands that alter score entries do not actually modify real
9430 score files.  That would be too inefficient.  Gnus maintains a cache of
9431 previously loaded score files, one of which is considered the
9432 @dfn{current score file alist}.  The score commands simply insert
9433 entries into this list, and upon group exit, this list is saved.
9434
9435 The current score file is by default the group's local score file, even
9436 if no such score file actually exists.  To insert score commands into
9437 some other score file (eg. @file{all.SCORE}), you must first make this
9438 score file the current one.
9439
9440 General score commands that don't actually change the score file:
9441
9442 @table @kbd
9443
9444 @item V s
9445 @kindex V s (Summary)
9446 @findex gnus-summary-set-score
9447 Set the score of the current article (@code{gnus-summary-set-score}).  
9448
9449 @item V S
9450 @kindex V S (Summary)
9451 @findex gnus-summary-current-score
9452 Display the score of the current article
9453 (@code{gnus-summary-current-score}).   
9454
9455 @item V t
9456 @kindex V t (Summary)
9457 @findex gnus-score-find-trace
9458 Display all score rules that have been used on the current article
9459 (@code{gnus-score-find-trace}).   
9460
9461 @item V R
9462 @cindex V R (Summary)
9463 @findex gnus-summary-rescore
9464 Run the current summary through the scoring process
9465 (@code{gnus-summary-rescore}).  This might be useful if you're playing
9466 around with your score files behind Gnus' back and want to see the
9467 effect you're having.
9468
9469 @item V a
9470 @kindex V a (Summary)
9471 @findex gnus-summary-score-entry
9472 Add a new score entry, and allow specifying all elements 
9473 (@code{gnus-summary-score-entry}).
9474
9475 @item V c
9476 @kindex V c (Summary)
9477 @findex gnus-score-change-score-file
9478 Make a different score file the current
9479 (@code{gnus-score-change-score-file}). 
9480
9481 @item V e
9482 @kindex V e (Summary)
9483 @findex gnus-score-edit-current-scores
9484 Edit the current score file (@code{gnus-score-edit-current-scores}).
9485 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
9486 File Editing}).
9487
9488 @item V f
9489 @kindex V f (Summary)
9490 @findex gnus-score-edit-file
9491 Edit a score file and make this score file the current one
9492 (@code{gnus-score-edit-file}).
9493
9494 @item V F
9495 @kindex V F (Summary)
9496 @findex gnus-score-flush-cache
9497 Flush the score cahe (@code{gnus-score-flush-cache}).  This is useful
9498 after editing score files.
9499
9500 @item V C
9501 @kindex V C (Summary)
9502 @findex gnus-score-customize
9503 Customize a score file in a visually pleasing manner
9504 (@code{gnus-score-customize}). 
9505
9506 @item I C-i
9507 @kindex I C-i (Summary)
9508 @findex gnus-summary-raise-score
9509 Increase the score of the current article
9510 (@code{gnus-summary-raise-score}).
9511
9512 @item L C-l
9513 @kindex L C-l (Summary)
9514 @findex gnus-summary-lower-score
9515 Lower the score of the current article
9516 (@code{gnus-summary-lower-score}). 
9517 @end table
9518
9519 The rest of these commands modify the local score file.
9520
9521 @table @kbd
9522
9523 @item V m
9524 @kindex V m (Summary)
9525 @findex gnus-score-set-mark-below
9526 Prompt for a score, and mark all articles with a score below this as
9527 read (@code{gnus-score-set-mark-below}).
9528
9529 @item V x
9530 @kindex V x (Summary)
9531 @findex gnus-score-set-expunge-below
9532 Prompt for a score, and add a score rule to the current score file to
9533 expunge all articles below this score
9534 (@code{gnus-score-set-expunge-below}).
9535 @end table
9536
9537 The keystrokes for actually making score entries follow a very regular
9538 pattern, so there's no need to list all the commands.  (Hundreds of
9539 them.)  
9540
9541 @enumerate
9542 @item
9543 The first key is either @kbd{I} (upper case i) for increasing the score
9544 or @kbd{L} for lowering the score. 
9545 @item
9546 The second key says what header you want to score on.  The following
9547 keys are available:
9548 @table @kbd
9549
9550 @item a
9551 Score on the author name.
9552
9553 @item s
9554 Score on the subject line.
9555
9556 @item x
9557 Score on the Xref line---i.e., the cross-posting line.
9558
9559 @item t
9560 Score on thread---the References line.
9561
9562 @item d
9563 Score on the date.
9564
9565 @item l
9566 Score on the number of lines.
9567
9568 @item i
9569 Score on the Message-ID.
9570
9571 @item f
9572 Score on followups.
9573
9574 @item b
9575 Score on the body.
9576
9577 @item h
9578 Score on the head.
9579 @end table
9580
9581 @item
9582 The third key is the match type.  Which match types are legal depends on
9583 what headers you are scoring on.
9584
9585 @table @code
9586
9587 @item strings 
9588
9589 @table @kbd
9590
9591 @item e
9592 Exact matching.
9593
9594 @item s
9595 Substring matching.
9596
9597 @item f
9598 Fuzzy matching.
9599
9600 @item r
9601 Regexp matching
9602 @end table
9603
9604 @item date
9605 @table @kbd
9606
9607 @item b
9608 Before date.
9609
9610 @item a
9611 At date.
9612
9613 @item n
9614 This date.
9615 @end table
9616
9617 @item number
9618 @table @kbd
9619
9620 @item <
9621 Less than number.
9622
9623 @item =
9624 Equal to number.
9625
9626 @item >
9627 Greater than number.
9628 @end table
9629 @end table
9630
9631 @item 
9632 The fourth and final key says whether this is a temporary (i.e., expiring)
9633 score entry, or a permanent (i.e., non-expiring) score entry, or whether
9634 it is to be done immediately, without adding to the score file.
9635 @table @kbd
9636
9637 @item t
9638 Temporary score entry.
9639
9640 @item p
9641 Permanent score entry.
9642
9643 @item i
9644 Immediately scoring.
9645 @end table
9646
9647 @end enumerate
9648
9649 So, let's say you want to increase the score on the current author with
9650 exact matching permanently: @kbd{I a e p}.  If you want to lower the
9651 score based on the subject line, using substring matching, and make a
9652 temporary score entry: @kbd{L s s t}.  Pretty easy.
9653
9654 To make things a bit more complicated, there are shortcuts.  If you use
9655 a capital letter on either the second or third keys, Gnus will use
9656 defaults for the remaining one or two keystrokes.  The defaults are
9657 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
9658 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
9659
9660 @vindex gnus-score-mimic-keymap
9661 The @code{gnus-score-mimic-keymap} says whether these commands will
9662 pretend they are keymaps or not.
9663
9664
9665 @node Group Score Commands
9666 @section Group Score Commands
9667 @cindex group score commands
9668
9669 There aren't many of these as yet, I'm afraid.
9670
9671 @table @kbd
9672
9673 @item W f
9674 @kindex W f (Group)
9675 @findex gnus-score-flush-cache
9676 Gnus maintains a cache of score alists to avoid having to reload them
9677 all the time.  This command will flush the cache
9678 (@code{gnus-score-flush-cache}). 
9679
9680 @end table
9681
9682
9683 @node Score Variables
9684 @section Score Variables
9685 @cindex score variables
9686
9687 @table @code
9688
9689 @item gnus-use-scoring
9690 @vindex gnus-use-scoring
9691 If @code{nil}, Gnus will not check for score files, and will not, in
9692 general, do any score-related work.  This is @code{t} by default.
9693
9694 @item gnus-kill-killed
9695 @vindex gnus-kill-killed
9696 If this variable is @code{nil}, Gnus will never apply score files to
9697 articles that have already been through the kill process.  While this
9698 may save you lots of time, it also means that if you apply a kill file
9699 to a group, and then change the kill file and want to run it over you
9700 group again to kill more articles, it won't work.  You have to set this
9701 variable to @code{t} to do that.  (It is @code{t} by default.)
9702
9703 @item gnus-kill-files-directory
9704 @vindex gnus-kill-files-directory
9705 All kill and score files will be stored in this directory, which is
9706 initialized from the @code{SAVEDIR} environment variable by default.
9707 This is @file{~/News/} by default.
9708
9709 @item gnus-score-file-suffix
9710 @vindex gnus-score-file-suffix
9711 Suffix to add to the group name to arrive at the score file name
9712 (@samp{SCORE} by default.)
9713
9714 @item gnus-score-uncacheable-files
9715 @vindex gnus-score-uncacheable-files
9716 @cindex score cache
9717 All score files are normally cached to avoid excessive re-loading of
9718 score files.  However, if this might make you Emacs grow big and
9719 bloated, so this regexp can be used to weed out score files that are
9720 unlikely to be needed again.  It would be a bad idea to deny caching of
9721 @file{all.SCORE}, while it might be a good idea to not cache
9722 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
9723 variable is @samp{ADAPT$} by default, so no adaptive score files will
9724 be cached.
9725
9726 @item gnus-save-score
9727 @vindex gnus-save-score
9728 If you have really complicated score files, and do lots of batch
9729 scoring, then you might set this variable to @code{t}.  This will make
9730 Gnus save the scores into the @file{.newsrc.eld} file.
9731
9732 @item gnus-score-interactive-default-score
9733 @vindex gnus-score-interactive-default-score
9734 Score used by all the interactive raise/lower commands to raise/lower
9735 score with.  Default is 1000, which may seem excessive, but this is to
9736 ensure that the adaptive scoring scheme gets enough room to play with.
9737 We don't want the small changes from the adaptive scoring to overwrite
9738 manually entered data.
9739
9740 @item gnus-summary-default-score
9741 @vindex gnus-summary-default-score
9742 Default score of an article, which is 0 by default.
9743
9744 @item gnus-score-over-mark
9745 @vindex gnus-score-over-mark
9746 Mark (in the third column) used for articles with a score over the
9747 default.  Default is @samp{+}.
9748
9749 @item gnus-score-below-mark
9750 @vindex gnus-score-below-mark
9751 Mark (in the third column) used for articles with a score below the
9752 default.  Default is @samp{-}.
9753
9754 @item gnus-score-find-score-files-function
9755 @vindex gnus-score-find-score-files-function
9756 Function used to find score files for the current group.  This function
9757 is called with the name of the group as the argument. 
9758
9759 Predefined functions available are:
9760 @table @code
9761
9762 @item gnus-score-find-single
9763 @findex gnus-score-find-single
9764 Only apply the group's own score file.
9765
9766 @item gnus-score-find-bnews
9767 @findex gnus-score-find-bnews
9768 Apply all score files that match, using bnews syntax.  This is the
9769 default.  For instance, if the current group is @samp{gnu.emacs.gnus},
9770 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
9771 @file{gnu.all.SCORE} would all apply.  In short, the instances of
9772 @samp{all} in the score file names are translated into @samp{.*}, and
9773 then a regexp match is done.
9774
9775 This means that if you have some score entries that you want to apply to
9776 all groups, then you put those entries in the @file{all.SCORE} file. 
9777
9778 @item gnus-score-find-hierarchical
9779 @findex gnus-score-find-hierarchical
9780 Apply all score files from all the parent groups.  This means that you
9781 can't have score files like @file{all.SCORE} or @file{all.emacs.SCORE},
9782 but you can have @file{SCORE},  @file{comp.SCORE} and
9783 @file{comp.emacs.SCORE}. 
9784
9785 @end table
9786 This variable can also be a list of functions.  In that case, all these
9787 functions will be called, and all the returned lists of score files will
9788 be applied.  These functions can also return lists of score alists
9789 directly.  In that case, the functions that return these non-file score
9790 alists should probably be placed before the ``real'' score file
9791 functions, to ensure that the last score file returned is the local
9792 score file.  Phu.
9793
9794 @item gnus-score-expiry-days
9795 @vindex gnus-score-expiry-days
9796 This variable says how many days should pass before an unused score file
9797 entry is expired.  If this variable is @code{nil}, no score file entries
9798 are expired.  It's 7 by default.
9799
9800 @item gnus-update-score-entry-dates
9801 @vindex gnus-update-score-entry-dates
9802 If this variable is non-@code{nil}, matching score entries will have
9803 their dates updated.  (This is how Gnus controls expiry---all
9804 non-matching entries will become too old while matching entries will
9805 stay fresh and young.)  However, if you set this variable to @code{nil},
9806 even matching entries will grow old and will have to face that oh-so
9807 grim reaper.  
9808
9809 @item gnus-score-after-write-file-function
9810 @vindex gnus-score-after-write-file-function
9811 Function called with the name of the score file just written.
9812
9813 @end table
9814
9815
9816 @node Score File Format
9817 @section Score File Format
9818 @cindex score file format
9819
9820 A score file is an @code{emacs-lisp} file that normally contains just a
9821 single form.  Casual users are not expected to edit these files;
9822 everything can be changed from the summary buffer.
9823
9824 Anyway, if you'd like to dig into it yourself, here's an example:
9825
9826 @lisp
9827 (("from"
9828   ("Lars Ingebrigtsen" -10000)
9829   ("Per Abrahamsen")
9830   ("larsi\\|lmi" -50000 nil R))
9831  ("subject"
9832   ("Ding is Badd" nil 728373))
9833  ("xref"
9834   ("alt.politics" -1000 728372 s))
9835  ("lines"
9836   (2 -100 nil <))
9837  (mark 0)
9838  (expunge -1000)
9839  (mark-and-expunge -10)
9840  (read-only nil)
9841  (orphan -10)
9842  (adapt t)
9843  (files "/hom/larsi/News/gnu.SCORE")
9844  (exclude-files "all.SCORE")
9845  (local (gnus-newsgroup-auto-expire t)
9846         (gnus-summary-make-false-root 'empty))
9847  (eval (ding)))
9848 @end lisp
9849
9850 This example demonstrates absolutely everything about a score file. 
9851
9852 Even though this looks much like lisp code, nothing here is actually
9853 @code{eval}ed.  The lisp reader is used to read this form, though, so it
9854 has to be legal syntactically, if not semantically.
9855
9856 Six keys are supported by this alist:
9857
9858 @table @code
9859
9860 @item STRING
9861 If the key is a string, it is the name of the header to perform the
9862 match on.  Scoring can only be performed on these eight headers:
9863 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
9864 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
9865 these headers, there are three strings to tell Gnus to fetch the entire
9866 article and do the match on larger parts of the article: @code{Body}
9867 will perform the match on the body of the article, @code{Head} will
9868 perform the match on the head of the article, and @code{All} will
9869 perform the match on the entire article.  Note that using any of these
9870 last three keys will slow down group entry @emph{considerably}.  The
9871 final ``header'' you can score on is @code{Followup}.  These score
9872 entries will result in new score entries being added for all follow-ups
9873 to articles that matches these score entries.
9874
9875 Following this key is a arbitrary number of score entries, where each
9876 score entry has one to four elements.
9877 @enumerate
9878
9879 @item 
9880 The first element is the @dfn{match element}.  On most headers this will
9881 be a string, but on the Lines and Chars headers, this must be an
9882 integer. 
9883
9884 @item 
9885 If the second element is present, it should be a number---the @dfn{score
9886 element}.  This number should be an integer in the neginf to posinf
9887 interval.  This number is added to the score of the article if the match
9888 is successful.  If this element is not present, the
9889 @code{gnus-score-interactive-default-score} number will be used
9890 instead.  This is 1000 by default.
9891
9892 @item 
9893 If the third element is present, it should be a number---the @dfn{date
9894 element}.  This date says when the last time this score entry matched,
9895 which provides a mechanism for expiring the score entries.  It this
9896 element is not present, the score entry is permanent.  The date is
9897 represented by the number of days since December 31, 1 ce.
9898
9899 @item 
9900 If the fourth element is present, it should be a symbol---the @dfn{type
9901 element}.  This element specifies what function should be used to see
9902 whether this score entry matches the article.  What match types that can
9903 be used depends on what header you wish to perform the match on.
9904 @table @dfn
9905
9906 @item From, Subject, References, Xref, Message-ID
9907 For most header types, there are the @code{r} and @code{R} (regexp), as
9908 well as @code{s} and @code{S} (substring) types, and @code{e} and
9909 @code{E} (exact match), and @code{w} (word match) types.  If this
9910 element is not present, Gnus will assume that substring matching should
9911 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
9912 that the matches will be done in a case-sensitive manner.  All these
9913 one-letter types are really just abbreviations for the @code{regexp},
9914 @code{string}, @code{exact}, and @code{word} types, which you can use
9915 instead, if you feel like.
9916
9917 @item Lines, Chars
9918 These two headers use different match types: @code{<}, @code{>},
9919 @code{=}, @code{>=} and @code{<=}.
9920
9921 @item Date
9922 For the Date header we have three kinda silly match types:
9923 @code{before}, @code{at} and @code{after}.  I can't really imagine this
9924 ever being useful, but, like, it would feel kinda silly not to provide
9925 this function.  Just in case.  You never know.  Better safe than sorry.
9926 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
9927 sex on a first date.  (I have been told that at least one person, and I
9928 quote, ``found this function indispensable'', however.)
9929
9930 A more useful match type is @code{regexp}.  With it, you can match the
9931 date string using a regular expression.  The date is normalized to
9932 ISO8601 compact format first, which looks like @samp{YYYYMMDDTHHMMSS}.
9933 If you want to match all articles that have been posted on April 1st in
9934 every year, you could use @samp{....0401.........} as a match string,
9935 for instance.  (Note that the date is kept in its original time zone, so
9936 this will match articles that were posted when it was April 1st where
9937 the article was posted from.  Time zones are such wholesome fun for the
9938 whole family, eh?)
9939
9940 @item Head, Body, All
9941 These three match keys use the same match types as the @code{From} (etc)
9942 header uses.
9943
9944 @item Followup
9945 This match key will add a score entry on all articles that followup to
9946 some author.  Uses the same match types as the @code{From} header uses.
9947
9948 @item Thread
9949 This match key will add a score entry on all articles that are part of
9950 a thread.  Uses the same match types as the @code{References} header
9951 uses.
9952 @end table
9953 @end enumerate
9954
9955 @item mark
9956 The value of this entry should be a number.  Any articles with a score
9957 lower than this number will be marked as read.
9958
9959 @item expunge
9960 The value of this entry should be a number.  Any articles with a score
9961 lower than this number will be removed from the summary buffer.
9962
9963 @item mark-and-expunge
9964 The value of this entry should be a number.  Any articles with a score
9965 lower than this number will be marked as read and removed from the
9966 summary buffer.
9967
9968 @item thread-mark-and-expunge
9969 The value of this entry should be a number.  All articles that belong to
9970 a thread that has a total score below this number will be marked as read
9971 and removed from the summary buffer.  @code{gnus-thread-score-function}
9972 says how to compute the total score for a thread.
9973
9974 @item files
9975 The value of this entry should be any number of file names.  These files
9976 are assumed to be score files as well, and will be loaded the same way
9977 this one was.
9978
9979 @item exclude-files
9980 The clue of this entry should be any number of files.  This files will
9981 not be loaded, even though they would normally be so, for some reason or
9982 other. 
9983
9984 @item eval
9985 The value of this entry will be @code{eval}el.  This element will be
9986 ignored when handling global score files. 
9987
9988 @item read-only
9989 Read-only score files will not be updated or saved.  Global score files
9990 should feature this atom (@pxref{Global Score Files}).
9991
9992 @item orphan
9993 The value of this entry should be a number.  Articles that do not have
9994 parents will get this number added to their scores.  Imagine you follow
9995 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
9996 will only follow a few of the threads, also want to see any new threads.
9997
9998 You can do this with the following two score file entries:
9999
10000 @example
10001         (orphan -500)
10002         (mark-and-expunge -100)
10003 @end example
10004
10005 When you enter the group the first time, you will only see the new
10006 threads.  You then raise the score of the threads that you find
10007 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
10008 rest.  Next time you enter the group, you will see new articles in the
10009 interesting threads, plus any new threads.
10010
10011 I.e.---the orphan score atom is for high-volume groups where there
10012 exist a few interesting threads which can't be found automatically by
10013 ordinary scoring rules.
10014
10015 @item adapt
10016 This entry controls the adaptive scoring.  If it is @code{t}, the
10017 default adaptive scoring rules will be used.  If it is @code{ignore}, no
10018 adaptive scoring will be performed on this group.  If it is a list, this
10019 list will be used as the adaptive scoring rules.  If it isn't present,
10020 or is something other than @code{t} or @code{ignore}, the default
10021 adaptive scoring rules will be used.  If you want to use adaptive
10022 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
10023 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
10024 not want adaptive scoring.  If you only want adaptive scoring in a few
10025 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
10026 insert @code{(adapt t)} in the score files of the groups where you want
10027 it. 
10028
10029 @item adapt-file
10030 All adaptive score entries will go to the file named by this entry.  It
10031 will also be applied when entering the group.  This atom might be handy
10032 if you want to adapt on several groups at once, using the same adaptive
10033 file for a number of groups.
10034
10035 @item local
10036 @cindex local variables
10037 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
10038 Each @var{var} will be made buffer-local to the current summary buffer,
10039 and set to the value specified.  This is a convenient, if somewhat
10040 strange, way of setting variables in some groups if you don't like hooks
10041 much.
10042 @end table
10043
10044
10045 @node Score File Editing
10046 @section Score File Editing
10047
10048 You normally enter all scoring commands from the summary buffer, but you
10049 might feel the urge to edit them by hand as well, so we've supplied you
10050 with a mode for that.  
10051
10052 It's simply a slightly customized @code{emacs-lisp} mode, with these
10053 additional commands:
10054
10055 @table @kbd
10056
10057 @item C-c C-c
10058 @kindex C-c C-c (Score)
10059 @findex gnus-score-edit-done
10060 Save the changes you have made and return to the summary buffer
10061 (@code{gnus-score-edit-done}). 
10062
10063 @item C-c C-d
10064 @kindex C-c C-d (Score)
10065 @findex gnus-score-edit-insert-date
10066 Insert the current date in numerical format
10067 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
10068 you were wondering.
10069
10070 @item C-c C-p
10071 @kindex C-c C-p (Score)
10072 @findex gnus-score-pretty-print
10073 The adaptive score files are saved in an unformatted fashion.  If you
10074 intend to read one of these files, you want to @dfn{pretty print} it
10075 first.  This command (@code{gnus-score-pretty-print}) does that for
10076 you. 
10077
10078 @end table
10079
10080 Type @kbd{M-x gnus-score-mode} to use this mode.
10081
10082 @vindex gnus-score-mode-hook
10083 @code{gnus-score-menu-hook} is run in score mode buffers.
10084
10085 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
10086 e} to begin editing score files.
10087
10088
10089 @node Adaptive Scoring
10090 @section Adaptive Scoring
10091 @cindex adaptive scoring
10092
10093 If all this scoring is getting you down, Gnus has a way of making it all
10094 happen automatically---as if by magic.  Or rather, as if by artificial
10095 stupidity, to be precise.
10096
10097 @vindex gnus-use-adaptive-scoring
10098 When you read an article, or mark an article as read, or kill an
10099 article, you leave marks behind.  On exit from the group, Gnus can sniff
10100 these marks and add score elements depending on what marks it finds.
10101 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
10102 @code{t} or @code{(line)}.  If you want score adaptively on separate
10103 words appearing in the subjects, you should set this variable to
10104 @code{(word)}.  If you want to use both adaptive methods, set this
10105 variable to @code{(word line)}.
10106
10107 @vindex gnus-default-adaptive-score-alist
10108 To give you complete control over the scoring process, you can customize
10109 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
10110 might look something like this:
10111
10112 @lisp
10113 (defvar gnus-default-adaptive-score-alist
10114   '((gnus-unread-mark)
10115     (gnus-ticked-mark (from 4))
10116     (gnus-dormant-mark (from 5))
10117     (gnus-del-mark (from -4) (subject -1))
10118     (gnus-read-mark (from 4) (subject 2))
10119     (gnus-expirable-mark (from -1) (subject -1))
10120     (gnus-killed-mark (from -1) (subject -3))
10121     (gnus-kill-file-mark)
10122     (gnus-ancient-mark)
10123     (gnus-low-score-mark)
10124     (gnus-catchup-mark (from -1) (subject -1))))
10125 @end lisp
10126
10127 As you see, each element in this alist has a mark as a key (either a
10128 variable name or a ``real'' mark---a character).  Following this key is
10129 a arbitrary number of header/score pairs.  If there are no header/score
10130 pairs following the key, no adaptive scoring will be done on articles
10131 that have that key as the article mark.  For instance, articles with
10132 @code{gnus-unread-mark} in the example above will not get adaptive score
10133 entries.
10134
10135 Each article can have only one mark, so just a single of these rules
10136 will be applied to each article.
10137
10138 To take @code{gnus-del-mark} as an example---this alist says that all
10139 articles that have that mark (i.e., are marked with @samp{D}) will have a
10140 score entry added to lower based on the @code{From} header by -4, and
10141 lowered by @code{Subject} by -1.  Change this to fit your prejudices. 
10142
10143 If you have marked 10 articles with the same subject with
10144 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
10145 That means that that subject will get a score of ten times -1, which
10146 should be, unless I'm much mistaken, -10.
10147
10148 The headers you can score on are @code{from}, @code{subject},
10149 @code{message-id}, @code{references}, @code{xref}, @code{lines},
10150 @code{chars} and @code{date}.  In addition, you can score on
10151 @code{followup}, which will create an adaptive score entry that matches
10152 on the @code{References} header using the @code{Message-ID} of the
10153 current article, thereby matching the following thread.  
10154
10155 You can also score on @code{thread}, which will try to score all
10156 articles that appear in a thread.  @code{thread} matches uses a
10157 @code{Message-ID} to match on the @code{References} header of the
10158 article.  If the match is made, the @code{Message-ID} of the article is
10159 added to the @code{thread} rule.  (Think about it.  I'd recommend two
10160 aspirins afterwards.)
10161
10162 If you use this scheme, you should set the score file atom @code{mark}
10163 to something small---like -300, perhaps, to avoid having small random
10164 changes result in articles getting marked as read.
10165
10166 After using adaptive scoring for a week or so, Gnus should start to
10167 become properly trained and enhance the authors you like best, and kill
10168 the authors you like least, without you having to say so explicitly. 
10169
10170 You can control what groups the adaptive scoring is to be performed on
10171 by using the score files (@pxref{Score File Format}).  This will also
10172 let you use different rules in different groups.
10173
10174 @vindex gnus-adaptive-file-suffix
10175 The adaptive score entries will be put into a file where the name is the
10176 group name with @code{gnus-adaptive-file-suffix} appended.  The default
10177 is @samp{ADAPT}.
10178
10179 @vindex gnus-score-exact-adapt-limit
10180 When doing adaptive scoring, substring or fuzzy matching would probably
10181 give you the best results in most cases.  However, if the header one
10182 matches is short, the possibility for false positives is great, so if
10183 the length of the match is less than
10184 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
10185 this variable is @code{nil}, exact matching will always be used to avoid
10186 this problem.
10187
10188 @vindex gnus-default-adaptive-word-score-alist
10189 As mentioned above, you can adapt either on individual words or entire
10190 headers.  If you adapt on words, the
10191 @code{gnus-default-adaptive-word-score-alist} variable says what score
10192 each instance of a word should add given a mark.
10193
10194 @lisp
10195 (setq gnus-default-adaptive-word-score-alist  
10196       `((,gnus-read-mark . 30)
10197         (,gnus-catchup-mark . -10)
10198         (,gnus-killed-mark . -20)
10199         (,gnus-del-mark . -15)))
10200 @end lisp
10201
10202 This is the default value.  If you have adaption on words enabled, every
10203 word that appears in subjects of articles that are marked with
10204 @code{gnus-read-mark} will result in a score rule that increase the
10205 score with 30 points.
10206
10207 @vindex gnus-ignored-adaptive-words
10208 Words that appear in the @code{gnus-ignored-adaptive-words} list will be
10209 ignored.
10210
10211 After using this scheme for a while, it might be nice to write a
10212 @code{gnus-psychoanalyze-user} command to go through the rules and see
10213 what words you like and what words you don't like.  Or perhaps not.
10214
10215
10216 @node Home Score File
10217 @section Home Score File
10218
10219 The score file where new score file entries will go is called the
10220 @dfn{home score file}.  This is normally (and by default) the score file
10221 for the group itself.  For instance, the home score file for
10222 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
10223
10224 However, this may not be what you want.  It is often convenient to share
10225 a common home score file among many groups---all @samp{emacs} groups
10226 could perhaps use the same home score file.
10227
10228 @vindex gnus-home-score-file
10229 The variable that controls this is @code{gnus-home-score-file}.  It can
10230 be:
10231
10232 @enumerate
10233 @item
10234 A string.  Then this file will be used as the home score file for all
10235 groups. 
10236
10237 @item
10238 A function. The result of this function will be used as the home score
10239 file.  The function will be called with the name of the group as the
10240 parameter. 
10241
10242 @item
10243 A list.  The elements in this list can be:
10244
10245 @enumerate
10246 @item 
10247 @var{(regexp file-name)}.  If the @var{regexp} matches the group name,
10248 the @var{file-name} will will be used as the home score file.
10249
10250 @item 
10251 A function. If the function returns non-nil, the result will be used as
10252 the home score file.
10253
10254 @item 
10255 A string.  Use the string as the home score file.
10256 @end enumerate
10257
10258 The list will be traversed from the beginning towards the end looking
10259 for matches.
10260
10261 @end enumerate
10262
10263 So, if you want to use just a single score file, you could say:
10264
10265 @lisp
10266 (setq gnus-home-score-file
10267       "my-total-score-file.SCORE")
10268 @end lisp
10269
10270 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
10271 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
10272
10273 @lisp
10274 (setq gnus-home-score-file
10275       'gnus-hierarchial-home-score-file)
10276 @end lisp
10277
10278 This is a ready-made function provided for your convenience.
10279
10280 If you want to have one score file for the @samp{emacs} groups and
10281 another for the @samp{comp} groups, while letting all other groups use
10282 their own home score files:
10283
10284 @lisp
10285 (setq gnus-home-score-file
10286       ;; All groups that match the regexp "\\.emacs"
10287       '("\\.emacs" "emacs.SCORE")
10288       ;; All the comp groups in one score file
10289        ("^comp" "comp.SCORE"))
10290 @end lisp
10291    
10292 @vindex gnus-home-adapt-file
10293 @code{gnus-home-adapt-file} works exactly the same way as
10294 @code{gnus-home-score-file}, but says what the home adaptive score file
10295 is instead.  All new adaptive file entries will go into the file
10296 specified by this variable, and the same syntax is allowed.
10297
10298 In addition to using @code{gnus-home-score-file} and
10299 @code{gnus-home-adapt-file}, you can also use group parameters
10300 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
10301 Parameters}) to achieve much the same.  Group and topic parameters take
10302 presedence over this variable.
10303
10304
10305 @node Followups To Yourself
10306 @section Followups To Yourself
10307
10308 Gnus offers two commands for picking out the @code{Message-ID} header in
10309 the current buffer.  Gnus will then add a score rule that scores using
10310 this @code{Message-ID} on the @code{References} header of other
10311 articles.  This will, in effect, increase the score of all articles that
10312 respond to the article in the current buffer.  Quite useful if you want
10313 to easily note when people answer what you've said.
10314
10315 @table @code
10316
10317 @item gnus-score-followup-article
10318 @findex gnus-score-followup-article
10319 This will add a score to articles that directly follow up your own
10320 article. 
10321
10322 @item gnus-score-followup-thread
10323 @findex gnus-score-followup-thread
10324 This will add a score to all articles that appear in a thread ``below''
10325 your own article.
10326 @end table
10327
10328 @vindex message-sent-hook
10329 These two functions are both primarily meant to be used in hooks like
10330 @code{message-sent-hook}.  
10331
10332 If you look closely at your own @code{Message-ID}, you'll notice that
10333 the first two or three characters are always the same.  Here's two of
10334 mine:  
10335
10336 @example
10337 <x6u3u47icf.fsf@@eyesore.no>
10338 <x6sp9o7ibw.fsf@@eyesore.no>
10339 @end example
10340
10341 So ``my'' ident on this machine is @samp{x6}.  This can be
10342 exploited---the following rule will raise the score on all followups to
10343 myself: 
10344
10345 @lisp
10346 ("references" 
10347  "<x6[0-9a-z]+\\.fsf@.*eyesore.no>" 1000 nil r)
10348 @end lisp
10349
10350 Whether it's the first two or first three characters that are ``yours''
10351 is system-dependent.
10352
10353
10354 @node Scoring Tips
10355 @section Scoring Tips
10356 @cindex scoring tips
10357
10358 @table @dfn
10359
10360 @item Crossposts
10361 @cindex crossposts
10362 @cindex scoring crossposts
10363 If you want to lower the score of crossposts, the line to match on is
10364 the @code{Xref} header.
10365 @lisp
10366 ("xref" (" talk.politics.misc:" -1000))
10367 @end lisp
10368
10369 @item Multiple crossposts
10370 If you want to lower the score of articles that have been crossposted to
10371 more than, say, 3 groups:
10372 @lisp
10373 ("xref" ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+" -1000 nil r))
10374 @end lisp
10375
10376 @item Matching on the body
10377 This is generally not a very good idea---it takes a very long time.
10378 Gnus actually has to fetch each individual article from the server.  But
10379 you might want to anyway, I guess.  Even though there are three match
10380 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
10381 and stick with it in each score file.  If you use any two, each article
10382 will be fetched @emph{twice}.  If you want to match a bit on the
10383 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
10384 the matches.  
10385
10386 @item Marking as read
10387 You will probably want to mark articles that has a score below a certain
10388 number as read.  This is most easily achieved by putting the following
10389 in your @file{all.SCORE} file:
10390 @lisp
10391 ((mark -100))
10392 @end lisp
10393 You may also consider doing something similar with @code{expunge}.  
10394
10395 @item Negated character classes
10396 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
10397 That will match newlines, which might lead to, well, The Unknown.  Say
10398 @code{[^abcd\n]*} instead.
10399 @end table
10400
10401
10402 @node Reverse Scoring
10403 @section Reverse Scoring
10404 @cindex reverse scoring
10405
10406 If you want to keep just articles that have @samp{Sex with Emacs} in the
10407 subject header, and expunge all other articles, you could put something
10408 like this in your score file:
10409
10410 @lisp
10411 (("subject"
10412   ("Sex with Emacs" 2))
10413  (mark 1)
10414  (expunge 1))
10415 @end lisp
10416
10417 So, you raise all articles that match @samp{Sex with Emacs} and mark the
10418 rest as read, and expunge them to boot.
10419
10420
10421 @node Global Score Files
10422 @section Global Score Files
10423 @cindex global score files
10424
10425 Sure, other newsreaders have ``global kill files''.  These are usually
10426 nothing more than a single kill file that applies to all groups, stored
10427 in the user's home directory.  Bah!  Puny, weak newsreaders!
10428
10429 What I'm talking about here are Global Score Files.  Score files from
10430 all over the world, from users everywhere, uniting all nations in one
10431 big, happy score file union!  Ange-score!  New and untested!
10432
10433 @vindex gnus-global-score-files
10434 All you have to do to use other people's score files is to set the
10435 @code{gnus-global-score-files} variable.  One entry for each score file,
10436 or each score file directory.  Gnus will decide by itself what score
10437 files are applicable to which group.
10438
10439 Say you want to use all score files in the
10440 @file{/ftp@@ftp.some-where:/pub/score} directory and the single score
10441 file @file{/ftp@@ftp.ifi.uio.no:/pub/larsi/ding/score/soc.motss.SCORE}:
10442
10443 @lisp
10444 (setq gnus-global-score-files
10445       '("/ftp@@ftp.ifi.uio.no:/pub/larsi/ding/score/soc.motss.SCORE"
10446         "/ftp@@ftp.some-where:/pub/score/"))
10447 @end lisp
10448
10449 @findex gnus-score-search-global-directories
10450 Simple, eh?  Directory names must end with a @samp{/}.  These
10451 directories are typically scanned only once during each Gnus session.
10452 If you feel the need to manually re-scan the remote directories, you can
10453 use the @code{gnus-score-search-global-directories} command.
10454
10455 Note that, at present, using this option will slow down group entry
10456 somewhat.  (That is---a lot.)
10457
10458 If you want to start maintaining score files for other people to use,
10459 just put your score file up for anonymous ftp and announce it to the
10460 world.  Become a retro-moderator!  Participate in the retro-moderator
10461 wars sure to ensue, where retro-moderators battle it out for the
10462 sympathy of the people, luring them to use their score files on false
10463 premises!  Yay!  The net is saved!
10464
10465 Here are some tips for the would-be retro-moderator, off the top of my
10466 head: 
10467
10468 @itemize @bullet
10469
10470 @item 
10471 Articles that are heavily crossposted are probably junk. 
10472 @item
10473 To lower a single inappropriate article, lower by @code{Message-ID}.
10474 @item
10475 Particularly brilliant authors can be raised on a permanent basis. 
10476 @item
10477 Authors that repeatedly post off-charter for the group can safely be
10478 lowered out of existence.
10479 @item
10480 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
10481 articles completely.
10482
10483 @item 
10484 Use expiring score entries to keep the size of the file down.  You
10485 should probably have a long expiry period, though, as some sites keep
10486 old articles for a long time.
10487 @end itemize
10488
10489 ... I wonder whether other newsreaders will support global score files
10490 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
10491 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
10492 holding our breath yet?
10493
10494
10495 @node Kill Files
10496 @section Kill Files
10497 @cindex kill files
10498
10499 Gnus still supports those pesky old kill files.  In fact, the kill file
10500 entries can now be expiring, which is something I wrote before Daniel
10501 Quinlan thought of doing score files, so I've left the code in there.
10502
10503 In short, kill processing is a lot slower (and I do mean @emph{a lot})
10504 than score processing, so it might be a good idea to rewrite your kill
10505 files into score files.
10506
10507 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
10508 forms into this file, which means that you can use kill files as some
10509 sort of primitive hook function to be run on group entry, even though
10510 that isn't a very good idea.
10511
10512 XCNormal kill files look like this:
10513
10514 @lisp
10515 (gnus-kill "From" "Lars Ingebrigtsen")
10516 (gnus-kill "Subject" "ding")
10517 (gnus-expunge "X")
10518 @end lisp
10519
10520 This will mark every article written by me as read, and remove them from
10521 the summary buffer.  Very useful, you'll agree.
10522
10523 Other programs use a totally different kill file syntax.  If Gnus
10524 encounters what looks like a @code{rn} kill file, it will take a stab at
10525 interpreting it. 
10526
10527 Two summary functions for editing a GNUS kill file:
10528
10529 @table @kbd
10530
10531 @item M-k
10532 @kindex M-k (Summary)
10533 @findex gnus-summary-edit-local-kill
10534 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
10535
10536 @item M-K
10537 @kindex M-K (Summary)
10538 @findex gnus-summary-edit-global-kill
10539 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
10540 @end table
10541
10542 Two group mode functions for editing the kill files:
10543
10544 @table @kbd
10545
10546 @item M-k
10547 @kindex M-k (Group)
10548 @findex gnus-group-edit-local-kill
10549 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
10550
10551 @item M-K
10552 @kindex M-K (Group)
10553 @findex gnus-group-edit-global-kill
10554 Edit the general kill file (@code{gnus-group-edit-global-kill}).
10555 @end table
10556
10557 Kill file variables:
10558
10559 @table @code
10560 @item gnus-kill-file-name
10561 @vindex gnus-kill-file-name
10562 A kill file for the group @samp{soc.motss} is normally called
10563 @file{soc.motss.KILL}.  The suffix appended to the group name to get
10564 this file name is detailed by the @code{gnus-kill-file-name} variable.
10565 The ``global'' kill file (not in the score file sense of ``global'', of
10566 course) is called just @file{KILL}.
10567
10568 @vindex gnus-kill-save-kill-file
10569 @item gnus-kill-save-kill-file
10570 If this variable is non-@code{nil}, Gnus will save the
10571 kill file after processing, which is necessary if you use expiring
10572 kills. 
10573
10574 @item gnus-apply-kill-hook
10575 @vindex gnus-apply-kill-hook
10576 @findex gnus-apply-kill-file-unless-scored
10577 @findex gnus-apply-kill-file
10578 A hook called to apply kill files to a group.  It is
10579 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
10580 kill file if you have a score file for the same group, you can set this
10581 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
10582 kill files to be processed, you should set this variable to @code{nil}.
10583
10584 @item gnus-kill-file-mode-hook
10585 @vindex gnus-kill-file-mode-hook
10586 A hook called in kill-file mode buffers.
10587
10588 @end table
10589
10590
10591 @node GroupLens
10592 @section GroupLens
10593 @cindex GroupLens
10594
10595 GroupLens is a collaborative filtering system that helps you work
10596 together with other people to find the quality news articles out of the
10597 huge volume of news articles generated every day.
10598
10599 To accomplish this the GroupLens system combines your opinions about
10600 articles you have already read with the opinions of others who have done
10601 likewise and gives you a personalized prediction for each unread news
10602 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
10603 rate articles, and finds other people that rate articles the same way.
10604 Once it has found for you some people you agree with it tells you, in
10605 the form of a prediction, what they thought of the article.  You can use
10606 this prediction to help you decide whether or not you want to read the
10607 article.
10608
10609 @menu
10610 * Using GroupLens::          How to make Gnus use GroupLens.
10611 * Rating Articles::          Letting GroupLens know how you rate articles.
10612 * Displaying Predictions::   Displaying predictions given by GroupLens.
10613 * GroupLens Variables::      Customizing GroupLens.
10614 @end menu
10615
10616
10617 @node Using GroupLens
10618 @subsection Using GroupLens
10619
10620 To use GroupLens you must register a pseudonym with your local Better
10621 Bit Bureau (BBB).  At the moment the only better bit in town is at
10622 @samp{http://www.cs.umn.edu/Research/GroupLens/bbb.html}.
10623
10624 Once you have registered you'll need to set a couple of variables.
10625
10626 @table @code
10627
10628 @item gnus-use-grouplens
10629 @vindex gnus-use-grouplens
10630 Setting this variable to a non-@code{nil} value will make Gnus hook into
10631 all the relevant GroupLens functions.
10632
10633 @item grouplens-pseudonym
10634 @vindex grouplens-pseudonym
10635 This variable should be set to the pseudonum you got when registering
10636 with the Better Bit Bureau.
10637
10638 @item grouplens-newsgroups
10639 @vindex grouplens-newsgroups
10640 A list of groups that you want to get GroupLens predictions for. 
10641
10642 @end table
10643
10644 Thats the minimum of what you need to get up and running with GroupLens.
10645 Once you've registered, GroupLens will start giving you scores for
10646 articles based on the average of what other people think.  But, to get
10647 the real benefit of GroupLens you need to start rating articles
10648 yourself.  Then the scores GroupLens gives you will be personalized for
10649 you, based on how the people you usually agree with have already rated.
10650
10651
10652 @node Rating Articles
10653 @subsection Rating Articles
10654
10655 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
10656 Where 1 means something like this article is a waste of bandwidth and 5
10657 means that the article was really good.  The basic question to ask
10658 yourself is, "on a scale from 1 to 5 would I like to see more articles
10659 like this one?"
10660
10661 There are four ways to enter a rating for an article in GroupLens.
10662
10663 @table @kbd
10664
10665 @item r
10666 @kindex r (GroupLens)
10667 @findex bbb-summary-rate-article
10668 This function will prompt you for a rating on a scale of one to five.
10669
10670 @item k
10671 @kindex k (GroupLens)
10672 @findex grouplens-score-thread
10673 This function will prompt you for a rating, and rate all the articles in
10674 the thread.  This is really useful for some of those long running giant
10675 threads in rec.humor.
10676
10677 @end table
10678
10679 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
10680 the score of the article you're reading.
10681
10682 @table @kbd
10683
10684 @item 1-5 n
10685 @kindex n (GroupLens)
10686 @findex grouplens-next-unread-article
10687 Rate the article and go to the next unread article.
10688
10689 @item 1-5 ,
10690 @kindex , (GroupLens)
10691 @findex grouplens-best-unread-article
10692 Rate the article and go to the next unread article with the highest score.
10693
10694 @end table
10695
10696 If you want to give the current article a score of 4 and then go to the
10697 next article, just type @kbd{4 n}.
10698
10699
10700 @node Displaying Predictions
10701 @subsection Displaying Predictions
10702
10703 GroupLens makes a prediction for you about how much you will like a
10704 news article.  The predictions from GroupLens are on a scale from 1 to
10705 5, where 1 is the worst and 5 is the best.  You can use the predictions
10706 from GroupLens in one of three ways controlled by the variable
10707 @code{gnus-grouplens-override-scoring}.
10708
10709 @vindex gnus-grouplens-override-scoring
10710 There are three ways to display predictions in grouplens.  You may
10711 choose to have the GroupLens scores contribute to, or override the
10712 regular gnus scoring mechanism. override is the default; however, some
10713 people prefer to see the Gnus scores plus the grouplens scores.  To get
10714 the separate scoring behavior you need to set
10715 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
10716 GroupLens predictions combined with the grouplens scores set it to
10717 @code{'override} and to combine the scores set
10718 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
10719 the combine option you will also want to set the values for
10720 @code{grouplens-prediction-offset} and
10721 @code{grouplens-score-scale-factor}.
10722
10723 @vindex grouplens-prediction-display
10724 In either case, GroupLens gives you a few choices for how you would like
10725 to see your predictions displayed.  The display of predictions is
10726 controlled by the @code{grouplens-prediction-display} variable.
10727
10728 The following are legal values for that variable.
10729
10730 @table @code
10731 @item prediction-spot
10732 The higher the prediction, the further to the right an @samp{*} is
10733 displayed. 
10734
10735 @item confidence-interval
10736 A numeric confidence interval.
10737
10738 @item prediction-bar
10739 The higher the prediction, the longer the bar.
10740
10741 @item confidence-bar
10742 Numerical confidence.
10743
10744 @item confidence-spot
10745 The spot gets bigger with more confidence.
10746
10747 @item prediction-num
10748 Plain-old numeric value.
10749
10750 @item confidence-plus-minus
10751 Prediction +/i confidence.
10752
10753 @end table
10754
10755
10756 @node GroupLens Variables
10757 @subsection GroupLens Variables
10758
10759 @table @code
10760
10761 @item gnus-summary-grouplens-line-format
10762 The summary line format used in summary buffers that are GroupLens
10763 enhanced.  It accepts the same specs as the normal summary line format
10764 (@pxref{Summary Buffer Lines}).  The default is
10765 @samp{%U%R%z%l%I%(%[%4L: %-20,20n%]%) %s\n}.
10766
10767 @item grouplens-bbb-host
10768 Host running the bbbd server.  The default is
10769 @samp{grouplens.cs.umn.edu}. 
10770
10771 @item grouplens-bbb-port
10772 Port of the host running the bbbd server.  The default is 9000.
10773
10774 @item grouplens-score-offset
10775 Offset the prediction by this value.  In other words, subtract the
10776 prediction value by this number to arrive at the effective score.  The
10777 default is 0.
10778
10779 @item grouplens-score-scale-factor 
10780 This variable allows the user to magnify the effect of GroupLens scores.
10781 The scale factor is applied after the offset.  The default is 1.
10782
10783 @end table
10784
10785
10786 @node Advanced Scoring
10787 @section Advanced Scoring
10788
10789 Scoring on Subjects and From headers is nice enough, but what if you're
10790 really interested in what a person has to say only when she's talking
10791 about a particular subject?  Or what about if you really don't want to
10792 read what person A has to say when she's following up to person B, but
10793 want to read what she says when she's following up to person C?
10794
10795 By using advanced scoring rules you may create arbitrarily complex
10796 scoring patterns.
10797
10798 @menu
10799 * Advanced Scoring Syntax::     A definition.
10800 * Advanced Scoring Examples::   What they look like.
10801 * Advanced Scoring Tips::       Getting the most out of it.
10802 @end menu
10803
10804
10805 @node Advanced Scoring Syntax
10806 @subsection Advanced Scoring Syntax
10807
10808 Ordinary scoring rules have a string as the first element in the rule.
10809 Advanced scoring rules have a list as the first element.  The second
10810 element is the score to be applied if the first element evaluated to a
10811 non-@code{nil} value.
10812
10813 These lists may consist of three logical operators, one redirection
10814 operator, and various match operators.
10815
10816 Logical operators:
10817
10818 @table @code
10819 @item &
10820 @itemx and
10821 This logical operator will evaluate each of its arguments until it finds
10822 one that evaluates to @code{false}, and then it'll stop.  If all arguments
10823 evaluate to @code{true} values, then this operator will return
10824 @code{true}. 
10825
10826 @item |
10827 @itemx or
10828 This logical operator will evaluate each of its arguments until it finds
10829 one that evaluates to @code{true}.  If no arguments are @code{true},
10830 then this operator will return @code{false}.
10831
10832 @item !
10833 @itemx not
10834 @itemx Â¬
10835 This logical operator only takes a single argument.  It returns the
10836 inverse of the value of its argument.
10837
10838 @end table
10839
10840 There is an @dfn{indirection operator} that will make its arguments
10841 apply to the ancenstors of the current article being scored.  For
10842 instance, @code{1-} will make score rules apply to the parent of the
10843 current article.  @code{2-} will make score fules apply to the
10844 grandparent of the current article.  Alternatively, you can write
10845 @code{^^}, where the number of @code{^}s (carets) say how far back into
10846 the ancestry you want to go.
10847
10848 Finally, we have the match operators.  These are the ones that do the
10849 real work.  Match operators are header name strings followed by a match
10850 and a match type.  A typical match operator looks like @samp{("from"
10851 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
10852 simple scoring, and the match types are also the same.
10853
10854
10855 @node Advanced Scoring Examples
10856 @subsection Advanced Scoring Examples
10857
10858 Let's say you want to increase the score of articles written by Lars
10859 when he's talking about Gnus:
10860
10861 @example
10862 ((& 
10863   ("from" "Lars Ingebrigtsen")
10864   ("subject" "Gnus"))
10865  1000)
10866 @end example
10867
10868 Quite simple, huh?
10869
10870 When he writes long articles, he sometimes has something nice to say: 
10871
10872 @example
10873 ((& 
10874   ("from" "Lars Ingebrigtsen")
10875   (|
10876    ("subject" "Gnus")
10877    ("lines" 100 >)))
10878  1000)
10879 @end example
10880
10881 However, when he responds to things written by Reig Eigil Logge, you
10882 really don't want to read what he's written:
10883
10884 @example
10885 ((&
10886   ("from" "Lars Ingebrigtsen")
10887   (1- ("from" "Reig Eigir Logge")))
10888  -100000)
10889 @end example
10890
10891 Everybody that follows up Redmondo when he writes about disappearing
10892 socks should have their scores raised, but only when they talk about
10893 white socks.  However, when Lars talks about socks, it's usually not
10894 very interesting:
10895
10896 @example
10897 ((&
10898   (1-
10899    (&
10900     ("from" "redmondo@@.*no" r)
10901     ("body" "disappearing.*socks" t)))
10902   (! ("from" "Lars Ingebrigtsen"))
10903   ("body" "white.*socks"))
10904  1000)
10905 @end example
10906
10907 The possibilities are endless.
10908
10909
10910 @node Advanced Scoring Tips
10911 @subsection Advanced Scoring Tips
10912
10913 The @code{&} and @code{|} logical operators do short-circuit logic.
10914 That is, they stop processing their arguments when it's clear what the
10915 result of the operation will be.  For instance, if one of the arguments
10916 of an @code{&} evaluates to @code{false}, there's no point in evaluating
10917 the rest of the arguments.  This means that you should put slow matches
10918 (@samp{body}, @code{header}) last and quick matches (@samp{from},
10919 @samp{subject}) first.
10920
10921 The indirection arguments (@code{1-} and so on) will make their
10922 arguments work on previous generations of the thread.  If you say
10923 something like:
10924
10925 @example
10926 ...
10927 (1-
10928  (1-
10929   ("from" "lars")))
10930 ...
10931 @end example
10932
10933 Then that means "score on the from header of the grandparent of the
10934 current article".  An indirection is quite fast, but it's better to say:
10935
10936 @example
10937 (1-
10938  (& 
10939   ("from" "Lars")
10940   ("subject" "Gnus")))
10941 @end example
10942
10943 than it is to say:
10944
10945 @example
10946 (&
10947  (1- ("from" "Lars"))
10948  (1- ("subject" "Gnus")))
10949 @end example
10950
10951
10952 @node Score Decays
10953 @section Score Decays
10954 @cindex score decays
10955 @cindex decays
10956
10957 You may find that your scores have a tendency to grow without
10958 bounds, especially if you're using adaptive scoring.  If scores get too
10959 big, they lose all meaning---they simply max out and it's difficult to
10960 use them in any sensible way.
10961
10962 @vindex gnus-decay-scores
10963 @findex gnus-decay-score
10964 @vindex gnus-score-decay-function
10965 Gnus provides a mechanism for decaying scores to help with this problem.
10966 When score files are loaded and @code{gnus-decay-scores} is
10967 non-@code{nil}, Gnus will run the score files through the decaying
10968 mechanism thereby lowering the scores of all non-permanent score rules.
10969 The decay itself if performed by the @code{gnus-score-decay-function}
10970 function, which is @code{gnus-decay-score} by default.  Here's the
10971 definition of that function:
10972
10973 @lisp
10974 (defun gnus-decay-score (score)
10975   (floor
10976    (- score
10977       (* (if (< score 0) 1 -1)
10978          (min score
10979               (max gnus-score-decay-constant
10980                    (* (abs score)
10981                       gnus-score-decay-scale)))))))
10982 @end lisp
10983
10984 @vindex gnus-score-decay-scale
10985 @vindex gnus-score-decay-constant
10986 @code{gnus-score-decay-constant} is 3 by default and
10987 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
10988
10989 @enumerate
10990 @item
10991 Scores between -3 and 3 will be set to 0 when this function is called.
10992
10993 @item
10994 Scores with magnitudes between 3 and 60 will be shrunk by 3.
10995
10996 @item
10997 Scores with magnutudes greater than 60 will be shrunk by 5% of the
10998 score.
10999 @end enumerate
11000
11001 If you don't like this decay function, write your own.  It is called
11002 with the score to be decayed as its only parameter, and it should return
11003 the new score, which should be an integer.
11004
11005 Gnus will try to decay scores once a day.  If you haven't run Gnus for
11006 four days, Gnus will decay the scores four times, for instance.
11007
11008
11009 @node Various
11010 @chapter Various
11011
11012 @menu
11013 * Process/Prefix::             A convention used by many treatment commands.
11014 * Interactive::                Making Gnus ask you many questions.
11015 * Formatting Variables::       You can specify what buffers should look like.
11016 * Windows Configuration::      Configuring the Gnus buffer windows.
11017 * Compilation::                How to speed Gnus up.
11018 * Mode Lines::                 Displaying information in the mode lines.
11019 * Highlighting and Menus::     Making buffers look all nice and cozy.
11020 * Buttons::                    Get tendonitis in ten easy steps!
11021 * Daemons::                    Gnus can do things behind your back.
11022 * NoCeM::                      How to avoid spam and other fatty foods.
11023 * Picons::                     How to display pictures of what your reading.
11024 * Moderation::                 What to do if you're a moderator.
11025 * Various Various::            Things that are really various.
11026 @end menu
11027
11028
11029 @node Process/Prefix
11030 @section Process/Prefix
11031 @cindex process/prefix convention
11032
11033 Many functions, among them functions for moving, decoding and saving
11034 articles, use what is known as the @dfn{Process/Prefix convention}.
11035
11036 This is a method for figuring out what articles that the user wants the
11037 command to be performed on.
11038
11039 It goes like this:
11040
11041 If the numeric prefix is N, perform the operation on the next N
11042 articles, starting with the current one.  If the numeric prefix is
11043 negative, perform the operation on the previous N articles, starting
11044 with the current one.
11045
11046 @vindex transient-mark-mode
11047 If @code{transient-mark-mode} in non-@code{nil} and the region is
11048 active, all articles in the region will be worked upon.
11049
11050 If there is no numeric prefix, but some articles are marked with the
11051 process mark, perform the operation on the articles that are marked with
11052 the process mark.
11053
11054 If there is neither a numeric prefix nor any articles marked with the
11055 process mark, just perform the operation on the current article.
11056
11057 Quite simple, really, but it needs to be made clear so that surprises
11058 are avoided.
11059
11060 Commands that react to the process mark will push the current list of
11061 process marked articles onto a stack and will then clear all process
11062 marked articles.  You can restore the previous configuration with the
11063 @kbd{M P y} command (@pxref{Setting Process Marks}).
11064
11065 @vindex gnus-summary-goto-unread
11066 One thing that seems to shock & horrify lots of people is that, for
11067 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
11068 Since each @kbd{d} (which marks the current article as read) by default
11069 goes to the next unread article after marking, this means that @kbd{3 d}
11070 will mark the next three unread articles as read, no matter what the
11071 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
11072 @code{nil} for a more straightforward action.
11073
11074
11075 @node Interactive
11076 @section Interactive
11077 @cindex interaction
11078
11079 @table @code
11080
11081 @item gnus-novice-user
11082 @vindex gnus-novice-user
11083 If this variable is non-@code{nil}, you are either a newcomer to the
11084 World of Usenet, or you are very cautious, which is a nice thing to be,
11085 really.  You will be given questions of the type ``Are you sure you want
11086 to do this?'' before doing anything dangerous.  This is @code{t} by
11087 default.
11088
11089 @item gnus-expert-user
11090 @vindex gnus-expert-user
11091 If this variable is non-@code{nil}, you will never ever be asked any
11092 questions by Gnus.  It will simply assume you know what you're doing, no
11093 matter how strange.
11094
11095 @item gnus-interactive-catchup
11096 @vindex gnus-interactive-catchup
11097 Require confirmation before catching up a group if non-@code{nil}.  It
11098 is @code{t} by default.
11099
11100 @item gnus-interactive-exit
11101 @vindex gnus-interactive-exit
11102 Require confirmation before exiting Gnus.  This variable is @code{t} by
11103 default. 
11104 @end table
11105
11106
11107 @node Formatting Variables
11108 @section Formatting Variables
11109 @cindex formatting variables
11110
11111 Throughout this manual you've probably noticed lots of variables that
11112 are called things like @code{gnus-group-line-format} and
11113 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
11114 output lines in the various buffers.  There's quite a lot of them.
11115 Fortunately, they all use the same syntax, so there's not that much to
11116 be annoyed by.
11117
11118 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
11119 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
11120 lots of percentages everywhere.  
11121
11122 @menu 
11123 * Formatting Basics::     A formatting variable is basically a format string.
11124 * Advanced Formatting::   Modifying output in various ways.
11125 * User-Defined Specs::    Having Gnus call your own functions.
11126 * Formatting Fonts::      Making the formatting look colorful and nice.
11127 @end menu
11128
11129 Currently Gnus uses the following formatting variables:
11130 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
11131 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
11132 @code{gnus-group-mode-line-format},
11133 @code{gnus-summary-mode-line-format},
11134 @code{gnus-article-mode-line-format},
11135 @code{gnus-server-mode-line-format}, and
11136 @code{gnus-summary-pick-line-format}.
11137
11138 All these format variables can also be arbitrary elisp forms.  In that
11139 case, they will be @code{eval}ed to insert the required lines.
11140
11141 @kindex M-x gnus-update-format
11142 @findex gnus-update-format
11143 Gnus includes a command to help you while creating your own format
11144 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
11145 update the spec in question and pop you to a buffer where you can
11146 examine the resulting lisp code to be run to generate the line.  
11147
11148
11149
11150 @node Formatting Basics
11151 @subsection Formatting Basics
11152
11153 Each @samp{%} element will be replaced by some string or other when the
11154 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
11155 spec, and pad with spaces to get a 5-character field''.
11156
11157 As with normal C and Emacs Lisp formatting strings, the numerical
11158 modifier between the @samp{%} and the formatting type character will
11159 @dfn{pad} the output so that it is always at least that long.
11160 @samp{%5y} will make the field always (at least) five characters wide by
11161 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
11162 the right instead.
11163
11164 You may also wish to limit the length of the field to protect against
11165 particularly wide values.  For that you can say @samp{%4,6y}, which
11166 means that the field will never be more than 6 characters wide and never
11167 less than 4 characters wide.
11168
11169
11170 @node Advanced Formatting
11171 @subsection Advanced Formatting
11172
11173 It is frequently useful to post-process the fields in some way.
11174 Padding, limiting, cutting off parts and suppressing certain values can
11175 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
11176 look like @samp{%~(cut 3)~(ignore "0")y}.
11177
11178 These are the legal modifiers:
11179
11180 @table @code
11181 @item pad
11182 @itemx pad-left
11183 Pad the field to the left with spaces until it reaches the required
11184 length.
11185
11186 @item pad-right
11187 Pad the field to the right with spaces until it reaches the required
11188 length.
11189
11190 @item max
11191 @itemx max-left
11192 Cut off characters from the left until it reaches the specified length.
11193
11194 @item max-right
11195 Cut off characters from the right until it reaches the specified
11196 length. 
11197
11198 @item cut
11199 @itemx cut-left
11200 Cut off the specified number of characters from the left.
11201
11202 @item cut-right
11203 Cut off the specified number of characters from the right.
11204
11205 @item ignore
11206 Return an empty string if the field is equal to the specified value. 
11207
11208 @item form
11209 Use the specified form as the field value when the @samp{@@} spec is
11210 used. 
11211 @end table
11212
11213 Let's take an example.  The @samp{%o} spec in the summary mode lines
11214 will return a date in compact ISO8601 format---@samp{19960809T230410}.
11215 This is quite a mouthful, so we want to shave off the century number and
11216 the time, leaving us with a six-character date.  That would be
11217 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
11218 maxing, and we need the padding to ensure that the date is never less
11219 than 6 characters to make it look nice in columns.)
11220
11221 Ignoring is done first; then cutting; then maxing; and then as the very
11222 last operation, padding.  
11223
11224 If you use lots of these advanced thingies, you'll find that Gnus gets
11225 quite slow.  This can be helped enourmously by running @kbd{M-x
11226 gnus-compile} when you are setisfied with the look of your lines.
11227 @xref{Compilation}. 
11228
11229
11230 @node User-Defined Specs
11231 @subsection User-Defined Specs
11232
11233 All the specs allow for inserting user defined specifiers---@samp{u}.
11234 The next character in the format string should be a letter.  Gnus
11235 will call the function @code{gnus-user-format-function-}@samp{X}, where
11236 @samp{X} is the letter following @samp{%u}.  The function will be passed
11237 a single parameter---what the parameter means depends on what buffer
11238 it's being called from.  The function should return a string, which will
11239 be inserted into the buffer just like information from any other
11240 specifier.  This function may also be called with dummy values, so it
11241 should protect against that.
11242
11243 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
11244 much the same without defining new functions.  Here's an example:
11245 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
11246 given here will be evaluated to yield the current line number, and then
11247 inserted.
11248
11249
11250 @node Formatting Fonts
11251 @subsection Formatting Fonts
11252
11253 There are specs for highlighting, and these are shared by all the format
11254 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
11255 the special @code{mouse-face} property set, which means that it will be
11256 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
11257 over it.
11258
11259 Text inside the @samp{%[} and @samp{%]} specifiers will have their
11260 normal faces set using @code{gnus-face-0}, which is @code{bold} by
11261 default.  If you say @samp{%1[} instead, you'll get @code{gnus-face-1}
11262 instead, and so on.  Create as many faces as you wish.  The same goes
11263 for the @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
11264 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
11265
11266 Here's an alternative recipe for the group buffer:
11267
11268 @lisp
11269 ;; Create three face types.
11270 (setq gnus-face-1 'bold)
11271 (setq gnus-face-3 'italic)
11272
11273 ;; We want the article count to be in 
11274 ;; a bold and green face.  So we create 
11275 ;; a new face called `my-green-bold'.
11276 (copy-face 'bold 'my-green-bold)
11277 ;; Set the color.
11278 (set-face-foreground 'my-green-bold "ForestGreen")
11279 (setq gnus-face-2 'my-green-bold)
11280
11281 ;; Set the new & fancy format.
11282 (setq gnus-group-line-format 
11283       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
11284 @end lisp
11285
11286 I'm sure you'll be able to use this scheme to create totally unreadable
11287 and extremely vulgar displays.  Have fun!
11288
11289 Note that the @samp{%(} specs (and friends) do not make any sense on the
11290 mode-line variables.
11291
11292
11293 @node Windows Configuration
11294 @section Windows Configuration
11295 @cindex windows configuration
11296
11297 No, there's nothing here about X, so be quiet.
11298
11299 @vindex gnus-use-full-window
11300 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
11301 other windows and occupy the entire Emacs screen by itself.  It is
11302 @code{t} by default.
11303
11304 @vindex gnus-buffer-configuration
11305 @code{gnus-buffer-configuration} describes how much space each Gnus
11306 buffer should be given.  Here's an excerpt of this variable:
11307
11308 @lisp
11309 ((group (vertical 1.0 (group 1.0 point)
11310                       (if gnus-carpal (group-carpal 4))))
11311  (article (vertical 1.0 (summary 0.25 point) 
11312                         (article 1.0))))
11313 @end lisp
11314
11315 This is an alist.  The @dfn{key} is a symbol that names some action or
11316 other.  For instance, when displaying the group buffer, the window
11317 configuration function will use @code{group} as the key.  A full list of
11318 possible names is listed below.
11319
11320 The @dfn{value} (i. e., the @dfn{split}) says how much space each buffer
11321 should occupy.  To take the @code{article} split as an example -
11322
11323 @lisp
11324 (article (vertical 1.0 (summary 0.25 point)
11325                        (article 1.0)))
11326 @end lisp
11327
11328 This @dfn{split} says that the summary buffer should occupy 25% of upper
11329 half of the screen, and that it is placed over the article buffer.  As
11330 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
11331 reaching for that calculator there).  However, the special number
11332 @code{1.0} is used to signal that this buffer should soak up all the
11333 rest of the space available after the rest of the buffers have taken
11334 whatever they need.  There should be only one buffer with the @code{1.0}
11335 size spec per split.
11336
11337 Point will be put in the buffer that has the optional third element
11338 @code{point}. 
11339
11340 Here's a more complicated example:
11341
11342 @lisp
11343 (article (vertical 1.0 (group 4)
11344                        (summary 0.25 point)
11345                        (if gnus-carpal (summary-carpal 4))
11346                        (article 1.0)))
11347 @end lisp
11348
11349 If the size spec is an integer instead of a floating point number, 
11350 then that number will be used to say how many lines a buffer should
11351 occupy, not a percentage.
11352
11353 If the @dfn{split} looks like something that can be @code{eval}ed (to be
11354 precise---if the @code{car} of the split is a function or a subr), this
11355 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
11356 be used as a split.  This means that there will be three buffers if
11357 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
11358 is non-@code{nil}.
11359
11360 Not complicated enough for you?  Well, try this on for size:
11361
11362 @lisp
11363 (article (horizontal 1.0 
11364              (vertical 0.5
11365                  (group 1.0)
11366                  (gnus-carpal 4))
11367              (vertical 1.0
11368                  (summary 0.25 point)
11369                  (summary-carpal 4)
11370                  (article 1.0))))
11371 @end lisp
11372
11373 Whoops.  Two buffers with the mystery 100% tag.  And what's that
11374 @code{horizontal} thingie?  
11375
11376 If the first element in one of the split is @code{horizontal}, Gnus will
11377 split the window horizontally, giving you two windows side-by-side.
11378 Inside each of these strips you may carry on all you like in the normal
11379 fashion.  The number following @code{horizontal} says what percentage of
11380 the screen is to be given to this strip.
11381
11382 For each split, there @emph{must} be one element that has the 100% tag.
11383 The splitting is never accurate, and this buffer will eat any leftover
11384 lines from the splits.
11385
11386 To be slightly more formal, here's a definition of what a legal split
11387 may look like:
11388
11389 @example
11390 split       = frame | horizontal | vertical | buffer | form
11391 frame       = "(frame " size *split ")"
11392 horizontal  = "(horizontal " size *split ")"
11393 vertical    = "(vertical " size *split ")"
11394 buffer      = "(" buffer-name " " size *[ "point" ] ")"
11395 size        = number | frame-params
11396 buffer-name = group | article | summary ...
11397 @end example
11398
11399 The limitations are that the @code{frame} split can only appear as the
11400 top-level split.  @var{form} should be an Emacs Lisp form that should
11401 return a valid split.  We see that each split is fully recursive, and
11402 may contain any number of @code{vertical} and @code{horizontal} splits. 
11403
11404 @vindex gnus-window-min-width
11405 @vindex gnus-window-min-height
11406 @cindex window height
11407 @cindex window width
11408 Finding the right sizes can be a bit complicated.  No window may be less
11409 than @code{gnus-window-min-height} (default 1) characters high, and all
11410 windows must be at least @code{gnus-window-min-width} (default 1)
11411 characters wide.  Gnus will try to enforce this before applying the
11412 splits.  If you want to use the normal Emacs window width/height limit,
11413 you can just set these two variables to @code{nil}.
11414
11415 If you're not familiar with Emacs terminology, @code{horizontal} and
11416 @code{vertical} splits may work the opposite way of what you'd expect.
11417 Windows inside a @code{horizontal} split are shown side-by-side, and
11418 windows within a @code{vertical} split are shown above each other.
11419
11420 @findex gnus-configure-frame
11421 If you want to experiment with window placement, a good tip is to call
11422 @code{gnus-configure-frame} directly with a split.  This is the function
11423 that does all the real work when splitting buffers.  Below is a pretty
11424 nonsensical configuration with 5 windows; two for the group buffer and
11425 three for the article buffer.  (I said it was nonsensical.)  If you
11426 @code{eval} the statement below, you can get an idea of how that would
11427 look straight away, without going through the normal Gnus channels.
11428 Play with it until you're satisfied, and then use
11429 @code{gnus-add-configuration} to add your new creation to the buffer
11430 configuration list. 
11431
11432 @lisp
11433 (gnus-configure-frame
11434  '(horizontal 1.0
11435     (vertical 10
11436       (group 1.0)
11437       (article 0.3 point))
11438     (vertical 1.0
11439       (article 1.0)
11440       (horizontal 4
11441         (group 1.0)
11442         (article 10)))))
11443 @end lisp
11444
11445 You might want to have several frames as well.  No prob---just use the
11446 @code{frame} split:
11447
11448 @lisp
11449 (gnus-configure-frame
11450  '(frame 1.0
11451          (vertical 1.0
11452                    (summary 0.25 point)
11453                    (article 1.0))
11454          (vertical ((height . 5) (width . 15)
11455                     (user-position . t)
11456                     (left . -1) (top . 1))
11457                    (picon 1.0))))
11458
11459 @end lisp
11460
11461 This split will result in the familiar summary/article window
11462 configuration in the first (or ``main'') frame, while a small additional
11463 frame will be created where picons will be shown.  As you can see,
11464 instead of the normal @code{1.0} top-level spec, each additional split
11465 should have a frame parameter alist as the size spec.
11466 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
11467 Reference Manual}.
11468
11469 Here's a list of all possible keys for
11470 @code{gnus-buffer-configuration}:
11471
11472 @code{group}, @code{summary}, @code{article}, @code{server},
11473 @code{browse}, @code{message}, @code{pick}, @code{info},
11474 @code{summary-faq}, @code{edit-group}, @code{edit-server},
11475 @code{edit-score}, @code{post}, @code{reply}, @code{forward},
11476 @code{reply-yank}, @code{mail-bounce}, @code{draft},
11477 @code{pipe}, @code{bug}, @code{compose-bounce}.  
11478
11479 Note that the @code{message} key is used for both
11480 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
11481 it is desireable to distinguish between the two, something like this
11482 might be used:
11483
11484 @lisp
11485 (message (horizontal 1.0
11486                      (vertical 1.0 (message 1.0 point))
11487                      (vertical 0.24
11488                                (if (buffer-live-p gnus-summary-buffer)
11489                                    '(summary 0.5))
11490                                (group 1.0)))))
11491 @end lisp
11492
11493 @findex gnus-add-configuration
11494 Since the @code{gnus-buffer-configuration} variable is so long and
11495 complicated, there's a function you can use to ease changing the config
11496 of a single setting: @code{gnus-add-configuration}.  If, for instance,
11497 you want to change the @code{article} setting, you could say:
11498
11499 @lisp
11500 (gnus-add-configuration
11501  '(article (vertical 1.0
11502                (group 4)
11503                (summary .25 point)
11504                (article 1.0))))
11505 @end lisp
11506
11507 You'd typically stick these @code{gnus-add-configuration} calls in your
11508 @file{.gnus} file or in some startup hook---they should be run after
11509 Gnus has been loaded.
11510
11511
11512 @node Compilation
11513 @section Compilation
11514 @cindex compilation
11515 @cindex byte-compilation
11516
11517 @findex gnus-compile
11518
11519 Remember all those line format specification variables?
11520 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
11521 on.  Now, Gnus will of course heed whatever these variables are, but,
11522 unfortunately, changing them will mean a quite significant slow-down.
11523 (The default values of these variables have byte-compiled functions
11524 associated with them, while the user-generated versions do not, of
11525 course.) 
11526
11527 To help with this, you can run @kbd{M-x gnus-compile} after you've
11528 fiddled around with the variables and feel that you're (kind of)
11529 satisfied.  This will result in the new specs being byte-compiled, and
11530 you'll get top speed again.  Gnus will save these compiled specs in the
11531 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
11532 this function, though---you should compile them yourself by sticking
11533 them into the @code{.gnus.el} file and byte-compiling that file.)
11534
11535
11536 @node Mode Lines
11537 @section Mode Lines
11538 @cindex mode lines
11539
11540 @vindex gnus-updated-mode-lines
11541 @code{gnus-updated-mode-lines} says what buffers should keep their mode
11542 lines updated.  It is a list of symbols.  Supported symbols include
11543 @code{group}, @code{article}, @code{summary}, @code{server},
11544 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
11545 Gnus will keep that mode line updated with information that may be
11546 pertinent.  If this variable is @code{nil}, screen refresh may be
11547 quicker.
11548
11549 @cindex display-time
11550
11551 @vindex gnus-mode-non-string-length
11552 By default, Gnus displays information on the current article in the mode
11553 lines of the summary and article buffers.  The information Gnus wishes
11554 to display (eg. the subject of the article) is often longer than the
11555 mode lines, and therefore have to be cut off at some point.  The
11556 @code{gnus-mode-non-string-length} variable says how long the other
11557 elements on the line is (i.e., the non-info part).  If you put
11558 additional elements on the mode line (eg. a clock), you should modify
11559 this variable:
11560
11561 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
11562 @lisp
11563 (add-hook 'display-time-hook
11564           (lambda () (setq gnus-mode-non-string-length
11565                            (+ 21
11566                               (if line-number-mode 5 0)
11567                               (if column-number-mode 4 0)
11568                               (length display-time-string)))))
11569 @end lisp
11570
11571 If this variable is @code{nil} (which is the default), the mode line
11572 strings won't be chopped off, and they won't be padded either.
11573
11574
11575 @node Highlighting and Menus
11576 @section Highlighting and Menus
11577 @cindex visual
11578 @cindex highlighting
11579 @cindex menus
11580
11581 @vindex gnus-visual
11582 The @code{gnus-visual} variable controls most of the prettifying Gnus
11583 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
11584 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
11585 file.
11586
11587 This variable can be a list of visual properties that are enabled.  The
11588 following elements are legal, and are all included by default:
11589
11590 @table @code
11591 @item group-highlight
11592 Do highlights in the group buffer.
11593 @item summary-highlight
11594 Do highlights in the summary buffer.
11595 @item article-highlight
11596 Do highlights in the article buffer.
11597 @item highlight
11598 Turn on highlighting in all buffers.
11599 @item group-menu
11600 Create menus in the group buffer.
11601 @item summary-menu
11602 Create menus in the summary buffers.
11603 @item article-menu
11604 Create menus in the article buffer.
11605 @item browse-menu
11606 Create menus in the browse buffer.
11607 @item server-menu
11608 Create menus in the server buffer.
11609 @item score-menu
11610 Create menus in the score buffers.
11611 @item menu
11612 Create menus in all buffers.
11613 @end table
11614
11615 So if you only want highlighting in the article buffer and menus in all
11616 buffers, you could say something like:
11617
11618 @lisp
11619 (setq gnus-visual '(article-highlight menu))
11620 @end lisp
11621
11622 If you want only highlighting and no menus whatsoever, you'd say:
11623
11624 @lisp
11625 (setq gnus-visual '(highlight))
11626 @end lisp
11627
11628 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
11629 in all Gnus buffers.
11630
11631 Other general variables that influence the look of all buffers include:
11632
11633 @table @code
11634 @item gnus-mouse-face
11635 @vindex gnus-mouse-face
11636 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
11637 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
11638
11639 @item gnus-display-type
11640 @vindex gnus-display-type
11641 This variable is symbol indicating the display type Emacs is running
11642 under.  The symbol should be one of @code{color}, @code{grayscale} or
11643 @code{mono}.  If Gnus guesses this display attribute wrongly, either set
11644 this variable in your @file{~/.emacs} or set the resource
11645 @code{Emacs.displayType} in your @file{~/.Xdefaults}.
11646
11647 @item gnus-background-mode 
11648 @vindex gnus-background-mode 
11649 This is a symbol indicating the Emacs background brightness.  The symbol
11650 should be one of @code{light} or @code{dark}.  If Gnus guesses this
11651 frame attribute wrongly, either set this variable in your @file{~/.emacs} or
11652 set the resource @code{Emacs.backgroundMode} in your @file{~/.Xdefaults}. 
11653 `gnus-display-type'.
11654 @end table
11655
11656 There are hooks associated with the creation of all the different menus:
11657
11658 @table @code
11659
11660 @item gnus-article-menu-hook
11661 @vindex gnus-article-menu-hook
11662 Hook called after creating the article mode menu.
11663
11664 @item gnus-group-menu-hook
11665 @vindex gnus-group-menu-hook
11666 Hook called after creating the group mode menu.
11667
11668 @item gnus-summary-menu-hook
11669 @vindex gnus-summary-menu-hook
11670 Hook called after creating the summary mode menu.
11671
11672 @item gnus-server-menu-hook
11673 @vindex gnus-server-menu-hook
11674 Hook called after creating the server mode menu.
11675
11676 @item gnus-browse-menu-hook
11677 @vindex gnus-browse-menu-hook
11678 Hook called after creating the browse mode menu.
11679
11680 @item gnus-score-menu-hook
11681 @vindex gnus-score-menu-hook
11682 Hook called after creating the score mode menu.
11683
11684 @end table
11685
11686
11687 @node Buttons
11688 @section Buttons
11689 @cindex buttons
11690 @cindex mouse
11691 @cindex click
11692
11693 Those new-fangled @dfn{mouse} contraptions is very popular with the
11694 young, hep kids who don't want to learn the proper way to do things
11695 these days.  Why, I remember way back in the summer of '89, when I was
11696 using Emacs on a Tops 20 system.  Three hundred users on one single
11697 machine, and every user was running Simula compilers.  Bah!
11698
11699 Right.
11700
11701 @vindex gnus-carpal
11702 Well, you can make Gnus display bufferfuls of buttons you can click to
11703 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
11704 really.  Tell the chiropractor I sent you.
11705
11706
11707 @table @code
11708
11709 @item gnus-carpal-mode-hook
11710 @vindex gnus-carpal-mode-hook
11711 Hook run in all carpal mode buffers.
11712
11713 @item gnus-carpal-button-face
11714 @vindex gnus-carpal-button-face
11715 Face used on buttons.
11716
11717 @item gnus-carpal-header-face
11718 @vindex gnus-carpal-header-face
11719 Face used on carpal buffer headers.
11720
11721 @item gnus-carpal-group-buffer-buttons
11722 @vindex gnus-carpal-group-buffer-buttons
11723 Buttons in the group buffer.
11724
11725 @item gnus-carpal-summary-buffer-buttons
11726 @vindex gnus-carpal-summary-buffer-buttons
11727 Buttons in the summary buffer.
11728
11729 @item gnus-carpal-server-buffer-buttons
11730 @vindex gnus-carpal-server-buffer-buttons
11731 Buttons in the server buffer.
11732
11733 @item gnus-carpal-browse-buffer-buttons
11734 @vindex gnus-carpal-browse-buffer-buttons
11735 Buttons in the browse buffer.
11736 @end table
11737
11738 All the @code{buttons} variables are lists.  The elements in these list
11739 is either a cons cell where the car contains a text to be displayed and
11740 the cdr contains a function symbol, or a simple string.
11741
11742
11743 @node Daemons
11744 @section Daemons
11745 @cindex demons
11746 @cindex daemons
11747
11748 Gnus, being larger than any program ever written (allegedly), does lots
11749 of strange stuff that you may wish to have done while you're not
11750 present.  For instance, you may want it to check for new mail once in a
11751 while.  Or you may want it to close down all connections to all servers
11752 when you leave Emacs idle.  And stuff like that.
11753
11754 Gnus will let you do stuff like that by defining various
11755 @dfn{handlers}.  Each handler consists of three elements:  A
11756 @var{function}, a @var{time}, and an @var{idle} parameter.
11757
11758 Here's an example of a handler that closes connections when Emacs has
11759 been idle for thirty minutes:
11760
11761 @lisp
11762 (gnus-demon-close-connections nil 30)
11763 @end lisp
11764
11765 Here's a handler that scans for PGP headers every hour when Emacs is
11766 idle: 
11767
11768 @lisp
11769 (gnus-demon-scan-pgp 60 t)
11770 @end lisp
11771
11772 This @var{time} parameter and than @var{idle} parameter works together
11773 in a strange, but wonderful fashion.  Basically, if @var{idle} is
11774 @code{nil}, then the function will be called every @var{time} minutes.
11775
11776 If @var{idle} is @code{t}, then the function will be called after
11777 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
11778 the function will never be called.  But once Emacs goes idle, the
11779 function will be called every @var{time} minutes.
11780
11781 If @var{idle} is a number and @var{time} is a number, the function will
11782 be called every @var{time} minutes only when Emacs has been idle for
11783 @var{idle} minutes.
11784
11785 If @var{idle} is a number and @var{time} is @code{nil}, the function
11786 will be called once every time Emacs has been idle for @var{idle}
11787 minutes.  
11788
11789 And if @var{time} is a string, it should look like @samp{07:31}, and
11790 the function will then be called once every day somewhere near that
11791 time.  Modified by the @var{idle} parameter, of course.
11792
11793 @vindex gnus-demon-timestep
11794 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
11795 seconds.  This is @code{60} by default.  If you change that variable,
11796 all the timings in the handlers will be affected.)
11797
11798 @vindex gnus-use-demon
11799 To set the whole thing in motion, though, you have to set
11800 @code{gnus-use-demon} to @code{t}.
11801
11802 So, if you want to add a handler, you could put something like this in
11803 your @file{.gnus} file:
11804
11805 @findex gnus-demon-add-handler
11806 @lisp
11807 (gnus-demon-add-handler 'gnus-demon-close-connections nil 30)
11808 @end lisp
11809
11810 @findex gnus-demon-add-nocem
11811 @findex gnus-demon-add-scanmail
11812 @findex gnus-demon-add-disconnection
11813 Some ready-made functions to do this has been created:
11814 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection}, and
11815 @code{gnus-demon-add-scanmail}.  Just put those functions in your
11816 @file{.gnus} if you want those abilities.
11817
11818 @findex gnus-demon-init
11819 @findex gnus-demon-cancel
11820 @vindex gnus-demon-handlers
11821 If you add handlers to @code{gnus-demon-handlers} directly, you should
11822 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
11823 daemons, you can use the @code{gnus-demon-cancel} function.
11824
11825 Note that adding daemons can be pretty naughty if you overdo it.  Adding
11826 functions that scan all news and mail from all servers every two seconds
11827 is a sure-fire way of getting booted off any respectable system.  So
11828 behave. 
11829
11830
11831 @node NoCeM
11832 @section NoCeM
11833 @cindex nocem
11834 @cindex spam
11835
11836 @dfn{Spamming} is posting the same article lots and lots of times.
11837 Spamming is bad.  Spamming is evil.  
11838
11839 Spamming is usually canceled within a day or so by various anti-spamming
11840 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
11841 NoCeM is pronounced ``no see-'em'', and means what the name
11842 implies---these are messages that make the offending articles, like, go
11843 away.  
11844
11845 What use are these NoCeM messages if the articles are canceled anyway?
11846 Some sites do not honor cancel messages and some sites just honor cancels
11847 from a select few people.  Then you may wish to make use of the NoCeM
11848 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
11849
11850 Gnus can read and parse the messages in this group automatically, and
11851 this will make spam disappear.  
11852
11853 There are some variables to customize, of course:
11854
11855 @table @code
11856 @item gnus-use-nocem
11857 @vindex gnus-use-nocem
11858 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
11859 by default. 
11860
11861 @item gnus-nocem-groups
11862 @vindex gnus-nocem-groups
11863 Gnus will look for NoCeM messages in the groups in this list.  The
11864 default is @code{("alt.nocem.misc" "news.admin.net-abuse.announce")}. 
11865
11866 @item gnus-nocem-issuers
11867 @vindex gnus-nocem-issuers
11868 There are many people issuing NoCeM messages.  This list says what
11869 people you want to listen to.  The default is @code{("Automoose-1"
11870 "clewis@@ferret.ocunix.on.ca;" "jem@@xpat.com;" "red@@redpoll.mrfs.oh.us
11871 (Richard E. Depew)")}; fine, upstanding citizens all of them.
11872
11873 Known despammers that you can put in this list include:
11874
11875 @table @samp
11876 @item clewis@@ferret.ocunix.on.ca;
11877 @cindex Chris Lewis
11878 Chris Lewis---Major Canadian despammer who has probably canceled more
11879 usenet abuse than anybody else.
11880
11881 @item Automoose-1
11882 @cindex CancelMoose[tm]
11883 The CancelMoose[tm] on autopilot.  The CancelMoose[tm] is reputed to be
11884 Norwegian, and was the person(s) who invented NoCeM.  
11885
11886 @item jem@@xpat.com;
11887 @cindex Jem
11888 Jem---Korean despammer who is getting very busy these days.
11889
11890 @item red@@redpoll.mrfs.oh.us (Richard E. Depew)
11891 Richard E. Depew---lone American despammer.  He mostly cancels binary
11892 postings to non-binary groups and removes spews (regurgitated articles).
11893 @end table
11894
11895 You do not have to heed NoCeM messages from all these people---just the
11896 ones you want to listen to.
11897
11898 @item gnus-nocem-directory
11899 @vindex gnus-nocem-directory
11900 This is where Gnus will store its NoCeM cache files.  The default is
11901 @file{~/News/NoCeM/}. 
11902
11903 @item gnus-nocem-expiry-wait
11904 @vindex gnus-nocem-expiry-wait
11905 The number of days before removing old NoCeM entries from the cache.
11906 The default is 15.  If you make it shorter Gnus will be faster, but you
11907 might then see old spam.
11908
11909 @end table
11910
11911
11912 @node Picons
11913 @section Picons
11914
11915 So...  You want to slow down your news reader even more!  This is a
11916 good way to do so.  Its also a great way to impress people staring
11917 over your shoulder as you read news.
11918
11919 @menu
11920 * Picon Basics::           What are picons and How do I get them.
11921 * Picon Requirements::     Don't go further if you aren't using XEmacs.
11922 * Easy Picons::            Displaying Picons---the easy way.
11923 * Hard Picons::            The way you should do it.  You'll learn something.
11924 * Picon Configuration::    Other variables you can trash/tweak/munge/play with.
11925 @end menu
11926
11927
11928 @node Picon Basics
11929 @subsection Picon Basics
11930
11931 What are Picons?  To quote directly from the Picons Web site
11932 (@samp{http://www.cs.indiana.edu/picons/ftp/index.html}):
11933
11934 @quotation 
11935 @dfn{Picons} is short for ``personal icons''.  They're small,
11936 constrained images used to represent users and domains on the net,
11937 organized into databases so that the appropriate image for a given
11938 e-mail address can be found.  Besides users and domains, there are picon
11939 databases for Usenet newsgroups and weather forecasts.  The picons are
11940 in either monochrome @code{XBM} format or color @code{XPM} and
11941 @code{GIF} formats.
11942 @end quotation
11943
11944 Please see the above mentioned web site for instructions on obtaining
11945 and installing the picons databases, or the following ftp site:
11946 @samp{http://www.cs.indiana.edu/picons/ftp/index.html}.
11947
11948 @vindex gnus-picons-database
11949 Gnus expects picons to be installed into a location pointed to by
11950 @code{gnus-picons-database}.
11951
11952
11953 @node Picon Requirements
11954 @subsection Picon Requirements
11955
11956 To use have Gnus display Picons for you, you must be running XEmacs
11957 19.13 or greater since all other versions of Emacs aren't yet able to
11958 display images.
11959
11960 Additionally, you must have @code{xpm} support compiled into XEmacs.
11961
11962 @vindex gnus-picons-convert-x-face
11963 If you want to display faces from @code{X-Face} headers, you must have
11964 the @code{netpbm} utilities installed, or munge the
11965 @code{gnus-picons-convert-x-face} variable to use something else.
11966
11967
11968 @node Easy Picons
11969 @subsection Easy Picons
11970
11971 To enable displaying picons, simply put the following line in your
11972 @file{~/.gnus} file and start Gnus.
11973
11974 @lisp
11975 (setq gnus-use-picons t)
11976 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
11977 (add-hook 'gnus-summary-prepare-hook 'gnus-group-display-picons t)
11978 (add-hook 'gnus-article-display-hook 'gnus-picons-article-display-x-face)
11979 @end lisp
11980
11981
11982 @node Hard Picons
11983 @subsection Hard Picons 
11984
11985 Gnus can display picons for you as you enter and leave groups and
11986 articles.  It knows how to interact with three sections of the picons
11987 database.  Namely, it can display the picons newsgroup pictures,
11988 author's face picture(s), and the authors domain.  To enable this
11989 feature, you need to first decide where to display them.
11990
11991 @table @code 
11992
11993 @item gnus-picons-display-where 
11994 @vindex gnus-picons-display-where 
11995 Where the picon images should be displayed.  It is @code{picons} by
11996 default (which by default maps to the buffer @samp{*Picons*}).  Other
11997 valid places could be @code{article}, @code{summary}, or
11998 @samp{"*scratch*"} for all I care.  Just make sure that you've made the
11999 buffer visible using the standard Gnus window configuration
12000 routines---@xref{Windows Configuration}.
12001
12002 @end table
12003
12004 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
12005 window configuration for you to include the @code{picons} buffer.
12006
12007 Now that you've made that decision, you need to add the following
12008 functions to the appropriate hooks so these pictures will get
12009 displayed at the right time.
12010
12011 @vindex gnus-article-display-hook
12012 @vindex gnus-picons-display-where
12013 @table @code
12014 @item gnus-article-display-picons
12015 @findex gnus-article-display-picons
12016 Looks up and display the picons for the author and the author's domain
12017 in the @code{gnus-picons-display-where} buffer.  Should be added to
12018 the @code{gnus-article-display-hook}.
12019
12020 @item gnus-group-display-picons
12021 @findex gnus-article-display-picons
12022 Displays picons representing the current group.  This function should
12023 be added to the @code{gnus-summary-prepare-hook} or to the
12024 @code{gnus-article-display-hook} if @code{gnus-picons-display-where}
12025 is set to @code{article}.
12026
12027 @item gnus-picons-article-display-x-face
12028 @findex gnus-article-display-picons
12029 Decodes and displays the X-Face header if present.  This function
12030 should be added to @code{gnus-article-display-hook}.
12031
12032 @end table
12033
12034 Note:  You must append them to the hook, so make sure to specify 't'
12035 to the append flag of @code{add-hook}:
12036
12037 @lisp
12038 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
12039 @end lisp
12040
12041
12042 @node Picon Configuration
12043 @subsection Picon Configuration
12044
12045 The following variables offer further control over how things are
12046 done, where things are located, and other useless stuff you really
12047 don't need to worry about.
12048
12049 @table @code
12050 @item gnus-picons-database
12051 @vindex gnus-picons-database
12052 The location of the picons database.  Should point to a directory
12053 containing the @file{news}, @file{domains}, @file{users} (and so on)
12054 subdirectories.  Defaults to @file{/usr/local/faces}.
12055
12056 @item gnus-picons-news-directory
12057 @vindex gnus-picons-news-directory
12058 Sub-directory of the faces database containing the icons for
12059 newsgroups.
12060
12061 @item gnus-picons-user-directories
12062 @vindex gnus-picons-user-directories
12063 List of subdirectories to search in @code{gnus-picons-database} for user
12064 faces.  Defaults to @code{("local" "users" "usenix" "misc/MISC")}.
12065
12066 @item gnus-picons-domain-directories
12067 @vindex gnus-picons-domain-directories
12068 List of subdirectories to search in @code{gnus-picons-database} for
12069 domain name faces.  Defaults to @code{("domains")}.  Some people may
12070 want to add @samp{unknown} to this list.
12071
12072 @item gnus-picons-convert-x-face
12073 @vindex gnus-picons-convert-x-face
12074 The command to use to convert the @code{X-Face} header to an X bitmap
12075 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
12076 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
12077 gnus-picons-x-face-file-name)}
12078
12079 @item gnus-picons-x-face-file-name
12080 @vindex gnus-picons-x-face-file-name
12081 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
12082 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
12083
12084 @item gnus-picons-buffer
12085 @vindex gnus-picons-buffer
12086 The name of the buffer that @code{picons} points to.  Defaults to
12087 @samp{*Icon Buffer*}.
12088
12089 @end table
12090
12091
12092 @node Moderation
12093 @section Moderation
12094 @cindex moderation
12095
12096 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
12097 It is not included in the standard Gnus package.  Write a mail to
12098 @samp{larsi@@ifi.uio.no} and state what group you moderate, and you'll
12099 get a copy.
12100
12101 The moderation package is implemented as a minor mode for summary
12102 buffers.  Put
12103
12104 @lisp
12105 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
12106 @end lisp
12107
12108 in your @file{.gnus.el} file.
12109
12110 If you are the moderation of @samp{rec.zoofle}, this is how it's
12111 supposed to work:
12112
12113 @enumerate
12114 @item 
12115 You split your incoming mail by matching on
12116 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
12117 articles in some mail group---@samp{nnml:rec.zoofle}, for instance.
12118
12119 @item
12120 You enter that group once in a while and post articles using the @kbd{e}
12121 (edit-and-post) or @kbd{s} (just send unedited) commands.
12122
12123 @item
12124 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
12125 articles that weren't approved by you, you can cancel them with the
12126 @kbd{c} command.
12127 @end enumerate
12128
12129 To use moderation mode in these two groups, say:
12130
12131 @lisp
12132 (setq gnus-moderatated-groups 
12133       "^nnml:rec.zoofle$\\|^rec.zoofle$")
12134 @end lisp
12135
12136
12137 @node Various Various
12138 @section Various Various
12139 @cindex mode lines
12140 @cindex highlights
12141
12142 @table @code
12143
12144 @item gnus-directory
12145 @vindex gnus-directory
12146 All Gnus directories will be initialized from this variable, which
12147 defaults to the @samp{SAVEDIR} environment variable, or @file{~/News/}
12148 if that variable isn't set.
12149
12150 @item gnus-default-directory
12151 @vindex gnus-default-directory
12152 Not related to the above variable at all---this variable says what the
12153 default directory of all Gnus buffers should be.  If you issue commands
12154 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
12155 default directory.  If this variable is @code{nil} (which is the
12156 default), the default directory will be the default directory of the
12157 buffer you were in when you started Gnus.
12158
12159 @item gnus-verbose
12160 @vindex gnus-verbose
12161 This variable is an integer between zero and ten.  The higher the value,
12162 the more messages will be displayed.  If this variable is zero, Gnus
12163 will never flash any messages, if it is seven (which is the default),
12164 most important messages will be shown, and if it is ten, Gnus won't ever
12165 shut up, but will flash so many messages it will make your head swim.
12166
12167 @item gnus-verbose-backends
12168 @vindex gnus-verbose-backends
12169 This variable works the same way as @code{gnus-verbose}, but it applies
12170 to the Gnus backends instead of Gnus proper.
12171
12172 @item nnheader-max-head-length
12173 @vindex nnheader-max-head-length
12174 When the backends read straight heads of articles, they all try to read
12175 as little as possible.  This variable (default @code{4096}) specifies
12176 the absolute max length the backends will try to read before giving up
12177 on finding a separator line between the head and the body.  If this
12178 variable is @code{nil}, there is no upper read bound.  If it is
12179 @code{t}, the backends won't try to read the articles piece by piece,
12180 but read the entire articles.  This makes sense with some versions of
12181 @code{ange-ftp}. 
12182
12183 @item nnheader-file-name-translation-alist 
12184 @vindex nnheader-file-name-translation-alist 
12185 @cindex file names
12186 @cindex illegal characters in file names
12187 @cindex characters in file names
12188 This is an alist that says how to translate characters in file names.
12189 For instance, if @samp{:} is illegal as a file character in file names
12190 on your system (you OS/2 user you), you could say something like:
12191
12192 @lisp
12193 (setq nnheader-file-name-translation-alist 
12194       '((?: . ?_)))
12195 @end lisp
12196
12197 In fact, this is the default value for this variable on OS/2 and MS
12198 Windows (phooey) systems.
12199
12200 @item gnus-hidden-properties
12201 @vindex gnus-hidden-properties
12202 This is a list of properties to use to hide ``invisible'' text.  It is
12203 @code{(invisible t intangible t)} by default on most systems, which
12204 makes invisible text invisible and intangible.
12205
12206 @item gnus-parse-headers-hook
12207 @vindex gnus-parse-headers-hook
12208 A hook called before parsing headers.  It can be used, for instance, to
12209 gather statistics on the headers fetched, or perhaps you'd like to prune
12210 some headers.  I don't see why you'd want that, though.
12211
12212 @item gnus-shell-command-separator
12213 @vindex gnus-shell-command-separator
12214 String used to separate to shell commands.  The default is @samp{;}. 
12215
12216
12217 @end table
12218
12219
12220 @node The End
12221 @chapter The End
12222
12223 Well, that's the manual---you can get on with your life now.  Keep in
12224 touch.  Say hello to your cats from me.  
12225
12226 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
12227
12228 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
12229
12230 @quotation
12231 @strong{Te Deum}
12232 @sp 1
12233 Not because of victories @*
12234 I sing,@*
12235 having none,@*
12236 but for the common sunshine,@*
12237 the breeze,@*
12238 the largess of the spring.
12239 @sp 1
12240 Not for victory@*
12241 but for the day's work done@*
12242 as well as I was able;@*
12243 not for a seat upon the dais@*
12244 but at the common table.@*
12245 @end quotation
12246
12247
12248 @node Appendices
12249 @chapter Appendices
12250
12251 @menu
12252 * History::                        How Gnus got where it is today.
12253 * Terminology::                    We use really difficult, like, words here.
12254 * Customization::                  Tailoring Gnus to your needs.
12255 * Troubleshooting::                What you might try if things do not work.
12256 * A Programmers Guide to Gnus::    Rilly, rilly technical stuff.
12257 * Emacs for Heathens::             A short introduction to Emacsian terms.
12258 * Frequently Asked Questions::     A question-and-answer session.
12259 @end menu
12260
12261
12262 @node History
12263 @section History
12264
12265 @cindex history
12266 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
12267 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
12268
12269 If you want to investigate the person responsible for this outrage, you
12270 can point your (feh!) web browser to
12271 @file{http://www.ifi.uio.no/~larsi/}.  This is also the primary
12272 distribution point for the new and spiffy versions of Gnus, and is known
12273 as The Site That Destroys Newsrcs And Drives People Mad.
12274
12275 During the first extended alpha period of development, the new Gnus was
12276 called ``(ding) Gnus''.  @dfn{(ding)}, is, of course, short for
12277 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
12278 (Besides, the ``Gnus'' in this abbreviation should probably be
12279 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
12280 appropriate name, don't you think?)
12281
12282 In any case, after spending all that energy on coming up with a new and
12283 spunky name, we decided that the name was @emph{too} spunky, so we
12284 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
12285 ``@sc{gnus}''.  New vs. old.
12286
12287 The first ``proper'' release of Gnus 5 was done in November 1995 when it
12288 was included in the Emacs 19.30 distribution.
12289
12290 In May 1996 the next Gnus generation (aka.  ``September Gnus'') was
12291 released under the name ``Gnus 5.2''.  
12292
12293 On July 28th 1996 work on Red Gnus was begun.
12294
12295 @menu
12296 * Why?::                What's the point of Gnus?
12297 * Compatibility::       Just how compatible is Gnus with @sc{gnus}?
12298 * Conformity::          Gnus tries to conform to all standards.
12299 * Emacsen::             Gnus can be run on a few modern Emacsen.
12300 * Contributors::        Oodles of people.  
12301 * New Features::        Pointers to some of the new stuff in Gnus.
12302 * Newest Features::     Features so new that they haven't been written yet.
12303 @end menu
12304
12305
12306 @node Why?
12307 @subsection Why?
12308
12309 What's the point of Gnus?  
12310
12311 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
12312 newsreader, that lets you do anything you can think of.  That was my
12313 original motivation, but while working on Gnus, it has become clear to
12314 me that this generation of newsreaders really belong in the stone age.
12315 Newsreaders haven't developed much since the infancy of the net.  If the
12316 volume continues to rise with the current rate of increase, all current
12317 newsreaders will be pretty much useless.  How do you deal with
12318 newsgroups that have thousands of new articles each day?  How do you
12319 keep track of millions of people who post?
12320
12321 Gnus offers no real solutions to these questions, but I would very much
12322 like to see Gnus being used as a testing ground for new methods of
12323 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
12324 to separate the newsreader from the backends, Gnus now offers a simple
12325 interface for anybody who wants to write new backends for fetching mail
12326 and news from different sources.  I have added hooks for customizations
12327 everywhere I could imagine useful.  By doing so, I'm inviting every one
12328 of you to explore and invent.
12329
12330 May Gnus never be complete. @kbd{C-u 100 M-x hail-emacs}. 
12331
12332
12333 @node Compatibility
12334 @subsection Compatibility
12335
12336 @cindex compatibility
12337 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
12338 bindings have been kept.  More key bindings have been added, of course,
12339 but only in one or two obscure cases have old bindings been changed.
12340
12341 Our motto is:
12342 @quotation
12343 @cartouche
12344 @center In a cloud bones of steel.
12345 @end cartouche
12346 @end quotation
12347
12348 All commands have kept their names.  Some internal functions have changed
12349 their names.
12350
12351 The @code{gnus-uu} package has changed drastically. @pxref{Decoding
12352 Articles}. 
12353
12354 One major compatibility question is the presence of several summary
12355 buffers.  All variables that are relevant while reading a group are
12356 buffer-local to the summary buffer they belong in.  Although many
12357 important variables have their values copied into their global
12358 counterparts whenever a command is executed in the summary buffer, this
12359 change might lead to incorrect values being used unless you are careful.
12360
12361 All code that relies on knowledge of @sc{gnus} internals will probably
12362 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
12363 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
12364 maintains a hash table that points to the entries in this alist (which
12365 speeds up many functions), and changing the alist directly will lead to
12366 peculiar results.
12367
12368 @cindex hilit19
12369 @cindex highlighting
12370 Old hilit19 code does not work at all.  In fact, you should probably
12371 remove all hilit code from all Gnus hooks
12372 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
12373 Gnus provides various integrated functions for highlighting.  These are
12374 faster and more accurate.  To make life easier for everybody, Gnus will
12375 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
12376 Away!
12377
12378 Packages like @code{expire-kill} will no longer work.  As a matter of
12379 fact, you should probably remove all old @sc{gnus} packages (and other
12380 code) when you start using Gnus.  More likely than not, Gnus already
12381 does what you have written code to make @sc{gnus} do.  (Snicker.)
12382
12383 Even though old methods of doing things are still supported, only the
12384 new methods are documented in this manual.  If you detect a new method of
12385 doing something while reading this manual, that does not mean you have
12386 to stop doing it the old way.
12387
12388 Gnus understands all @sc{gnus} startup files.
12389
12390 @kindex M-x gnus-bug
12391 @findex gnus-bug
12392 @cindex reporting bugs
12393 @cindex bugs
12394 Overall, a casual user who hasn't written much code that depends on
12395 @sc{gnus} internals should suffer no problems.  If problems occur,
12396 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
12397
12398
12399 @node Conformity
12400 @subsection Conformity
12401
12402 No rebels without a clue here, ma'am.  We conform to all standards known
12403 to (wo)man.  Except for those standards and/or conventions we disagree
12404 with, of course.
12405
12406 @table @strong
12407
12408 @item RFC 822
12409 @cindex RFC 822
12410 There are no known breaches of this standard.
12411
12412 @item RFC 1036
12413 @cindex RFC 1036
12414 There are no known breaches of this standard, either.
12415
12416 @item Good Net-Keeping Seal of Approval
12417 @cindex Good Net-Keeping Seal of Approval
12418 Gnus has been through the Seal process and failed.  I think it'll pass
12419 the next inspection.
12420
12421 @item Son-of-RFC 1036
12422 @cindex Son-of-RFC 1036
12423 We do have some breaches to this one.
12424
12425 @table @emph
12426
12427 @item MIME
12428 Gnus does no MIME handling, and this standard-to-be seems to think that
12429 MIME is the bees' knees, so we have major breakage here.
12430
12431 @item X-Newsreader
12432 This is considered to be a ``vanity header'', while I consider it to be
12433 consumer information.  After seeing so many badly formatted articles
12434 coming from @code{tin} and @code{Netscape} I know not to use either of
12435 those for posting articles.  I would not have known that if it wasn't
12436 for the @code{X-Newsreader} header.
12437
12438 @item References
12439 Gnus does line breaking on this header.  I infer from RFC1036 that being
12440 conservative in what you output is not creating 5000-character lines, so
12441 it seems like a good idea to me.  However, this standard-to-be says that
12442 whitespace in the @code{References} header is to be preserved, so...  It
12443 doesn't matter one way or the other to Gnus, so if somebody tells me
12444 what The Way is, I'll change it.  Or not.
12445 @end table
12446
12447 @end table
12448
12449 If you ever notice Gnus acting non-compliantly with regards to the texts
12450 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
12451 know.
12452
12453
12454 @node Emacsen
12455 @subsection Emacsen
12456 @cindex Emacsen
12457 @cindex XEmacs
12458 @cindex Mule
12459 @cindex Emacs
12460
12461 Gnus should work on :
12462
12463 @itemize @bullet 
12464
12465 @item
12466 Emacs 19.30 and up.
12467
12468 @item
12469 XEmacs 19.13 and up.
12470
12471 @item 
12472 Mule versions based on Emacs 19.30 and up.
12473
12474 @end itemize
12475
12476 Gnus will absolutely not work on any Emacsen older than that.  Not
12477 reliably, at least. 
12478
12479 There are some vague differences between Gnus on the various platforms: 
12480
12481 @itemize @bullet
12482
12483 @item
12484 The mouse-face on Gnus lines under Emacs and Mule is delimited to
12485 certain parts of the lines while they cover the entire line under
12486 XEmacs. 
12487
12488 @item 
12489 The same with current-article marking---XEmacs puts an underline under
12490 the entire summary line while Emacs and Mule are nicer and kinder.
12491
12492 @item
12493 XEmacs features more graphics---a logo and a toolbar.
12494
12495 @item
12496 Citation highlighting us better under Emacs and Mule than under XEmacs.
12497
12498 @item
12499 Emacs 19.26-19.28 have tangible hidden headers, which can be a bit
12500 confusing. 
12501
12502 @end itemize
12503
12504
12505 @node Contributors
12506 @subsection Contributors
12507 @cindex contributors
12508
12509 The new Gnus version couldn't have been done without the help of all the
12510 people on the (ding) mailing list.  Every day for over a year I have
12511 gotten billions of nice bug reports from them, filling me with joy,
12512 every single one of them.  Smooches.  The people on the list have been
12513 tried beyond endurance, what with my ``oh, that's a neat idea <type
12514 type>, yup, I'll release it right away <ship off> no wait, that doesn't
12515 work at all <type type>, yup, I'll ship that one off right away <ship
12516 off> no, wait, that absolutely does not work'' policy for releases.
12517 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
12518 ``worser''? ``much worser''?  ``worsest''?)
12519
12520 I would like to take this opportunity to thank the Academy for...  oops,
12521 wrong show.
12522
12523 @itemize @bullet
12524
12525 @item Masanobu @sc{Umeda}
12526 The writer of the original @sc{gnus}.
12527
12528 @item Per Abrahamsen
12529 Custom, scoring, highlighting and @sc{soup} code (as well as numerous
12530 other things).
12531
12532 @item Luis Fernandes
12533 Design and graphics.
12534
12535 @item Wes Hardaker
12536 @file{gnus-picon.el} and the manual section on @dfn{picons}
12537 (@pxref{Picons}). 
12538
12539 @item Brad Miller
12540 @file{gnus-gl.el} and the GroupLens manual section (@pxref{GroupLens}). 
12541
12542 @item Sudish Joseph
12543 Innumerable bug fixes.
12544
12545 @item Ilja Weis
12546 @file{gnus-topic.el}.
12547
12548 @item Steven L. Baur
12549 Lots and lots of bugs detections and fixes.
12550
12551 @item Vladimir Alexiev
12552 The refcard and reference booklets.
12553
12554 @item Felix Lee & JWZ
12555 I stole some pieces from the XGnus distribution by Felix Lee and JWZ.
12556
12557 @item Scott Byer
12558 @file{nnfolder.el} enhancements & rewrite.
12559
12560 @item Peter Mutsaers
12561 Orphan article scoring code.
12562
12563 @item Ken Raeburn
12564 POP mail support.
12565
12566 @item Hallvard B Furuseth
12567 Various bits and pieces, especially dealing with .newsrc files.
12568
12569 @item Brian Edmonds
12570 @file{gnus-bbdb.el}.
12571
12572 @item Ricardo Nassif and Mark Borges
12573 Proof-reading.
12574
12575 @item Kevin Davidson
12576 Came up with the name @dfn{ding}, so blame him.
12577
12578 @end itemize
12579
12580 Peter Arius, Stainless Steel Rat, Ulrik Dickow, Jack Vinson, Daniel
12581 Quinlan, Frank D. Cringle, Geoffrey T. Dairiki, Fabrice Popineau and
12582 Andrew Eskilsson have all contributed code and suggestions.
12583
12584
12585 @node New Features
12586 @subsection New Features
12587 @cindex new features
12588
12589 @itemize @bullet
12590
12591 @item
12592 The look of all buffers can be changed by setting format-like variables
12593 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}). 
12594  
12595 @item 
12596 Local spool and several @sc{nntp} servers can be used at once
12597 (@pxref{Select Methods}).  
12598
12599 @item 
12600 You can combine groups into virtual groups (@pxref{Virtual Groups}).
12601
12602 @item 
12603 You can read a number of different mail formats (@pxref{Getting Mail}).
12604 All the mail backends implement a convenient mail expiry scheme
12605 (@pxref{Expiring Mail}). 
12606
12607 @item
12608 Gnus can use various strategies for gathering threads that have lost
12609 their roots (thereby gathering loose sub-threads into one thread) or it
12610 can go back and retrieve enough headers to build a complete thread
12611 (@pxref{Customizing Threading}).
12612
12613 @item 
12614 Killed groups can be displayed in the group buffer, and you can read
12615 them as well (@pxref{Listing Groups}).
12616
12617 @item 
12618 Gnus can do partial group updates---you do not have to retrieve the
12619 entire active file just to check for new articles in a few groups
12620 (@pxref{The Active File}).
12621
12622 @item 
12623 Gnus implements a sliding scale of subscribedness to groups
12624 (@pxref{Group Levels}).
12625
12626 @item 
12627 You can score articles according to any number of criteria
12628 (@pxref{Scoring}).  You can even get Gnus to find out how to score
12629 articles for you (@pxref{Adaptive Scoring}).
12630
12631 @item 
12632 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
12633 manner, so it should be difficult to lose much data on what you have
12634 read if your machine should go down (@pxref{Auto Save}). 
12635
12636 @item 
12637 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
12638 the @file{.emacs} file.
12639
12640 @item 
12641 You can set the process mark on both groups and articles and perform
12642 operations on all the marked items (@pxref{Process/Prefix}).
12643
12644 @item 
12645 You can grep through a subset of groups and create a group from the
12646 results (@pxref{Kibozed Groups}). 
12647
12648 @item 
12649 You can list subsets of groups according to, well, anything
12650 (@pxref{Listing Groups}). 
12651
12652 @item 
12653 You can browse foreign servers and subscribe to groups from those
12654 servers (@pxref{Browse Foreign Server}). 
12655
12656 @item 
12657 Gnus can fetch articles asynchronously on a second connection to the
12658 server (@pxref{Asynchronous Fetching}).
12659
12660 @item 
12661 You can cache articles locally (@pxref{Article Caching}). 
12662
12663 @item 
12664 The uudecode functions have been expanded and generalized
12665 (@pxref{Decoding Articles}). 
12666
12667 @item
12668 You can still post uuencoded articles, which was a little-known feature
12669 of @sc{gnus}' past (@pxref{Uuencoding and Posting}). 
12670
12671 @item
12672 Fetching parents (and other articles) now actually works without
12673 glitches (@pxref{Finding the Parent}). 
12674
12675 @item
12676 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
12677
12678 @item
12679 Digests (and other files) can be used as the basis for groups
12680 (@pxref{Document Groups}).
12681
12682 @item 
12683 Articles can be highlighted and customized (@pxref{Customizing
12684 Articles}). 
12685
12686 @item 
12687 URLs and other external references can be buttonized (@pxref{Article
12688 Buttons}). 
12689
12690 @item
12691 You can do lots of strange stuff with the Gnus window & frame
12692 configuration (@pxref{Windows Configuration}).
12693
12694 @item
12695 You can click on buttons instead of using the keyboard
12696 (@pxref{Buttons}). 
12697
12698 @item 
12699 Gnus can use NoCeM files to weed out spam (@pxref{NoCeM}). 
12700
12701 @end itemize
12702
12703 This is, of course, just a @emph{short} overview of the @emph{most}
12704 important new features.  No, really.  There are tons more.  Yes, we have
12705 feeping creaturism in full effect, but nothing too gratuitous, I would
12706 hope. 
12707
12708
12709 @node Newest Features
12710 @subsection Newest Features
12711 @cindex todo
12712
12713 Also known as the @dfn{todo list}.  Sure to be implemented before the
12714 next millennium. 
12715
12716 Be afraid.  Be very afraid.
12717
12718 @itemize @bullet
12719 @item
12720 Native @sc{mime} support is something that should be done.  
12721 @item
12722 A better and simpler method for specifying mail composing methods. 
12723 @item
12724 Allow posting through mail-to-news gateways.
12725 @item
12726 Really do unbinhexing.
12727 @end itemize
12728
12729 And much, much, much more.  There is more to come than has already been
12730 implemented.  (But that's always true, isn't it?)
12731
12732 @code{<URL:http://www.ifi.uio.no/~larsi/sgnus/todo>} is where the actual
12733 up-to-the-second todo list is located, so if you're really curious, you
12734 could point your Web browser over that-a-way.
12735
12736
12737 @node Terminology
12738 @section Terminology
12739
12740 @cindex terminology
12741 @table @dfn
12742
12743 @item news
12744 @cindex news
12745 This is what you are supposed to use this thing for---reading news.
12746 News is generally fetched from a nearby @sc{nntp} server, and is
12747 generally publicly available to everybody.  If you post news, the entire
12748 world is likely to read just what you have written, and they'll all
12749 snigger mischievously.  Behind your back.
12750
12751 @item mail
12752 @cindex mail
12753 Everything that's delivered to you personally is mail.  Some news/mail
12754 readers (like Gnus) blur the distinction between mail and news, but
12755 there is a difference.  Mail is private.  News is public.  Mailing is
12756 not posting, and replying is not following up.
12757
12758 @item reply
12759 @cindex reply
12760 Send a mail to the person who has written what you are reading.
12761
12762 @item follow up
12763 @cindex follow up
12764 Post an article to the current newsgroup responding to the article you
12765 are reading.
12766
12767 @item backend
12768 @cindex backend
12769 Gnus gets fed articles from a number of backends, both news and mail
12770 backends.  Gnus does not handle the underlying media, so to speak---this
12771 is all done by the backends.
12772
12773 @item native
12774 @cindex native
12775 Gnus will always use one method (and backend) as the @dfn{native}, or
12776 default, way of getting news.
12777
12778 @item foreign
12779 @cindex foreign
12780 You can also have any number of foreign groups active at the same time.
12781 These are groups that use different backends for getting news.
12782
12783 @item secondary
12784 @cindex secondary
12785 Secondary backends are somewhere half-way between being native and being
12786 foreign, but they mostly act like they are native.
12787
12788 @item article
12789 @cindex article
12790 A nessage that has been posted as news.
12791
12792 @item mail message
12793 @cindex mail message
12794 A message that has been mailed.
12795
12796 @item message 
12797 @cindex message
12798 A mail message or news article
12799
12800 @item head
12801 @cindex head
12802 The top part of a message, where administrative information (etc.) is
12803 put.
12804
12805 @item body
12806 @cindex body
12807 The rest of an article.  Everything that is not in the head is in the
12808 body. 
12809
12810 @item header
12811 @cindex header
12812 A line from the head of an article. 
12813
12814 @item headers
12815 @cindex headers
12816 A collection of such lines, or a collection of heads.  Or even a
12817 collection of @sc{nov} lines.
12818
12819 @item @sc{nov}
12820 @cindex nov
12821 When Gnus enters a group, it asks the backend for the headers of all
12822 unread articles in the group.  Most servers support the News OverView
12823 format, which is more compact and much faster to read and parse than the
12824 normal @sc{head} format.
12825
12826 @item level
12827 @cindex levels
12828 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
12829 that have a lower level are ``more'' subscribed than the groups with a
12830 higher level.  In fact, groups on levels 1-5 are considered
12831 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
12832 are @dfn{killed}.  Commands for listing groups and scanning for new
12833 articles will all use the numeric prefix as @dfn{working level}.
12834
12835 @item killed groups
12836 @cindex killed groups
12837 No information on killed groups is stored or updated, which makes killed
12838 groups much easier to handle than subscribed groups.
12839
12840 @item zombie groups
12841 @cindex zombie groups
12842 Just like killed groups, only slightly less dead.
12843
12844 @item active file
12845 @cindex active file
12846 The news server has to keep track of what articles it carries, and what
12847 groups exist.  All this information in stored in the active file, which
12848 is rather large, as you might surmise.
12849
12850 @item bogus groups
12851 @cindex bogus groups
12852 A group that exists in the @file{.newsrc} file, but isn't known to the
12853 server (i. e.,  it isn't in the active file), is a @emph{bogus group}.
12854 This means that the group probably doesn't exist (any more).
12855
12856 @item server 
12857 @cindex server
12858 A machine than one can connect to and get news (or mail) from.
12859
12860 @item select method
12861 @cindex select method
12862 A structure that specifies the backend, the server and the virtual
12863 server parameters.
12864
12865 @item virtual server
12866 @cindex virtual server
12867 A named select method.  Since a select methods defines all there is to
12868 know about connecting to a (physical) server, taking the who things as a
12869 whole is a virtual server.
12870
12871 @end table
12872
12873
12874 @node Customization
12875 @section Customization
12876 @cindex general customization
12877
12878 All variables are properly documented elsewhere in this manual.  This
12879 section is designed to give general pointers on how to customize Gnus
12880 for some quite common situations.
12881
12882 @menu
12883 * Slow/Expensive Connection:: You run a local Emacs and get the news elsewhere.
12884 * Slow Terminal Connection::  You run a remote Emacs.
12885 * Little Disk Space::         You feel that having large setup files is icky.
12886 * Slow Machine::              You feel like buying a faster machine.
12887 @end menu
12888
12889
12890 @node Slow/Expensive Connection
12891 @subsection Slow/Expensive @sc{nntp} Connection
12892
12893 If you run Emacs on a machine locally, and get your news from a machine
12894 over some very thin strings, you want to cut down on the amount of data
12895 Gnus has to get from the @sc{nntp} server.
12896
12897 @table @code
12898
12899 @item gnus-read-active-file
12900 Set this to @code{nil}, which will inhibit Gnus from requesting the
12901 entire active file from the server.  This file is often v.  large.  You
12902 also have to set @code{gnus-check-new-news} and
12903 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
12904 doesn't suddenly decide to fetch the active file anyway.
12905
12906 @item gnus-nov-is-evil
12907 This one has to be @code{nil}.  If not, grabbing article headers from
12908 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
12909 support @sc{xover}; Gnus will detect this by itself.
12910 @end table
12911
12912
12913 @node Slow Terminal Connection
12914 @subsection Slow Terminal Connection
12915
12916 Let's say you use your home computer for dialing up the system that
12917 runs Emacs and Gnus.  If your modem is slow, you want to reduce the
12918 amount of data that is sent over the wires as much as possible.
12919
12920 @table @code
12921
12922 @item gnus-auto-center-summary
12923 Set this to @code{nil} to inhibit Gnus from re-centering the summary
12924 buffer all the time.  If it is @code{vertical}, do only vertical
12925 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
12926 horizontal and vertical recentering.
12927
12928 @item gnus-visible-headers
12929 Cut down on the headers that are included in the articles to the
12930 minimum.  You can, in fact, make do without them altogether---most of the
12931 useful data is in the summary buffer, anyway.  Set this variable to
12932 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
12933
12934 @item gnus-article-display-hook
12935 Set this hook to all the available hiding commands:
12936 @lisp
12937 (setq gnus-article-display-hook 
12938       '(gnus-article-hide-headers gnus-article-hide-signature
12939         gnus-article-hide-citation))
12940 @end lisp
12941
12942 @item gnus-use-full-window
12943 By setting this to @code{nil}, you can make all the windows smaller.
12944 While this doesn't really cut down much generally, it means that you
12945 have to see smaller portions of articles before deciding that you didn't
12946 want to read them anyway.
12947
12948 @item gnus-thread-hide-subtree
12949 If this is non-@code{nil}, all threads in the summary buffer will be
12950 hidden initially.
12951
12952 @item gnus-updated-mode-lines
12953 If this is @code{nil}, Gnus will not put information in the buffer mode
12954 lines, which might save some time.
12955 @end table
12956
12957
12958 @node Little Disk Space
12959 @subsection Little Disk Space
12960 @cindex disk space
12961
12962 The startup files can get rather large, so you may want to cut their
12963 sizes a bit if you are running out of space.
12964
12965 @table @code
12966
12967 @item gnus-save-newsrc-file
12968 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
12969 only save @file{.newsrc.eld}.  This means that you will not be able to
12970 use any other newsreaders than Gnus.  This variable is @code{t} by
12971 default. 
12972
12973 @item gnus-save-killed-list
12974 If this is @code{nil}, Gnus will not save the list of dead groups.  You
12975 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
12976 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
12977 variable to @code{nil}.  This variable is @code{t} by default.
12978
12979 @end table
12980
12981
12982 @node Slow Machine
12983 @subsection Slow Machine
12984 @cindex slow machine
12985
12986 If you have a slow machine, or are just really impatient, there are a
12987 few things you can do to make Gnus run faster.
12988
12989 Set@code{gnus-check-new-newsgroups} and
12990 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
12991
12992 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
12993 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
12994 summary buffer faster.
12995
12996 Set @code{gnus-article-display-hook} to @code{nil} to make article
12997 processing a bit faster.
12998
12999
13000 @node Troubleshooting
13001 @section Troubleshooting
13002 @cindex troubleshooting
13003
13004 Gnus works @emph{so} well straight out of the box---I can't imagine any
13005 problems, really.
13006
13007 Ahem.
13008
13009 @enumerate
13010
13011 @item
13012 Make sure your computer is switched on.
13013
13014 @item
13015 Make sure that you really load the current Gnus version.  If you have
13016 been running @sc{gnus}, you need to exit Emacs and start it up again before
13017 Gnus will work.
13018
13019 @item
13020 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
13021 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
13022 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
13023 flee}, you have some old @file{.el} files lying around.  Delete these.
13024
13025 @item
13026 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
13027 how-to. 
13028
13029 @item
13030 @vindex max-lisp-eval-depth
13031 Gnus works on many recursive structures, and in some extreme (and very
13032 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
13033 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
13034 something like that.
13035 @end enumerate
13036
13037 If all else fails, report the problem as a bug.
13038
13039 @cindex bugs
13040 @cindex reporting bugs
13041
13042 @kindex M-x gnus-bug
13043 @findex gnus-bug
13044 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
13045 command. @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
13046 me the backtrace.  I will fix bugs, but I can only fix them if you send
13047 me a precise description as to how to reproduce the bug.
13048
13049 You really can never be too detailed in a bug report.  Always use the
13050 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
13051 a 10Kb mail each time you use it, and even if you have sent me your
13052 environment 500 times before.  I don't care.  I want the full info each
13053 time.  
13054
13055 It is also important to remember that I have no memory whatsoever.  If
13056 you send a bug report, and I send you a reply, and then you send back
13057 just ``No, it's not! Moron!'', I will have no idea what you are
13058 insulting me about.  Always over-explain everything.  It's much easier
13059 for all of us---if I don't have all the information I need, I will just
13060 mail you and ask for more info, and everything takes more time.
13061
13062 If the problem you're seeing is very visual, and you can't quite explain
13063 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
13064 it somewhere it can be reached, and include the URL of the picture in
13065 the bug report.a
13066
13067 If you just need help, you are better off asking on
13068 @samp{gnu.emacs.gnus}.  I'm not very helpful.
13069
13070 @cindex gnu.emacs.gnus
13071 @cindex ding mailing list
13072 You can also ask on the ding mailing list---@samp{ding@@ifi.uio.no}.
13073 Write to @samp{ding-request@@ifi.uio.no} to subscribe.
13074
13075
13076 @node A Programmers Guide to Gnus
13077 @section A Programmer's Guide to Gnus
13078
13079 It is my hope that other people will figure out smart stuff that Gnus
13080 can do, and that other people will write those smart things as well.  To
13081 facilitate that I thought it would be a good idea to describe the inner
13082 workings of Gnus.  And some of the not-so-inner workings, while I'm at
13083 it.
13084
13085 You can never expect the internals of a program not to change, but I
13086 will be defining (in some details) the interface between Gnus and its
13087 backends (this is written in stone), the format of the score files
13088 (ditto), data structures (some are less likely to change than others)
13089 and general method of operations.
13090
13091 @menu 
13092 * Backend Interface::        How Gnus communicates with the servers.
13093 * Score File Syntax::        A BNF definition of the score file standard.
13094 * Headers::                  How Gnus stores headers internally.
13095 * Ranges::                   A handy format for storing mucho numbers.
13096 * Group Info::               The group info format.
13097 * Emacs/XEmacs Code::        Gnus can be run under all modern Emacsen.
13098 * Various File Formats::     Formats of files that Gnus use.
13099 @end menu
13100
13101
13102 @node Backend Interface
13103 @subsection Backend Interface
13104
13105 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
13106 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
13107 server is a @dfn{backend} and some @dfn{backend variables}.  As examples
13108 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
13109 examples of the latter we have @code{nntp-port-number} and
13110 @code{nnmbox-directory}.
13111
13112 When Gnus asks for information from a backend---say @code{nntp}---on
13113 something, it will normally include a virtual server name in the
13114 function parameters.  (If not, the backend should use the ``current''
13115 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
13116 server as its only (optional) parameter.  If this virtual server hasn't
13117 been opened, the function should fail.
13118
13119 Note that a virtual server name has no relation to some physical server
13120 name.  Take this example:
13121
13122 @lisp
13123 (nntp "odd-one" 
13124       (nntp-address "ifi.uio.no") 
13125       (nntp-port-number 4324))
13126 @end lisp
13127
13128 Here the virtual server name is @samp{odd-one} while the name of
13129 the physical server is @samp{ifi.uio.no}. 
13130
13131 The backends should be able to switch between several virtual servers.
13132 The standard backends implement this by keeping an alist of virtual
13133 server environments that it pulls down/pushes up when needed.  
13134
13135 There are two groups of interface functions: @dfn{required functions},
13136 which must be present, and @dfn{optional functions}, which Gnus will
13137 always check whether are present before attempting to call.
13138
13139 All these functions are expected to return data in the buffer
13140 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
13141 unfortunately named, but we'll have to live with it.  When I talk about
13142 @dfn{resulting data}, I always refer to the data in that buffer.  When I
13143 talk about @dfn{return value}, I talk about the function value returned by
13144 the function call.  Functions that fail should return @code{nil} as the
13145 return value.
13146
13147 Some backends could be said to be @dfn{server-forming} backends, and
13148 some might be said to not be.  The latter are backends that generally
13149 only operate on one group at a time, and have no concept of ``server''
13150 -- they have a group, and they deliver info on that group and nothing
13151 more.
13152
13153 In the examples and definitions I will refer to the imaginary backend
13154 @code{nnchoke}. 
13155
13156 @cindex @code{nnchoke}
13157
13158 @menu
13159 * Required Backend Functions::        Functions that must be implemented.
13160 * Optional Backend Functions::        Functions that need not be implemented.
13161 * Error Messaging::                   How to get messages and report errors.
13162 * Writing New Backends::              Extending old backends.
13163 * Hooking New Backends Into Gnus::    What has to be done on the Gnus end.
13164 @end menu
13165
13166
13167 @node Required Backend Functions
13168 @subsubsection Required Backend Functions
13169
13170 @table @code
13171
13172 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
13173
13174 @var{articles} is either a range of article numbers or a list of
13175 @code{Message-ID}s.  Current backends do not fully support either---only
13176 sequences (lists) of article numbers, and most backends do not support
13177 retrieval of @code{Message-ID}s.  But they should try for both. 
13178
13179 The result data should either be HEADs or NOV lines, and the result
13180 value should either be @code{headers} or @code{nov} to reflect this.
13181 This might later be expanded to @code{various}, which will be a mixture
13182 of HEADs and NOV lines, but this is currently not supported by Gnus.  
13183
13184 If @var{fetch-old} is non-@code{nil} it says to try to fetch "extra
13185 headers, in some meaning of the word.  This is generally done by
13186 fetching (at most) @var{fetch-old} extra headers less than the smallest
13187 article number in @code{articles}, and fill in the gaps as well.  The
13188 presence of this parameter can be ignored if the backend finds it
13189 cumbersome to follow the request.  If this is non-@code{nil} and not a
13190 number, do maximum fetches.
13191
13192 Here's an example HEAD:
13193
13194 @example
13195 221 1056 Article retrieved.
13196 Path: ifi.uio.no!sturles
13197 From: sturles@@ifi.uio.no (Sturle Sunde)
13198 Newsgroups: ifi.discussion
13199 Subject: Re: Something very droll
13200 Date: 27 Oct 1994 14:02:57 +0100
13201 Organization: Dept. of Informatics, University of Oslo, Norway
13202 Lines: 26
13203 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
13204 References: <38jdmq$4qu@@visbur.ifi.uio.no>
13205 NNTP-Posting-Host: holmenkollen.ifi.uio.no
13206 .
13207 @end example
13208
13209 So a @code{headers} return value would imply that there's a number of
13210 these in the data buffer.
13211
13212 Here's a BNF definition of such a buffer:
13213
13214 @example
13215 headers        = *head
13216 head           = error / valid-head
13217 error-message  = [ "4" / "5" ] 2number " " <error message> eol
13218 valid-head     = valid-message *header "." eol
13219 valid-message  = "221 " <number> " Article retrieved." eol
13220 header         = <text> eol
13221 @end example
13222
13223 If the return value is @code{nov}, the data buffer should contain
13224 @dfn{network overview database} lines.  These are basically fields
13225 separated by tabs. 
13226
13227 @example
13228 nov-buffer = *nov-line
13229 nov-line   = 8*9 [ field <TAB> ] eol
13230 field      = <text except TAB>
13231 @end example
13232
13233 For a closer explanation what should be in those fields,
13234 @pxref{Headers}. 
13235
13236
13237 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
13238
13239 @var{server} is here the virtual server name.  @var{definitions} is a
13240 list of @code{(VARIABLE VALUE)} pairs that defines this virtual server. 
13241
13242 If the server can't be opened, no error should be signaled.  The backend
13243 may then choose to refuse further attempts at connecting to this
13244 server.  In fact, it should do so. 
13245
13246 If the server is opened already, this function should return a
13247 non-@code{nil} value.  There should be no data returned.
13248
13249
13250 @item (nnchoke-close-server &optional SERVER)
13251
13252 Close connection to @var{server} and free all resources connected
13253 to it.  Return @code{nil} if the server couldn't be closed for some
13254 reason.
13255
13256 There should be no data returned.
13257
13258
13259 @item (nnchoke-request-close)
13260
13261 Close connection to all servers and free all resources that the backend
13262 have reserved.  All buffers that have been created by that backend
13263 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
13264 function is generally only called when Gnus is shutting down.
13265
13266 There should be no data returned. 
13267
13268
13269 @item (nnchoke-server-opened &optional SERVER)
13270
13271 If @var{server} is the current virtual server, and the connection to the
13272 physical server is alive, then this function should return a
13273 non-@code{nil} vlue.  This function should under no circumstances
13274 attempt to reconnect to a server that is has lost connection to.
13275
13276 There should be no data returned.
13277
13278
13279 @item (nnchoke-status-message &optional SERVER)
13280
13281 This function should return the last error message from @var{server}. 
13282
13283 There should be no data returned.
13284
13285
13286 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
13287
13288 The result data from this function should be the article specified by
13289 @var{article}.  This might either be a @code{Message-ID} or a number.
13290 It is optional whether to implement retrieval by @code{Message-ID}, but
13291 it would be nice if that were possible.
13292
13293 If @var{to-buffer} is non-@code{nil}, the result data should be returned
13294 in this buffer instead of the normal data buffer.  This is to make it
13295 possible to avoid copying large amounts of data from one buffer to
13296 another, and Gnus mainly request articles to be inserted directly into
13297 its article buffer.
13298
13299 If it is at all possible, this function should return a cons cell where
13300 the car is the group name the article was fetched from, and the cdr is
13301 the article number.  This will enable Gnus to find out what the real
13302 group and article numbers are when fetching articles by
13303 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
13304 on successful article retrievement.
13305
13306
13307 @item (nnchoke-open-group GROUP &optional SERVER)
13308
13309 Make @var{group} the current group.  
13310
13311 There should be no data returned by this function.
13312
13313
13314 @item (nnchoke-request-group GROUP &optional SERVER FAST)
13315
13316 Get data on @var{group}.  This function also has the side effect of
13317 making @var{group} the current group. 
13318
13319 If @var{FAST}, don't bother to return useful data, just make @var{group}
13320 the current group.
13321
13322 Here's an example of some result data and a definition of the same:
13323
13324 @example
13325 211 56 1000 1059 ifi.discussion
13326 @end example
13327
13328 The first number is the status, which should be @code{211}.  Next is the
13329 total number of articles in the group, the lowest article number, the
13330 highest article number, and finally the group name.  Note that the total
13331 number of articles may be less than one might think while just
13332 considering the highest and lowest article numbers, but some articles
13333 may have been canceled.  Gnus just discards the total-number, so
13334 whether one should take the bother to generate it properly (if that is a
13335 problem) is left as an exercise to the reader.
13336
13337 @example
13338 group-status = [ error / info ] eol
13339 error        = [ "4" / "5" ] 2<number> " " <Error message>
13340 info         = "211 " 3* [ <number> " " ] <string>
13341 @end example
13342
13343
13344 @item (nnchoke-close-group GROUP &optional SERVER)
13345
13346 Close @var{group} and free any resources connected to it.  This will be
13347 a no-op on most backends. 
13348
13349 There should be no data returned.
13350
13351
13352 @item (nnchoke-request-list &optional SERVER)
13353
13354 Return a list of all groups available on @var{server}.  And that means
13355 @emph{all}. 
13356
13357 Here's an example from a server that only carries two groups:
13358
13359 @example
13360 ifi.test 0000002200 0000002000 y
13361 ifi.discussion 3324 3300 n
13362 @end example
13363
13364 On each line we have a group name, then the highest article number in
13365 that group, the lowest article number, and finally a flag.
13366
13367 @example
13368 active-file = *active-line
13369 active-line = name " " <number> " " <number> " " flags eol
13370 name        = <string>
13371 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
13372 @end example
13373
13374 The flag says whether the group is read-only (@samp{n}), is moderated
13375 (@samp{m}), is dead (@samp{x}), is aliased to some other group
13376 (@samp{=other-group} or none of the above (@samp{y}). 
13377
13378
13379 @item (nnchoke-request-post &optional SERVER)
13380
13381 This function should post the current buffer.  It might return whether
13382 the posting was successful or not, but that's not required.  If, for
13383 instance, the posting is done asynchronously, it has generally not been
13384 completed by the time this function concludes.  In that case, this
13385 function should set up some kind of sentinel to beep the user loud and
13386 clear if the posting could not be completed.
13387
13388 There should be no result data from this function. 
13389
13390 @end table
13391
13392
13393 @node Optional Backend Functions
13394 @subsubsection Optional Backend Functions
13395
13396 @table @code
13397
13398 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
13399
13400 @var{groups} is a list of groups, and this function should request data
13401 on all those groups.  How it does it is of no concern to Gnus, but it
13402 should attempt to do this in a speedy fashion.
13403
13404 The return value of this function can be either @code{active} or
13405 @code{group}, which says what the format of the result data is.  The
13406 former is in the same format as the data from
13407 @code{nnchoke-request-list}, while the latter is a buffer full of lines
13408 in the same format as @code{nnchoke-request-group} gives.
13409
13410 @example
13411 group-buffer = *active-line / *group-status
13412 @end example
13413
13414
13415 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
13416
13417 A Gnus group info (@pxref{Group Info}) is handed to the backend for
13418 alterations.  This comes in handy if the backend really carries all the
13419 information (as is the case with virtual an imap groups).  This function
13420 may alter the info in any manner it sees fit, and should return the
13421 (altered) group info.  This function may alter the group info
13422 destructively, so no copying is needed before boogeying. 
13423
13424 There should be no result data from this function.
13425
13426
13427 @item (nnchoke-request-type GROUP &optional ARTICLE)
13428
13429 When the user issues commands for ``sending news'' (@kbd{F} in the
13430 summary buffer, for instance), Gnus has to know whether the article the
13431 user is following up is news or mail.  This function should return
13432 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
13433 is mail and @code{unknown} if the type can't be decided.  (The
13434 @var{article} parameter is necessary in @code{nnvirtual} groups which
13435 might very well combine mail groups and news groups.)  Both @var{group}
13436 and @var{article} may be @code{nil}.
13437
13438 There should be no result data from this function.
13439
13440
13441 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
13442
13443 If the user tries to set a mark that the backend doesn't like, this
13444 function may change the mark.  Gnus will use whatever this function
13445 returns as the mark for @var{article} instead of the original
13446 @var{mark}.  If the backend doesn't care, it must return the original
13447 @var{mark}, and not @code{nil} or any other type of garbage.  
13448
13449 The only use for this that I can see is what @code{nnvirtual} does with
13450 it---if a component group is auto-expirable, marking an article as read
13451 in the virtual group should result in the article being marked as
13452 expirable. 
13453
13454 There should be no result data from this function.
13455
13456
13457 @item (nnchoke-request-scan &optional GROUP SERVER)
13458
13459 This function may be called at any time (by Gnus or anything else) to
13460 request that the backend check for incoming articles, in one way or
13461 another.  A mail backend will typically read the spool file or query the
13462 POP server when this function is invoked.  The @var{group} doesn't have
13463 to be heeded---if the backend decides that it is too much work just
13464 scanning for a single group, it may do a total scan of all groups.  It
13465 would be nice, however, to keep things local if that's practical.
13466
13467 There should be no result data from this function.
13468
13469
13470 @item (nnchoke-request-asynchronous GROUP &optional SERVER ARTICLES)
13471
13472 This is a request to fetch articles asynchronously later.
13473 @var{articles} is an alist of @var{(article-number line-number)}.  One
13474 would generally expect that if one later fetches article number 4, for
13475 instance, some sort of asynchronous fetching of the articles after 4
13476 (which might be 5, 6, 7 or 11, 3, 909 depending on the order in that
13477 alist) would be fetched asynchronously, but that is left up to the
13478 backend.  Gnus doesn't care.
13479
13480 There should be no result data from this function.
13481  
13482
13483 @item (nnchoke-request-group-description GROUP &optional SERVER)
13484
13485 The result data from this function should be a description of
13486 @var{group}. 
13487
13488 @example
13489 description-line = name <TAB> description eol
13490 name             = <string>
13491 description      = <text>
13492 @end example
13493
13494 @item (nnchoke-request-list-newsgroups &optional SERVER)
13495
13496 The result data from this function should be the description of all
13497 groups available on the server.
13498
13499 @example
13500 description-buffer = *description-line
13501 @end example
13502
13503
13504 @item (nnchoke-request-newgroups DATE &optional SERVER)
13505
13506 The result data from this function should be all groups that were
13507 created after @samp{date}, which is in normal human-readable date
13508 format.  The data should be in the active buffer format.
13509
13510
13511 @item (nnchoke-request-create-group GROUP &optional SERVER)
13512
13513 This function should create an empty group with name @var{group}.  
13514
13515 There should be no return data.
13516
13517
13518 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
13519
13520 This function should run the expiry process on all articles in the
13521 @var{articles} range (which is currently a simple list of article
13522 numbers.)  It is left up to the backend to decide how old articles
13523 should be before they are removed by this function.  If @var{force} is
13524 non-@code{nil}, all @var{articles} should be deleted, no matter how new
13525 they are. 
13526
13527 This function should return a list of articles that it did not/was not
13528 able to delete.
13529
13530 There should be no result data returned.
13531
13532
13533 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
13534 &optional LAST)
13535
13536 This function should move @var{article} (which is a number) from
13537 @var{group} by calling @var{accept-form}.  
13538
13539 This function should ready the article in question for moving by
13540 removing any header lines it has added to the article, and generally
13541 should ``tidy up'' the article.  Then it should @code{eval}
13542 @var{accept-form} in the buffer where the ``tidy'' article is.  This
13543 will do the actual copying.  If this @code{eval} returns a
13544 non-@code{nil} value, the article should be removed.
13545
13546 If @var{last} is @code{nil}, that means that there is a high likelihood
13547 that there will be more requests issued shortly, so that allows some
13548 optimizations. 
13549
13550 The function should return a cons where the car is the group name and
13551 the cdr is the article number that the article was entered as.
13552
13553 There should be no data returned. 
13554
13555
13556 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
13557
13558 This function takes the current buffer and inserts it into @var{group}.
13559 If @var{last} in @code{nil}, that means that there will be more calls to
13560 this function in short order.
13561
13562 The function should return a cons where the car is the group name and
13563 the cdr is the article number that the article was entered as.
13564
13565 There should be no data returned.
13566
13567
13568 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
13569
13570 This function should remove @var{article} (which is a number) from
13571 @var{group} and insert @var{buffer} there instead.
13572
13573 There should be no data returned.
13574
13575
13576 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
13577
13578 This function should delete @var{group}.  If @var{force}, it should
13579 really delete all the articles in the group, and then delete the group
13580 itself.  (If there is such a thing as ``the group itself''.)
13581
13582 There should be no data returned.
13583
13584
13585 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
13586
13587 This function should rename @var{group} into @var{new-name}.  All
13588 articles that are in @var{group} should move to @var{new-name}.
13589
13590 There should be no data returned.
13591
13592 @end table
13593
13594
13595 @node Error Messaging
13596 @subsubsection Error Messaging
13597
13598 @findex nnheader-report
13599 @findex nnheader-get-report
13600 The backends should use the function @code{nnheader-report} to report
13601 error conditions---they should not raise errors when they aren't able to
13602 perform a request.  The first argument to this function is the backend
13603 symbol, and the rest are interpreted as arguments to @code{format} if
13604 there are many of them, or just a string if there is one of them.
13605 This function always returns @code{nil}.
13606
13607 @lisp
13608 (nnheader-report 'nnchoke "You did something totally bogus")
13609
13610 (nnheader-report 'nnchoke "Could not request group %s" group)
13611 @end lisp
13612
13613 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
13614 @code{nil} back from a server, and this function returns the most
13615 recently reported message for the backend in question.  This function
13616 takes one argument---the server symbol.
13617
13618 Internally, these function access @var{backend}@code{-status-string}, so
13619 the @code{nnchoke} backend will have its error message stored in
13620 @code{nnchoke-status-string}. 
13621
13622
13623 @node Writing New Backends
13624 @subsubsection Writing New Backends
13625
13626 Many backends are quite similar.  @code{nnml} is just like
13627 @code{nnspool}, but it allows you to edit the articles on the server.
13628 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
13629 and it doesn't maintain overview databases.  @code{nndir} is just like
13630 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
13631 editing articles.
13632
13633 It would make sense if it were possible to ``inherit'' functions from
13634 backends when writing new backends.  And, indeed, you can do that if you
13635 want to.  (You don't have to if you don't want to, of course.)  
13636
13637 All the backends declare their public variables and functions by using a
13638 package called @code{nnoo}.  
13639
13640 To inherit functions from other backends (and allow other backends to
13641 inherit functions from the current backend), you should use the
13642 following macros:
13643 following. 
13644
13645 @table @code
13646
13647 @item nnoo-declare
13648 This macro declares the first parameter to be a child of the subsequent
13649 parameters.  For instance:
13650
13651 @lisp
13652 (nnoo-declare nndir
13653   nnml nnmh)
13654 @end lisp
13655
13656 @code{nndir} has here declared that it intends to inherit functions from
13657 both @code{nnml} and @code{nnmh}.
13658
13659 @item defvoo
13660 This macro is equivalent to @code{defvar}, but registers the variable as
13661 a public server variable.  Most state-oriented variables should be
13662 declared with @code{defvoo} instead of @code{defvar}.  
13663
13664 In addition to the normal @code{defvar} parameters, it takes a list of
13665 variables in the parent backends to map the variable to when executing
13666 a function in those backends.
13667
13668 @lisp
13669 (defvoo nndir-directory nil
13670   "Where nndir will look for groups."
13671   nnml-current-directory nnmh-current-directory)
13672 @end lisp
13673
13674 This means that @code{nnml-current-directory} will be set to
13675 @code{nndir-directory} when an @code{nnml} function is called on behalf
13676 of @code{nndir}.  (The same with @code{nnmh}.)  
13677
13678 @item nnoo-define-basics
13679 This macro defines some common functions that almost all backends should
13680 have.
13681
13682 @example
13683 (nnoo-define-basics nndir)
13684 @end example
13685
13686 @item deffoo
13687 This macro is just like @code{defun} and takes the same parameters.  In
13688 addition to doing the normal @code{defun} things, it registers the
13689 function as being public so that other backends can inherit it.
13690
13691 @item nnoo-map-functions
13692 This macro allows mapping of functions from the current backend to
13693 functions from the parent backends.
13694
13695 @example
13696 (nnoo-map-functions nndir
13697   (nnml-retrieve-headers 0 nndir-current-group 0 0)
13698   (nnmh-request-article 0 nndir-current-group 0 0))
13699 @end example
13700
13701 This means that when @code{nndir-retrieve-headers} is called, the first,
13702 third, and fourth parameters will be passed on to
13703 @code{nnml-retrieve-headers}, while the second parameter is set to the
13704 value of @code{nndir-current-group}.
13705
13706 @item nnoo-import
13707 This macro allows importing functions from backends.  It should be the
13708 last thing in the source file, since it will only define functions that
13709 haven't already been defined.
13710
13711 @example
13712 (nnoo-import nndir
13713   (nnmh
13714    nnmh-request-list
13715    nnmh-request-newgroups)
13716   (nnml))
13717 @end example
13718
13719 This means that calls to @code{nndir-request-list} should just be passed
13720 on to @code{nnmh-request-list}, while all public functions from
13721 @code{nnml} that haven't been defined in @code{nndir} yet should be
13722 defined now.
13723
13724 @end table
13725
13726 Below is a slightly shortened version of the @code{nndir} backend.
13727
13728 @lisp
13729 ;;; nndir.el --- single directory newsgroup access for Gnus
13730 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
13731
13732 ;;; Code:
13733
13734 (require 'nnheader)
13735 (require 'nnmh)
13736 (require 'nnml)
13737 (require 'nnoo)
13738 (eval-when-compile (require 'cl))
13739
13740 (nnoo-declare nndir
13741   nnml nnmh)
13742
13743 (defvoo nndir-directory nil
13744   "Where nndir will look for groups."
13745   nnml-current-directory nnmh-current-directory)
13746
13747 (defvoo nndir-nov-is-evil nil
13748   "*Non-nil means that nndir will never retrieve NOV headers."
13749   nnml-nov-is-evil)
13750
13751 (defvoo nndir-current-group "" nil nnml-current-group nnmh-current-group)
13752 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
13753 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
13754
13755 (defvoo nndir-status-string "" nil nnmh-status-string)
13756 (defconst nndir-version "nndir 1.0")
13757
13758 ;;; Interface functions.
13759
13760 (nnoo-define-basics nndir)
13761
13762 (deffoo nndir-open-server (server &optional defs)
13763   (setq nndir-directory
13764         (or (cadr (assq 'nndir-directory defs))
13765             server))
13766   (unless (assq 'nndir-directory defs)
13767     (push `(nndir-directory ,server) defs))
13768   (push `(nndir-current-group
13769           ,(file-name-nondirectory (directory-file-name nndir-directory)))
13770         defs)
13771   (push `(nndir-top-directory
13772           ,(file-name-directory (directory-file-name nndir-directory)))
13773         defs)
13774   (nnoo-change-server 'nndir server defs))
13775
13776 (nnoo-map-functions nndir
13777   (nnml-retrieve-headers 0 nndir-current-group 0 0)
13778   (nnmh-request-article 0 nndir-current-group 0 0)
13779   (nnmh-request-group nndir-current-group 0 0)
13780   (nnmh-close-group nndir-current-group 0))
13781
13782 (nnoo-import nndir
13783   (nnmh
13784    nnmh-status-message
13785    nnmh-request-list
13786    nnmh-request-newgroups))
13787
13788 (provide 'nndir)
13789 @end lisp
13790
13791
13792 @node Hooking New Backends Into Gnus
13793 @subsubsection Hooking New Backends Into Gnus
13794
13795 @vindex gnus-valid-select-methods
13796 Having Gnus start using your new backend is rather easy---you just
13797 declare it with the @code{gnus-declare-backend} functions.  This will
13798 enter the backend into the @code{gnus-valid-select-methods} variable.
13799
13800 @code{gnus-declare-backend} takes two parameters---the backend name and
13801 an arbitrary number of @dfn{abilities}.
13802
13803 Here's an example:
13804
13805 @lisp
13806 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
13807 @end lisp
13808
13809 The abilities can be:
13810
13811 @table @code
13812 @item mail
13813 This is a mailish backend---followups should (probably) go via mail.
13814 @item post
13815 This is a newsish backend---followups should (probably) go via news. 
13816 @item post-mail
13817 This backend supports both mail and news.
13818 @item none
13819 This is neither a post or mail backend---it's something completely
13820 different. 
13821 @item respool
13822 It supports respooling---or rather, it is able to modify its source
13823 articles and groups.
13824 @item address
13825 The name of the server should be in the virtual server name.  This is
13826 true for almost all backends.
13827 @item prompt-address
13828 The user should be prompted for an address when doing commands like
13829 @kbd{B} in the group buffer.  This is true for backends like
13830 @code{nntp}, but not @code{nnmbox}, for instance. 
13831 @end table
13832
13833
13834
13835 @node Score File Syntax
13836 @subsection Score File Syntax
13837
13838 Score files are meant to be easily parsable, but yet extremely
13839 mallable.   It was decided that something that had the same read syntax
13840 as an Emacs Lisp list would fit that spec.
13841
13842 Here's a typical score file:
13843
13844 @lisp
13845 (("summary"
13846   ("win95" -10000 nil s)
13847   ("Gnus"))
13848  ("from"
13849   ("Lars" -1000))
13850  (mark -100))
13851 @end lisp
13852
13853 BNF definition of a score file:
13854
13855 @example
13856 score-file       = "" / "(" *element ")"
13857 element          = rule / atom
13858 rule             = string-rule / number-rule / date-rule
13859 string-rule      = "(" quote string-header quote space *string-match ")"
13860 number-rule      = "(" quote number-header quote space *number-match ")"
13861 date-rule        = "(" quote date-header quote space *date-match ")"
13862 quote            = <ascii 34>
13863 string-header    = "subject" / "from" / "references" / "message-id" / 
13864                    "xref" / "body" / "head" / "all" / "followup"
13865 number-header    = "lines" / "chars"
13866 date-header      = "date"
13867 string-match     = "(" quote <string> quote [ "" / [ space score [ "" / 
13868                    space date [ "" / [ space string-match-t ] ] ] ] ] ")"
13869 score            = "nil" / <integer>
13870 date             = "nil" / <natural number>
13871 string-match-t   = "nil" / "s" / "substring" / "S" / "Substring" / 
13872                    "r" / "regex" / "R" / "Regex" /
13873                    "e" / "exact" / "E" / "Exact" /
13874                    "f" / "fuzzy" / "F" / "Fuzzy"
13875 number-match     = "(" <integer> [ "" / [ space score [ "" / 
13876                    space date [ "" / [ space number-match-t ] ] ] ] ] ")"
13877 number-match-t   = "nil" / "=" / "<" / ">" / ">=" / "<="
13878 date-match       = "(" quote <string> quote [ "" / [ space score [ "" / 
13879                    space date [ "" / [ space date-match-t ] ] ] ] ")"
13880 date-match-t     = "nil" / "at" / "before" / "after"
13881 atom             = "(" [ required-atom / optional-atom ] ")"
13882 required-atom    = mark / expunge / mark-and-expunge / files /
13883                    exclude-files / read-only / touched
13884 optional-atom    = adapt / local / eval 
13885 mark             = "mark" space nil-or-number
13886 nil-or-number    = "nil" / <integer>
13887 expunge          = "expunge" space nil-or-number
13888 mark-and-expunge = "mark-and-expunge" space nil-or-number
13889 files            = "files" *[ space <string> ]
13890 exclude-files    = "exclude-files" *[ space <string> ]
13891 read-only        = "read-only" [ space "nil" / space "t" ]
13892 adapt            = "adapt" [ space "nil" / space "t" / space adapt-rule ]
13893 adapt-rule       = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
13894 local            = "local" *[ space "(" <string> space <form> ")" ]
13895 eval             = "eval" space <form>
13896 space            = *[ " " / <TAB> / <NEWLINE> ]
13897 @end example
13898
13899 Any unrecognized elements in a score file should be ignored, but not
13900 discarded.  
13901
13902 As you can see, white space is needed, but the type and amount of white
13903 space is irrelevant.  This means that formatting of the score file is
13904 left up to the programmer---if it's simpler to just spew it all out on
13905 one looong line, then that's ok.
13906
13907 The meaning of the various atoms are explained elsewhere in this
13908 manual. 
13909
13910
13911 @node Headers
13912 @subsection Headers
13913
13914 Gnus uses internally a format for storing article headers that
13915 corresponds to the @sc{nov} format in a mysterious fashion.  One could
13916 almost suspect that the author looked at the @sc{nov} specification and
13917 just shamelessly @emph{stole} the entire thing, and one would be right.
13918
13919 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
13920 RFC1036 to talk about lines in the head of an article (eg.,
13921 @code{From}).  It is used by many people as a synonym for
13922 ``head''---``the header and the body''.  (That should be avoided, in my
13923 opinion.)  And Gnus uses a format internally that it calls ``header'',
13924 which is what I'm talking about here.  This is a 9-element vector,
13925 basically, with each header (ouch) having one slot.
13926
13927 These slots are, in order: @code{number}, @code{subject}, @code{from},
13928 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
13929 @code{xref}.  There are macros for accessing and setting these
13930 slots---they all have predictable names beginning with
13931 @code{mail-header-} and @code{mail-header-set-}, respectively.
13932
13933 The @code{xref} slot is really a @code{misc} slot.  Any extra info will
13934 be put in there.
13935
13936
13937 @node Ranges
13938 @subsection Ranges
13939
13940 @sc{gnus} introduced a concept that I found so useful that I've started
13941 using it a lot and have elaborated on it greatly. 
13942
13943 The question is simple: If you have a large amount of objects that are
13944 identified by numbers (say, articles, to take a @emph{wild} example)
13945 that you want to callify as being ``included'', a normal sequence isn't
13946 very useful.  (A 200,000 length sequence is a bit long-winded.)
13947
13948 The solution is as simple as the question: You just collapse the
13949 sequence. 
13950
13951 @example
13952 (1 2 3 4 5 6 10 11 12)
13953 @end example
13954
13955 is transformed into
13956
13957 @example
13958 ((1 . 6) (10 . 12))
13959 @end example
13960
13961 To avoid having those nasty @samp{(13 . 13)} elements to denote a
13962 lonesome object, a @samp{13} is a valid element:
13963
13964 @example
13965 ((1 . 6) 7 (10 . 12))
13966 @end example
13967
13968 This means that comparing two ranges to find out whether they are equal
13969 is slightly tricky:
13970
13971 @example
13972 ((1 . 5) 7 8 (10 . 12))
13973 @end example
13974
13975 and
13976
13977 @example
13978 ((1 . 5) (7 . 8) (10 . 12))
13979 @end example
13980
13981 are equal.  In fact, any non-descending list is a range:
13982
13983 @example
13984 (1 2 3 4 5)
13985 @end example
13986
13987 is a perfectly valid range, although a pretty long-winded one.  This is
13988 also legal:
13989
13990 @example
13991 (1 . 5)
13992 @end example
13993
13994 and is equal to the previous range.
13995
13996 Here's a BNF definition of ranges.  Of course, one must remember the
13997 semantic requirement that the numbers are non-descending.  (Any number
13998 of repetition of the same number is allowed, but apt to disappear in
13999 range handling.)
14000
14001 @example
14002 range           = simple-range / normal-range
14003 simple-range    = "(" number " . " number ")"
14004 normal-range    = "(" start-contents ")"
14005 contents        = "" / simple-range *[ " " contents ] / 
14006                   number *[ " " contents ]
14007 @end example
14008
14009 Gnus currently uses ranges to keep track of read articles and article
14010 marks.  I plan on implementing a number of range operators in C if The
14011 Powers That Be are willing to let me.  (I haven't asked yet, because I
14012 need to do some more thinking on what operators I need to make life
14013 totally range-based without ever having to convert back to normal
14014 sequences.) 
14015
14016
14017 @node Group Info
14018 @subsection Group Info
14019
14020 Gnus stores all permanent info on groups in a @dfn{group info} list.
14021 This list is from three to six elements (or more) long and exhaustively
14022 describes the group.
14023
14024 Here are two example group infos; one is a very simple group while the
14025 second is a more complex one:
14026
14027 @example
14028 ("no.group" 5 (1 . 54324))
14029
14030 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
14031                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
14032                 (nnml "")
14033                 (auto-expire (to-address "ding@@ifi.uio.no")))
14034 @end example
14035
14036 The first element is the group name as Gnus knows the group; the second
14037 is the group level; the third is the read articles in range format; the
14038 fourth is a list of article marks lists; the fifth is the select method;
14039 and the sixth contains the group parameters.
14040
14041 Here's a BNF definition of the group info format:
14042
14043 @example
14044 info          = "(" group space level space read 
14045                 [ "" / [ space marks-list [ "" / [ space method [ "" /
14046                 space parameters ] ] ] ] ] ")" 
14047 group         = quote <string> quote
14048 level         = <integer in the range of 1 to inf>
14049 read          = range
14050 marks-lists   = nil / "(" *marks ")"
14051 marks         = "(" <string> range ")"
14052 method        = "(" <string> *elisp-forms ")"
14053 parameters    = "(" *elisp-forms ")"
14054 @end example
14055
14056 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
14057 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
14058 in pseudo-BNF.
14059
14060
14061 @node Emacs/XEmacs Code
14062 @subsection Emacs/XEmacs Code
14063 @cindex XEmacs
14064 @cindex Emacsen
14065
14066 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
14067 platforms must be the primary one.  I chose Emacs.  Not because I don't
14068 like XEmacs or Mule, but because it comes first alphabetically.
14069
14070 This means that Gnus will byte-compile under Emacs with nary a warning,
14071 while XEmacs will pump out gigabytes of warnings while byte-compiling.
14072 As I use byte-compilation warnings to help me root out trivial errors in
14073 Gnus, that's very useful.  
14074
14075 I've also consistently used Emacs function interfaces, but have used
14076 Gnusey aliases for the functions.  To take an example:  Emacs defines a
14077 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
14078 function.  I then define a function called @code{gnus-run-at-time} that
14079 takes the same parameters as the Emacs @code{run-at-time}.  When running
14080 Gnus under Emacs, the former function is just an alias for the latter.
14081 However, when running under XEmacs, the former is an alias for the
14082 following function:
14083
14084 @lisp
14085 (defun gnus-xmas-run-at-time (time repeat function &rest args)
14086   (start-itimer
14087    "gnus-run-at-time"
14088    `(lambda ()
14089       (,function ,@@args))
14090    time repeat))
14091 @end lisp
14092
14093 This sort of thing has been done for bunches of functions.  Gnus does
14094 not redefine any native Emacs functions while running under XEmacs---it
14095 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
14096 all over.
14097
14098 Of course, I could have chosen XEmacs as my native platform and done
14099 mapping functions the other way around.  But I didn't.  The performance
14100 hit these indirections impose on Gnus under XEmacs should be slight.
14101
14102
14103 @node Various File Formats
14104 @subsection Various File Formats
14105
14106 @menu
14107 * Active File Format::      Information on articles and groups available.
14108 * Newsgroups File Format::  Group descriptions.
14109 @end menu
14110
14111
14112 @node Active File Format
14113 @subsubsection Active File Format
14114
14115 The active file lists all groups that are available on the server in
14116 question.  It also lists the highest and lowest current article numbers
14117 in each group.  
14118
14119 Here's an excerpt from a typical active file:
14120
14121 @example
14122 soc.motss 296030 293865 y
14123 alt.binaries.pictures.fractals 3922 3913 n
14124 comp.sources.unix 1605 1593 m
14125 comp.binaries.ibm.pc 5097 5089 y
14126 no.general 1000 900 y
14127 @end example
14128
14129 Here's a pseudo-BNF definition of this file:
14130
14131 @example
14132 active      = *group-line
14133 group-line  = group space high-number space low-number space flag <NEWLINE>
14134 group       = <non-white-space string>
14135 space       = " "
14136 high-number = <non-negative integer>
14137 low-number  = <positive integer>
14138 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
14139 @end example
14140
14141
14142 @node Newsgroups File Format
14143 @subsubsection Newsgroups File Format
14144
14145 The newsgroups file lists groups along with their descriptions.  Not all
14146 groups on the server have to be listed,  and not all groups in the file
14147 have to exist on the server.  The file is meant purely as information to
14148 the user.
14149
14150 The format is quite simple; a group name, a tab, and the description.
14151 Here's the definition:
14152
14153 @example
14154 newsgroups    = *line
14155 line          = group tab description <NEWLINE>
14156 group         = <non-white-space string>
14157 tab           = <TAB>
14158 description   = <string>
14159 @end example
14160
14161
14162 @node Emacs for Heathens
14163 @section Emacs for Heathens
14164
14165 Believe it or not, but some people who use Gnus haven't really used
14166 Emacs much before they embarked on their journey on the Gnus Love Boat.
14167 If you are one of those unfortunates whom ``@kbd{M-C-a}'', ``kill the
14168 region'', and ``set @code{gnus-flargblossen} to an alist where the key
14169 is a regexp that is used for matching on the group name'' are magical
14170 phrases with little or no meaning, then this appendix is for you.  If
14171 you are already familiar with Emacs, just ignore this and go fondle your
14172 cat instead.
14173
14174 @menu
14175 * Keystrokes::      Entering text and executing commands.
14176 * Emacs Lisp::      The built-in Emacs programming language.
14177 @end menu
14178
14179
14180 @node Keystrokes
14181 @subsection Keystrokes
14182
14183 @itemize @bullet
14184 @item
14185 Q: What is an experienced Emacs user?
14186
14187 @item 
14188 A: A person who wishes that the terminal had pedals.
14189 @end itemize
14190
14191 Yes, when you use Emacs, you are apt to use the control key, the shift
14192 key and the meta key a lot.  This is very annoying to some people
14193 (notably @code{vi}le users), and the rest of us just love the hell out
14194 of it.  Just give up and submit.  Emacs really does stand for
14195 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
14196 may have heard from other disreputable sources (like the Emacs author).
14197
14198 The shift key is normally located near your pinky fingers, and are
14199 normally used to get capital letters and stuff.  You probably use it all
14200 the time.  The control key is normally marked ``CTRL'' or something like
14201 that.  The meta key is, funnily enough, never marked as such on any
14202 keyboards.  The one I'm currently at has a key that's marked ``Alt'',
14203 which is the meta key on this keyboard.  It's usually located somewhere
14204 to the left hand side of the keyboard, usually on the bottom row.
14205
14206 Now, us Emacs people doesn't say ``press the meta-control-m key'',
14207 because that's just too inconvenient.  We say ``press the @kbd{M-C-m}
14208 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
14209 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
14210 down the control key, and hold it down while you press @kbd{k}''.
14211 ``Press @kbd{M-C-k}'' means ``press down and hold down the meta key and
14212 the control key and then press @kbd{k}''.  Simple, ay?
14213
14214 This is somewhat complicated by the fact that not all keyboards have a
14215 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
14216 means ``press escape, release escape, press @kbd{k}''.  That's much more
14217 work than if you have a meta key, so if that's the case, I respectfully
14218 suggest you get a real keyboard with a meta key.  You can't live without
14219 it.
14220
14221
14222
14223 @node Emacs Lisp
14224 @subsection Emacs Lisp
14225
14226 Emacs is the King of Editors because it's really a Lisp interpreter.
14227 Each and every key you tap runs some Emacs Lisp code snippet, and since
14228 Emacs Lisp is an interpreted language, that means that you can configure
14229 any key to run any arbitrary code.  You just, like, do it.
14230
14231 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
14232 functions.  (These are byte-compiled for speed, but it's still
14233 interpreted.)  If you decide that you don't like the way Gnus does
14234 certain things, it's trivial to have it do something a different way.
14235 (Well, at least if you know how to write Lisp code.)  However, that's
14236 beyond the scope of this manual, so we are simply going to talk about
14237 some common constructs that you normally use in your @file{.emacs} file
14238 to customize Gnus.
14239
14240 If you want to set the variable @code{gnus-florgbnize} to four (4), you
14241 write the following:
14242
14243 @lisp
14244 (setq gnus-florgbnize 4)
14245 @end lisp
14246
14247 This function (really ``special form'') @code{setq} is the one that can
14248 set a variable to some value.  This is really all you need to know.  Now
14249 you can go and fill your @code{.emacs} file with lots of these to change
14250 how Gnus works.
14251
14252 If you have put that thing in your @code{.emacs} file, it will be read
14253 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
14254 start Emacs.  If you want to change the variable right away, simply say
14255 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
14256 previous ``form'', which here is a simple @code{setq} statement.
14257
14258 Go ahead---just try it, if you're located at your Emacs.  After you
14259 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
14260 is the return value of the form you @code{eval}ed.
14261
14262 Some pitfalls:
14263
14264 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
14265 that means:
14266
14267 @lisp
14268 (setq gnus-read-active-file 'some)
14269 @end lisp
14270
14271 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
14272 @samp{nntp.ifi.uio.no}'', that means:
14273
14274 @lisp
14275 (setq gnus-nntp-server "nntp.ifi.uio.no")
14276 @end lisp
14277
14278 So be careful not to mix up strings (the latter) with symbols (the
14279 former).  The manual is unambiguous, but it can be confusing.
14280
14281
14282 @include gnus-faq.texi
14283
14284 @node Index
14285 @chapter Index
14286 @printindex cp
14287
14288 @node Key Index
14289 @chapter Key Index
14290 @printindex ky
14291
14292 @summarycontents
14293 @contents
14294 @bye
14295
14296 @iftex
14297 @iflatex
14298 \end{document}
14299 @end iflatex
14300 @end iftex
14301
14302 @c End:
14303