*** empty log message ***
[gnus] / texi / gnus.texi
1 \input texinfo                  @c -*-texinfo-*-
2
3 @setfilename gnus
4 @settitle Red Gnus Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @iftex
9 @finalout
10 @end iftex
11 @setchapternewpage odd
12
13 @iftex
14 @iflatex
15 \documentclass[twoside,a4paper,openright]{book}
16 \usepackage[latin1]{inputenc}
17 % \usepackage{fontenc}
18 % \usepackage{babel}
19 \usepackage{pagestyle}
20 \usepackage{epsfig}
21 % \usepackage{ifitricks}
22 \fontfamily{bembo}\selectfont
23
24 \makeindex
25 \begin{document}
26
27 \newcommand{\gnuschaptername}{}
28 \newcommand{\gnussectionname}{}
29
30 \newcommand{\gnusbackslash}{/}
31
32 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
33 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
34
35 \newcommand{\gnuskindex}[1]{\index{#1}}
36 \newcommand{\gnusindex}[1]{\index{#1}}
37
38 \newcommand{\gnustt}[1]{{\textbf{\textsf{#1}}}}
39 \newcommand{\gnuscode}[1]{\gnustt{#1}}
40 \newcommand{\gnussamp}[1]{``\gnustt{#1}''}
41 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
42 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
43 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
44 \newcommand{\gnusdfn}[1]{\textit{#1}}
45 \newcommand{\gnusi}[1]{\textit{#1}}
46 \newcommand{\gnusstrong}[1]{\textbf{#1}}
47 \newcommand{\gnusemph}[1]{\textit{#1}}
48 \newcommand{\gnusvar}[1]{\textsl{\textsf{#1}}}
49 \newcommand{\gnussc}[1]{\textsc{#1}}
50 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
51 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
52
53 \newcommand{\gnusbullet}{{${\bullet}$}}
54 \newcommand{\gnusdollar}{\$}
55 \newcommand{\gnusampersand}{\&}
56 \newcommand{\gnuspercent}{\%}
57 \newcommand{\gnushash}{\#}
58 \newcommand{\gnushat}{\symbol{"5E}}
59 \newcommand{\gnusunderline}{\symbol{"5F}}
60 \newcommand{\gnustilde}{\symbol{"7E}}
61 \newcommand{\gnusless}{{$<$}}
62 \newcommand{\gnusgreater}{{$>$}}
63
64 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=gnus-head.eps,height=1cm}}}
65 \newcommand{\gnusinteresting}{
66 \marginpar[\hspace{2.5cm}\gnushead]{\gnushead}
67 }
68
69 \newcommand{\gnuschapter}[1]{
70 \renewcommand{\gnussectionname}{}
71 \chapter{#1}
72 \renewcommand{\gnuschaptername}{#1}
73 \thispagestyle{empty}
74 % \epsfig{figure=gnus-herd-\arabic{chapter}.eps,height=15cm}
75 \clearpage
76 }
77
78 \newcommand{\gnusitemx}[1]{\vspace{-\itemsep}\item#1}
79
80 \newcommand{\gnussection}[1]{
81 \renewcommand{\gnussectionname}{#1}
82 \section{#1}
83 }
84
85 \newenvironment{codelist}%
86 {\begin{list}{}{
87 }
88 }{\end{list}}
89
90 \newenvironment{kbdlist}%
91 {\begin{list}{}{
92 \labelwidth=0cm
93 }
94 }{\end{list}}
95
96 \newenvironment{dfnlist}%
97 {\begin{list}{}{
98 }
99 }{\end{list}}
100
101 \newenvironment{stronglist}%
102 {\begin{list}{}{
103 }
104 }{\end{list}}
105
106 \newenvironment{samplist}%
107 {\begin{list}{}{
108 }
109 }{\end{list}}
110
111 \newenvironment{varlist}%
112 {\begin{list}{}{
113 }
114 }{\end{list}}
115
116 \newenvironment{emphlist}%
117 {\begin{list}{}{
118 }
119 }{\end{list}}
120
121 \newpagestyle{gnus}%
122 {
123 {
124 \ifodd\count0
125 {
126 \hspace*{-2ex}
127 \underline{
128 \makebox[\headtextwidth]{
129 \hspace*{-2.3ex}
130 \textbf{\arabic{chapter}.\arabic{section}}
131 \textbf{\gnussectionname\hfill\arabic{page}}
132 }}
133 }
134 \else
135 {
136 \hspace*{-2.25cm}
137 \underline{
138 \hspace*{-2.3ex}
139 \makebox[\headtextwidth]{
140 \textbf{\arabic{page}\hfill\gnuschaptername}
141 }}
142 }
143 \fi
144 }
145 }
146 {
147 \ifodd\count0
148 \mbox{} \hfill 
149 \raisebox{-0.5cm}{\epsfig{figure=gnus-big-logo.eps,height=1cm}}
150 \else
151 \raisebox{-0.5cm}{\epsfig{figure=gnus-big-logo.eps,height=1cm}}
152 \hfill \mbox{}
153 \fi
154 }
155 \pagestyle{gnus}
156
157 @end iflatex
158 @end iftex
159
160 @iftex
161 @iflatex
162 \begin{titlepage}
163 {
164
165 %\addtolength{\oddsidemargin}{-5cm}
166 %\addtolength{\evensidemargin}{-5cm}
167 \parindent=0cm
168 \addtolength{\textheight}{2cm}
169
170 \gnustitle{\gnustitlename}\\
171 \rule{15cm}{1mm}\\
172 \vfill
173 \hspace*{-1cm}\epsfig{figure=gnus-big-logo.eps,height=15cm}
174 \vfill
175 \rule{15cm}{1mm}\\
176 \gnusauthor{by Lars Magne Ingebrigtsen}
177 \newpage
178 }
179
180 \mbox{}
181 \vfill
182
183 \thispagestyle{empty}
184
185 Copyright \copyright{} 1995,96 Free Software Foundation, Inc. 
186
187 Permission is granted to make and distribute verbatim copies of
188 this manual provided the copyright notice and this permission notice
189 are preserved on all copies.
190
191 Permission is granted to copy and distribute modified versions of this
192 manual under the conditions for verbatim copying, provided that the
193 entire resulting derived work is distributed under the terms of a
194 permission notice identical to this one.
195
196 Permission is granted to copy and distribute translations of this manual
197 into another language, under the above conditions for modified versions.
198
199 \newpage
200 \end{titlepage}
201 @end iflatex
202 @end iftex
203
204 @ifinfo
205
206 This file documents Gnus, the GNU Emacs newsreader.
207
208 Copyright (C) 1995,96 Free Software Foundation, Inc.
209
210 Permission is granted to make and distribute verbatim copies of
211 this manual provided the copyright notice and this permission notice
212 are preserved on all copies.
213
214 @ignore
215 Permission is granted to process this file through Tex and print the
216 results, provided the printed document carries copying permission
217 notice identical to this one except for the removal of this paragraph
218 (this paragraph not being relevant to the printed manual).
219
220 @end ignore
221 Permission is granted to copy and distribute modified versions of this
222 manual under the conditions for verbatim copying, provided also that the
223 entire resulting derived work is distributed under the terms of a
224 permission notice identical to this one.
225
226 Permission is granted to copy and distribute translations of this manual
227 into another language, under the above conditions for modified versions.
228 @end ifinfo
229
230 @tex
231
232 @titlepage
233 @title Red Gnus Manual
234
235 @author by Lars Magne Ingebrigtsen
236 @page
237
238 @vskip 0pt plus 1filll
239 Copyright @copyright{} 1995,96 Free Software Foundation, Inc. 
240
241 Permission is granted to make and distribute verbatim copies of
242 this manual provided the copyright notice and this permission notice
243 are preserved on all copies.
244
245 Permission is granted to copy and distribute modified versions of this
246 manual under the conditions for verbatim copying, provided that the
247 entire resulting derived work is distributed under the terms of a
248 permission notice identical to this one.
249
250 Permission is granted to copy and distribute translations of this manual
251 into another language, under the above conditions for modified versions.
252
253 @end titlepage
254 @page
255
256 @end tex
257
258
259 @node Top
260 @top The Gnus Newsreader
261
262 @ifinfo
263
264 You can read news (and mail) from within Emacs by using Gnus.  The news
265 can be gotten by any nefarious means you can think of---@sc{nntp}, local
266 spool or your mbox file.  All at the same time, if you want to push your
267 luck.
268
269 @end ifinfo
270
271 @iftex
272
273 @iflatex
274 \thispagestyle{empty}
275 @end iflatex
276
277 Gnus is the advanced, self-documenting, customizable, extensible
278 unreal-time newsreader for GNU Emacs.  
279
280 Oops.  That sounds oddly familiar, so let's start over again to avoid
281 being accused of plagiarism:
282
283 Gnus is a message-reading laboratory.  It will let you look at just
284 about anything as if it were a newsgroup.  You can read mail with it,
285 you can browse directories with it, you can @code{ftp} with it---you can
286 even read news with it!
287
288 Gnus tries to empower people who read news the same way Emacs empowers
289 people who edit text.  Gnus sets no limits to what the user should be
290 allowed to do.  Users are encouraged to extend Gnus to make it behave
291 like they want it to behave.  A program should not control people;
292 people should be empowered to do what they want by using (or abusing)
293 the program.
294
295 @end iftex
296
297
298 @menu
299 * Starting Up::           Finding news can be a pain.
300 * The Group Buffer::      Selecting, subscribing and killing groups.
301 * The Summary Buffer::    Reading, saving and posting articles.
302 * The Article Buffer::    Displaying and handling articles.
303 * Composing Messages::    Information on sending mail and news.
304 * Select Methods::        Gnus reads all messages from various select methods.
305 * Scoring::               Assigning values to articles.
306 * Various::               General purpose settings.
307 * The End::               Farewell and goodbye.
308 * Appendices::            Terminology, Emacs intro, FAQ, History, Internals.
309 * Index::                 Variable, function and concept index.
310 * Key Index::             Key Index.
311 @end menu
312
313
314 @node Starting Up
315 @chapter Starting Gnus
316 @cindex starting up
317
318 @kindex M-x gnus
319 @findex gnus
320 If your system administrator has set things up properly, starting Gnus
321 and reading news is extremely easy---you just type @kbd{M-x gnus} in
322 your Emacs. 
323
324 @findex gnus-other-frame
325 @kindex M-x gnus-other-frame
326 If you want to start Gnus in a different frame, you can use the command
327 @kbd{M-x gnus-other-frame} instead.
328
329 If things do not go smoothly at startup, you have to twiddle some
330 variables. 
331
332 @menu
333 * Finding the News::    Choosing a method for getting news.
334 * The First Time::      What does Gnus do the first time you start it?
335 * The Server is Down::  How can I read my mail then?
336 * Slave Gnusii::        You can have more than one Gnus active at a time.
337 * Fetching a Group::    Starting Gnus just to read a group.
338 * New Groups::          What is Gnus supposed to do with new groups?
339 * Startup Files::       Those pesky startup files---@file{.newsrc}.
340 * Auto Save::           Recovering from a crash.
341 * The Active File::     Reading the active file over a slow line Takes Time.
342 * Changing Servers::    You may want to move from one server to another.
343 * Startup Variables::   Other variables you might change.
344 @end menu
345
346
347 @node Finding the News
348 @section Finding the News
349
350 @vindex gnus-select-method
351 @c @head
352 The @code{gnus-select-method} variable says where Gnus should look for
353 news.  This variable should be a list where the first element says
354 @dfn{how} and the second element says @dfn{where}.  This method is your
355 native method.  All groups that are not fetched with this method are
356 foreign groups.
357
358 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
359 you want to get your daily dosage of news from, you'd say:
360
361 @lisp
362 (setq gnus-select-method '(nntp "news.somewhere.edu"))
363 @end lisp
364
365 If you want to read directly from the local spool, say:
366
367 @lisp
368 (setq gnus-select-method '(nnspool ""))
369 @end lisp
370
371 If you can use a local spool, you probably should, as it will almost
372 certainly be much faster.
373
374 @vindex gnus-nntpserver-file
375 @cindex NNTPSERVER
376 @cindex @sc{nntp} server
377 If this variable is not set, Gnus will take a look at the
378 @code{NNTPSERVER} environment variable.  If that variable isn't set,
379 Gnus will see whether @code{gnus-nntpserver-file}
380 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
381 that fails as well, Gnus will will try to use the machine that is
382 running Emacs as an @sc{nntp} server.  That's a long-shot, though.
383
384 @vindex gnus-nntp-server
385 If @code{gnus-nntp-server} is set, this variable will override
386 @code{gnus-select-method}.  You should therefore set
387 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
388
389 @vindex gnus-secondary-servers
390 You can also make Gnus prompt you interactively for the name of an
391 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
392 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
393 in the @code{gnus-secondary-servers} list (if any).  You can also just
394 type in the name of any server you feel like visiting.
395
396 @findex gnus-group-browse-foreign-server
397 @kindex B (Group)
398 However, if you use one @sc{nntp} server regularly and are just
399 interested in a couple of groups from a different server, you would be
400 better served by using the @kbd{B} command in the group buffer.  It will
401 let you have a look at what groups are available, and you can subscribe
402 to any of the groups you want to.  This also makes @file{.newsrc}
403 maintenance much tidier.  @xref{Foreign Groups}.
404
405 @vindex gnus-secondary-select-methods
406 @c @head
407 A slightly different approach to foreign groups is to set the
408 @code{gnus-secondary-select-methods} variable.  The select methods
409 listed in this variable are in many ways just as native as the
410 @code{gnus-select-method} server.  They will also be queried for active
411 files during startup (if that's required), and new newsgroups that
412 appear on these servers will be subscribed (or not) just as native
413 groups are.
414
415 For instance, if you use the @code{nnmbox} backend to read your mail, you
416 would typically set this variable to
417
418 @lisp
419 (setq gnus-secondary-select-methods '((nnmbox "")))
420 @end lisp
421
422
423 @node The First Time
424 @section The First Time
425 @cindex first time usage
426
427 If no startup files exist, Gnus will try to determine what groups should
428 be subscribed by default.
429
430 @vindex gnus-default-subscribed-newsgroups
431 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
432 will subscribe you to just those groups in that list, leaving the rest
433 killed.  Your system administrator should have set this variable to
434 something useful.
435
436 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
437 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is here
438 defined as @dfn{whatever Lars thinks you should read}.)
439
440 You'll also be subscribed to the Gnus documentation group, which should
441 help you with most common problems.  
442
443 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
444 use the normal functions for handling new groups, and not do anything
445 special.
446
447
448 @node The Server is Down
449 @section The Server is Down
450 @cindex server errors
451
452 If the default server is down, Gnus will understandably have some
453 problems starting.  However, if you have some mail groups in addition to
454 the news groups, you may want to start Gnus anyway.
455
456 Gnus, being the trusting sort of program, will ask whether to proceed
457 without a native select method if that server can't be contacted.  This
458 will happen whether the server doesn't actually exist (i.e., you have
459 given the wrong address) or the server has just momentarily taken ill
460 for some reason or other.  If you decide to continue and have no foreign
461 groups, you'll find it difficult to actually do anything in the group
462 buffer.  But, hey, that's your problem.  Blllrph!
463
464 @findex gnus-no-server
465 @c @head
466 If you know that the server is definitely down, or you just want to read
467 your mail without bothering with the server at all, you can use the
468 @code{gnus-no-server} command to start Gnus.  That might come in handy
469 if you're in a hurry as well.
470
471
472 @node Slave Gnusii
473 @section Slave Gnusiï
474 @cindex slave
475
476 You might want to run more than one Emacs with more than one Gnus at the
477 same time.  If you are using different @file{.newsrc} files (eg., if you
478 are using the two different Gnusiï to read from two different servers),
479 that is no problem whatsoever.  You just do it.
480
481 The problem appears when you want to run two Gnusiï that use the same
482 @code{.newsrc} file.
483
484 To work around that problem some, we here at the Think-Tank at the Gnus
485 Towers have come up with a new concept: @dfn{Masters} and
486 @dfn{servants}.  (We have applied for a patent on this concept, and have
487 taken out a copyright on those words.  If you wish to use those words in
488 conjunction with each other, you have to send $1 per usage instance to
489 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
490 Applications}) will be much more expensive, of course.)
491
492 Anyways, you start one Gnus up the normal way with @kbd{M-x gnus} (or
493 however you do it).  Each subsequent slave Gnusiï should be started with
494 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
495 files, but instead save @dfn{slave files} that contains information only
496 on what groups have been read in the slave session.  When a master Gnus
497 starts, it will read (and delete) these slave files, incorporating all
498 information from them.  (The slave files will be read in the sequence
499 they were created, so the latest changes will have precedence.)
500
501 Information from the slave files has, of course, precedence over the
502 information in the normal (i. e., master) @code{.newsrc} file.
503
504
505 @node Fetching a Group
506 @section Fetching a Group
507
508 @findex gnus-fetch-group
509 It it sometime convenient to be able to just say ``I want to read this
510 group and I don't care whether Gnus has been started or not''.  This is
511 perhaps more useful for people who write code than for users, but the
512 command @code{gnus-fetch-group} provides this functionality in any case.
513 It takes the group name as a parameter.
514
515
516 @node New Groups
517 @section New Groups
518 @cindex new groups
519
520 @vindex gnus-subscribe-newsgroup-method
521 What Gnus does when it encounters a new group is determined by the
522 @code{gnus-subscribe-newsgroup-method} variable.
523
524 This variable should contain a function.  Some handy pre-fab values
525 are:
526
527 @table @code
528
529 @item gnus-subscribe-zombies
530 @vindex gnus-subscribe-zombies
531 Make all new groups zombies.  You can browse the zombies later (with
532 @kbd{A z}) and either kill them all off properly, or subscribe to them.
533 This is the default.
534
535 @item gnus-subscribe-randomly
536 @vindex gnus-subscribe-randomly
537 Subscribe all new groups randomly.
538
539 @item gnus-subscribe-alphabetically
540 @vindex gnus-subscribe-alphabetically
541 Subscribe all new groups alphabetically.
542
543 @item gnus-subscribe-hierarchically
544 @vindex gnus-subscribe-hierarchically
545 Subscribe all new groups hierarchically.  The difference between this
546 function and @code{gnus-subscribe-alphabetically} is slight.
547 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
548 alphabetical fashion, while this function will enter groups into it's
549 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
550 @samp{comp} hierarchy, this function will not mess that configuration
551 up.  Or something like that.
552
553 @item gnus-subscribe-interactively
554 @vindex gnus-subscribe-interactively
555 Subscribe new groups interactively.  This means that Gnus will ask
556 you about @strong{all} new groups.
557
558 @item gnus-subscribe-killed
559 @vindex gnus-subscribe-killed
560 Kill all new groups.
561
562 @end table
563
564 @vindex gnus-subscribe-hierarchical-interactive
565 A closely related variable is
566 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
567 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
568 hierarchical fashion whether to subscribe to new groups or not.  Gnus
569 will ask you for each sub-hierarchy whether you want to descend the
570 hierarchy or not.  
571
572 One common mistake is to set the variable a few paragraphs above to
573 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
574 will not work.  This is ga-ga.  So don't do it.
575
576 A nice and portable way to control which new newsgroups should be
577 subscribed (or ignored) is to put an @dfn{options} line at the start of
578 the @file{.newsrc} file.  Here's an example:
579
580 @example
581 options -n !alt.all !rec.all sci.all
582 @end example
583
584 @vindex gnus-subscribe-options-newsgroup-method
585 This line obviously belongs to a serious-minded intellectual scientific
586 person (or she may just be plain old boring), because it says that all
587 groups that have names beginning with @samp{alt} and @samp{rec} should
588 be ignored, and all groups with names beginning with @samp{sci} should
589 be subscribed.  Gnus will not use the normal subscription method for
590 subscribing these groups.
591 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
592 variable defaults to @code{gnus-subscribe-alphabetically}.
593
594 @vindex gnus-options-not-subscribe
595 @vindex gnus-options-subscribe
596 If you don't want to mess with your @file{.newsrc} file, you can just
597 set the two variables @code{gnus-options-subscribe} and
598 @code{gnus-options-not-subscribe}.  These two variables do exactly the
599 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
600 and if the the new group matches the former, it will be unconditionally
601 subscribed, and if it matches the latter, it will be ignored.
602
603 @vindex gnus-auto-subscribed-groups
604 Yet another variable that meddles here is
605 @code{gnus-auto-subscribed-groups}.  It works exactly like
606 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
607 thought it would be nice to have two of these.  This variable is more
608 meant for setting some ground rules, while the other variable is used
609 more for user fiddling.  By default this variable makes all new groups
610 that come from mail backends (@code{nnml}, @code{nnbabyl},
611 @code{nnfolder}, @code{nnmbox}, and @code{nnmh}) subscribed.  If you
612 don't like that, just set this variable to @code{nil}.
613
614 @vindex gnus-check-new-newsgroups
615 If you are satisfied that you really never want to see any new groups,
616 you could set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
617 also save you some time at startup.  Even if this variable is
618 @code{nil}, you can always subscribe to the new groups just by pressing
619 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
620 is @code{t} by default.
621
622 Gnus normally determines whether a group is new or not by comparing the
623 list of groups from the active file(s) with the lists of subscribed and
624 dead groups.  This isn't a particularly fast method.  If
625 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
626 server for new groups since the last time.  This is both faster &
627 cheaper.  This also means that you can get rid of the list of killed
628 groups altogether, so you may set @code{gnus-save-killed-list} to
629 @code{nil}, which will save time both at startup, at exit, and all over.
630 Saves disk space, too.  Why isn't this the default, then?
631 Unfortunately, not all servers support this command. 
632
633 I bet I know what you're thinking now: How do I find out whether my
634 server supports @code{ask-server}?  No?  Good, because I don't have a
635 fail-safe answer.  I would suggest just setting this variable to
636 @code{ask-server} and see whether any new groups appear within the next
637 few days.  If any do, then it works.  If any don't, then it doesn't
638 work.  I could write a function to make Gnus guess whether the server
639 supports @code{ask-server}, but it would just be a guess.  So I won't.
640 You could @code{telnet} to the server and say @code{HELP} and see
641 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
642 it does, then it might work.  (But there are servers that lists
643 @samp{NEWGROUPS} without supporting the function properly.)
644
645 This variable can also be a list of select methods.  If so, Gnus will
646 issue an @code{ask-server} command to each of the select methods, and
647 subscribe them (or not) using the normal methods.  This might be handy
648 if you are monitoring a few servers for new groups.  A side effect is
649 that startup will take much longer, so you can meditate while waiting.
650 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
651
652
653 @node Changing Servers
654 @section Changing Servers
655
656 Sometimes it is necessary to move from one @sc{nntp} server to another.
657 This happens very rarely, but perhaps you change jobs, or one server is
658 very flake and you want to use another.  
659
660 Changing the server is pretty easy, right?  You just change
661 @code{gnus-select-method} to point to the new server?  
662
663 @emph{Wrong!}
664
665 Article numbers are not (in any way) kept synchronized between different
666 @sc{nntp} servers, and the only way Gnus keeps track of what articles
667 you have read is by keeping track of article numbers.  So when you
668 change @code{gnus-select-method}, your @file{.newsrc} file becomes
669 worthless.  
670
671 Gnus provides a few functions to attempt to translate a @file{.newsrc}
672 file from one server to another.  They all have one thing in
673 common---they take a looong time to run.  You don't want to use these
674 functions more than absolutely necessary.
675
676 @kindex M-x gnus-change-server
677 @findex gnus-change-server
678 If you have access to both servers, Gnus can request the headers for all
679 the articles you have read and compare @code{Message-ID}s and map
680 reads and article marks.  The @kbd{M-x gnus-change-server} command will
681 do this for all your native groups.  It will prompt for the method you
682 want to move to.
683
684 @kindex M-x gnus-group-move-group-to-server
685 @findex gnus-group-move-group-to-server
686 You can also move individual groups with the @kbd{M-x
687 gnus-group-move-group-to-server} command.  This is useful if you want to
688 move a (foreign) group from one server to another.
689
690
691 @node Startup Files
692 @section Startup Files
693 @cindex startup files
694 @cindex .newsrc
695
696 Now, you all know about the @file{.newsrc} file.  All subscription
697 information is traditionally stored in this file.
698
699 Things got a bit more complicated with @sc{gnus}.  In addition to
700 keeping the @file{.newsrc} file updated, it also used a file called
701 @file{.newsrc.el} for storing all the information that didn't fit into
702 the @file{.newsrc} file.  (Actually, it also duplicated everything in
703 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
704 files was the most recently saved, which enabled people to swap between
705 @sc{gnus} and other newsreaders.
706
707 That was kinda silly, so Gnus went one better: In addition to the
708 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
709 @file{.newsrc.eld}.  It will read whichever of these files that are most
710 recent, but it will never write a @file{.newsrc.el} file.
711
712 @vindex gnus-save-newsrc-file
713 You can turn off writing the @file{.newsrc} file by setting
714 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
715 the file and save some space, as well as making exit from Gnus faster.
716 However, this will make it impossible to use other newsreaders than
717 Gnus.  But hey, who would want to, right?
718
719 @vindex gnus-save-killed-list
720 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
721 will not save the list of killed groups to the startup file.  This will
722 save both time (when starting and quitting) and space (on disk).  It
723 will also means that Gnus has no record of what groups are new or old,
724 so the automatic new groups subscription methods become meaningless.
725 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
726 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
727 Groups}).
728
729 @vindex gnus-startup-file
730 The @code{gnus-startup-file} variable says where the startup files are.
731 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
732 file being whatever that one is with a @samp{.eld} appended.
733
734 @vindex gnus-save-newsrc-hook
735 @vindex gnus-save-quick-newsrc-hook
736 @vindex gnus-save-standard-newsrc-hook
737 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
738 files, while @code{gnus-save-quick-newsrc-hook} is called just before
739 saving the @file{.newsrc.eld} file, and
740 @code{gnus-save-standard-newsrc-hook} is called just before saving the
741 @file{.newsrc} file.  The latter two are commonly used to turn version
742 control on or off.  Version control is off by default when saving the
743 startup files.
744
745 @vindex gnus-init-file
746 When Gnus starts, it will read the @code{gnus-init-file} file, which is
747 @file{~/.gnus.el} by default.  This is a normal Emacs Lisp file and can
748 be used to avoid cluttering your @file{.emacs} file with Gnus stuff.
749
750
751 @node Auto Save
752 @section Auto Save
753 @cindex dribble file
754 @cindex auto-save
755
756 Whenever you do something that changes the Gnus data (reading articles,
757 catching up, killing/subscribing groups), the change is added to a
758 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
759 Emacs way.  If your Emacs should crash before you have saved the
760 @file{.newsrc} files, all changes you have made can be recovered from
761 this file.
762
763 If Gnus detects this file at startup, it will ask the user whether to
764 read it.  The auto save file is deleted whenever the real startup file is
765 saved.
766
767 @vindex gnus-use-dribble-file
768 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
769 maintain a dribble buffer.  The default is @code{t}.
770
771 @vindex gnus-dribble-directory
772 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
773 this variable is @code{nil}, which it is by default, Gnus will dribble
774 into the directory where the @file{.newsrc} file is located.  (This is
775 normally the user's home directory.)  The dribble file will get the same
776 file permissions as the @code{.newsrc} file.
777
778
779 @node The Active File
780 @section The Active File
781 @cindex active file
782 @cindex ignored groups
783
784 When Gnus starts, or indeed whenever it tries to determine whether new
785 articles have arrived, it reads the active file.  This is a very large
786 file that lists all the active groups and articles on the server.
787
788 @vindex gnus-ignored-newsgroups
789 Before examining the active file, Gnus deletes all lines that match the
790 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
791 any groups with bogus names, but you can use this variable to make Gnus
792 ignore hierarchies you aren't ever interested in.  However, this is not
793 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
794 Groups} for an overview of other variables that can be used instead.
795
796 @c This variable is
797 @c @code{nil} by default, and will slow down active file handling somewhat
798 @c if you set it to anything else.
799
800 @vindex gnus-read-active-file
801 @c @head
802 The active file can be rather Huge, so if you have a slow network, you
803 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
804 reading the active file.  This variable is @code{t} by default.
805
806 Gnus will try to make do by getting information just on the groups that
807 you actually subscribe to.
808
809 Note that if you subscribe to lots and lots of groups, setting this
810 variable to @code{nil} will probably make Gnus slower, not faster.  At
811 present, having this variable @code{nil} will slow Gnus down
812 considerably, unless you read news over a 2400 baud modem.  
813
814 This variable can also have the value @code{some}.  Gnus will then
815 attempt to read active info only on the subscribed groups.  On some
816 servers this is quite fast (on sparkling, brand new INN servers that
817 support the @code{LIST ACTIVE group} command), on others this isn't fast
818 at all.  In any case, @code{some} should be faster than @code{nil}, and
819 is certainly faster than @code{t} over slow lines.
820
821 If this variable is @code{nil}, Gnus will ask for group info in total
822 lock-step, which isn't very fast.  If it is @code{some} and you use an
823 @sc{nntp} server, Gnus will pump out commands as fast as it can, and
824 read all the replies in one swoop.  This will normally result in better
825 performance, but if the server does not support the aforementioned
826 @code{LIST ACTIVE group} command, this isn't very nice to the server.
827
828 In any case, if you use @code{some} or @code{nil}, you should definitely
829 kill all groups that you aren't interested in to speed things up.
830
831
832 @node Startup Variables
833 @section Startup Variables
834
835 @table @code
836
837 @item gnus-load-hook
838 @vindex gnus-load-hook
839 A hook that is run while Gnus is being loaded.  Note that this hook will
840 normally be run just once in each Emacs session, no matter how many
841 times you start Gnus.
842
843 @item gnus-startup-hook
844 @vindex gnus-startup-hook
845 A hook that is run after starting up Gnus successfully.
846
847 @item gnus-check-bogus-newsgroups
848 @vindex gnus-check-bogus-newsgroups
849 If non-@code{nil}, Gnus will check for and delete all bogus groups at
850 startup.  A @dfn{bogus group} is a group that you have in your
851 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
852 bogus groups can take quite a while, so to save time and resources it's
853 best to leave this option off, and do the checking for bogus groups once
854 in a while from the group buffer instead (@pxref{Group Maintenance}).
855
856 @item gnus-inhibit-startup-message
857 @vindex gnus-inhibit-startup-message
858 If non-@code{nil}, the startup message won't be displayed.  That way,
859 your boss might not notice that you are reading news instead of doing
860 your job as easily.
861
862 @item gnus-no-groups-message
863 @vindex gnus-no-groups-message
864 Message displayed by Gnus when no groups are available.
865 @end table
866
867
868 @node The Group Buffer
869 @chapter The Group Buffer
870 @cindex group buffer
871
872 The @dfn{group buffer} lists all (or parts) of the available groups.  It
873 is the first buffer shown when Gnus starts, and will never be killed as
874 long as Gnus is active.
875
876 @menu
877 * Group Buffer Format::    Information listed and how you can change it.
878 * Group Maneuvering::      Commands for moving in the group buffer.
879 * Selecting a Group::      Actually reading news.
880 * Subscription Commands::  Unsubscribing, killing, subscribing.
881 * Group Levels::           Levels? What are those, then?
882 * Group Score::            A mechanism for finding out what groups you like.
883 * Marking Groups::         You can mark groups for later processing.
884 * Foreign Groups::         Creating and editing groups.
885 * Group Parameters::       Each group may have different parameters set.
886 * Listing Groups::         Gnus can list various subsets of the groups.
887 * Sorting Groups::         Re-arrange the group order.
888 * Group Maintenance::      Maintaining a tidy @file{.newsrc} file.
889 * Browse Foreign Server::  You can browse a server.  See what it has to offer.
890 * Exiting Gnus::           Stop reading news and get some work done.
891 * Group Topics::           A folding group mode divided into topics.
892 * Misc Group Stuff::       Other stuff that you can to do.
893 @end menu
894
895
896 @node Group Buffer Format
897 @section Group Buffer Format
898 @cindex group buffer format
899
900 @menu 
901 * Group Line Specification::       Deciding how the group buffer is to look.
902 * Group Modeline Specification::   The group buffer modeline.
903 * Group Highlighting::             Having nice colors in the group buffer.
904 @end menu
905
906
907 @node Group Line Specification
908 @subsection Group Line Specification
909
910 The default format of the group buffer is nice and dull, but you can
911 make it as exciting and ugly as you feel like.
912
913 Here's a couple of example group lines:
914
915 @example
916      25: news.announce.newusers
917  *    0: alt.fan.andrea-dworkin
918 @end example
919
920 Quite simple, huh?
921
922 You can see that there are 25 unread articles in
923 @samp{news.announce.newusers}.  There are no unread articles, but some
924 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
925 asterisk at the beginning of the line?)
926
927 @vindex gnus-group-line-format
928 You can change that format to whatever you want by fiddling with the
929 @code{gnus-group-line-format} variable.  This variable works along the
930 lines of a @code{format} specification, which is pretty much the same as
931 a @code{printf} specifications, for those of you who use (feh!) C.
932 @xref{Formatting Variables}. 
933
934 The default value that produced those lines above is 
935 @samp{%M%S%5y: %(%g%)\n}.
936
937 There should always be a colon on the line; the cursor always moves to
938 the colon after performing an operation.  Nothing else is required---not
939 even the group name.  All displayed text is just window dressing, and is
940 never examined by Gnus.  Gnus stores all real information it needs using
941 text properties.
942
943 (Note that if you make a really strange, wonderful, spreadsheet-like
944 layout, everybody will believe you are hard at work with the accounting
945 instead of wasting time reading news.)
946
947 Here's a list of all available format characters:
948
949 @table @samp
950
951 @item M    
952 Only marked articles.
953
954 @item S
955 Whether the group is subscribed.
956
957 @item L    
958 Level of subscribedness.
959
960 @item N
961 Number of unread articles.
962
963 @item I
964 Number of dormant articles.
965
966 @item T
967 Number of ticked articles.
968
969 @item R
970 Number of read articles.
971
972 @item t
973 Estimated total number of articles.  (This is really @var{max-number}
974 minus @var{min-number} plus 1.)
975
976 @item y
977 Number of unread, unticked, non-dormant articles.
978
979 @item i
980 Number of ticked and dormant articles.
981
982 @item g
983 Full group name.
984
985 @item G
986 Group name.
987
988 @item D
989 Newsgroup description.
990
991 @item o
992 @samp{m} if moderated.
993
994 @item O
995 @samp{(m)} if moderated.
996
997 @item s
998 Select method.
999
1000 @item n
1001 Select from where.
1002
1003 @item z
1004 A string that looks like @samp{<%s:%n>} if a foreign select method is
1005 used.
1006
1007 @item P
1008 Indentation based on the level of the topic (@pxref{Group Topics}). 
1009
1010 @item c
1011 @vindex gnus-group-uncollapsed-levels
1012 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1013 variable says how many levels to leave at the end of the group name.
1014 The default is @code{1}.
1015
1016 @item u
1017 User defined specifier.  The next character in the format string should
1018 be a letter.  @sc{gnus} will call the function
1019 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1020 following @samp{%u}.  The function will be passed the current headers as
1021 argument.  The function should return a string, which will be inserted
1022 into the buffer just like information from any other specifier.
1023 @end table
1024
1025 @cindex *
1026 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1027 if no info is available---for instance, if it is a non-activated foreign
1028 group, or a bogus (or semi-bogus) native group.
1029
1030
1031 @node Group Modeline Specification
1032 @subsection Group Modeline Specification
1033
1034 @vindex gnus-group-mode-line-format
1035 The mode line can be changed by setting
1036 @code{gnus-group-mode-line-format} (@pxref{Formatting Variables}).  It
1037 doesn't understand that many format specifiers:
1038
1039 @table @samp
1040 @item S
1041 The native news server.
1042 @item M
1043 The native select method.
1044 @end table
1045
1046
1047 @node Group Highlighting
1048 @subsection Group Highlighting
1049
1050 @vindex gnus-group-highlight
1051 Highlighting in the group buffer is controlled by the
1052 @code{gnus-group-highlight} variable.  This is an alist with elements
1053 that look like @var{(form . face)}.  If @var{form} evaluates to
1054 something non-@code{nil}, the @var{face} will be used on the line.
1055
1056 Here's an example value for this variable that might look nice if the
1057 background is dark:
1058
1059 @lisp
1060 (setq gnus-group-highlight
1061     `(((> unread 200) . 
1062        ,(custom-face-lookup "Red" nil nil t nil nil))
1063       ((and (< level 3) (zerop unread)) . 
1064        ,(custom-face-lookup "SeaGreen" nil nil t nil nil))
1065       ((< level 3) . 
1066        ,(custom-face-lookup "SpringGreen" nil nil t nil nil))
1067       ((zerop unread) . 
1068        ,(custom-face-lookup "SteelBlue" nil nil t nil nil))
1069       (t . 
1070        ,(custom-face-lookup "SkyBlue" nil nil t nil nil))
1071       ))
1072 @end lisp
1073
1074 Variables that are dynamically bound when the forms are evaluated
1075 include:
1076
1077 @table @code
1078 @item group
1079 The group name.
1080 @item unread
1081 The number of unread articles in the group.
1082 @item method
1083 The select method.
1084 @item mailp
1085 Whether the group is a mail group.
1086 @item level
1087 The level of the group.
1088 @item score
1089 The score of the group.
1090 @item ticked 
1091 The number of ticked articles in the group.
1092 @item topic
1093 When using the topic minor mode, this variable is bound to the current
1094 topic being inserted.
1095 @end table
1096
1097 When the forms are @code{eval}ed, point is at the beginning of the line
1098 of the group in question, so you can use many of the normal Gnus
1099 functions for snarfing info on the group.
1100
1101 @vindex gnus-group-update-hook
1102 @findex gnus-group-highlight-line
1103 @code{gnus-group-update-hook} is called when a group line is changed.
1104 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1105 calls @code{gnus-group-highlight-line} by default.
1106
1107
1108 @node Group Maneuvering
1109 @section Group Maneuvering
1110 @cindex group movement
1111
1112 All movement commands understand the numeric prefix and will behave as
1113 expected, hopefully. 
1114
1115 @table @kbd
1116
1117 @item n
1118 @kindex n (Group)
1119 @findex gnus-group-next-unread-group
1120 Go to the next group that has unread articles
1121 (@code{gnus-group-next-unread-group}).
1122
1123 @item p
1124
1125 @itemx DEL
1126 @kindex DEL (Group)
1127 @kindex p (Group)
1128 @findex gnus-group-prev-unread-group
1129 Go to the previous group group that has unread articles
1130 (@code{gnus-group-prev-unread-group}).
1131
1132 @item N
1133 @kindex N (Group)
1134 @findex gnus-group-next-group
1135 Go to the next group (@code{gnus-group-next-group}).
1136
1137 @item P
1138 @kindex P (Group)
1139 @findex gnus-group-prev-group
1140 Go to the previous group (@code{gnus-group-prev-group}).
1141
1142 @item M-p
1143 @kindex M-p (Group)
1144 @findex gnus-group-next-unread-group-same-level
1145 Go to the next unread group on the same level (or lower)
1146 (@code{gnus-group-next-unread-group-same-level}). 
1147
1148 @item M-n
1149 @kindex M-n (Group)
1150 @findex gnus-group-prev-unread-group-same-level
1151 Go to the previous unread group on the same level (or lower)
1152 (@code{gnus-group-prev-unread-group-same-level}). 
1153 @end table
1154
1155 Three commands for jumping to groups:
1156
1157 @table @kbd
1158
1159 @item j
1160 @kindex j (Group)
1161 @findex gnus-group-jump-to-group
1162 Jump to a group (and make it visible if it isn't already)
1163 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
1164 like living groups.
1165
1166 @item ,
1167 @kindex , (Group)
1168 @findex gnus-group-best-unread-group
1169 Jump to the unread group with the lowest level
1170 (@code{gnus-group-best-unread-group}). 
1171
1172 @item .
1173 @kindex . (Group)
1174 @findex gnus-group-first-unread-group
1175 Jump to the first group with unread articles
1176 (@code{gnus-group-first-unread-group}).  
1177 @end table
1178
1179 @vindex gnus-group-goto-unread
1180 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
1181 commands will move to the next group, not the next unread group.  Even
1182 the commands that say they move to the next unread group.  The default
1183 is @code{t}.
1184
1185
1186 @node Selecting a Group
1187 @section Selecting a Group
1188 @cindex group selection
1189
1190 @table @kbd
1191
1192 @item SPACE
1193 @kindex SPACE (Group)
1194 @findex gnus-group-read-group
1195 Select the current group, switch to the summary buffer and display the
1196 first unread article (@code{gnus-group-read-group}).  If there are no
1197 unread articles in the group, or if you give a non-numerical prefix to
1198 this command, Gnus will offer to fetch all the old articles in this
1199 group from the server.  If you give a numerical prefix @var{N}, Gnus
1200 will fetch @var{N} number of articles.  If @var{N} is positive, fetch
1201 the @var{N} newest articles, if @var{N} is negative, fetch the
1202 @var{abs(N)} oldest articles.
1203
1204 @item RET
1205 @kindex RET (Group)
1206 @findex gnus-group-select-group
1207 Select the current group and switch to the summary buffer
1208 (@code{gnus-group-select-group}).  Takes the same arguments as
1209 @code{gnus-group-read-group}---the only difference is that this command
1210 does not display the first unread article automatically upon group
1211 entry. 
1212
1213 @item M-RET
1214 @kindex M-RET (Group)
1215 @findex gnus-group-quick-select-group
1216 This does the same as the command above, but tries to do it with the
1217 minimum amount off fuzz (@code{gnus-group-quick-select-group}).  No
1218 scoring/killing will be performed, there will be no highlights and no
1219 expunging.  This might be useful if you're in a real hurry and have to
1220 enter some humongous group.
1221
1222 @item M-SPACE
1223 @kindex M-RET (Group)
1224 @findex gnus-group-visible-select-group
1225 This is yet one more command that does the same as the one above, but
1226 this one does it without expunging and hiding dormants
1227 (@code{gnus-group-visible-select-group}).  
1228
1229 @item c
1230 @kindex c (Group)
1231 @findex gnus-group-catchup-current
1232 @vindex gnus-group-catchup-group-hook
1233 Mark all unticked articles in this group as read
1234 (@code{gnus-group-catchup-current}).
1235 @code{gnus-group-catchup-group-hook} is when catching up a group from
1236 the group buffer.
1237
1238 @item C
1239 @kindex C (Group)
1240 @findex gnus-group-catchup-current-all
1241 Mark all articles in this group, even the ticked ones, as read
1242 (@code{gnus-group-catchup-current-all}).   
1243 @end table
1244
1245 @vindex gnus-large-newsgroup
1246 The @code{gnus-large-newsgroup} variable says what Gnus should consider
1247 to be a big group.  This is 200 by default.  If the group has more
1248 unread articles than this, Gnus will query the user before entering the
1249 group.  The user can then specify how many articles should be fetched
1250 from the server.  If the user specifies a negative number (@code{-n}),
1251 the @code{n} oldest articles will be fetched.  If it is positive, the
1252 @code{n} articles that have arrived most recently will be fetched.
1253
1254 @vindex gnus-select-group-hook
1255 @vindex gnus-auto-select-first
1256 @code{gnus-auto-select-first} control whether any articles are selected
1257 automatically when entering a group.  
1258
1259 @table @code
1260
1261 @item nil
1262 Don't select any articles when entering the group.  Just display the
1263 full summary buffer.
1264
1265 @item t
1266 Select the first unread article when entering the group.  
1267
1268 @item best
1269 Select the most high-scored article in the group when entering the
1270 group. 
1271 @end table
1272         
1273 If you want to prevent automatic selection in some group (say, in a
1274 binary group with Huge articles) you can set this variable to @code{nil}
1275 in @code{gnus-select-group-hook}, which is called when a group is
1276 selected.
1277
1278
1279 @node Subscription Commands
1280 @section Subscription Commands
1281 @cindex subscribing
1282
1283 @table @kbd
1284
1285 @item S t
1286 @itemx u
1287 @kindex S t (Group)
1288 @kindex u (Group)
1289 @findex gnus-group-unsubscribe-current-group
1290 Toggle subscription to the current group
1291 (@code{gnus-group-unsubscribe-current-group}).  
1292
1293 @item S s
1294 @itemx U
1295 @kindex S s (Group)
1296 @kindex U (Group)
1297 @findex gnus-group-unsubscribe-group
1298 Prompt for a group to subscribe, and then subscribe it.  If it was
1299 subscribed already, unsubscribe it instead
1300 (@code{gnus-group-unsubscribe-group}).
1301
1302 @item S k
1303 @itemx C-k
1304 @kindex S k (Group)
1305 @kindex C-k (Group)
1306 @findex gnus-group-kill-group
1307 Kill the current group (@code{gnus-group-kill-group}).
1308
1309 @item S y
1310 @itemx C-y
1311 @kindex S y (Group)
1312 @kindex C-y (Group)
1313 @findex gnus-group-yank-group
1314 Yank the last killed group (@code{gnus-group-yank-group}).
1315
1316 @item C-x C-t
1317 @kindex C-x C-t (Group)
1318 @findex gnus-group-transpose-groups
1319 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
1320 really a subscription command, but you can use it instead of a
1321 kill-and-yank sequence sometimes.
1322
1323 @item S w
1324 @itemx C-w
1325 @kindex S w (Group)
1326 @kindex C-w (Group)
1327 @findex gnus-group-kill-region
1328 Kill all groups in the region (@code{gnus-group-kill-region}). 
1329
1330 @item S z
1331 @kindex S z (Group)
1332 @findex gnus-group-kill-all-zombies
1333 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
1334
1335 @item S C-k
1336 @kindex S C-k (Group)
1337 @findex gnus-group-kill-level
1338 Kill all groups on a certain level (@code{gnus-group-kill-level}).
1339 These groups can't be yanked back after killing, so this command should
1340 be used with some caution.  The only thing where this command comes in
1341 really handy is when you have a @file{.newsrc} with lots of unsubscribed
1342 groups that you want to get rid off.  @kbd{S C-k} on level @code{7} will
1343 kill off all unsubscribed groups that do not have message numbers in the
1344 @file{.newsrc} file.  
1345
1346 @end table
1347
1348 Also @pxref{Group Levels}.
1349
1350
1351 @node Group Levels
1352 @section Group Levels
1353 @cindex group level
1354
1355 All groups have a level of @dfn{subscribedness}.  For instance, if a
1356 group is on level 2, it is more subscribed than a group on level 5.  You
1357 can ask Gnus to just list groups on a given level or lower
1358 (@pxref{Listing Groups}), or to just check for new articles in groups on
1359 a given level or lower (@pxref{Scanning New Messages}).
1360
1361 Remember:  The higher the level of the group, the less important it is. 
1362
1363 @table @kbd
1364
1365 @item S l
1366 @kindex S l (Group)
1367 @findex gnus-group-set-current-level
1368 Set the level of the current group.  If a numeric prefix is given, the
1369 next @var{n} groups will have their levels set.  The user will be
1370 prompted for a level.
1371 @end table
1372
1373 @vindex gnus-level-killed
1374 @vindex gnus-level-zombie
1375 @vindex gnus-level-unsubscribed
1376 @vindex gnus-level-subscribed
1377 Gnus considers groups on between levels 1 and
1378 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
1379 @code{gnus-level-subscribed} (exclusive) and
1380 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
1381 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
1382 (default 8) and @code{gnus-level-killed} to be killed (default 9),
1383 completely dead.  Gnus treats subscribed and unsubscribed groups exactly
1384 the same, but zombie and killed groups have no information on what
1385 articles you have read, etc, stored.  This distinction between dead and
1386 living groups isn't done because it is nice or clever, it is done purely
1387 for reasons of efficiency.
1388
1389 It is recommended that you keep all your mail groups (if any) on quite
1390 low levels (eg. 1 or 2).
1391
1392 If you want to play with the level variables, you should show some care.
1393 Set them once, and don't touch them ever again.  Better yet, don't touch
1394 them at all unless you know exactly what you're doing.
1395
1396 @vindex gnus-level-default-unsubscribed
1397 @vindex gnus-level-default-subscribed
1398 Two closely related variables are @code{gnus-level-default-subscribed}
1399 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
1400 which are the levels that new groups will be put on if they are
1401 (un)subscribed.  These two variables should, of course, be inside the
1402 relevant legal ranges.
1403
1404 @vindex gnus-keep-same-level
1405 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
1406 will only move to groups that are of the same level (or lower).  In
1407 particular, going from the last article in one group to the next group
1408 will go to the next group of the same level (or lower).  This might be
1409 handy if you want to read the most important groups before you read the
1410 rest.
1411
1412 @vindex gnus-group-default-list-level
1413 All groups with a level less than or equal to
1414 @code{gnus-group-default-list-level} will be listed in the group buffer
1415 by default.
1416
1417 @vindex gnus-group-list-inactive-groups
1418 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
1419 groups will be listed along with the unread groups.  This variable is
1420 @code{t} by default.  If it is @code{nil}, inactive groups won't be
1421 listed. 
1422
1423 @vindex gnus-group-use-permanent-levels
1424 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
1425 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
1426 use this level as the ``work'' level.
1427
1428 @vindex gnus-activate-level
1429 Gnus will normally just activate groups that are on level
1430 @code{gnus-activate-level} or less.  If you don't want to activate
1431 unsubscribed groups, for instance, you might set this variable to
1432 @code{5}. 
1433
1434
1435 @node Group Score
1436 @section Group Score
1437 @cindex group score
1438
1439 You would normally keep important groups on high levels, but that scheme
1440 is somewhat restrictive.  Don't you wish you could have Gnus sort the
1441 group buffer according to how often you read groups, perhaps?  Within
1442 reason?  
1443
1444 This is what @dfn{group score} is for.  You can assign a score to each
1445 group.  You can then sort the group buffer based on this score.
1446 Alternatively, you can sort on score and then level.  (Taken together,
1447 the level and the score is called the @dfn{rank} of the group.  A group
1448 that is on level 4 and has a score of 1 has a higher rank than a group
1449 on level 5 that has a score of 300.  (The level is the most significant
1450 part and the score is the least significant part.)
1451
1452 @findex gnus-summary-bubble-group
1453 If you want groups you read often to get higher scores than groups you
1454 read seldom you can add the @code{gnus-summary-bubble-group} function to
1455 the @code{gnus-summary-exit-hook} hook.  This will result (after
1456 sorting) in a bubbling sort of action.  If you want to see that in
1457 action after each summary exit, you can add
1458 @code{gnus-group-sort-groups-by-rank} or
1459 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
1460 slow things down somewhat.
1461
1462
1463 @node Marking Groups
1464 @section Marking Groups
1465 @cindex marking groups
1466
1467 If you want to perform some command on several groups, and they appear
1468 subsequently in the group buffer, you would normally just give a
1469 numerical prefix to the command.  Most group commands will then do your
1470 bidding on those groups.
1471
1472 However, if the groups are not in sequential order, you can still
1473 perform a command on several groups.  You simply mark the groups first
1474 with the process mark and then execute the command.
1475
1476 @table @kbd
1477
1478 @item #
1479 @kindex # (Group)
1480 @itemx M m
1481 @kindex M m (Group)
1482 @findex gnus-group-mark-group
1483 Set the mark on the current group (@code{gnus-group-mark-group}). 
1484
1485 @item M-#
1486 @kindex M-# (Group)
1487 @itemx M u
1488 @kindex M u (Group)
1489 @findex gnus-group-unmark-group
1490 Remove the mark from the current group
1491 (@code{gnus-group-unmark-group}). 
1492
1493 @item M U
1494 @kindex M U (Group)
1495 @findex gnus-group-unmark-all-groups
1496 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}). 
1497
1498 @item M w
1499 @kindex M w (Group)
1500 @findex gnus-group-mark-region
1501 Mark all groups between point and mark (@code{gnus-group-mark-region}). 
1502
1503 @item M b
1504 @kindex M b (Group)
1505 @findex gnus-group-mark-buffer
1506 Mark all groups in the buffer (@code{gnus-group-mark-buffer}). 
1507
1508 @item M r
1509 @kindex M r (Group)
1510 @findex gnus-group-mark-regexp
1511 Mark all groups that match some regular expression
1512 (@code{gnus-group-mark-regexp}).  
1513 @end table
1514
1515 Also @pxref{Process/Prefix}.
1516
1517 @findex gnus-group-universal-argument
1518 If you want to execute some command on all groups that have been marked
1519 with the process mark, you can use the @kbd{M-&}
1520 (@code{gnus-group-universal-argument}) command.  It will prompt you for
1521 the command to be executed.
1522
1523
1524 @node Foreign Groups
1525 @section Foreign Groups
1526
1527 Here are some group mode commands for making and editing general foreign
1528 groups, as well as commands to ease the creation of a few
1529 special-purpose groups:
1530
1531 @table @kbd
1532
1533 @item G m
1534 @kindex G m (Group)
1535 @findex gnus-group-make-group
1536 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
1537 for a name, a method and possibly an @dfn{address}.  For an easier way
1538 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
1539
1540 @item G r
1541 @kindex G r (Group)
1542 @findex gnus-group-rename-group
1543 Rename the current group to something else
1544 (@code{gnus-group-rename-group}).  This is legal only on some
1545 groups---mail groups mostly.  This command might very well be quite slow
1546 on some backends.
1547
1548 @item G e
1549 @kindex G e (Group)
1550 @findex gnus-group-edit-group-method
1551 Enter a buffer where you can edit the select method of the current
1552 group (@code{gnus-group-edit-group-method}).
1553
1554 @item G p
1555 @kindex G p (Group)
1556 @findex gnus-group-edit-group-parameters
1557 Enter a buffer where you can edit the group parameters
1558 (@code{gnus-group-edit-group-parameters}). 
1559
1560 @item G E
1561 @kindex G E (Group)
1562 @findex gnus-group-edit-group
1563 Enter a buffer where you can edit the group info
1564 (@code{gnus-group-edit-group}).
1565
1566 @item G d
1567 @kindex G d (Group)
1568 @findex gnus-group-make-directory-group
1569 Make a directory group.  You will be prompted for a directory name
1570 (@code{gnus-group-make-directory-group}).  
1571
1572 @item G h 
1573 @kindex G h (Group)
1574 @findex gnus-group-make-help-group
1575 Make the Gnus help group (@code{gnus-group-make-help-group}).
1576
1577 @item G a
1578 @kindex G a (Group)
1579 @findex gnus-group-make-archive-group
1580 @vindex gnus-group-archive-directory
1581 @vindex gnus-group-recent-archive-directory
1582 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
1583 default a group pointing to the most recent articles will be created
1584 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
1585 group will be created from @code{gnus-group-archive-directory}.
1586
1587 @item G k
1588 @kindex G k (Group)
1589 @findex gnus-group-make-kiboze-group
1590 Make a kiboze group.  You will be prompted for a name, for a regexp to
1591 match groups to be ``included'' in the kiboze group, and a series of
1592 strings to match on headers (@code{gnus-group-make-kiboze-group}).
1593 @xref{Kibozed Groups}
1594
1595 @item G D
1596 @kindex G D (Group)
1597 @findex gnus-group-enter-directory
1598 Read an arbitrary directory as if with were a newsgroup with the
1599 @code{nneething} backend (@code{gnus-group-enter-directory}).
1600
1601 @item G f
1602 @kindex G f (Group)
1603 @findex gnus-group-make-doc-group
1604 @cindex ClariNet Briefs
1605 Make a group based on some file or other
1606 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
1607 command, you will be prompted for a file name and a file type.
1608 Currently supported types are @code{babyl}, @code{mbox}, @code{digest},
1609 @code{mmdf}, @code{news}, @code{rnews}, @code{clari-briefs}, and
1610 @code{forward}.  If you run this command without a prefix, Gnus will
1611 guess at the file type.
1612
1613 @item G DEL
1614 @kindex G DEL (Group)
1615 @findex gnus-group-delete-group
1616 This function will delete the current group
1617 (@code{gnus-group-delete-group}).  If given a prefix, this function will
1618 actually delete all the articles in the group, and forcibly remove the
1619 group itself from the face of the Earth.  Use a prefix only if you are
1620 absolutely sure of what you are doing.
1621
1622 @item G V
1623 @kindex G V (Group)
1624 @findex gnus-group-make-empty-virtual
1625 Make a new, fresh, empty @code{nnvirtual} group
1626 (@code{gnus-group-make-empty-virtual}).
1627
1628 @item G v
1629 @kindex G v (Group)
1630 @findex gnus-group-add-to-virtual
1631 Add the current group to an @code{nnvirtual} group
1632 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
1633 @end table
1634
1635 @xref{Select Methods} for more information on the various select
1636 methods. 
1637
1638 @vindex gnus-activate-foreign-newsgroups
1639 If the @code{gnus-activate-foreign-newsgroups} is a positive number,
1640 Gnus will check all foreign groups with this level or lower at startup.
1641 This might take quite a while, especially if you subscribe to lots of
1642 groups from different @sc{nntp} servers.
1643
1644
1645 @node Group Parameters
1646 @section Group Parameters
1647 @cindex group parameters
1648
1649 Gnus stores all information on a group in a list that is usually known
1650 as the @dfn{group info}.  This list has from three to six elements.
1651 Here's an example info.
1652
1653 @lisp
1654 ("nnml:mail.ding" 3 ((1 . 232) 244 (256 . 270)) ((tick 246 249))
1655                   (nnml "private") ((to-address . "ding@@ifi.uio.no")))
1656 @end lisp
1657
1658 The first element is the @dfn{group name}, as Gnus knows the group,
1659 anyway.  The second element is the @dfn{subscription level}, which
1660 normally is a small integer.  The third element is a list of ranges of
1661 read articles.  The fourth element is a list of lists of article marks
1662 of various kinds.  The fifth element is the select method (or virtual
1663 server, if you like).  The sixth element is a list of @dfn{group
1664 parameters}, which is what this section is about.
1665
1666 Any of the last three elements may be missing if they are not required.
1667 In fact, the vast majority of groups will normally only have the first
1668 three elements, which saves quite a lot of cons cells.
1669
1670 The group parameters store information local to a particular group:
1671
1672 @table @code
1673 @item to-address
1674 @cindex to-address
1675 If the group parameter list contains an element that looks like
1676 @code{(to-address .  "some@@where.com")}, that address will be used by
1677 the backend when doing followups and posts.  This is primarily useful in
1678 mail groups that represent closed mailing lists---mailing lists where
1679 it's expected that everybody that writes to the mailing list is
1680 subscribed to it.  Since using this parameter ensures that the mail only
1681 goes to the mailing list itself, it means that members won't receive two
1682 copies of your followups.
1683
1684 Using @code{to-address} will actually work whether the group is foreign
1685 or not.  Let's say there's a group on the server that is called
1686 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
1687 the articles from a mail-to-news gateway.  Posting directly to this
1688 group is therefore impossible---you have to send mail to the mailing
1689 list address instead. 
1690
1691 @item to-list
1692 @cindex to-list
1693 If the group parameter list has an element that looks like
1694 @code{(to-list . "some@@where.com")}, that address will be used when
1695 doing a @kbd{a} in any group.  It is totally ignored when doing a
1696 followup---except that if it is present in a news group, you'll get mail
1697 group semantics when doing @kbd{f}.
1698
1699 @item broken-reply-to
1700 @cindex broken-reply-to
1701 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
1702 headers in this group are to be ignored.  This can be useful if you're
1703 reading a mailing list group where the listserv has inserted
1704 @code{Reply-To} headers that point back to the listserv itself.  This is
1705 broken behavior.  So there!
1706
1707 @item to-group
1708 @cindex to-group
1709 If the group parameter list contains an element like @code{(to-group
1710 . "some.group.name")}, all posts will be sent to that group.
1711
1712 @item auto-expire
1713 @cindex auto-expire
1714 If this symbol is present in the group parameter list, all articles that
1715 are read will be marked as expirable.  For an alternative approach,
1716 @pxref{Expiring Mail}.
1717
1718 @item total-expire
1719 @cindex total-expire
1720 If this symbol is present, all read articles will be put through the
1721 expiry process, even if they are not marked as expirable.  Use with
1722 caution. 
1723
1724 @item expiry-wait
1725 @cindex expiry-wait
1726 @vindex nnmail-expiry-wait-function
1727 If the group parameter has an element that looks like @code{(expiry-wait
1728 . 10)}, this value will override any @code{nnmail-expiry-wait} and
1729 @code{nnmail-expiry-wait-function} when expiring expirable messages.
1730 The value can either be a number of days (not necessarily an integer) or
1731 the symbols @code{never} or @code{immediate}.
1732
1733 @item score-file
1734 @cindex score file group parameter
1735 Elements that look like @code{(score-file . "file")} will make
1736 @file{file} into the current score file for the group in question.  This
1737 means that all score commands you issue will end up in that file. 
1738
1739 @item adapt-file
1740 @cindex adapt file group parameter
1741 Elements that look like @code{(adapt-file . "file")} will make
1742 @file{file} into the current adaptive file for the group in question.
1743 All adaptive score entries will be put into this file.
1744
1745 @item admin-address
1746 When unsubscribing to a mailing list you should never send the
1747 unsubscription notice to the mailing list itself.  Instead, you'd send
1748 messages to the administrative address.  This parameter allows you to
1749 put the admin address somewhere convenient.
1750
1751 @item comment
1752 This parameter allows you to enter a arbitrary comment on the group.
1753
1754 @item @var{(variable form)}
1755 You can use the group parameters to set variables local to the group you
1756 are entering.  Say you want to turn threading off in
1757 @samp{news.answers}.  You'd then put @code{(gnus-show-threads nil)} in
1758 the group parameters of that group.  @code{gnus-show-threads} will be
1759 made into a local variable in the summary buffer you enter, and the form
1760 @code{nil} will be @code{eval}ed there.  
1761
1762 This can also be used as a group-specific hook function, if you'd like.
1763 If you want to hear a beep when you enter the group
1764 @samp{alt.binaries.pictures.furniture}, you could put something like
1765 @code{(dummy-variable (ding))} in the parameters of that group.
1766 @code{dummy-variable} will be set to the result of the @code{(ding)}
1767 form, but who cares?
1768
1769 @end table
1770
1771 Use the @kbd{G p} command to edit group parameters of a group.
1772
1773 Also @xref{Topic Parameters}.
1774
1775
1776 @node Listing Groups
1777 @section Listing Groups
1778 @cindex group listing
1779
1780 These commands all list various slices of the groups that are available.
1781
1782 @table @kbd
1783
1784 @item l
1785 @itemx A s
1786 @kindex A s (Group)
1787 @kindex l (Group)
1788 @findex gnus-group-list-groups
1789 List all groups that have unread articles
1790 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
1791 command will list only groups of level ARG and lower.  By default, it
1792 only lists groups of level five or lower (i.e., just subscribed groups).
1793
1794 @item L
1795 @itemx A u
1796 @kindex A u (Group)
1797 @kindex L (Group)
1798 @findex gnus-group-list-all-groups
1799 List all groups, whether they have unread articles or not
1800 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
1801 this command will list only groups of level ARG and lower.  By default,
1802 it lists groups of level seven or lower (i.e., just subscribed and
1803 unsubscribed groups).
1804
1805 @item A l
1806 @kindex A l (Group)
1807 @findex gnus-group-list-level
1808 List all unread groups on a specific level
1809 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
1810 with no unread articles.
1811
1812 @item A k
1813 @kindex A k (Group)
1814 @findex gnus-group-list-killed
1815 List all killed groups (@code{gnus-group-list-killed}).  If given a
1816 prefix argument, really list all groups that are available, but aren't
1817 currently (un)subscribed.  This could entail reading the active file
1818 from the server.
1819
1820 @item A z
1821 @kindex A z (Group)
1822 @findex gnus-group-list-zombies
1823 List all zombie groups (@code{gnus-group-list-zombies}).
1824
1825 @item A m
1826 @kindex A m (Group)
1827 @findex gnus-group-list-matching
1828 List all unread, subscribed groups with names that match a regexp
1829 (@code{gnus-group-list-matching}). 
1830
1831 @item A M
1832 @kindex A M (Group)
1833 @findex gnus-group-list-all-matching
1834 List groups that match a regexp (@code{gnus-group-list-all-matching}).
1835
1836 @item A A
1837 @kindex A A (Group)
1838 @findex gnus-group-list-active
1839 List absolutely all groups that are in the active file(s) of the
1840 server(s) you are connected to (@code{gnus-group-list-active}).  This
1841 might very well take quite a while.  It might actually be a better idea
1842 to do a @kbd{A m} to list all matching, and just give @samp{.} as the
1843 thing to match on.  Also note that this command may list group that
1844 don't exist (yet)---these will be listed as if they are killed groups.
1845 Take the output with some grains of salt.
1846
1847 @item A a
1848 @kindex A a (Group)
1849 @findex gnus-group-apropos
1850 List all groups that have names that match a regexp
1851 (@code{gnus-group-apropos}).
1852
1853 @item A d
1854 @kindex A d (Group)
1855 @findex gnus-group-description-apropos
1856 List all groups that have names or descriptions that match a regexp
1857 (@code{gnus-group-description-apropos}).
1858
1859 @end table
1860
1861 @vindex gnus-permanently-visible-groups
1862 @cindex visible group parameter
1863 Groups that match the @code{gnus-permanently-visible-groups} regexp will
1864 always be shown, whether they have unread articles or not.  You can also
1865 add the @code{visible} element to the group parameters in question to
1866 get the same effect.
1867
1868 @vindex gnus-list-groups-with-ticked-articles
1869 Groups that have just ticked articles in it are normally listed in the
1870 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
1871 @code{nil}, these groups will be treated just like totally empty
1872 groups.  It is @code{t} by default.
1873
1874
1875 @node Sorting Groups
1876 @section Sorting Groups
1877 @cindex sorting groups
1878
1879 @kindex C-c C-s (Group)
1880 @findex gnus-group-sort-groups
1881 @vindex gnus-group-sort-function
1882 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
1883 group buffer according to the function(s) given by the
1884 @code{gnus-group-sort-function} variable.  Available sorting functions
1885 include: 
1886
1887 @table @code
1888
1889 @item gnus-group-sort-by-alphabet
1890 @findex gnus-group-sort-by-alphabet
1891 Sort the group names alphabetically.  This is the default.
1892
1893 @item gnus-group-sort-by-level
1894 @findex gnus-group-sort-by-level
1895 Sort by group level.
1896
1897 @item gnus-group-sort-by-score
1898 @findex gnus-group-sort-by-score
1899 Sort by group score.
1900
1901 @item gnus-group-sort-by-rank
1902 @findex gnus-group-sort-by-rank
1903 Sort by group score and then the group level.  The level and the score
1904 are, when taken together, the group's @dfn{rank}. 
1905
1906 @item gnus-group-sort-by-unread
1907 @findex gnus-group-sort-by-unread
1908 Sort by number of unread articles.
1909
1910 @item gnus-group-sort-by-method
1911 @findex gnus-group-sort-by-method
1912 Sort by alphabetically on the select method.
1913
1914
1915 @end table
1916
1917 @code{gnus-group-sort-function} can also be a list of sorting
1918 functions.  In that case, the most significant sort key function must be
1919 the last one.
1920
1921
1922 There are also a number of commands for sorting directly according to
1923 some sorting criteria:
1924
1925 @table @kbd
1926 @item G S a
1927 @kindex G S a (Group)
1928 @findex gnus-group-sort-groups-by-alphabet
1929 Sort the group buffer alphabetically by group name
1930 (@code{gnus-group-sort-groups-by-alphabet}). 
1931
1932 @item G S u
1933 @kindex G S u (Group)
1934 @findex gnus-group-sort-groups-by-unread
1935 Sort the group buffer by the number of unread articles
1936 (@code{gnus-group-sort-groups-by-unread}).
1937
1938 @item G S l
1939 @kindex G S l (Group)
1940 @findex gnus-group-sort-groups-by-level
1941 Sort the group buffer by group level
1942 (@code{gnus-group-sort-groups-by-level}). 
1943
1944 @item G S v
1945 @kindex G S v (Group)
1946 @findex gnus-group-sort-groups-by-score
1947 Sort the group buffer by group score
1948 (@code{gnus-group-sort-groups-by-score}). 
1949
1950 @item G S r
1951 @kindex G S r (Group)
1952 @findex gnus-group-sort-groups-by-rank
1953 Sort the group buffer by group level
1954 (@code{gnus-group-sort-groups-by-rank}). 
1955
1956 @item G S m
1957 @kindex G S m (Group)
1958 @findex gnus-group-sort-groups-by-method
1959 Sort the group buffer alphabetically by backend name
1960 (@code{gnus-group-sort-groups-by-method}). 
1961
1962 @end table
1963
1964 When given a prefix, all these commands will sort in reverse order. 
1965
1966
1967 @node Group Maintenance
1968 @section Group Maintenance
1969 @cindex bogus groups
1970
1971 @table @kbd
1972 @item b
1973 @kindex b (Group)
1974 @findex gnus-group-check-bogus-groups
1975 Find bogus groups and delete them
1976 (@code{gnus-group-check-bogus-groups}).
1977
1978 @item F
1979 @kindex F (Group)
1980 @findex gnus-find-new-newsgroups
1981 Find new groups and process them (@code{gnus-find-new-newsgroups}).  If
1982 given a prefix, use the @code{ask-server} method to query the server for
1983 new groups.
1984
1985 @item C-c C-x
1986 @kindex C-c C-x (Group)
1987 @findex gnus-group-expire-articles
1988 Run all expirable articles in the current group through the expiry
1989 process (if any) (@code{gnus-group-expire-articles}).
1990
1991 @item C-c M-C-x
1992 @kindex C-c M-C-x (Group)
1993 @findex gnus-group-expire-all-groups
1994 Run all articles in all groups through the expiry process
1995 (@code{gnus-group-expire-all-groups}).
1996
1997 @end table
1998
1999
2000 @node Browse Foreign Server
2001 @section Browse Foreign Server
2002 @cindex foreign servers
2003 @cindex browsing servers
2004
2005 @table @kbd
2006 @item B
2007 @kindex B (Group)
2008 @findex gnus-group-browse-foreign-server
2009 You will be queried for a select method and a server name.  Gnus will
2010 then attempt to contact this server and let you browse the groups there
2011 (@code{gnus-group-browse-foreign-server}).
2012 @end table
2013
2014 @findex gnus-browse-mode
2015 A new buffer with a list of available groups will appear.  This buffer
2016 will be use the @code{gnus-browse-mode}.  This buffer looks a bit
2017 (well, a lot) like a normal group buffer, but with one major difference
2018 - you can't enter any of the groups.  If you want to read any of the
2019 news available on that server, you have to subscribe to the groups you
2020 think may be interesting, and then you have to exit this buffer.  The
2021 new groups will be added to the group buffer, and then you can read them
2022 as you would any other group.
2023
2024 Future versions of Gnus may possibly permit reading groups straight from
2025 the browse buffer.
2026
2027 Here's a list of keystrokes available in the browse mode:
2028
2029 @table @kbd
2030 @item n
2031 @kindex n (Browse)
2032 @findex gnus-group-next-group
2033 Go to the next group (@code{gnus-group-next-group}).
2034
2035 @item p
2036 @kindex p (Browse)
2037 @findex gnus-group-prev-group
2038 Go to the previous group (@code{gnus-group-prev-group}).
2039
2040 @item SPACE
2041 @kindex SPACE (Browse)
2042 @findex gnus-browse-read-group
2043 Enter the current group and display the first article
2044 (@code{gnus-browse-read-group}). 
2045
2046 @item RET
2047 @kindex RET (Browse)
2048 @findex gnus-browse-select-group
2049 Enter the current group (@code{gnus-browse-select-group}). 
2050
2051 @item u
2052 @kindex u (Browse)
2053 @findex gnus-browse-unsubscribe-current-group
2054 Unsubscribe to the current group, or, as will be the case here,
2055 subscribe to it (@code{gnus-browse-unsubscribe-current-group}). 
2056
2057 @item l
2058 @itemx q
2059 @kindex q (Browse)
2060 @kindex l (Browse)
2061 @findex gnus-browse-exit
2062 Exit browse mode (@code{gnus-browse-exit}).
2063
2064 @item ?
2065 @kindex ? (Browse)
2066 @findex gnus-browse-describe-briefly
2067 Describe browse mode briefly (well, there's not much to describe, is
2068 there) (@code{gnus-browse-describe-briefly}).
2069 @end table
2070
2071
2072 @node Exiting Gnus
2073 @section Exiting Gnus
2074 @cindex exiting Gnus
2075
2076 Yes, Gnus is ex(c)iting.
2077
2078 @table @kbd
2079 @item z
2080 @kindex z (Group)
2081 @findex gnus-group-suspend
2082 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
2083 but it kills all buffers except the Group buffer.  I'm not sure why this
2084 is a gain, but then who am I to judge?
2085
2086 @item q
2087 @kindex q (Group)
2088 @findex gnus-group-exit
2089 Quit Gnus (@code{gnus-group-exit}).
2090
2091 @item Q
2092 @kindex Q (Group)
2093 @findex gnus-group-quit
2094 Quit Gnus without saving any startup files (@code{gnus-group-quit}).
2095 @end table
2096
2097 @vindex gnus-exit-gnus-hook
2098 @vindex gnus-suspend-gnus-hook
2099 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
2100 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
2101 @code{gnus-after-exiting-gnus-hook} is called as the final item when
2102 exiting Gnus.
2103
2104 @findex gnus-unload
2105 @cindex unloading
2106 If you wish to completely unload Gnus and all its adherents, you can use
2107 the @code{gnus-unload} command.  This command is also very handy when
2108 trying to customize meta-variables.
2109
2110 Note:
2111
2112 @quotation
2113 Miss Lisa Cannifax, while sitting in English class, feels her feet go
2114 numbly heavy and herself fall into a hazy trance as the boy sitting
2115 behind her drew repeated lines with his pencil across the back of her
2116 plastic chair.
2117 @end quotation
2118
2119
2120 @node Group Topics
2121 @section Group Topics
2122 @cindex topics
2123
2124 If you read lots and lots of groups, it might be convenient to group
2125 them hierarchically according to topics.  You put your Emacs groups over
2126 here, your sex groups over there, and the rest (what, two groups or so?)
2127 you put in some misc section that you never bother with anyway.  You can
2128 even group the Emacs sex groups as a sub-topic to either the Emacs
2129 groups or the sex groups---or both!  Go wild!
2130
2131 @findex gnus-topic-mode
2132 @kindex t (Group)
2133 To get this @emph{fab} functionality you simply turn on (ooh!) the
2134 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
2135 is a toggling command.)
2136
2137 Go ahead, just try it.  I'll still be here when you get back.  La de
2138 dum...  Nice tune, that...  la la la...  What, you're back? Yes, and now
2139 press @kbd{l}.  There.  All your groups are now listed under
2140 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
2141 bothered?
2142
2143 If you want this permanently enabled, you should add that minor mode to
2144 the hook for the group mode:
2145
2146 @lisp
2147 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
2148 @end lisp
2149
2150 @menu 
2151 * Topic Variables::    How to customize the topics the Lisp Way.
2152 * Topic Commands::     Interactive E-Z commands.
2153 * Topic Topology::     A map of the world.
2154 * Topic Parameters::   Parameters that apply to all groups in a topic.
2155 @end menu
2156
2157
2158 @node Topic Variables
2159 @subsection Topic Variables
2160 @cindex topic variables
2161
2162 Now, if you select a topic, if will fold/unfold that topic, which is
2163 really neat, I think.
2164
2165 @vindex gnus-topic-line-format
2166 The topic lines themselves are created according to the
2167 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
2168 Legal elements are:
2169
2170 @table @samp
2171 @item i
2172 Indentation.
2173 @item n
2174 Topic name.
2175 @item v
2176 Visibility.
2177 @item l
2178 Level.
2179 @item g
2180 Number of groups in the topic.
2181 @item a
2182 Number of unread articles in the topic.
2183 @item A 
2184 Number of unread articles in the topic and all its subtopics. 
2185 @end table
2186
2187 @vindex gnus-topic-indent-level
2188 Each sub-topic (and the groups in the sub-topics) will be indented with
2189 @code{gnus-topic-indent-level} times the topic level number of spaces.
2190 The default is @code{2}.
2191
2192 @vindex gnus-topic-mode-hook
2193 @code{gnus-topic-mode-hook} is called in topic minor mode buffers. 
2194
2195
2196 @node Topic Commands
2197 @subsection Topic Commands
2198 @cindex topic commands
2199
2200 When the topic minor mode is turned on, a new @kbd{T} submap will be
2201 available.  In addition, a few of the standard keys change their
2202 definitions slightly.
2203
2204 @table @kbd
2205
2206 @item T n
2207 @kindex T n (Topic)
2208 @findex gnus-topic-create-topic
2209 Prompt for a new topic name and create it 
2210 (@code{gnus-topic-create-topic}). 
2211
2212 @item T m
2213 @kindex T m (Topic)
2214 @findex gnus-topic-move-group
2215 Move the current group to some other topic
2216 (@code{gnus-topic-move-group}).  This command understands the
2217 process/prefix convention (@pxref{Process/Prefix}).
2218
2219 @item T c
2220 @kindex T c (Topic)
2221 @findex gnus-topic-copy-group
2222 Copy the current group to some other topic
2223 (@code{gnus-topic-copy-group}).  This command understands the
2224 process/prefix convention (@pxref{Process/Prefix}).
2225
2226 @item T D
2227 @kindex T D (Topic)
2228 @findex gnus-topic-remove-group
2229 Remove a group from the current topic (@code{gnus-topic-remove-group}).
2230 This command understands the process/prefix convention
2231 (@pxref{Process/Prefix}).
2232
2233 @item T M
2234 @kindex T M (Topic)
2235 @findex gnus-topic-move-matching
2236 Move all groups that match some regular expression to a topic
2237 (@code{gnus-topic-move-matching}). 
2238
2239 @item T C
2240 @kindex T C (Topic)
2241 @findex gnus-topic-copy-matching
2242 Copy all groups that match some regular expression to a topic
2243 (@code{gnus-topic-copy-matching}). 
2244
2245 @item T #
2246 @kindex T # (Topic)
2247 @findex gnus-topic-mark-topic
2248 Mark all groups in the current topic with the process mark
2249 (@code{gnus-topic-mark-topic}). 
2250
2251 @item T M-#
2252 @kindex T M-# (Topic)
2253 @findex gnus-topic-unmark-topic
2254 Remove the process mark from all groups in the current topic
2255 (@code{gnus-topic-unmark-topic}). 
2256
2257 @item RET
2258 @kindex RET (Topic)
2259 @findex gnus-topic-select-group
2260 @itemx SPACE
2261 Either select a group or fold a topic (@code{gnus-topic-select-group}).
2262 When you perform this command on a group, you'll enter the group, as
2263 usual.  When done on a topic line, the topic will be folded (if it was
2264 visible) or unfolded (if it was folded already).  So it's basically a
2265 toggling command on topics.  In addition, if you give a numerical
2266 prefix, group on that level (and lower) will be displayed.
2267
2268 @item T TAB
2269 @kindex T TAB (Topic)
2270 @findex gnus-topic-indent
2271 ``Indent'' the current topic so that it becomes a sub-topic of the
2272 previous topic (@code{gnus-topic-indent}).  If given a prefix,
2273 ``un-indent'' the topic instead.
2274
2275 @item C-k
2276 @kindex C-k (Topic)
2277 @findex gnus-topic-kill-group
2278 Kill a group or topic (@code{gnus-topic-kill-group}).  
2279
2280 @item C-y
2281 @kindex C-y (Topic)
2282 @findex gnus-topic-yank-group
2283 Yank the previously killed group or topic (@code{gnus-topic-yank-group}).
2284 Note that all topics will be yanked before all groups.
2285
2286 @item T r
2287 @kindex T r (Topic)
2288 @findex gnus-topic-rename
2289 Rename a topic (@code{gnus-topic-rename}). 
2290
2291 @item T DEL
2292 @kindex T DEL (Topic)
2293 @findex gnus-topic-delete
2294 Delete an empty topic (@code{gnus-topic-delete}). 
2295
2296 @item A T
2297 @kindex A T (Topic)
2298 @findex gnus-topic-list-active
2299 List all groups that Gnus knows about in a topics-ified way
2300 (@code{gnus-topic-list-active}).
2301
2302 @item G p
2303 @kindex G p (Topic)
2304 @findex gnus-topic-edit-parameters
2305 @cindex group parameters
2306 @cindex topic parameters
2307 @cindex parameters
2308 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
2309 @xref{Topic Parameters}.
2310
2311 @end table
2312
2313
2314 @node Topic Topology
2315 @subsection Topic Topology
2316 @cindex topic topology
2317 @cindex topology
2318
2319 So, let's have a look at an example group buffer:
2320
2321 @example
2322 Gnus
2323   Emacs -- I wuw it!
2324      3: comp.emacs
2325      2: alt.religion.emacs
2326     Naughty Emacs
2327      452: alt.sex.emacs
2328        0: comp.talk.emacs.recovery
2329   Misc
2330      8: comp.binaries.fractals
2331     13: comp.sources.unix
2332 @end example
2333
2334 So, here we have one top-level topic, two topics under that, and one
2335 sub-topic under one of the sub-topics.  (There is always just one (1)
2336 top-level topic).  This topology can be expressed as follows:
2337
2338 @lisp
2339 (("Gnus" visible)
2340  (("Emacs -- I wuw it!" visible) 
2341   (("Naughty Emacs" visible)))
2342  (("Misc" visible)))
2343 @end lisp
2344
2345 @vindex gnus-topic-topology
2346 This is in fact how the variable @code{gnus-topic-topology} would look
2347 for the display above.  That variable is saved in the @file{.newsrc.eld}
2348 file, and shouldn't be messed with manually---unless you really want
2349 to.  Since this variable is read from the @file{.newsrc.eld} file,
2350 setting it in any other startup files will have no effect.  
2351
2352 This topology shows what topics are sub-topics of what topics (right),
2353 and which topics are visible.  Two settings are currently
2354 allowed---@code{visible} and @code{invisible}.
2355
2356
2357 @node Topic Parameters
2358 @subsection Topic Parameters
2359
2360 All groups in a topic will inherit group parameters from the parent (and
2361 ancestor) topic parameters.  All legal group parameters are legal topic
2362 parameters (@pxref{Group Parameters}).  
2363
2364 Group parameters (of course) override topic parameters, and topic
2365 parameters in sub-topics override topic parameters in super-topics.  You
2366 know.  Normal inheretance rules.  (@dfn{Rules} is here a noun, not a
2367 verb, although you may feel free to disagree with me here.)
2368
2369 @example
2370 Gnus
2371   Emacs
2372      3: comp.emacs
2373      2: alt.religion.emacs
2374    452: alt.sex.emacs
2375     Relief
2376      452: alt.sex.emacs
2377        0: comp.talk.emacs.recovery
2378   Misc
2379      8: comp.binaries.fractals
2380     13: comp.sources.unix
2381    452: alt.sex.emacs
2382 @end example
2383
2384 Now, the @samp{Emacs} topic has the topic parameter 
2385 @code{(score-file . "emacs.SCORE")}; the @samp{Relief} topic has the topic
2386 parameter @code{(score-file . "relief.SCORE")}; and the @samp{Misc}
2387 topic has the topic parameter @code{(score-file . "emacs.SCORE")}.  In
2388 addition, @samp{alt.religion.emacs} has the group parameter
2389 @code{(score-file . "religion.SCORE")}.
2390
2391 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
2392 will get the @file{relief.SCORE} home score file.  If you enter the same
2393 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
2394 score file.  If you enter @samp{alt.religion.emacs}, you'll get the
2395 @file{religion.SCORE} home score file.  
2396
2397 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
2398 there are some problems, especially with the @code{total-expiry}
2399 parameter.  Say you have a mail group in two topics; one with
2400 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
2401 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
2402 of these topics you mean to expire articles from, so anything may
2403 happen.  In fact, I hereby declare that it is @dfn{undefined} what
2404 happens.  You just have to be careful if you do stuff like that.
2405
2406
2407 @node Misc Group Stuff
2408 @section Misc Group Stuff
2409
2410 @menu
2411 * Scanning New Messages:: Asking Gnus to see whether new messages have arrived.
2412 * Group Information::     Information and help on groups and Gnus.
2413 * File Commands::         Reading and writing the Gnus files.
2414 @end menu
2415
2416 @table @kbd
2417
2418 @item ^
2419 @kindex ^ (Group)
2420 @findex gnus-group-enter-server-mode
2421 Enter the server buffer (@code{gnus-group-enter-server-mode}). @xref{The
2422 Server Buffer}.
2423
2424 @item a
2425 @kindex a (Group)
2426 @findex gnus-group-post-news
2427 Post an article to a group (@code{gnus-group-post-news}).  The current
2428 group name will be used as the default.
2429
2430 @item m
2431 @kindex m (Group)
2432 @findex gnus-group-mail
2433 Mail a message somewhere (@code{gnus-group-mail}).
2434
2435 @end table
2436
2437 Variables for the group buffer:
2438
2439 @table @code
2440
2441 @item gnus-group-mode-hook
2442 @vindex gnus-group-mode-hook
2443 @code{gnus-group-mode-hook} is called after the group buffer has been
2444 created. 
2445
2446 @item gnus-group-prepare-hook
2447 @vindex gnus-group-prepare-hook
2448 @code{gnus-group-prepare-hook} is called after the group buffer is
2449 generated.  It may be used to modify the buffer in some strange,
2450 unnatural way.
2451
2452 @item gnus-permanently-visible-groups
2453 @vindex gnus-permanently-visible-groups
2454 Groups matching this regexp will always be listed in the group buffer,
2455 whether they are empty or not.
2456
2457 @end table
2458
2459
2460 @node Scanning New Messages
2461 @subsection Scanning New Messages
2462 @cindex new messages
2463 @cindex scanning new news
2464
2465 @table @kbd
2466
2467 @item g
2468 @kindex g (Group)
2469 @findex gnus-group-get-new-news
2470 Check the server(s) for new articles.  If the numerical prefix is used,
2471 this command will check only groups of level @var{arg} and lower
2472 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
2473 command will force a total rereading of the active file(s) from the
2474 backend(s).
2475
2476 @item M-g
2477 @kindex M-g (Group)
2478 @findex gnus-group-get-new-news-this-group
2479 @vindex gnus-goto-next-group-when-activating
2480 Check whether new articles have arrived in the current group
2481 (@code{gnus-group-get-new-news-this-group}).  The
2482 @code{gnus-goto-next-group-when-activating} variable controls whether
2483 this command is to move point to the next group or not.  It is @code{t}
2484 by default.
2485
2486 @findex gnus-activate-all-groups
2487 @cindex activating groups
2488 @item C-c M-g
2489 @kindex C-c M-g (Group)
2490 Activate absolutely all groups (@code{gnus-activate-all-groups}). 
2491
2492 @item R
2493 @kindex R (Group)
2494 @cindex restarting
2495 @findex gnus-group-restart
2496 Restart Gnus (@code{gnus-group-restart}).
2497
2498 @end table
2499
2500 @vindex gnus-get-new-news-hook
2501 @code{gnus-get-new-news-hook} is run just before checking for new news. 
2502
2503 @vindex gnus-after-getting-new-news-hook
2504 @code{gnus-after-getting-new-news-hook} is run after checking for new
2505 news.
2506
2507
2508 @node Group Information
2509 @subsection Group Information
2510 @cindex group information
2511 @cindex information on groups
2512
2513 @table @kbd
2514
2515 @item M-f
2516 @kindex M-f (Group)
2517 @findex gnus-group-fetch-faq
2518 @cindex FAQ
2519 @cindex ange-ftp
2520 Try to fetch the FAQ for the current group
2521 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
2522 @code{gnus-group-faq-directory}, which is usually a directory on a
2523 remote machine.  @code{ange-ftp} will be used for fetching the file.
2524
2525 @item D
2526 @kindex D (Group)
2527 @cindex describing groups
2528 @cindex group description
2529 @findex gnus-group-describe-group
2530 Describe the current group (@code{gnus-group-describe-group}).  If given
2531 a prefix, force Gnus to re-read the description from the server.
2532
2533 @item M-d
2534 @kindex M-d (Group)
2535 @findex gnus-group-describe-all-groups
2536 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
2537 prefix, force Gnus to re-read the description file from the server.
2538
2539 @item V
2540 @kindex V (Group)
2541 @cindex version
2542 @findex gnus-version
2543 Display current Gnus version numbers (@code{gnus-version}).
2544
2545 @item ?
2546 @kindex ? (Group)
2547 @findex gnus-group-describe-briefly
2548 Give a very short help message (@code{gnus-group-describe-briefly}).
2549
2550 @item C-c C-i
2551 @kindex C-c C-i (Group)
2552 @cindex info
2553 @cindex manual
2554 @findex gnus-info-find-node
2555 Go to the Gnus info node (@code{gnus-info-find-node}).
2556 @end table
2557
2558
2559 @node File Commands
2560 @subsection File Commands
2561 @cindex file commands
2562
2563 @table @kbd
2564
2565 @item r
2566 @kindex r (Group)
2567 @findex gnus-group-read-init-file
2568 @vindex gnus-init-file
2569 @cindex reading init file
2570 Read the init file (@code{gnus-init-file}, which defaults to
2571 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
2572
2573 @item s
2574 @kindex s (Group)
2575 @findex gnus-group-save-newsrc
2576 @cindex saving .newsrc
2577 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
2578 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
2579 file(s) whether Gnus thinks it is necessary or not.
2580
2581 @c @item Z
2582 @c @kindex Z (Group)
2583 @c @findex gnus-group-clear-dribble
2584 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
2585
2586 @end table
2587
2588
2589 @node The Summary Buffer
2590 @chapter The Summary Buffer
2591 @cindex summary buffer
2592
2593 A line for each article is displayed in the summary buffer.  You can
2594 move around, read articles, post articles and reply to articles.
2595
2596 @menu
2597 * Summary Buffer Format::       Deciding how the summary buffer is to look.
2598 * Summary Maneuvering::         Moving around the summary buffer.
2599 * Choosing Articles::           Reading articles.
2600 * Paging the Article::          Scrolling the current article.
2601 * Reply Followup and Post::     Posting articles.
2602 * Canceling and Superseding::   ``Whoops, I shouldn't have called him that.''
2603 * Marking Articles::            Marking articles as read, expirable, etc.
2604 * Limiting::                    You can limit the summary buffer.
2605 * Threading::                   How threads are made.
2606 * Sorting::                     How articles and threads are sorted.
2607 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
2608 * Article Caching::             You may store articles in a cache.
2609 * Persistent Articles::         Making articles expiry-resistant.
2610 * Article Backlog::             Having already read articles hang around.
2611 * Saving Articles::             Ways of customizing article saving.
2612 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
2613 * Article Treatment::           The article buffer can be mangled at will.
2614 * Summary Sorting::             Sorting the summary buffer in various ways.
2615 * Finding the Parent::          No child support? Get the parent.
2616 * Alternative Approaches::      Reading using non-default summaries.
2617 * Tree Display::                A more visual display of threads.
2618 * Mail Group Commands::         Some commands can only be used in mail groups.
2619 * Various Summary Stuff::       What didn't fit anywhere else.
2620 * Exiting the Summary Buffer::  Returning to the Group buffer.
2621 * Crosspost Handling::          How crossposted articles are dealt with.
2622 * Duplicate Suppression::       An alternative when crosspost handling fails.
2623 @end menu
2624
2625
2626 @node Summary Buffer Format
2627 @section Summary Buffer Format
2628 @cindex summary buffer format
2629
2630 @menu
2631 * Summary Buffer Lines::     You can specify how summary lines should look.
2632 * Summary Buffer Mode Line:: You can say how the mode line should look.
2633 * Summary Highlighting::     Making the summary buffer all pretty and nice.
2634 @end menu
2635
2636 @findex mail-extract-address-components
2637 @findex gnus-extract-address-components
2638 @vindex gnus-extract-address-components
2639 Gnus will use the value of the @code{gnus-extract-address-components}
2640 variable as a function for getting the name and address parts of a
2641 @code{From} header.  Two pre-defined function exist:
2642 @code{gnus-extract-address-components}, which is the default, quite
2643 fast, and too simplistic solution; and
2644 @code{mail-extract-address-components}, which works very nicely, but is
2645 slower.  The default function will return the wrong answer in 5% of the
2646 cases.  If this is unacceptable to you, use the other function instead.
2647
2648 @vindex gnus-summary-same-subject
2649 @code{gnus-summary-same-subject} is a string indicating that the current
2650 article has the same subject as the previous.  This string will be used
2651 with those specs that require it.  The default is @samp{}.
2652
2653
2654 @node Summary Buffer Lines
2655 @subsection Summary Buffer Lines
2656
2657 @vindex gnus-summary-line-format
2658 You can change the format of the lines in the summary buffer by changing
2659 the @code{gnus-summary-line-format} variable.  It works along the same
2660 lines a a normal @code{format} string, with some extensions
2661 (@pxref{Formatting Variables}).
2662
2663 The default string is @samp{%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n}.
2664
2665 The following format specification characters are understood:
2666
2667 @table @samp
2668 @item N 
2669 Article number.
2670 @item S
2671 Subject string.
2672 @item s
2673 Subject if the article is the root or the previous article had a
2674 different subject, @code{gnus-summary-same-subject} otherwise.
2675 (@code{gnus-summary-same-subject} defaults to @samp{}.)
2676 @item F
2677 Full @code{From} header.
2678 @item n
2679 The name (from the @code{From} header).
2680 @item a
2681 The name (from the @code{From} header).  This differs from the @code{n}
2682 spec in that it uses @code{gnus-extract-address-components}, which is
2683 slower, but may be more thorough.
2684 @item A
2685 The address (from the @code{From} header).  This works the same way as
2686 the @code{a} spec.
2687 @item L
2688 Number of lines in the article.
2689 @item c
2690 Number of characters in the article.
2691 @item I
2692 Indentation based on thread level (@pxref{Customizing Threading}).
2693 @item T
2694 Nothing if the article is a root and lots of spaces if it isn't (it
2695 pushes everything after it off the screen).
2696 @item \[
2697 Opening bracket, which is normally @samp{\[}, but can also be @samp{<}
2698 for adopted articles (@pxref{Customizing Threading}).
2699 @item \]
2700 Closing bracket, which is normally @samp{\]}, but can also be @samp{>}
2701 for adopted articles.
2702 @item >
2703 One space for each thread level.
2704 @item <
2705 Twenty minus thread level spaces.
2706 @item U
2707 Unread.
2708 @item R
2709 Replied.
2710 @item i
2711 Score as a number.
2712 @item z
2713 @vindex gnus-summary-zcore-fuzz
2714 Zcore, @samp{+} if above the default level and @samp{-} if below the
2715 default level.  If the difference between
2716 @code{gnus-summary-default-level} and the score is less than
2717 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
2718 @item V
2719 Total thread score.
2720 @item x
2721 @code{Xref}.
2722 @item D
2723 @code{Date}.
2724 @item d
2725 The @code{Date} in @code{YY-MMM} format.
2726 @item o
2727 The @code{Date} in @code{YYMMDD-HH:MM:SS} format.
2728 @item M
2729 @code{Message-ID}.
2730 @item r
2731 @code{References}.
2732 @item t
2733 Number of articles in the current sub-thread.  Using this spec will slow
2734 down summary buffer generation somewhat.
2735 @item e
2736 A single character will be displayed if the article has any children. 
2737 @item P
2738 The line number.
2739 @item u
2740 User defined specifier.  The next character in the format string should
2741 be a letter.  @sc{gnus} will call the function
2742 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
2743 following @samp{%u}.  The function will be passed the current header as
2744 argument.  The function should return a string, which will be inserted
2745 into the summary just like information from any other summary specifier.
2746 @end table
2747
2748 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
2749 have to be handled with care.  For reasons of efficiency, Gnus will
2750 compute what column these characters will end up in, and ``hard-code''
2751 that.  This means that it is illegal to have these specs after a
2752 variable-length spec.  Well, you might not be arrested, but your summary
2753 buffer will look strange, which is bad enough.
2754
2755 The smart choice is to have these specs as far to the left as possible.
2756 (Isn't that the case with everything, though?  But I digress.)
2757
2758 This restriction may disappear in later versions of Gnus.
2759
2760
2761 @node Summary Buffer Mode Line
2762 @subsection Summary Buffer Mode Line
2763
2764 @vindex gnus-summary-mode-line-format
2765 You can also change the format of the summary mode bar.  Set
2766 @code{gnus-summary-mode-line-format} to whatever you like.  Here are the
2767 elements you can play with:
2768
2769 @table @samp
2770 @item G
2771 Group name.
2772 @item p
2773 Unprefixed group name.
2774 @item A
2775 Current article number.
2776 @item V
2777 Gnus version.
2778 @item U
2779 Number of unread articles in this group.
2780 @item e
2781 Number of unselected articles in this group.
2782 @item Z
2783 A string with the number of unread and unselected articles represented
2784 either as @samp{<%U(+%u) more>} if there are both unread and unselected
2785 articles, and just as @samp{<%U more>} if there are just unread articles
2786 and no unselected ones.
2787 @item g
2788 Shortish group name.  For instance, @samp{rec.arts.anime} will be
2789 shortened to @samp{r.a.anime}. 
2790 @item S
2791 Subject of the current article.
2792 @item u
2793 Used-defined spec.
2794 @item s
2795 Name of the current score file.
2796 @item d
2797 Number of dormant articles.
2798 @item t
2799 Number of ticked articles.
2800 @item r
2801 Number of articles that have been marked as read in this session. 
2802 @item E
2803 Number of articles expunged by the score files.
2804 @end table
2805
2806
2807 @node Summary Highlighting
2808 @subsection Summary Highlighting
2809
2810 @table @code
2811
2812 @item gnus-visual-mark-article-hook
2813 @vindex gnus-visual-mark-article-hook
2814 This hook is run after selecting an article.  It is meant to be used for
2815 highlighting the article in some way.  It is not run if
2816 @code{gnus-visual} is @code{nil}.
2817
2818 @item gnus-summary-update-hook
2819 @vindex gnus-summary-update-hook
2820 This hook is called when a summary line is changed.  It is not run if
2821 @code{gnus-visual} is @code{nil}.
2822
2823 @item gnus-summary-selected-face
2824 @vindex gnus-summary-selected-face
2825 This is the face (or @dfn{font} as some people call it) that is used to
2826 highlight the current article in the summary buffer.
2827
2828 @item gnus-summary-highlight
2829 @vindex gnus-summary-highlight
2830 Summary lines are highlighted according to this variable, which is a
2831 list where the elements are on the format @code{(FORM . FACE)}.  If you
2832 would, for instance, like ticked articles to be italic and high-scored
2833 articles to be bold, you could set this variable to something like
2834 @lisp
2835 (((eq mark gnus-ticked-mark) . italic)
2836  ((> score default) . bold))
2837 @end lisp
2838 As you may have guessed, if @var{FORM} returns a non-@code{nil} value,
2839 @var{FACE} will be applied to the line.
2840 @end table
2841
2842
2843 @node Summary Maneuvering
2844 @section Summary Maneuvering
2845 @cindex summary movement
2846
2847 All the straight movement commands understand the numeric prefix and
2848 behave pretty much as you'd expect. 
2849
2850 None of these commands select articles.
2851
2852 @table @kbd
2853 @item G M-n
2854 @itemx M-n
2855 @kindex M-n (Summary)
2856 @kindex G M-n (Summary)
2857 @findex gnus-summary-next-unread-subject
2858 Go to the next summary line of an unread article
2859 (@code{gnus-summary-next-unread-subject}). 
2860
2861 @item G M-p
2862 @itemx M-p
2863 @kindex M-p (Summary)
2864 @kindex G M-p (Summary)
2865 @findex gnus-summary-prev-unread-subject
2866 Go to the previous summary line of an unread article
2867 (@code{gnus-summary-prev-unread-subject}). 
2868
2869 @item G j
2870 @itemx j
2871 @kindex j (Summary)
2872 @kindex G j (Summary)
2873 @findex gnus-summary-goto-article
2874 Ask for an article number and then go that article
2875 (@code{gnus-summary-goto-article}). 
2876
2877 @item G g
2878 @kindex G g (Summary)
2879 @findex gnus-summary-goto-subject
2880 Ask for an article number and then go the summary line of that article
2881 (@code{gnus-summary-goto-subject}).
2882 @end table
2883
2884 If Gnus asks you to press a key to confirm going to the next group, you
2885 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
2886 buffer, searching for the next group to read without actually returning
2887 to the group buffer.
2888
2889 Variables related to summary movement:
2890
2891 @table @code
2892
2893 @vindex gnus-auto-select-next
2894 @item gnus-auto-select-next
2895 If you are at the end of the group and issue one of the movement
2896 commands, Gnus will offer to go to the next group.  If this variable is
2897 @code{t} and the next group is empty, Gnus will exit summary mode and
2898 return to the group buffer.  If this variable is neither @code{t} nor
2899 @code{nil}, Gnus will select the next group, no matter whether it has
2900 any unread articles or not.  As a special case, if this variable is
2901 @code{quietly}, Gnus will select the next group without asking for
2902 confirmation.  If this variable is @code{almost-quietly}, the same will
2903 happen only if you are located on the last article in the group.
2904 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
2905 command will go to the next group without confirmation.  Also
2906 @pxref{Group Levels}.
2907
2908 @item gnus-auto-select-same
2909 @vindex gnus-auto-select-same
2910 If non-@code{nil}, all the movement commands will try to go to the next
2911 article with the same subject as the current.  (@dfn{Same} here might
2912 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
2913 for details (@pxref{Customizing Threading}).)  This variable is not
2914 particularly useful if you use a threaded display.
2915
2916 @item gnus-summary-check-current
2917 @vindex gnus-summary-check-current
2918 If non-@code{nil}, all the ``unread'' movement commands will not proceed
2919 to the next (or previous) article if the current article is unread.
2920 Instead, they will choose the current article.
2921
2922 @item gnus-auto-center-summary
2923 @vindex gnus-auto-center-summary
2924 If non-@code{nil}, Gnus will keep the point in the summary buffer
2925 centered at all times.  This makes things quite tidy, but if you have a
2926 slow network connection, or simply do not like this un-Emacsism, you can
2927 set this variable to @code{nil} to get the normal Emacs scrolling
2928 action.  This will also inhibit horizontal re-centering of the summary
2929 buffer, which might make it more inconvenient to read extremely long
2930 threads.
2931
2932 @end table
2933
2934
2935 @node Choosing Articles
2936 @section Choosing Articles
2937 @cindex selecting articles
2938
2939 None of the following movement commands understand the numeric prefix,
2940 and they all select and display an article.
2941
2942 @table @kbd
2943 @item SPACE
2944 @kindex SPACE (Summary)
2945 @findex gnus-summary-next-page
2946 Select the current article, or, if that one's read already, the next
2947 unread article (@code{gnus-summary-next-page}).
2948
2949 @item G n
2950 @itemx n
2951 @kindex n (Summary)
2952 @kindex G n (Summary)
2953 @findex gnus-summary-next-unread-article
2954 Go to next unread article (@code{gnus-summary-next-unread-article}).
2955
2956 @item G p
2957 @itemx p
2958 @kindex p (Summary)
2959 @findex gnus-summary-prev-unread-article
2960 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
2961
2962 @item G N
2963 @itemx N
2964 @kindex N (Summary)
2965 @kindex G N (Summary)
2966 @findex gnus-summary-next-article
2967 Go to the next article (@code{gnus-summary-next-article}).
2968
2969 @item G P
2970 @itemx P
2971 @kindex P (Summary)
2972 @kindex G P (Summary)
2973 @findex gnus-summary-prev-article
2974 Go to the previous article (@code{gnus-summary-prev-article}).
2975
2976 @item G C-n
2977 @kindex G C-n (Summary)
2978 @findex gnus-summary-next-same-subject
2979 Go to the next article with the same subject
2980 (@code{gnus-summary-next-same-subject}). 
2981
2982 @item G C-p
2983 @kindex G C-p (Summary)
2984 @findex gnus-summary-prev-same-subject
2985 Go to the previous article with the same subject
2986 (@code{gnus-summary-prev-same-subject}). 
2987
2988 @item G f
2989 @itemx .
2990 @kindex G f  (Summary)
2991 @kindex .  (Summary)
2992 @findex gnus-summary-first-unread-article
2993 Go to the first unread article
2994 (@code{gnus-summary-first-unread-article}).
2995
2996 @item G b
2997 @itemx ,
2998 @kindex G b (Summary)
2999 @kindex , (Summary)
3000 @findex gnus-summary-best-unread-article
3001 Go to the article with the highest score
3002 (@code{gnus-summary-best-unread-article}). 
3003
3004 @item G l
3005 @itemx l
3006 @kindex l (Summary)
3007 @kindex G l (Summary)
3008 @findex gnus-summary-goto-last-article
3009 Go to the previous article read (@code{gnus-summary-goto-last-article}).
3010
3011 @item G p
3012 @kindex G p (Summary)
3013 @findex gnus-summary-pop-article
3014 Pop an article off the summary history and go to this article
3015 (@code{gnus-summary-pop-article}).  This command differs from the
3016 command above in that you can pop as many previous articles off the
3017 history as you like.
3018 @end table
3019
3020 Some variables that are relevant for moving and selecting articles:
3021
3022 @table @code
3023 @item gnus-auto-extend-newsgroup
3024 @vindex gnus-auto-extend-newsgroup
3025 All the movement commands will try to go to the previous (or next)
3026 article, even if that article isn't displayed in the Summary buffer if
3027 this variable is non-@code{nil}.  Gnus will then fetch the article from
3028 the server and display it in the article buffer.
3029
3030 @item gnus-select-article-hook
3031 @vindex gnus-select-article-hook
3032 This hook is called whenever an article is selected.  By default it
3033 exposes any threads hidden under the selected article.
3034
3035 @item gnus-mark-article-hook
3036 @vindex gnus-mark-article-hook
3037 @findex gnus-summary-mark-unread-as-read
3038 @findex gnus-summary-mark-read-and-unread-as-read
3039 @findex gnus-unread-mark
3040 This hook is called whenever an article is selected.  It is intended to
3041 be used for marking articles as read.  The default value is
3042 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
3043 mark of almost any article you read to @code{gnus-unread-mark}.  The
3044 only articles not affected by this function are ticked, dormant, and
3045 expirable articles.  If you'd instead like to just have unread articles
3046 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
3047 instead.  It will leave marks like @code{gnus-low-score-mark},
3048 @code{gnus-del-mark} (and so on) alone.
3049
3050 @end table
3051
3052
3053 @node Paging the Article
3054 @section Scrolling the Article
3055 @cindex article scrolling
3056
3057 @table @kbd
3058
3059 @item SPACE
3060 @kindex SPACE (Summary)
3061 @findex gnus-summary-next-page
3062 Pressing @kbd{SPACE} will scroll the current article forward one page,
3063 or, if you have come to the end of the current article, will choose the
3064 next article (@code{gnus-summary-next-page}).
3065
3066 @item DEL
3067 @kindex DEL (Summary)
3068 @findex gnus-summary-prev-page
3069 Scroll the current article back one page (@code{gnus-summary-prev-page}). 
3070
3071 @item RET
3072 @kindex RET (Summary)
3073 @findex gnus-summary-scroll-up
3074 Scroll the current article one line forward
3075 (@code{gnus-summary-scroll-up}).
3076
3077 @item A g
3078 @itemx g
3079 @kindex A g (Summary)
3080 @kindex g (Summary)
3081 @findex gnus-summary-show-article
3082 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
3083 given a prefix, fetch the current article, but don't run any of the
3084 article treatment functions.  This will give you a ``raw'' article, just
3085 the way it came from the server.
3086
3087 @item A <
3088 @itemx <
3089 @kindex < (Summary)
3090 @kindex A < (Summary)
3091 @findex gnus-summary-beginning-of-article
3092 Scroll to the beginning of the article
3093 (@code{gnus-summary-beginning-of-article}).
3094
3095 @item A >
3096 @itemx >
3097 @kindex > (Summary)
3098 @kindex A > (Summary)
3099 @findex gnus-summary-end-of-article
3100 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
3101
3102 @item A s 
3103 @kindex A s (Summary)
3104 @findex gnus-summary-isearch-article
3105 Perform an isearch in the article buffer
3106 (@code{gnus-summary-isearch-article}). 
3107
3108 @end table
3109
3110
3111 @node Reply Followup and Post
3112 @section Reply, Followup and Post
3113
3114 @menu
3115 * Summary Mail Commands::            Sending mail.
3116 * Summary Post Commands::            Sending news.
3117 @end menu
3118
3119
3120 @node Summary Mail Commands
3121 @subsection Summary Mail Commands
3122 @cindex mail
3123 @cindex composing mail
3124
3125 Commands for composing a mail message:
3126
3127 @table @kbd
3128
3129 @item S r
3130 @itemx r
3131 @kindex S r (Summary)
3132 @kindex r (Summary)
3133 @findex gnus-summary-reply
3134 Mail a reply to the author of the current article
3135 (@code{gnus-summary-reply}). 
3136
3137 @item S R
3138 @itemx R
3139 @kindex R (Summary)
3140 @kindex S R (Summary)
3141 @findex gnus-summary-reply-with-original
3142 Mail a reply to the author of the current article and include the
3143 original message (@code{gnus-summary-reply-with-original}).  This
3144 command uses the process/prefix convention.
3145
3146 @item S o m
3147 @kindex S o m (Summary)
3148 @findex gnus-summary-mail-forward
3149 Forward the current article to some other person
3150 (@code{gnus-summary-mail-forward}). 
3151
3152 @item S o p
3153 @kindex S o p (Summary)
3154 @findex gnus-summary-post-forward
3155 Forward the current article to a newsgroup
3156 (@code{gnus-summary-post-forward}).
3157
3158 @item S m
3159 @itemx m
3160 @kindex m (Summary)
3161 @kindex S m (Summary)
3162 @findex gnus-summary-mail-other-window
3163 Send a mail to some other person
3164 (@code{gnus-summary-mail-other-window}).
3165
3166 @item S D b
3167 @kindex S D b (Summary)
3168 @findex gnus-summary-resend-bounced-mail
3169 @cindex bouncing mail
3170 If you have sent a mail, but the mail was bounced back to you for some
3171 reason (wrong address, transient failure), you can use this command to
3172 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
3173 will be popped into a mail buffer where you can edit the headers before
3174 sending the mail off again.  If you give a prefix to this command, and
3175 the bounced mail is a reply to some other mail, Gnus will try to fetch
3176 that mail and display it for easy perusal of its headers.  This might
3177 very well fail, though.
3178
3179 @item S D r
3180 @kindex S D r (Summary)
3181 @findex gnus-summary-resend-message
3182 Not to be confused with the previous command,
3183 @code{gnus-summary-resend-message} will prompt you for an address to
3184 send the current message off to, and then send it to that place.  The
3185 headers of the message won't be altered---but lots of headers that say
3186 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
3187 means that you actually send a mail to someone that has a @code{To}
3188 header that (probably) points to yourself.  This will confuse people.
3189 So, natcherly you'll only do that if you're really eVIl.  
3190
3191 This command is mainly used if you have several accounts and want to
3192 ship a mail to a different account of yours.  (If you're both
3193 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
3194 to the @code{root} account, you may want to resend it to
3195 @code{postmaster}.  Ordnung muss sein!
3196
3197 @item S O m
3198 @kindex S O m (Summary)
3199 @findex gnus-uu-digest-mail-forward
3200 Digest the current series and forward the result using mail
3201 (@code{gnus-uu-digest-mail-forward}).  This command uses the
3202 process/prefix convention (@pxref{Process/Prefix}). 
3203
3204 @item S O p
3205 @kindex S O p (Summary)
3206 @findex gnus-uu-digest-post-forward
3207 Digest the current series and forward the result to a newsgroup
3208 (@code{gnus-uu-digest-mail-forward}).  
3209 @end table
3210
3211
3212 @node Summary Post Commands
3213 @subsection Summary Post Commands
3214 @cindex post
3215 @cindex composing news
3216
3217 Commands for posting an article:
3218
3219 @table @kbd
3220 @item S p
3221 @itemx a
3222 @kindex a (Summary)
3223 @kindex S p (Summary)
3224 @findex gnus-summary-post-news
3225 Post an article to the current group
3226 (@code{gnus-summary-post-news}).
3227
3228 @item S f
3229 @itemx f
3230 @kindex f (Summary)
3231 @kindex S f (Summary)
3232 @findex gnus-summary-followup
3233 Post a followup to the current article (@code{gnus-summary-followup}).
3234
3235 @item S F
3236 @itemx F
3237 @kindex S F (Summary)
3238 @kindex F (Summary)
3239 @findex gnus-summary-followup-with-original
3240 Post a followup to the current article and include the original message
3241 (@code{gnus-summary-followup-with-original}).   This command uses the
3242 process/prefix convention.
3243
3244 @item S u
3245 @kindex S u (Summary)
3246 @findex gnus-uu-post-news
3247 Uuencode a file, split it into parts, and post it as a series
3248 (@code{gnus-uu-post-news}). (@pxref{Uuencoding and Posting}). 
3249 @end table
3250
3251
3252 @node Canceling and Superseding
3253 @section Canceling Articles
3254 @cindex canceling articles
3255 @cindex superseding articles
3256
3257 Have you ever written something, and then decided that you really,
3258 really, really wish you hadn't posted that?
3259
3260 Well, you can't cancel mail, but you can cancel posts.
3261
3262 @findex gnus-summary-cancel-article
3263 @kindex C (Summary)
3264 Find the article you wish to cancel (you can only cancel your own
3265 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
3266 c} (@code{gnus-summary-cancel-article}).  Your article will be
3267 canceled---machines all over the world will be deleting your article. 
3268
3269 Be aware, however, that not all sites honor cancels, so your article may
3270 live on here and there, while most sites will delete the article in
3271 question.
3272
3273 If you discover that you have made some mistakes and want to do some
3274 corrections, you can post a @dfn{superseding} article that will replace
3275 your original article.
3276
3277 @findex gnus-summary-supersede-article
3278 @kindex S (Summary)
3279 Go to the original article and press @kbd{S s}
3280 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
3281 where you can edit the article all you want before sending it off the
3282 usual way.
3283
3284 The same goes for superseding as for canceling, only more so: Some
3285 sites do not honor superseding.  On those sites, it will appear that you
3286 have posted almost the same article twice.
3287
3288 If you have just posted the article, and change your mind right away,
3289 there is a trick you can use to cancel/supersede the article without
3290 waiting for the article to appear on your site first.  You simply return
3291 to the post buffer (which is called @code{*post-buf*}).  There you will
3292 find the article you just posted, with all the headers intact.  Change
3293 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
3294 header by substituting one of those words for @code{Message-ID}.  Then
3295 just press @kbd{C-c C-c} to send the article as you would do normally.
3296 The previous article will be canceled/superseded.
3297
3298 Just remember, kids: There is no 'c' in 'supersede'.
3299
3300
3301 @node Marking Articles
3302 @section Marking Articles
3303 @cindex article marking
3304 @cindex article ticking
3305 @cindex marks
3306
3307 There are several marks you can set on an article. 
3308
3309 You have marks that decide the @dfn{readedness} (whoo, neato-keano
3310 neologism ohoy!) of the article.  Alphabetic marks generally mean
3311 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
3312
3313 In addition, you also have marks that do not affect readedness.
3314
3315 @menu
3316 * Unread Articles::      Marks for unread articles.
3317 * Read Articles::        Marks for read articles.
3318 * Other Marks::          Marks that do not affect readedness.
3319 @end menu
3320
3321 @ifinfo
3322 There's a plethora of commands for manipulating these marks:
3323 @end ifinfo
3324
3325 @menu
3326 * Setting Marks::           How to set and remove marks.
3327 * Setting Process Marks::   How to mark articles for later processing.
3328 @end menu
3329
3330
3331 @node Unread Articles
3332 @subsection Unread Articles
3333
3334 The following marks mark articles as unread, in one form or other.
3335
3336 @vindex gnus-dormant-mark
3337 @vindex gnus-ticked-mark
3338 @table @samp
3339 @item !
3340 @dfn{Ticked articles} are articles that will remain visible always.  If
3341 you see an article that you find interesting, or you want to put off
3342 reading it, or replying to it, until sometime later, you'd typically
3343 tick it.  However, articles can be expired, so if you want to keep an
3344 article forever, you'll have to save it.  Ticked articles have a
3345 @samp{!} (@code{gnus-ticked-mark}) in the first column.
3346
3347 @item ?
3348 @vindex gnus-dormant-mark
3349 A @dfn{dormant} article is marked with a @samp{?}
3350 (@code{gnus-dormant-mark}), and will only appear in the summary buffer
3351 if there are followups to it.
3352
3353 @item SPACE
3354 @vindex gnus-unread-mark
3355 An @dfn{unread} article is marked with a @samp{SPACE}
3356 (@code{gnus-unread-mark}).  These are articles that haven't been read at
3357 all yet.
3358 @end table
3359
3360
3361 @node Read Articles
3362 @subsection Read Articles
3363 @cindex expirable mark
3364
3365 All the following marks mark articles as read.
3366
3367 @table @samp
3368
3369 @item r
3370 @vindex gnus-del-mark
3371 Articles that are marked as read.  They have a @samp{r}
3372 (@code{gnus-del-mark}) in the first column.  These are articles that the
3373 user has marked as read more or less manually.
3374
3375 @item R
3376 @vindex gnus-read-mark
3377 Articles that are actually read are marked with @samp{R}
3378 (@code{gnus-read-mark}). 
3379
3380 @item O
3381 @vindex gnus-ancient-mark
3382 Articles that were marked as read in previous sessions are now
3383 @dfn{old} and marked with @samp{O} (@code{gnus-ancient-mark}). 
3384
3385 @item K
3386 @vindex gnus-killed-mark
3387 Marked as killed (@code{gnus-killed-mark}).
3388
3389 @item X
3390 @vindex gnus-kill-file-mark
3391 Marked as killed by kill files (@code{gnus-kill-file-mark}).
3392
3393 @item Y
3394 @vindex gnus-low-score-mark
3395 Marked as read by having a too low score (@code{gnus-low-score-mark}).
3396
3397 @item C
3398 @vindex gnus-catchup-mark
3399 Marked as read by a catchup (@code{gnus-catchup-mark}).
3400
3401 @item G
3402 @vindex gnus-canceled-mark
3403 Canceled article (@code{gnus-canceled-mark})
3404
3405 @item F
3406 @vindex gnus-souped-mark
3407 @sc{SOUP}ed article (@code{gnus-souped-mark}).
3408
3409 @item Q
3410 @vindex gnus-sparse-mark
3411 Sparsely reffed article (@code{gnus-sparse-mark}).
3412 @end table
3413
3414 All these marks just mean that the article is marked as read, really.
3415 They are interpreted differently by the adaptive scoring scheme,
3416 however.
3417
3418 One more special mark, though:
3419
3420 @table @samp
3421 @item E
3422 @vindex gnus-expirable-mark
3423 You can also mark articles as @dfn{expirable} (or have them marked as
3424 such automatically).  That doesn't make much sense in normal groups,
3425 because a user does not control the expiring of news articles, but in
3426 mail groups, for instance, articles that are marked as @dfn{expirable}
3427 can be deleted by Gnus at any time.  Expirable articles are marked with
3428 @samp{E} (@code{gnus-expirable-mark}).
3429 @end table
3430
3431
3432 @node Other Marks
3433 @subsection Other Marks
3434 @cindex process mark
3435 @cindex bookmarks
3436
3437 There are some marks that have nothing to do with whether the article is
3438 read or not.
3439
3440 @itemize @bullet
3441
3442 @item 
3443 You can set a bookmark in the current article.  Say you are reading a
3444 long thesis on cats' urinary tracts, and have to go home for dinner
3445 before you've finished reading the thesis.  You can then set a bookmark
3446 in the article, and Gnus will jump to this bookmark the next time it
3447 encounters the article.
3448
3449 @item
3450 @vindex gnus-replied-mark
3451 All articles that you have replied to or made a followup to (i.e., have
3452 answered) will be marked with an @samp{A} in the second column
3453 (@code{gnus-replied-mark}).
3454
3455 @item 
3456 @vindex gnus-cached-mark
3457 Articles that are stored in the article cache will be marked with an
3458 @samp{*} in the second column (@code{gnus-cached-mark}).
3459
3460 @item 
3461 @vindex gnus-saved-mark
3462 Articles that are ``saved'' (in some manner or other; not necessarily
3463 religiously) are marked with an @samp{S} in the second column
3464 (@code{gnus-saved-mark}.
3465
3466 @item 
3467 @vindex gnus-not-empty-thread-mark
3468 @vindex gnus-empty-thread-mark
3469 It the @samp{%e} spec is used, the presence of threads or not will be
3470 marked with @code{gnus-not-empty-thread-mark} and
3471 @code{gnus-empty-thread-mark} in the third column, respectively.
3472
3473 @item 
3474 @vindex gnus-process-mark
3475 Finally we have the @dfn{process mark} (@code{gnus-process-mark}.  A
3476 variety of commands react to the presence of the process mark.  For
3477 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
3478 all articles that have been marked with the process mark.  Articles
3479 marked with the process mark have a @samp{#} in the second column.
3480
3481 @end itemize
3482
3483 You might have noticed that most of these ``non-readedness'' marks
3484 appear in the second column by default.  So if you have a cached, saved,
3485 replied article that you have process-marked, what will that look like?
3486
3487 Nothing much.  The precedence rules go as follows: process -> cache ->
3488 replied -> saved.  So if the article is in the cache and is replied,
3489 you'll only see the cache mark and not the replied mark.
3490
3491
3492 @node Setting Marks
3493 @subsection Setting Marks
3494 @cindex setting marks
3495
3496 All the marking commands understand the numeric prefix.
3497
3498 @table @kbd
3499 @item M t
3500 @itemx !
3501 @kindex ! (Summary)
3502 @kindex M t (Summary)
3503 @findex gnus-summary-tick-article-forward
3504 Tick the current article (@code{gnus-summary-tick-article-forward}).
3505
3506 @item M ?
3507 @itemx ?
3508 @kindex ? (Summary)
3509 @kindex M ? (Summary)
3510 @findex gnus-summary-mark-as-dormant
3511 Mark the current article as dormant
3512 (@code{gnus-summary-mark-as-dormant}).
3513
3514 @item M d
3515 @itemx d
3516 @kindex M d (Summary)
3517 @kindex d (Summary)
3518 @findex gnus-summary-mark-as-read-forward
3519 Mark the current article as read
3520 (@code{gnus-summary-mark-as-read-forward}).
3521
3522 @item D
3523 @kindex D (Summary)
3524 @findex gnus-summary-mark-as-read-backward
3525 Mark the current article as read and move point to the previous line
3526 (@code{gnus-summary-mark-as-read-backward}).
3527
3528 @item M k
3529 @itemx k
3530 @kindex k (Summary)
3531 @kindex M k (Summary)
3532 @findex gnus-summary-kill-same-subject-and-select
3533 Mark all articles that have the same subject as the current one as read,
3534 and then select the next unread article
3535 (@code{gnus-summary-kill-same-subject-and-select}).
3536
3537 @item M K
3538 @itemx C-k
3539 @kindex M K (Summary)
3540 @kindex C-k (Summary)
3541 @findex gnus-summary-kill-same-subject
3542 Mark all articles that have the same subject as the current one as read
3543 (@code{gnus-summary-kill-same-subject}).  
3544
3545 @item M C
3546 @kindex M C (Summary)
3547 @findex gnus-summary-catchup
3548 Mark all unread articles in the group as read
3549 (@code{gnus-summary-catchup}).
3550
3551 @item M C-c
3552 @kindex M C-c (Summary)
3553 @findex gnus-summary-catchup-all
3554 Mark all articles in the group as read---even the ticked and dormant
3555 articles (@code{gnus-summary-catchup-all}).
3556
3557 @item M H
3558 @kindex M H (Summary)
3559 @findex gnus-summary-catchup-to-here
3560 Catchup the current group to point
3561 (@code{gnus-summary-catchup-to-here}). 
3562
3563 @item C-w
3564 @kindex C-w (Summary)
3565 @findex gnus-summary-mark-region-as-read
3566 Mark all articles between point and mark as read
3567 (@code{gnus-summary-mark-region-as-read}). 
3568
3569 @item M V k
3570 @kindex M V k (Summary)
3571 @findex gnus-summary-kill-below
3572 Kill all articles with scores below the default score (or below the
3573 numeric prefix) (@code{gnus-summary-kill-below}).
3574
3575 @item M c
3576 @itemx M-u
3577 @kindex M c (Summary)
3578 @kindex M-u (Summary)
3579 @findex gnus-summary-clear-mark-forward
3580 Clear all readedness-marks from the current article
3581 (@code{gnus-summary-clear-mark-forward}).
3582
3583 @item M e
3584 @itemx E
3585 @kindex M e (Summary)
3586 @kindex E (Summary)
3587 @findex gnus-summary-mark-as-expirable
3588 Mark the current article as expirable
3589 (@code{gnus-summary-mark-as-expirable}).
3590
3591 @item M b
3592 @kindex M b (Summary)
3593 @findex gnus-summary-set-bookmark
3594 Set a bookmark in the current article
3595 (@code{gnus-summary-set-bookmark}).
3596
3597 @item M B
3598 @kindex M B (Summary)
3599 @findex gnus-summary-remove-bookmark
3600 Remove the bookmark from the current article
3601 (@code{gnus-summary-remove-bookmark}).
3602
3603 @item M V c
3604 @kindex M V c (Summary)
3605 @findex gnus-summary-clear-above
3606 Clear all marks from articles with scores over the default score (or
3607 over the numeric prefix) (@code{gnus-summary-clear-above}).
3608
3609 @item M V u
3610 @kindex M V u (Summary)
3611 @findex gnus-summary-tick-above
3612 Tick all articles with scores over the default score (or over the
3613 numeric prefix) (@code{gnus-summary-tick-above}).
3614
3615 @item M V m
3616 @kindex M V m (Summary)
3617 @findex gnus-summary-mark-above
3618 Prompt for a mark, and mark all articles with scores over the default
3619 score (or over the numeric prefix) with this mark
3620 (@code{gnus-summary-clear-above}).
3621 @end table
3622
3623 @vindex gnus-summary-goto-unread
3624 The @code{gnus-summary-goto-unread} variable controls what action should
3625 be taken after setting a mark.  If non-@code{nil}, point will move to
3626 the next/previous unread article.  If @code{nil}, point will just move
3627 one line up or down.  As a special case, if this variable is
3628 @code{never}, all the marking commands as well as other commands (like
3629 @kbd{SPACE}) will move to the next article, whether it is unread or not.
3630 The default is @code{t}.
3631
3632
3633 @node Setting Process Marks
3634 @subsection Setting Process Marks
3635 @cindex setting process marks
3636
3637 @table @kbd
3638
3639 @item M P p
3640 @itemx #
3641 @kindex # (Summary)
3642 @kindex M P p (Summary)
3643 @findex gnus-summary-mark-as-processable
3644 Mark the current article with the process mark
3645 (@code{gnus-summary-mark-as-processable}). 
3646 @findex gnus-summary-unmark-as-processable
3647
3648 @item M P u 
3649 @itemx M-#
3650 @kindex M P u (Summary)
3651 @kindex M-# (Summary)
3652 Remove the process mark, if any, from the current article
3653 (@code{gnus-summary-unmark-as-processable}).
3654
3655 @item M P U
3656 @kindex M P U (Summary)
3657 @findex gnus-summary-unmark-all-processable
3658 Remove the process mark from all articles
3659 (@code{gnus-summary-unmark-all-processable}). 
3660
3661 @item M P R
3662 @kindex M P R (Summary)
3663 @findex gnus-uu-mark-by-regexp
3664 Mark articles by a regular expression (@code{gnus-uu-mark-by-regexp}). 
3665
3666 @item M P r
3667 @kindex M P r (Summary)
3668 @findex gnus-uu-mark-region
3669 Mark articles in region (@code{gnus-uu-mark-region}).
3670
3671 @item M P t
3672 @kindex M P t (Summary)
3673 @findex gnus-uu-mark-thread
3674 Mark all articles in the current (sub)thread
3675 (@code{gnus-uu-mark-thread}).
3676
3677 @item M P T
3678 @kindex M P T (Summary)
3679 @findex gnus-uu-unmark-thread
3680 Unmark all articles in the current (sub)thread
3681 (@code{gnus-uu-unmark-thread}).
3682
3683 @item M P v
3684 @kindex M P v (Summary)
3685 @findex gnus-uu-mark-over
3686 Mark all articles that have a score above the prefix argument
3687 (@code{gnus-uu-mark-over}).
3688
3689 @item M P s
3690 @kindex M P s (Summary)
3691 @findex gnus-uu-mark-series
3692 Mark all articles in the current series (@code{gnus-uu-mark-series}).
3693
3694 @item M P S
3695 @kindex M P S (Summary)
3696 @findex gnus-uu-mark-sparse
3697 Mark all series that have already had some articles marked
3698 (@code{gnus-uu-mark-sparse}).
3699
3700 @item M P a
3701 @kindex M P a (Summary)
3702 @findex gnus-uu-mark-all
3703 Mark all articles in series order (@code{gnus-uu-mark-series}).
3704
3705 @item M P b
3706 @kindex M P b (Summary)
3707 @findex gnus-uu-mark-buffer
3708 Mark all articles in the buffer in the order they appear
3709 (@code{gnus-uu-mark-buffer}). 
3710 @end table
3711
3712
3713 @node Limiting
3714 @section Limiting
3715 @cindex limiting
3716
3717 It can be convenient to limit the summary buffer to just show some
3718 subset of the articles currently in the group.  The effect most limit
3719 commands have is to remove a few (or many) articles from the summary
3720 buffer. 
3721
3722 @table @kbd
3723
3724 @item / /
3725 @itemx / s
3726 @kindex / / (Summary)
3727 @findex gnus-summary-limit-to-subject
3728 Limit the summary buffer to articles that match some subject
3729 (@code{gnus-summary-limit-to-subject}). 
3730
3731 @item / a
3732 @kindex / a (Summary)
3733 @findex gnus-summary-limit-to-author
3734 Limit the summary buffer to articles that match some author
3735 (@code{gnus-summary-limit-to-author}).
3736
3737 @item / u
3738 @itemx x
3739 @kindex / u (Summary)
3740 @kindex x (Summary)
3741 @findex gnus-summary-limit-to-unread
3742 Limit the summary buffer to articles that are not marked as read
3743 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
3744 buffer to articles that are strictly unread.  This means that ticked and
3745 dormant articles will also be excluded.
3746
3747 @item / m
3748 @kindex / m (Summary)
3749 @findex gnus-summary-limit-to-marks
3750 Ask for a mark and then limit to all articles that have not been marked
3751 with that mark (@code{gnus-summary-limit-to-marks}).
3752
3753 @item / n
3754 @kindex / n (Summary)
3755 @findex gnus-summary-limit-to-articles
3756 Limit the summary buffer to the current article
3757 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
3758 convention (@pxref{Process/Prefix}).
3759
3760 @item / w
3761 @kindex / w (Summary)
3762 @findex gnus-summary-pop-limit
3763 Pop the previous limit off the stack and restore it
3764 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
3765 the stack.
3766
3767 @item / v
3768 @kindex / v (Summary)
3769 @findex gnus-summary-limit-to-score
3770 Limit the summary buffer to articles that have a score at or above some
3771 score (@code{gnus-summary-limit-to-score}).
3772
3773 @item / E
3774 @itemx M S
3775 @kindex M S (Summary)
3776 @kindex / E (Summary)
3777 @findex gnus-summary-limit-include-expunged
3778 Display all expunged articles
3779 (@code{gnus-summary-limit-include-expunged}). 
3780
3781 @item / D
3782 @kindex / D (Summary)
3783 @findex gnus-summary-limit-include-dormant
3784 Display all dormant articles (@code{gnus-summary-limit-include-dormant}).
3785
3786 @item / d
3787 @kindex / d (Summary)
3788 @findex gnus-summary-limit-exclude-dormant
3789 Hide all dormant articles (@code{gnus-summary-limit-exclude-dormant}).
3790
3791 @item / c
3792 @kindex / c (Summary)
3793 @findex gnus-summary-limit-exclude-childless-dormant
3794 Hide all dormant articles that have no children
3795 (@code{gnus-summary-limit-exclude-childless-dormant}). 
3796
3797 @item / C
3798 @kindex / C (Summary)
3799 @findex gnus-summary-limit-mark-excluded-as-read
3800 Mark all excluded unread articles as read
3801 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
3802 also mark excluded ticked and dormant articles as read.
3803
3804 @end table
3805
3806
3807 @node Threading
3808 @section Threading
3809 @cindex threading
3810 @cindex article threading
3811
3812 Gnus threads articles by default.  @dfn{To thread} is to put replies to
3813 articles directly after the articles they reply to---in a hierarchical
3814 fashion.
3815
3816 @menu
3817 * Customizing Threading::     Variables you can change to affect the threading.
3818 * Thread Commands::           Thread based commands in the summary buffer.
3819 @end menu
3820
3821
3822 @node Customizing Threading
3823 @subsection Customizing Threading
3824 @cindex customizing threading
3825 @cindex <
3826 @cindex >
3827
3828 @table @code
3829
3830 @item gnus-show-threads
3831 @vindex gnus-show-threads
3832 If this variable is @code{nil}, no threading will be done, and all of
3833 the rest of the variables here will have no effect.  Turning threading
3834 off will speed group selection up a bit, but it is sure to make reading
3835 slower and more awkward.
3836
3837 @item gnus-fetch-old-headers
3838 @vindex gnus-fetch-old-headers
3839 If non-@code{nil}, Gnus will attempt to build old threads by fetching
3840 more old headers---headers to articles that are marked as read.  If you
3841 would like to display as few summary lines as possible, but still
3842 connect as many loose threads as possible, you should set this variable
3843 to @code{some} or a number.  If you set it to a number, no more than
3844 that number of extra old headers will be fetched.  In either case,
3845 fetching old headers only works if the backend you are using carries
3846 overview files---this would normally be @code{nntp}, @code{nnspool} and
3847 @code{nnml}.  Also remember that if the root of the thread has been
3848 expired by the server, there's not much Gnus can do about that.
3849
3850 @item gnus-build-sparse-threads
3851 @vindex gnus-build-sparse-threads
3852 Fetching old headers can be slow.  A low-rent similar effect can be
3853 gotten by setting this variable to @code{some}.  Gnus will then look at
3854 the complete @code{References} headers of all articles and try to string
3855 articles that belong in the same thread together.  This will leave
3856 @dfn{gaps} in the threading display where Gnus guesses that an article
3857 is missing from the thread.  (These gaps appear like normal summary
3858 lines.  If you select a gap, Gnus will try to fetch the article in
3859 question.)  If this variable is @code{t}, Gnus will display all these
3860 ``gaps'' without regard for whether they are useful for completing the
3861 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
3862 off sparse leaf nodes that don't lead anywhere.  This variable is
3863 @code{nil} by default.
3864
3865 @item gnus-summary-gather-subject-limit
3866 @vindex gnus-summary-gather-subject-limit
3867 Loose threads are gathered by comparing subjects of articles.  If this
3868 variable is @code{nil}, Gnus requires an exact match between the
3869 subjects of the loose threads before gathering them into one big
3870 super-thread.  This might be too strict a requirement, what with the
3871 presence of stupid newsreaders that chop off long subjects lines.  If
3872 you think so, set this variable to, say, 20 to require that only the
3873 first 20 characters of the subjects have to match.  If you set this
3874 variable to a really low number, you'll find that Gnus will gather
3875 everything in sight into one thread, which isn't very helpful.
3876
3877 @cindex fuzzy article gathering
3878 If you set this variable to the special value @code{fuzzy}, Gnus will
3879 use a fuzzy string comparison algorithm on the subjects.
3880
3881 @item gnus-simplify-subject-fuzzy-regexp
3882 @vindex gnus-simplify-subject-fuzzy-regexp
3883 This can either be a regular expression or list of regular expressions
3884 that match strings that will be removed from subjects if fuzzy subject
3885 simplification is used.
3886
3887 @item gnus-simplify-ignored-prefixes
3888 @vindex gnus-simplify-ignored-prefixes
3889 If you set @code{gnus-summary-gather-subject-limit} to something as low
3890 as 10, you might consider setting this variable to something sensible:
3891
3892 @c Written by Michael Ernst <mernst@cs.rice.edu>
3893 @lisp
3894 (setq gnus-simplify-ignored-prefixes
3895       (concat 
3896        "\\`\\[?\\("
3897        (mapconcat 'identity
3898                   '("looking"
3899                      "wanted" "followup" "summary\\( of\\)?"
3900                      "help" "query" "problem" "question" 
3901                      "answer" "reference" "announce"
3902                      "How can I" "How to" "Comparison of"
3903                      ;; ...
3904                      )
3905                   "\\|")
3906                   "\\)\\s *\\("
3907                   (mapconcat 'identity
3908                              '("for" "for reference" "with" "about")
3909                              "\\|")
3910                   "\\)?\\]?:?[ \t]*"))
3911 @end lisp
3912
3913 All words that match this regexp will be removed before comparing two
3914 subjects. 
3915
3916 @item gnus-summary-gather-exclude-subject
3917 @vindex gnus-summary-gather-exclude-subject
3918 Since loose thread gathering is done on subjects only, that might lead
3919 to many false hits, especially with certain common subjects like
3920 @samp{} and @samp{(none)}.  To make the situation slightly better,
3921 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
3922 what subjects should be excluded from the gathering process.  The
3923 default is @samp{^ *$\\|^(none)$}.  
3924
3925 @item gnus-summary-thread-gathering-function
3926 @vindex gnus-summary-thread-gathering-function
3927 Gnus gathers threads by looking at @code{Subject} headers.  This means
3928 that totally unrelated articles may end up in the same ``thread'', which
3929 is confusing.  An alternate approach is to look at all the
3930 @code{Message-ID}s in all the @code{References} headers to find matches.
3931 This will ensure that no gathered threads ever includes unrelated
3932 articles, but it's also means that people who have posted with broken
3933 newsreaders won't be gathered properly.  The choice is yours---plague or
3934 cholera:
3935
3936 @table @code
3937 @item gnus-gather-threads-by-subject
3938 @findex gnus-gather-threads-by-subject
3939 This function is the default gathering function and looks at
3940 @code{Subject}s exclusively.
3941
3942 @item gnus-gather-threads-by-references
3943 @findex gnus-gather-threads-by-references
3944 This function looks at @code{References} headers exclusively.
3945 @end table
3946
3947 If you want to test gathering by @code{References}, you could say
3948 something like:
3949
3950 @lisp
3951 (setq gnus-summary-thread-gathering-function
3952       'gnus-gather-threads-by-references)
3953 @end lisp
3954
3955 @item gnus-summary-make-false-root
3956 @vindex gnus-summary-make-false-root
3957 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
3958 and create a dummy root at the top.  (Wait a minute.  Root at the top?
3959 Yup.)  Loose subtrees occur when the real root has expired, or you've
3960 read or killed the root in a previous session.
3961
3962 When there is no real root of a thread, Gnus will have to fudge
3963 something.  This variable says what fudging method Gnus should use.
3964 There are four possible values:
3965
3966 @cindex adopting articles
3967
3968 @table @code
3969
3970 @item adopt
3971 Gnus will make the first of the orphaned articles the parent.  This
3972 parent will adopt all the other articles.  The adopted articles will be
3973 marked as such by pointy brackets (@samp{<>}) instead of the standard
3974 square brackets (@samp{[]}).  This is the default method.
3975
3976 @item dummy
3977 @vindex gnus-summary-dummy-line-format
3978 Gnus will create a dummy summary line that will pretend to be the
3979 parent.  This dummy line does not correspond to any real article, so
3980 selecting it will just select the first real article after the dummy
3981 article.  @code{gnus-summary-dummy-line-format} is used to specify the
3982 format of the dummy roots.  It accepts only one format spec:  @samp{S},
3983 which is the subject of the article.  @xref{Formatting Variables}.
3984
3985 @item empty
3986 Gnus won't actually make any article the parent, but simply leave the
3987 subject field of all orphans except the first empty.  (Actually, it will
3988 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
3989 Buffer Format}).)
3990
3991 @item none
3992 Don't make any article parent at all.  Just gather the threads and
3993 display them after one another.
3994
3995 @item nil
3996 Don't gather loose threads.
3997 @end table
3998
3999 @item gnus-thread-hide-subtree
4000 @vindex gnus-thread-hide-subtree
4001 If non-@code{nil}, all threads will be hidden when the summary buffer is
4002 generated.
4003
4004 @item gnus-thread-hide-killed
4005 @vindex gnus-thread-hide-killed
4006 if you kill a thread and this variable is non-@code{nil}, the subtree
4007 will be hidden.
4008
4009 @item gnus-thread-ignore-subject
4010 @vindex gnus-thread-ignore-subject
4011 Sometimes somebody changes the subject in the middle of a thread.  If
4012 this variable is non-@code{nil}, the subject change is ignored.  If it
4013 is @code{nil}, which is the default, a change in the subject will result
4014 in a new thread.
4015
4016 @item gnus-thread-indent-level
4017 @vindex gnus-thread-indent-level
4018 This is a number that says how much each sub-thread should be indented.
4019 The default is @code{4}.
4020 @end table
4021
4022
4023 @node Thread Commands
4024 @subsection Thread Commands
4025 @cindex thread commands
4026
4027 @table @kbd
4028
4029 @item T k
4030 @itemx M-C-k
4031 @kindex T k (Summary)
4032 @kindex M-C-k (Summary)
4033 @findex gnus-summary-kill-thread
4034 Mark all articles in the current sub-thread as read
4035 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
4036 remove all marks instead.  If the prefix argument is negative, tick
4037 articles instead.
4038
4039 @item T l
4040 @itemx M-C-l
4041 @kindex T l (Summary)
4042 @kindex M-C-l (Summary)
4043 @findex gnus-summary-lower-thread
4044 Lower the score of the current thread
4045 (@code{gnus-summary-lower-thread}). 
4046
4047 @item T i
4048 @kindex T i (Summary)
4049 @findex gnus-summary-raise-thread
4050 Increase the score of the current thread
4051 (@code{gnus-summary-raise-thread}).
4052
4053 @item T #
4054 @kindex T # (Summary)
4055 @findex gnus-uu-mark-thread
4056 Set the process mark on the current thread
4057 (@code{gnus-uu-mark-thread}).
4058
4059 @item T M-#
4060 @kindex T M-# (Summary)
4061 @findex gnus-uu-unmark-thread
4062 Remove the process mark from the current thread
4063 (@code{gnus-uu-unmark-thread}).
4064
4065 @item T T
4066 @kindex T T (Summary)
4067 @findex gnus-summary-toggle-threads
4068 Toggle threading (@code{gnus-summary-toggle-threads}).
4069
4070 @item T s
4071 @kindex T s (Summary)
4072 @findex gnus-summary-show-thread
4073 Expose the thread hidden under the current article, if any
4074 (@code{gnus-summary-show-thread}).
4075
4076 @item T h
4077 @kindex T h (Summary)
4078 @findex gnus-summary-hide-thread
4079 Hide the current (sub)thread (@code{gnus-summary-hide-thread}).
4080
4081 @item T S
4082 @kindex T S (Summary)
4083 @findex gnus-summary-show-all-threads
4084 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
4085
4086 @item T H
4087 @kindex T H (Summary)
4088 @findex gnus-summary-hide-all-threads
4089 Hide all threads (@code{gnus-summary-hide-all-threads}).
4090
4091 @item T t
4092 @kindex T t (Summary)
4093 @findex gnus-summary-rethread-current
4094 Re-thread the thread the current article is part of
4095 (@code{gnus-summary-rethread-current}).  This works even when the
4096 summary buffer is otherwise unthreaded.
4097
4098 @item T ^
4099 @kindex T ^ (Summary)
4100 @findex gnus-summary-reparent-thread
4101 Make the current article the child of the marked (or previous) article
4102 (@code{gnus-summary-reparent-thread}.
4103
4104 @end table
4105
4106 The following commands are thread movement commands.  They all
4107 understand the numeric prefix.
4108
4109 @table @kbd
4110
4111 @item T n
4112 @kindex T n (Summary)
4113 @findex gnus-summary-next-thread
4114 Go to the next thread (@code{gnus-summary-next-thread}).
4115
4116 @item T p
4117 @kindex T p (Summary)
4118 @findex gnus-summary-prev-thread
4119 Go to the previous thread (@code{gnus-summary-prev-thread}).
4120
4121 @item T d
4122 @kindex T d (Summary)
4123 @findex gnus-summary-down-thread
4124 Descend the thread (@code{gnus-summary-down-thread}).
4125
4126 @item T u
4127 @kindex T u (Summary)
4128 @findex gnus-summary-up-thread
4129 Ascend the thread (@code{gnus-summary-up-thread}).
4130
4131 @item T o
4132 @kindex T o (Summary)
4133 @findex gnus-summary-top-thread
4134 Go to the top of the thread (@code{gnus-summary-top-thread}).
4135 @end table
4136
4137 @vindex gnus-thread-operation-ignore-subject 
4138 If you ignore subject while threading, you'll naturally end up with
4139 threads that have several different subjects in them.  If you then issue
4140 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
4141 wish to kill the entire thread, but just those parts of the thread that
4142 have the same subject as the current article.  If you like this idea,
4143 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If is
4144 is non-@code{nil} (which it is by default), subjects will be ignored
4145 when doing thread commands.  If this variable is @code{nil}, articles in
4146 the same thread with different subjects will not be included in the
4147 operation in question.  If this variable is @code{fuzzy}, only articles
4148 that have subjects that are fuzzily equal will be included.
4149
4150
4151 @node Sorting
4152 @section Sorting
4153
4154 @findex gnus-thread-sort-by-total-score
4155 @findex gnus-thread-sort-by-date
4156 @findex gnus-thread-sort-by-score
4157 @findex gnus-thread-sort-by-subject
4158 @findex gnus-thread-sort-by-author
4159 @findex gnus-thread-sort-by-number
4160 @vindex gnus-thread-sort-functions
4161 If you are using a threaded summary display, you can sort the threads by
4162 setting @code{gnus-thread-sort-functions}, which is a list of functions.
4163 By default, sorting is done on article numbers.  Ready-made sorting
4164 predicate functions include @code{gnus-thread-sort-by-number},
4165 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
4166 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score}, and
4167 @code{gnus-thread-sort-by-total-score}.
4168
4169 Each function takes two threads and return non-@code{nil} if the first
4170 thread should be sorted before the other.  Note that sorting really is
4171 normally done by looking only at the roots of each thread.  If you use
4172 more than one function, the primary sort key should be the last function
4173 in the list.  You should probably always include
4174 @code{gnus-thread-sort-by-number} in the list of sorting
4175 functions---preferably first.  This will ensure that threads that are
4176 equal with respect to the other sort criteria will be displayed in
4177 ascending article order.
4178
4179 If you would like to sort by score, then by subject, and finally by
4180 number, you could do something like:
4181
4182 @lisp
4183 (setq gnus-thread-sort-functions 
4184       '(gnus-thread-sort-by-number
4185         gnus-thread-sort-by-subject
4186         gnus-thread-sort-by-score))
4187 @end lisp
4188
4189 The threads that have highest score will be displayed first in the
4190 summary buffer.  When threads have the same score, they will be sorted
4191 alphabetically.  The threads that have the same score and the same
4192 subject will be sorted by number, which is (normally) the sequence in
4193 which the articles arrived.
4194
4195 If you want to sort by score and then reverse arrival order, you could
4196 say something like:
4197
4198 @lisp
4199 (setq gnus-thread-sort-functions
4200       '((lambda (t1 t2) 
4201           (not (gnus-thread-sort-by-number t1 t2)))
4202         gnus-thread-sort-by-score))
4203 @end lisp
4204
4205 @vindex gnus-thread-score-function
4206 The function in the @code{gnus-thread-score-function} variable (default
4207 @code{+}) is used for calculating the total score of a thread.  Useful
4208 functions might be @code{max}, @code{min}, or squared means, or whatever
4209 tickles your fancy.
4210
4211 @findex gnus-article-sort-functions
4212 @findex gnus-article-sort-by-date
4213 @findex gnus-article-sort-by-score
4214 @findex gnus-article-sort-by-subject
4215 @findex gnus-article-sort-by-author
4216 @findex gnus-article-sort-by-number
4217 If you are using an unthreaded display for some strange reason or other,
4218 you have to fiddle with the @code{gnus-article-sort-functions} variable.
4219 It is very similar to the @code{gnus-thread-sort-functions}, except that
4220 is uses slightly different functions for article comparison.  Available
4221 sorting predicate functions are @code{gnus-article-sort-by-number},
4222 @code{gnus-article-sort-by-author}, @code{gnus-article-sort-by-subject},
4223 @code{gnus-article-sort-by-date}, and @code{gnus-article-sort-by-score}.
4224
4225 If you want to sort an unthreaded summary display by subject, you could
4226 say something like:
4227
4228 @lisp
4229 (setq gnus-article-sort-functions 
4230       '(gnus-article-sort-by-number
4231         gnus-article-sort-by-subject))
4232 @end lisp
4233
4234
4235
4236 @node Asynchronous Fetching
4237 @section Asynchronous Article Fetching
4238 @cindex asynchronous article fetching
4239
4240 If you read your news from an @sc{nntp} server that's far away, the
4241 network latencies may make reading articles a chore.  You have to wait
4242 for a while after pressing @kbd{n} to go to the next article before the
4243 article appears.  Why can't Gnus just go ahead and fetch the article
4244 while you are reading the previous one? Why not, indeed.
4245
4246 First, some caveats.  There are some pitfalls to using asynchronous
4247 article fetching, especially the way Gnus does it.  
4248
4249 Let's say you are reading article 1, which is short, and article 2 is
4250 quite long, and you are not interested in reading that.  Gnus does not
4251 know this, so it goes ahead and fetches article 2.  You decide to read
4252 article 3, but since Gnus is in the process of fetching article 2, the
4253 connection is blocked.
4254
4255 To avoid these situations, Gnus will open two (count 'em two)
4256 connections to the server.  Some people may think this isn't a very nice
4257 thing to do, but I don't see any real alternatives.  Setting up that
4258 extra connection takes some time, so Gnus startup will be slower.
4259
4260 Gnus will fetch more articles than you will read.  This will mean that
4261 the link between your machine and the @sc{nntp} server will become more
4262 loaded than if you didn't use article pre-fetch.  The server itself will
4263 also become more loaded---both with the extra article requests, and the
4264 extra connection.
4265
4266 Ok, so now you know that you shouldn't really use this thing...  unless
4267 you really want to.
4268
4269 @vindex gnus-asynchronous
4270 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
4271 happen automatically.
4272
4273 @vindex nntp-async-number
4274 You can control how many articles that are to be pre-fetched by setting
4275 @code{nntp-async-number}.  This is five by default, which means that when
4276 you read an article in the group, @code{nntp} will pre-fetch the next
4277 five articles.  If this variable is @code{t}, @code{nntp} will pre-fetch
4278 all the articles that it can without bound.  If it is @code{nil}, no
4279 pre-fetching will be made.
4280
4281 @vindex gnus-asynchronous-article-function
4282 You may wish to create some sort of scheme for choosing which articles
4283 that @code{nntp} should consider as candidates for pre-fetching.  For
4284 instance, you may wish to pre-fetch all articles with high scores, and
4285 not pre-fetch low-scored articles.  You can do that by setting the
4286 @code{gnus-asynchronous-article-function}, which will be called with an
4287 alist where the keys are the article numbers.  Your function should
4288 return an alist where the articles you are not interested in have been
4289 removed.  You could also do sorting on article score and the like. 
4290
4291
4292 @node Article Caching
4293 @section Article Caching
4294 @cindex article caching
4295 @cindex caching
4296
4297 If you have an @emph{extremely} slow @sc{nntp} connection, you may
4298 consider turning article caching on.  Each article will then be stored
4299 locally under your home directory.  As you may surmise, this could
4300 potentially use @emph{huge} amounts of disk space, as well as eat up all
4301 your inodes so fast it will make your head swim.  In vodka.
4302
4303 Used carefully, though, it could be just an easier way to save articles.
4304
4305 @vindex gnus-use-long-file-name
4306 @vindex gnus-cache-directory
4307 @vindex gnus-use-cache
4308 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
4309 all articles that are ticked or marked as dormant will then be copied
4310 over to your local cache (@code{gnus-cache-directory}).  Whether this
4311 cache is flat or hierarchal is controlled by the
4312 @code{gnus-use-long-file-name} variable, as usual.
4313
4314 When re-select a ticked or dormant article, it will be fetched from the
4315 cache instead of from the server.  As articles in your cache will never
4316 expire, this might serve as a method of saving articles while still
4317 keeping them where they belong.  Just mark all articles you want to save
4318 as dormant, and don't worry.
4319
4320 When an article is marked as read, is it removed from the cache.
4321
4322 @vindex gnus-cache-remove-articles
4323 @vindex gnus-cache-enter-articles
4324 The entering/removal of articles from the cache is controlled by the
4325 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
4326 variables.  Both are lists of symbols.  The first is @code{(ticked
4327 dormant)} by default, meaning that ticked and dormant articles will be
4328 put in the cache.  The latter is @code{(read)} by default, meaning that
4329 articles that are marked as read are removed from the cache.  Possibly
4330 symbols in these two lists are @code{ticked}, @code{dormant},
4331 @code{unread} and @code{read}.
4332
4333 @findex gnus-jog-cache
4334 So where does the massive article-fetching and storing come into the
4335 picture?  The @code{gnus-jog-cache} command will go through all
4336 subscribed newsgroups, request all unread articles, and store them in
4337 the cache.  You should only ever, ever ever ever, use this command if 1)
4338 your connection to the @sc{nntp} server is really, really, really slow
4339 and 2) you have a really, really, really huge disk.  Seriously.
4340
4341 @vindex gnus-uncacheable-groups
4342 It is likely that you do not want caching on some groups.  For instance,
4343 if your @code{nnml} mail is located under your home directory, it makes no
4344 sense to cache it somewhere else under your home directory.  Unless you
4345 feel that it's neat to use twice as much space.  To limit the caching,
4346 you could set the @code{gnus-uncacheable-groups} regexp to
4347 @samp{^nnml}, for instance.  This variable is @code{nil} by
4348 default.
4349
4350 @findex gnus-cache-generate-nov-databases
4351 @findex gnus-cache-generate-active
4352 @vindex gnus-cache-active-file
4353 The cache stores information on what articles it contains in its active
4354 file (@code{gnus-cache-active-file}).  If this file (or any other parts
4355 of the cache) becomes all messed up for some reason or other, Gnus
4356 offers two functions that will try to set things right.  @kbd{M-x
4357 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
4358 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
4359 file.
4360
4361
4362 @node Persistent Articles
4363 @section Persistent Articles
4364 @cindex persistent articles
4365
4366 Closely related to article caching, we have @dfn{persistent articles}.
4367 In fact, it's just a different way of looking at caching, and much more
4368 useful in my opinion.
4369
4370 Say you're reading a newsgroup, and you happen on to some valuable gem
4371 that you want to keep and treasure forever.  You'd normally just save it
4372 (using one of the many saving commands) in some file.  The problem with
4373 that is that it's just, well, yucky.  Ideally you'd prefer just having
4374 the article remain in the group where you found it forever; untouched by
4375 the expiry going on at the news server.
4376
4377 This is what a @dfn{persistent article} is---an article that just won't
4378 be deleted.  It's implemented using the normal cache functions, but
4379 you use two explicit commands for managing persistent articles:
4380
4381 @table @kbd
4382
4383 @item *
4384 @kindex * (Summary)
4385 @findex gnus-cache-enter-article
4386 Make the current article persistent (@code{gnus-cache-enter-article}). 
4387
4388 @item M-*
4389 @kindex M-* (Summary)
4390 @findex gnus-cache-remove-article
4391 Remove the current article from the persistent articles
4392 (@code{gnus-cache-remove-article}).  This will normally delete the
4393 article. 
4394 @end table
4395
4396 Both these commands understand the process/prefix convention. 
4397
4398 To avoid having all ticked articles (and stuff) entered into the cache,
4399 you should set @code{gnus-use-cache} to @code{passive} if you're just
4400 interested in persistent articles:
4401
4402 @lisp
4403 (setq gnus-use-cache 'passive)
4404 @end lisp
4405
4406
4407 @node Article Backlog
4408 @section Article Backlog
4409 @cindex backlog
4410 @cindex article backlog
4411
4412 If you have a slow connection, but the idea of using caching seems
4413 unappealing to you (and it is, really), you can help the situation some
4414 by switching on the @dfn{backlog}.  This is where Gnus will buffer
4415 already read articles so that it doesn't have to re-fetch articles
4416 you've already read.  This only helps if you are in the habit of
4417 re-selecting articles you've recently read, of course.  If you never do
4418 that, turning the backlog on will slow Gnus down a little bit, and
4419 increase memory usage some.
4420
4421 @vindex gnus-keep-backlog
4422 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
4423 at most @var{n} old articles in a buffer for later re-fetching.  If this
4424 variable is non-@code{nil} and is not a number, Gnus will store
4425 @emph{all} read articles, which means that your Emacs will grow without
4426 bound before exploding and taking your machine down with you.  I put
4427 that in there just to keep y'all on your toes.  
4428
4429 This variable is @code{nil} by default.
4430
4431
4432 @node Saving Articles
4433 @section Saving Articles
4434 @cindex saving articles
4435
4436 Gnus can save articles in a number of ways.  Below is the documentation
4437 for saving articles in a fairly straight-forward fashion (i.e., little
4438 processing of the article is done before it is saved).  For a different
4439 approach (uudecoding, unsharing) you should use @code{gnus-uu}
4440 (@pxref{Decoding Articles}).
4441
4442 @vindex gnus-save-all-headers
4443 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
4444 unwanted headers before saving the article.
4445
4446 @vindex gnus-saved-headers
4447 If the preceding variable is @code{nil}, all headers that match the
4448 @code{gnus-saved-headers} regexp will be kept, while the rest will be
4449 deleted before saving.
4450
4451 @table @kbd
4452
4453 @item O o
4454 @itemx o
4455 @kindex O o (Summary)
4456 @kindex o (Summary)
4457 @findex gnus-summary-save-article
4458 Save the current article using the default article saver
4459 (@code{gnus-summary-save-article}). 
4460
4461 @item O m
4462 @kindex O m (Summary)
4463 @findex gnus-summary-save-article-mail
4464 Save the current article in mail format
4465 (@code{gnus-summary-save-article-mail}). 
4466
4467 @item O r
4468 @kindex O r (Summary)
4469 @findex gnus-summary-save-article-rmail
4470 Save the current article in rmail format
4471 (@code{gnus-summary-save-article-rmail}). 
4472
4473 @item O f
4474 @kindex O f (Summary)
4475 @findex gnus-summary-save-article-file
4476 Save the current article in plain file format
4477 (@code{gnus-summary-save-article-file}). 
4478
4479 @item O b
4480 @kindex O b (Summary)
4481 @findex gnus-summary-save-article-body-file
4482 Save the current article body in plain file format
4483 (@code{gnus-summary-save-article-body-file}). 
4484
4485 @item O h
4486 @kindex O h (Summary)
4487 @findex gnus-summary-save-article-folder
4488 Save the current article in mh folder format
4489 (@code{gnus-summary-save-article-folder}). 
4490
4491 @item O v
4492 @kindex O v (Summary)
4493 @findex gnus-summary-save-article-vm
4494 Save the current article in a VM folder
4495 (@code{gnus-summary-save-article-vm}).
4496
4497 @item O p
4498 @kindex O p (Summary)
4499 @findex gnus-summary-pipe-output
4500 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
4501 the current article to a process (@code{gnus-summary-pipe-output}).
4502 @end table
4503
4504 @vindex gnus-prompt-before-saving
4505 All these commands use the process/prefix convention
4506 (@pxref{Process/Prefix}).  If you save bunches of articles using these
4507 functions, you might get tired of being prompted for files to save each
4508 and every article in.  The prompting action is controlled by
4509 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
4510 default, giving you that excessive prompting action you know and
4511 loathe.  If you set this variable to @code{t} instead, you'll be prompted
4512 just once for each series of articles you save.  If you like to really
4513 have Gnus do all your thinking for you, you can even set this variable
4514 to @code{nil}, which means that you will never be prompted for files to
4515 save articles in.  Gnus will simply save all the articles in the default
4516 files. 
4517
4518
4519 @vindex gnus-default-article-saver
4520 You can customize the @code{gnus-default-article-saver} variable to make
4521 Gnus do what you want it to.  You can use any of the four ready-made
4522 functions below, or you can create your own.
4523
4524 @table @code
4525
4526 @item gnus-summary-save-in-rmail
4527 @findex gnus-summary-save-in-rmail
4528 @vindex gnus-rmail-save-name
4529 @findex gnus-plain-save-name
4530 This is the default format, @dfn{babyl}.  Uses the function in the
4531 @code{gnus-rmail-save-name} variable to get a file name to save the
4532 article in.  The default is @code{gnus-plain-save-name}.
4533
4534 @item gnus-summary-save-in-mail
4535 @findex gnus-summary-save-in-mail
4536 @vindex gnus-mail-save-name
4537 Save in a Unix mail (mbox) file.  Uses the function in the
4538 @code{gnus-mail-save-name} variable to get a file name to save the
4539 article in.  The default is @code{gnus-plain-save-name}.
4540
4541 @item gnus-summary-save-in-file
4542 @findex gnus-summary-save-in-file
4543 @vindex gnus-file-save-name
4544 @findex gnus-numeric-save-name
4545 Append the article straight to an ordinary file.  Uses the function in
4546 the @code{gnus-file-save-name} variable to get a file name to save the
4547 article in.  The default is @code{gnus-numeric-save-name}.
4548
4549 @item gnus-summary-save-body-in-file
4550 @findex gnus-summary-save-body-in-file
4551 Append the article body to an ordinary file.  Uses the function in the
4552 @code{gnus-file-save-name} variable to get a file name to save the
4553 article in.  The default is @code{gnus-numeric-save-name}.
4554
4555 @item gnus-summary-save-in-folder
4556 @findex gnus-summary-save-in-folder
4557 @findex gnus-folder-save-name
4558 @findex gnus-Folder-save-name
4559 @vindex gnus-folder-save-name
4560 @cindex rcvstore
4561 @cindex MH folders
4562 Save the article to an MH folder using @code{rcvstore} from the MH
4563 library.  Uses the function in the @code{gnus-folder-save-name} variable
4564 to get a file name to save the article in.  The default is
4565 @code{gnus-folder-save-name}, but you can also use
4566 @code{gnus-Folder-save-name}.  The former creates capitalized names, and
4567 the latter does not.
4568
4569 @item gnus-summary-save-in-vm
4570 @findex gnus-summary-save-in-vm
4571 Save the article in a VM folder.  You have to have the VM mail
4572 reader to use this setting.
4573 @end table
4574
4575 @vindex gnus-article-save-directory
4576 All of these functions, except for the last one, will save the article
4577 in the @code{gnus-article-save-directory}, which is initialized from the
4578 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
4579 default. 
4580
4581 As you can see above, the functions use different functions to find a
4582 suitable name of a file to save the article in.  Below is a list of
4583 available functions that generate names:
4584
4585 @table @code
4586
4587 @item gnus-Numeric-save-name
4588 @findex gnus-Numeric-save-name
4589 Generates file names that look like @file{~/News/Alt.andrea-dworkin/45}.
4590
4591 @item gnus-numeric-save-name
4592 @findex gnus-numeric-save-name
4593 Generates file names that look like @file{~/News/alt.andrea-dworkin/45}.
4594
4595 @item gnus-Plain-save-name
4596 @findex gnus-Plain-save-name
4597 Generates file names that look like @file{~/News/Alt.andrea-dworkin}.
4598
4599 @item gnus-plain-save-name
4600 @findex gnus-plain-save-name
4601 Generates file names that look like @file{~/News/alt.andrea-dworkin}.
4602 @end table
4603
4604 @vindex gnus-split-methods
4605 You can have Gnus suggest where to save articles by plonking a regexp into
4606 the @code{gnus-split-methods} alist.  For instance, if you would like to
4607 save articles related to Gnus in the file @file{gnus-stuff}, and articles
4608 related to VM in @code{vm-stuff}, you could set this variable to something
4609 like:
4610
4611 @lisp
4612 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
4613  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
4614  (my-choosing-function "../other-dir/my-stuff")
4615  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
4616 @end lisp
4617
4618 We see that this is a list where each element is a list that has two
4619 elements---the @dfn{match} and the @dfn{file}.  The match can either be
4620 a string (in which case it is used as a regexp to match on the article
4621 head); it can be a symbol (which will be called as a function with the
4622 group name as a parameter); or it can be a list (which will be
4623 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
4624 the @dfn{file} will be used as a default prompt.  In addition, the
4625 result of the operation itself will be used if the function or form
4626 called returns a string or a list of strings.
4627
4628 You basically end up with a list of file names that might be used when
4629 saving the current article.  (All ``matches'' will be used.)  You will
4630 then be prompted for what you really want to use as a name, with file
4631 name completion over the results from applying this variable.
4632
4633 This variable is @code{((gnus-article-archive-name))} by default, which
4634 means that Gnus will look at the articles it saves for an
4635 @code{Archive-name} line and use that as a suggestion for the file
4636 name. 
4637
4638 @vindex gnus-use-long-file-name
4639 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
4640 @code{nil}, all the preceding functions will replace all periods
4641 (@samp{.}) in the group names with slashes (@samp{/})---which means that
4642 the functions will generate hierarchies of directories instead of having
4643 all the files in the toplevel directory
4644 (@file{~/News/alt/andrea-dworkin} instead of
4645 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
4646 on most systems.  However, for historical reasons, this is @code{nil} on
4647 Xenix and usg-unix-v machines by default.
4648
4649 This function also affects kill and score file names.  If this variable
4650 is a list, and the list contains the element @code{not-score}, long file
4651 names will not be used for score files, if it contains the element
4652 @code{not-save}, long file names will not be used for saving, and if it
4653 contains the element @code{not-kill}, long file names will not be used
4654 for kill files.
4655
4656 If you'd like to save articles in a hierarchy that looks something like
4657 a spool, you could
4658
4659 @lisp
4660 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
4661 (setq gnus-default-article-save 'gnus-summary-save-in-file) ; no encoding
4662 @end lisp
4663
4664 Then just save with @kbd{o}.  You'd then read this hierarchy with
4665 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
4666 the toplevel directory as the argument (@file{~/News/}).  Then just walk
4667 around to the groups/directories with @code{nneething}.
4668
4669
4670 @node Decoding Articles
4671 @section Decoding Articles
4672 @cindex decoding articles
4673
4674 Sometime users post articles (or series of articles) that have been
4675 encoded in some way or other.  Gnus can decode them for you.
4676
4677 @menu 
4678 * Uuencoded Articles::    Uudecode articles.
4679 * Shared Articles::       Unshar articles.
4680 * PostScript Files::      Split PostScript.
4681 * Decoding Variables::    Variables for a happy decoding.
4682 * Viewing Files::         You want to look at the result of the decoding?
4683 @end menu
4684
4685 All these functions use the process/prefix convention
4686 (@pxref{Process/Prefix}) for finding out what articles to work on, with
4687 the extension that a ``single article'' means ``a single series''.  Gnus
4688 can find out by itself what articles belong to a series, decode all the
4689 articles and unpack/view/save the resulting file(s).
4690
4691 Gnus guesses what articles are in the series according to the following
4692 simplish rule: The subjects must be (nearly) identical, except for the
4693 last two numbers of the line.  (Spaces are largely ignored, however.)
4694
4695 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
4696 will find all the articles that match the regexp @samp{^cat.gif
4697 ([0-9]+/[0-9]+).*$}.  
4698
4699 Subjects that are nonstandard, like @samp{cat.gif (2/3) Part 6 of a
4700 series}, will not be properly recognized by any of the automatic viewing
4701 commands, and you have to mark the articles manually with @kbd{#}.
4702
4703
4704 @node Uuencoded Articles
4705 @subsection Uuencoded Articles
4706 @cindex uudecode
4707 @cindex uuencoded articles
4708
4709 @table @kbd
4710
4711 @item X u
4712 @kindex X u (Summary)
4713 @findex gnus-uu-decode-uu
4714 Uudecodes the current series (@code{gnus-uu-decode-uu}).
4715
4716 @item X U
4717 @kindex X U (Summary)
4718 @findex gnus-uu-decode-uu-and-save
4719 Uudecodes and saves the current series
4720 (@code{gnus-uu-decode-uu-and-save}).
4721
4722 @item X v u
4723 @kindex X v u (Summary)
4724 @findex gnus-uu-decode-uu-view
4725 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
4726
4727 @item X v U
4728 @kindex X v U (Summary)
4729 @findex gnus-uu-decode-uu-and-save-view
4730 Uudecodes, views and saves the current series
4731 (@code{gnus-uu-decode-uu-and-save-view}). 
4732 @end table
4733
4734 Remember that these all react to the presence of articles marked with
4735 the process mark.  If, for instance, you'd like to decode and save an
4736 entire newsgroup, you'd typically do @kbd{M P a}
4737 (@code{gnus-uu-mark-all}) and then @kbd{X U}
4738 (@code{gnus-uu-decode-uu-and-save}).
4739
4740 All this is very much different from how @code{gnus-uu} worked with
4741 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
4742 the sun.  This version of @code{gnus-uu} generally assumes that you mark
4743 articles in some way (@pxref{Setting Process Marks}) and then press
4744 @kbd{X u}.
4745
4746 @vindex gnus-uu-notify-files
4747 Note: When trying to decode articles that have names matching
4748 @code{gnus-uu-notify-files}, which is hard-coded to
4749 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
4750 automatically post an article on @samp{comp.unix.wizards} saying that
4751 you have just viewed the file in question.  This feature can't be turned
4752 off.
4753
4754
4755 @node Shared Articles
4756 @subsection Shared Articles
4757 @cindex unshar
4758 @cindex shared articles
4759
4760 @table @kbd
4761
4762 @item X s
4763 @kindex X s (Summary)
4764 @findex gnus-uu-decode-unshar
4765 Unshars the current series (@code{gnus-uu-decode-unshar}).
4766
4767 @item X S
4768 @kindex X S (Summary)
4769 @findex gnus-uu-decode-unshar-and-save
4770 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
4771
4772 @item X v s
4773 @kindex X v s (Summary)
4774 @findex gnus-uu-decode-unshar-view
4775 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
4776
4777 @item X v S
4778 @kindex X v S (Summary)
4779 @findex gnus-uu-decode-unshar-and-save-view
4780 Unshars, views and saves the current series
4781 (@code{gnus-uu-decode-unshar-and-save-view}). 
4782 @end table
4783
4784
4785 @node PostScript Files
4786 @subsection PostScript Files
4787 @cindex PostScript
4788
4789 @table @kbd
4790
4791 @item X p
4792 @kindex X p (Summary)
4793 @findex gnus-uu-decode-postscript
4794 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
4795
4796 @item X P
4797 @kindex X P (Summary)
4798 @findex gnus-uu-decode-postscript-and-save
4799 Unpack and save the current PostScript series
4800 (@code{gnus-uu-decode-postscript-and-save}).
4801
4802 @item X v p
4803 @kindex X v p (Summary)
4804 @findex gnus-uu-decode-postscript-view
4805 View the current PostScript series
4806 (@code{gnus-uu-decode-postscript-view}).
4807
4808 @item X v P
4809 @kindex X v P (Summary)
4810 @findex gnus-uu-decode-postscript-and-save-view
4811 View and save the current PostScript series
4812 (@code{gnus-uu-decode-postscript-and-save-view}). 
4813 @end table
4814
4815
4816 @node Decoding Variables
4817 @subsection Decoding Variables
4818
4819 Adjective, not verb.
4820
4821 @menu 
4822 * Rule Variables::          Variables that say how a file is to be viewed.
4823 * Other Decode Variables::  Other decode variables.
4824 * Uuencoding and Posting::  Variables for customizing uuencoding.
4825 @end menu
4826
4827
4828 @node Rule Variables
4829 @subsubsection Rule Variables
4830 @cindex rule variables
4831
4832 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
4833 variables are on the form
4834   
4835 @lisp
4836       (list '(regexp1 command2)
4837             '(regexp2 command2)
4838             ...)
4839 @end lisp
4840
4841 @table @code
4842
4843 @item gnus-uu-user-view-rules
4844 @vindex gnus-uu-user-view-rules
4845 @cindex sox
4846 This variable is consulted first when viewing files.  If you wish to use,
4847 for instance, @code{sox} to convert an @samp{.au} sound file, you could
4848 say something like:
4849 @lisp
4850        (setq gnus-uu-user-view-rules
4851          (list '(\"\\\\.au$\" \"sox %s -t .aiff > /dev/audio\")))
4852 @end lisp
4853
4854 @item gnus-uu-user-view-rules-end
4855 @vindex gnus-uu-user-view-rules-end
4856 This variable is consulted if Gnus couldn't make any matches from the
4857 user and default view rules.
4858
4859 @item gnus-uu-user-archive-rules
4860 @vindex gnus-uu-user-archive-rules
4861 This variable can be used to say what commands should be used to unpack
4862 archives.
4863 @end table
4864
4865
4866 @node Other Decode Variables
4867 @subsubsection Other Decode Variables
4868
4869 @table @code
4870 @vindex gnus-uu-grabbed-file-functions
4871
4872 @item gnus-uu-grabbed-file-functions
4873 All functions in this list will be called right each file has been
4874 successfully decoded---so that you can move or view files right away,
4875 and don't have to wait for all files to be decoded before you can do
4876 anything.  Ready-made functions you can put in this list are:
4877
4878 @table @code
4879
4880 @item gnus-uu-grab-view
4881 @findex gnus-uu-grab-view
4882 View the file.
4883
4884 @item gnus-uu-grab-move
4885 @findex gnus-uu-grab-move
4886 Move the file (if you're using a saving function.)
4887 @end table
4888
4889 @item gnus-uu-ignore-files-by-name
4890 @vindex gnus-uu-ignore-files-by-name
4891 Files with name matching this regular expression won't be viewed.
4892
4893 @item gnus-uu-ignore-files-by-type
4894 @vindex gnus-uu-ignore-files-by-type
4895 Files with a @sc{mime} type matching this variable won't be viewed.
4896 Note that Gnus tries to guess what type the file is based on the name.
4897 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
4898 kludgey.
4899
4900 @item gnus-uu-tmp-dir
4901 @vindex gnus-uu-tmp-dir
4902 Where @code{gnus-uu} does its work.
4903
4904 @item gnus-uu-do-not-unpack-archives
4905 @vindex gnus-uu-do-not-unpack-archives
4906 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
4907 looking for files to display.
4908
4909 @item gnus-uu-view-and-save
4910 @vindex gnus-uu-view-and-save
4911 Non-@code{nil} means that the user will always be asked to save a file
4912 after viewing it.
4913
4914 @item gnus-uu-ignore-default-view-rules
4915 @vindex gnus-uu-ignore-default-view-rules
4916 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
4917 rules.
4918
4919 @item gnus-uu-ignore-default-archive-rules
4920 @vindex gnus-uu-ignore-default-archive-rules
4921 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
4922 unpacking commands.
4923
4924 @item gnus-uu-kill-carriage-return
4925 @vindex gnus-uu-kill-carriage-return
4926 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
4927 from articles.
4928
4929 @item gnus-uu-unmark-articles-not-decoded
4930 @vindex gnus-uu-unmark-articles-not-decoded
4931 Non-@code{nil} means that @code{gnus-uu} will mark articles that were
4932 unsuccessfully decoded as unread.
4933
4934 @item gnus-uu-correct-stripped-uucode
4935 @vindex gnus-uu-correct-stripped-uucode
4936 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
4937 uuencoded files that have had trailing spaces deleted.
4938
4939 @item gnus-uu-view-with-metamail
4940 @vindex gnus-uu-view-with-metamail
4941 @cindex metamail
4942 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
4943 commands defined by the rule variables and just fudge a @sc{mime}
4944 content type based on the file name.  The result will be fed to
4945 @code{metamail} for viewing.
4946
4947 @item gnus-uu-save-in-digest
4948 @vindex gnus-uu-save-in-digest
4949 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
4950 decoding, will save in digests.  If this variable is @code{nil},
4951 @code{gnus-uu} will just save everything in a file without any
4952 embellishments.  The digesting almost conforms to RFC1153---no easy way
4953 to specify any meaningful volume and issue numbers were found, so I
4954 simply dropped them.
4955
4956 @end table
4957
4958
4959 @node Uuencoding and Posting
4960 @subsubsection Uuencoding and Posting
4961
4962 @table @code
4963
4964 @item gnus-uu-post-include-before-composing
4965 @vindex gnus-uu-post-include-before-composing
4966 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
4967 before you compose the article.  If this variable is @code{t}, you can
4968 either include an encoded file with @kbd{C-c C-i} or have one included
4969 for you when you post the article.
4970
4971 @item gnus-uu-post-length
4972 @vindex gnus-uu-post-length
4973 Maximum length of an article.  The encoded file will be split into how
4974 many articles it takes to post the entire file.
4975
4976 @item gnus-uu-post-threaded
4977 @vindex gnus-uu-post-threaded
4978 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
4979 thread.  This may not be smart, as no other decoder I have seen are able
4980 to follow threads when collecting uuencoded articles.  (Well, I have
4981 seen one package that does that---@code{gnus-uu}, but somehow, I don't
4982 think that counts...) Default is @code{nil}.
4983
4984 @item gnus-uu-post-separate-description
4985 @vindex gnus-uu-post-separate-description
4986 Non-@code{nil} means that the description will be posted in a separate
4987 article.  The first article will typically be numbered (0/x).  If this
4988 variable is @code{nil}, the description the user enters will be included
4989 at the beginning of the first article, which will be numbered (1/x).
4990 Default is @code{t}.
4991
4992 @end table
4993
4994
4995 @node Viewing Files
4996 @subsection Viewing Files
4997 @cindex viewing files
4998 @cindex pseudo-articles
4999
5000 After decoding, if the file is some sort of archive, Gnus will attempt
5001 to unpack the archive and see if any of the files in the archive can be
5002 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
5003 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
5004 uncompress and de-tar the main file, and then view the two pictures.
5005 This unpacking process is recursive, so if the archive contains archives
5006 of archives, it'll all be unpacked.
5007
5008 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
5009 extracted file into the summary buffer.  If you go to these
5010 ``articles'', you will be prompted for a command to run (usually Gnus
5011 will make a suggestion), and then the command will be run.
5012
5013 @vindex gnus-view-pseudo-asynchronously
5014 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
5015 until the viewing is done before proceeding.
5016
5017 @vindex gnus-view-pseudos
5018 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
5019 the pseudo-articles into the summary buffer, but view them
5020 immediately.  If this variable is @code{not-confirm}, the user won't even
5021 be asked for a confirmation before viewing is done.
5022
5023 @vindex gnus-view-pseudos-separately 
5024 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
5025 pseudo-article will be created for each file to be viewed.  If
5026 @code{nil}, all files that use the same viewing command will be given as
5027 a list of parameters to that command.
5028
5029 @vindex gnus-insert-pseudo-articles
5030 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
5031 pseudo-articles when decoding.  It is @code{t} by default.
5032
5033 So; there you are, reading your @emph{pseudo-articles} in your
5034 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
5035 Why isn't anything real anymore? How did we get here?
5036
5037
5038 @node Article Treatment
5039 @section Article Treatment
5040
5041 Reading through this huge manual, you may have quite forgotten that the
5042 object of newsreaders are to actually, like, read what people have
5043 written.  Reading articles.  Unfortunately, people are quite bad at
5044 writing, so there are tons of functions and variables to make reading
5045 these articles easier.
5046
5047 @menu
5048 * Article Highlighting::    You want to make the article look like fruit salad.
5049 * Article Hiding::          You also want to make certain info go away.
5050 * Article Washing::         Lots of way-neat functions to make life better.
5051 * Article Buttons::         Click on URLs, Message-IDs, addresses and the like.
5052 * Article Date::            Grumble, UT!
5053 * Article Signature::       What is a signature?
5054 @end menu
5055
5056
5057 @node Article Highlighting
5058 @subsection Article Highlighting
5059 @cindex highlight
5060
5061 Not only do you want your article buffer to look like fruit salad, but
5062 you want it to look like technicolor fruit salad.
5063
5064 @table @kbd
5065
5066 @item W H a
5067 @kindex W H a (Summary)
5068 @findex gnus-article-highlight
5069 Highlight the current article (@code{gnus-article-highlight}).
5070
5071 @item W H h
5072 @kindex W H h (Summary)
5073 @findex gnus-article-highlight-headers
5074 @vindex gnus-header-face-alist
5075 Highlight the headers (@code{gnus-article-highlight-headers}).  The
5076 highlighting will be done according to the @code{gnus-header-face-alist}
5077 variable, which is a list where each element has the form @var{(regexp
5078 name content)}.  @var{regexp} is a regular expression for matching the
5079 header, @var{name} is the face used for highlighting the header name and
5080 @var{content} is the face for highlighting the header value.  The first
5081 match made will be used.  Note that @var{regexp} shouldn't have @samp{^}
5082 prepended---Gnus will add one.
5083
5084 @item W H c
5085 @kindex W H c (Summary)
5086 @findex gnus-article-highlight-citation
5087 Highlight cited text (@code{gnus-article-highlight-citation}). 
5088
5089 Some variables to customize the citation highlights:
5090
5091 @table @code
5092 @vindex gnus-cite-parse-max-size
5093
5094 @item gnus-cite-parse-max-size
5095 If the article size if bigger than this variable (which is 25000 by
5096 default), no citation highlighting will be performed.  
5097
5098 @item gnus-cite-prefix-regexp
5099 @vindex gnus-cite-prefix-regexp
5100 Regexp matching the longest possible citation prefix on a line. 
5101
5102 @item gnus-cite-max-prefix
5103 @vindex gnus-cite-max-prefix
5104 Maximum possible length for a citation prefix (default 20).
5105
5106 @item gnus-cite-face-list
5107 @vindex gnus-cite-face-list
5108 List of faces used for highlighting citations.  When there are citations
5109 from multiple articles in the same message, Gnus will try to give each
5110 citation from each article its own face.  This should make it easier to
5111 see who wrote what.
5112
5113 @item gnus-supercite-regexp
5114 @vindex gnus-supercite-regexp
5115 Regexp matching normal Supercite attribution lines.  
5116
5117 @item gnus-supercite-secondary-regexp
5118 @vindex gnus-supercite-secondary-regexp
5119 Regexp matching mangled Supercite attribution lines.
5120
5121 @item gnus-cite-minimum-match-count
5122 @vindex gnus-cite-minimum-match-count
5123 Minimum number of identical prefixes we have to see before we believe
5124 that it's a citation.
5125
5126 @item gnus-cite-attribution-prefix
5127 @vindex gnus-cite-attribution-prefix
5128 Regexp matching the beginning of an attribution line.
5129
5130 @item gnus-cite-attribution-suffix
5131 @vindex gnus-cite-attribution-suffix
5132 Regexp matching the end of an attribution line.
5133
5134 @item gnus-cite-attribution-face
5135 @vindex gnus-cite-attribution-face
5136 Face used for attribution lines.  It is merged with the face for the
5137 cited text belonging to the attribution.
5138
5139 @end table
5140
5141
5142 @item W H s
5143 @kindex W H s (Summary)
5144 @vindex gnus-signature-separator
5145 @vindex gnus-signature-face
5146 @findex gnus-article-highlight-signature
5147 Highlight the signature (@code{gnus-article-highlight-signature}).
5148 Everything after @code{gnus-signature-separator} (@pxref{Article
5149 Signature}) in an article will be considered a signature and will be
5150 highlighted with @code{gnus-signature-face}, which is @code{italic} by
5151 default.
5152
5153 @end table
5154
5155
5156 @node Article Hiding
5157 @subsection Article Hiding
5158 @cindex article hiding
5159
5160 Or rather, hiding certain things in each article.  There usually is much
5161 too much cruft in most articles.  
5162
5163 @table @kbd
5164
5165 @item W W a
5166 @kindex W W a (Summary)
5167 @findex gnus-article-hide
5168 Do maximum hiding on the summary buffer (@kbd{gnus-article-hide}). 
5169
5170 @item W W h
5171 @kindex W W h (Summary)
5172 @findex gnus-article-hide-headers
5173 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
5174 Headers}. 
5175
5176 @item W W b
5177 @kindex W W b (Summary)
5178 @findex gnus-article-hide-boring-headers
5179 Hide headers that aren't particularly interesting
5180 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
5181
5182 @item W W s
5183 @kindex W W s (Summary)
5184 @findex gnus-article-hide-signature
5185 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
5186 Signature}. 
5187
5188 @item W W p
5189 @kindex W W p (Summary)
5190 @findex gnus-article-hide-pgp
5191 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}). 
5192
5193 @item W W P
5194 @kindex W W P (Summary)
5195 @findex gnus-article-hide-pem
5196 Hide @sc{pem} (privacy enhavnced hessages) gruft
5197 (@code{gnus-article-hide-pem}).
5198
5199 @item W W c
5200 @kindex W W c (Summary)
5201 @findex gnus-article-hide-citation
5202 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
5203 customizing the hiding:
5204
5205 @table @code
5206
5207 @item gnus-cite-hide-percentage
5208 @vindex gnus-cite-hide-percentage
5209 If the cited text is of a bigger percentage than this variable (default
5210 50), hide the cited text.
5211
5212 @item gnus-cite-hide-absolute
5213 @vindex gnus-cite-hide-absolute
5214 The cited text must be have at least this length (default 10) before it
5215 is hidden.
5216
5217 @item gnus-cited-text-button-line-format
5218 @vindex gnus-cited-text-button-line-format
5219 Gnus adds buttons show where the cited text has been hidden, and to
5220 allow toggle hiding the text.  The format of the variable is specified
5221 by this format-like variable (@pxref{Formatting Variables}).  These
5222 specs are legal:
5223
5224 @table @samp
5225 @item b
5226 Start point of the hidden text.
5227 @item e
5228 End point of the hidden text.
5229 @item l
5230 Length of the hidden text.
5231 @end table
5232
5233 @item gnus-cited-lines-visible
5234 @vindex gnus-cited-lines-visible
5235 The number of lines at the beginning of the cited text to leave shown. 
5236
5237 @end table
5238
5239 @item W W C
5240 @kindex W W C (Summary)
5241 @findex gnus-article-hide-citation-in-followups
5242 Hide cited text in articles that aren't roots
5243 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
5244 useful as an interactive command, but might be a handy function to stick
5245 in @code{gnus-article-display-hook} (@pxref{Customizing Articles}). 
5246
5247 @end table
5248
5249 All these ``hiding'' commands are toggles, but if you give a negative
5250 prefix to these commands, they will show what they have previously
5251 hidden.  If you give a positive prefix, they will always hide.
5252
5253 Also @pxref{Article Highlighting} for further variables for
5254 citation customization.
5255
5256
5257 @node Article Washing
5258 @subsection Article Washing
5259 @cindex washing
5260 @cindex article washing
5261
5262 We call this ``article washing'' for a really good reason.  Namely, the
5263 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
5264
5265 @dfn{Washing} is defined by us as ``changing something from something to
5266 something else'', but normally results in something looking better.
5267 Cleaner, perhaps.
5268
5269 @table @kbd
5270
5271 @item W l
5272 @kindex W l (Summary)
5273 @findex gnus-summary-stop-page-breaking
5274 Remove page breaks from the current article
5275 (@code{gnus-summary-stop-page-breaking}).
5276
5277 @item W r
5278 @kindex W r (Summary)
5279 @findex gnus-summary-caesar-message
5280 Do a Caesar rotate (rot13) on the article buffer
5281 (@code{gnus-summary-caesar-message}). 
5282
5283 @item W t
5284 @kindex W t (Summary)
5285 @findex gnus-summary-toggle-header
5286 Toggle whether to display all headers in the article buffer
5287 (@code{gnus-summary-toggle-header}). 
5288
5289 @item W v
5290 @kindex W v (Summary)
5291 @findex gnus-summary-verbose-header
5292 Toggle whether to display all headers in the article buffer permanently
5293 (@code{gnus-summary-verbose-header}).
5294
5295 @item W m
5296 @kindex W m (Summary)
5297 @findex gnus-summary-toggle-mime
5298 Toggle whether to run the article through @sc{mime} before displaying
5299 (@code{gnus-summary-toggle-mime}).
5300
5301 @item W o
5302 @kindex W o (Summary)
5303 @findex gnus-article-treat-overstrike
5304 Treat overstrike (@code{gnus-article-treat-overstrike}).
5305
5306 @item W w
5307 @kindex W w (Summary)
5308 @findex gnus-article-fill-cited-article
5309 Do word wrap (@code{gnus-article-fill-cited-article}).  If you use this
5310 function in @code{gnus-article-display-hook}, it should be run fairly
5311 late and certainly after any highlighting.
5312
5313 @item W c
5314 @kindex W c (Summary)
5315 @findex gnus-article-remove-cr
5316 Remove CR (@code{gnus-article-remove-cr}).
5317
5318 @item W L
5319 @kindex W L (Summary)
5320 @findex gnus-article-remove-trailing-blank-lines
5321 Remove all blank lines at the end of the article
5322 (@code{gnus-article-remove-trailing-blank-lines}).
5323
5324 @item W q
5325 @kindex W q (Summary)
5326 @findex gnus-article-de-quoted-unreadable
5327 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
5328
5329 @item W f
5330 @kindex W f (Summary)
5331 @cindex x-face
5332 @findex gnus-article-display-x-face
5333 @findex gnus-article-x-face-command
5334 @vindex gnus-article-x-face-command
5335 @vindex gnus-article-x-face-too-ugly
5336 Look for and display any X-Face headers
5337 (@code{gnus-article-display-x-face}).  The command executed by this
5338 function is given by the @code{gnus-article-x-face-command} variable.
5339 If this variable is a string, this string will be executed in a
5340 sub-shell.  If it is a function, this function will be called with the
5341 face as the argument.  If the @code{gnus-article-x-face-too-ugly} (which
5342 is a regexp) matches the @code{From} header, the face will not be shown.
5343 The default action under Emacs is to fork off an @code{xv} to view the
5344 face; under XEmacs the default action is to display the face before the
5345 @code{From} header.  (It's nicer if XEmacs has been compiled with X-Face
5346 support---that will make display somewhat faster.  If there's no native
5347 X-Face support, Gnus will try to convert the @code{X-Face} header using
5348 external programs from the @code{pbmplus} package and friends.)  If you
5349 want to have this function in the display hook, it should probably come
5350 last.
5351
5352 @item W b
5353 @kindex W b (Summary)
5354 @findex gnus-article-add-buttons
5355 Add clickable buttons to the article (@code{gnus-article-add-buttons}). 
5356
5357 @item W B
5358 @kindex W B (Summary)
5359 @findex gnus-article-add-buttons-to-head
5360 Add clickable buttons to the article headers
5361 (@code{gnus-article-add-buttons-to-head}).  
5362
5363 @end table
5364
5365
5366 @node Article Buttons
5367 @subsection Article Buttons
5368 @cindex buttons
5369
5370 People often include references to other stuff in articles, and it would
5371 be nice if Gnus could just fetch whatever it is that people talk about
5372 with the minimum of fuzz.
5373
5374 Gnus adds @dfn{buttons} to certain standard references by default:
5375 Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
5376 two variables, one that handles article bodies and one that handles
5377 article heads:
5378
5379 @table @code
5380
5381 @item gnus-button-alist
5382 @vindex gnus-button-alist
5383 This is an alist where each entry has this form:
5384
5385 @lisp
5386 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
5387 @end lisp
5388
5389 @table @var
5390
5391 @item regexp
5392 All text that match this regular expression will be considered an
5393 external reference.  Here's a typical regexp that match embedded URLs:
5394 @samp{<URL:\\([^\n\r>]*\\)>}. 
5395
5396 @item button-par
5397 Gnus has to know which parts of the match is to be highlighted.  This is
5398 a number that says what sub-expression of the regexp that is to be
5399 highlighted.  If you want it all highlighted, you use @code{0} here.
5400
5401 @item use-p
5402 This form will be @code{eval}ed, and if the result is non-@code{nil},
5403 this is considered a match.  This is useful if you want extra sifting to
5404 avoid false matches.
5405
5406 @item function
5407 This function will be called when you click on this button.
5408
5409 @item data-par
5410 As with @var{button-par}, this is a sub-expression number, but this one
5411 says which part of the match is to be sent as data to @var{function}. 
5412
5413 @end table
5414
5415 So the full entry for buttonizing URLs is then
5416
5417 @lisp
5418 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
5419 @end lisp
5420
5421 @item gnus-header-button-alist
5422 @vindex gnus-header-button-alist
5423 This is just like the other alist, except that it is applied to the
5424 article head only, and that each entry has an additional element that is
5425 used to say what headers to apply the buttonize coding to:
5426
5427 @lisp
5428 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
5429 @end lisp
5430
5431 @var{header} is a regular expression.
5432
5433 @item gnus-button-url-regexp
5434 @vindex gnus-button-url-regexp
5435 A regular expression that matches embedded URLs.  It is used in the
5436 default values of the variables above.
5437
5438 @item gnus-article-button-face
5439 @vindex gnus-article-button-face
5440 Face used on bottons.
5441
5442 @item gnus-article-mouse-face
5443 @vindex gnus-article-mouse-face
5444 Face is used when the mouse cursor is over a button.
5445
5446 @end table
5447
5448
5449 @node Article Date
5450 @subsection Article Date
5451
5452 The date is most likely generated in some obscure timezone you've never
5453 heard of, so it's quite nice to be able to find out what the time was
5454 when the article was sent.
5455
5456 @table @kbd
5457
5458 @item W T u
5459 @kindex W T u (Summary)
5460 @findex gnus-article-date-ut
5461 Display the date in UT (aka. GMT, aka ZULU)
5462 (@code{gnus-article-date-ut}). 
5463
5464 @item W T l
5465 @kindex W T l (Summary)
5466 @findex gnus-article-date-local
5467 Display the date in the local timezone (@code{gnus-article-date-local}).
5468
5469 @item W T e
5470 @kindex W T e (Summary)
5471 @findex gnus-article-date-lapsed
5472 Say how much time has (e)lapsed between the article was posted and now
5473 (@code{gnus-article-date-lapsed}).
5474
5475 @item W T o
5476 @kindex W T o (Summary)
5477 @findex gnus-article-date-original
5478 Display the original date (@code{gnus-article-date-original}).  This can
5479 be useful if you normally use some other conversion function and is
5480 worried that it might be doing something totally wrong.  Say, claiming
5481 that the article was posted in 1854.  Although something like that is
5482 @emph{totally} impossible.  Don't you trust me? *titter*
5483
5484 @end table
5485
5486
5487 @node Article Signature
5488 @subsection Article Signature
5489 @cindex signatures
5490 @cindex article signature
5491
5492 @vindex gnus-signature-separator
5493 Each article is divided into two parts---the head and the body.  The
5494 body can be divided into a signature part and a text part.  The variable
5495 that says what is to be considered a signature is
5496 @code{gnus-signature-separator}.  This is normally the standard
5497 @samp{"^-- $"} as mandated by son-of-RFC 1036.  However, many people use
5498 non-standard signature separators, so this variable can also be a list
5499 of regular expressions to be tested, one by one.  (Searches are done
5500 from the end of the body towards the beginning.)  One likely value is:
5501
5502 @lisp
5503 (setq gnus-signature-separator
5504       '("^-- $"         ; The standard
5505         "^-- *$"        ; A common mangling
5506         "^-------*$"    ; Many people just use a looong 
5507                         ; line of dashes.  Shame!
5508         "^ *--------*$" ; Double-shame!
5509         "^________*$"   ; Underscores are also popular
5510         "^========*$")) ; Pervert!
5511 @end lisp
5512
5513 The more permissive you are, the more likely it is that you'll get false
5514 positives.
5515
5516 @vindex gnus-signature-limit
5517 @code{gnus-signature-limit} provides a limit to what is considered a
5518 signature. 
5519
5520 @enumerate
5521 @item 
5522 If it is an integer, no signature may be longer (in characters) than
5523 that integer.
5524 @item 
5525 If it is a floating point number, no signature may be longer (in lines)
5526 than that number.
5527 @item 
5528 If it is a function, the function will be called without any parameters,
5529 and if it returns @code{nil}, there is no signature in the buffer.
5530 @item
5531 If it is a string, it will be used as a regexp.  If it matches, the text
5532 in question is not a signature.
5533 @end enumerate
5534
5535 This variable can also be a list where the elements may be of the types
5536 listed above.  
5537
5538
5539 @node Summary Sorting
5540 @section Summary Sorting
5541 @cindex summary sorting
5542
5543 You can have the summary buffer sorted in various ways, even though I
5544 can't really see why you'd want that.
5545
5546 @table @kbd
5547
5548 @item C-c C-s C-n
5549 @kindex C-c C-s C-n (Summary)
5550 @findex gnus-summary-sort-by-number
5551 Sort by article number (@code{gnus-summary-sort-by-number}).
5552
5553 @item C-c C-s C-a
5554 @kindex C-c C-s C-a (Summary)
5555 @findex gnus-summary-sort-by-author
5556 Sort by author (@code{gnus-summary-sort-by-author}).
5557
5558 @item C-c C-s C-s
5559 @kindex C-c C-s C-s (Summary)
5560 @findex gnus-summary-sort-by-subject
5561 Sort by subject (@code{gnus-summary-sort-by-subject}).
5562
5563 @item C-c C-s C-d
5564 @kindex C-c C-s C-d (Summary)
5565 @findex gnus-summary-sort-by-date
5566 Sort by date (@code{gnus-summary-sort-by-date}).
5567
5568 @item C-c C-s C-i
5569 @kindex C-c C-s C-i (Summary)
5570 @findex gnus-summary-sort-by-score
5571 Sort by score (@code{gnus-summary-sort-by-score}).
5572 @end table
5573
5574 These functions will work both when you use threading and when you don't
5575 use threading.  In the latter case, all summary lines will be sorted,
5576 line by line.  In the former case, sorting will be done on a
5577 root-by-root basis, which might not be what you were looking for.  To
5578 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
5579 Commands}).
5580
5581
5582 @node Finding the Parent
5583 @section Finding the Parent
5584 @cindex parent articles
5585 @cindex referring articles
5586
5587 @findex gnus-summary-refer-parent-article
5588 @kindex ^ (Summary)
5589 If you'd like to read the parent of the current article, and it is not
5590 displayed in the summary buffer, you might still be able to.  That is,
5591 if the current group is fetched by @sc{nntp}, the parent hasn't expired
5592 and the @code{References} in the current article are not mangled, you
5593 can just press @kbd{^} or @kbd{A r}
5594 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
5595 you'll get the parent.  If the parent is already displayed in the
5596 summary buffer, point will just move to this article.
5597
5598 @findex gnus-summary-refer-references
5599 @kindex A R (Summary)
5600 You can have Gnus fetch all articles mentioned in the @code{References}
5601 header of the article by pushing @kbd{A R}
5602 (@code{gnus-summary-refer-references}). 
5603
5604 @findex gnus-summary-refer-article
5605 @kindex M-^ (Summary)
5606 You can also ask the @sc{nntp} server for an arbitrary article, no
5607 matter what group it belongs to.  @kbd{M-^}
5608 (@code{gnus-summary-refer-article}) will ask you for a
5609 @code{Message-ID}, which is one of those long thingies that look
5610 something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You have to get
5611 it all exactly right.  No fuzzy searches, I'm afraid.
5612
5613 @vindex gnus-refer-article-method
5614 If the group you are reading is located on a backend that does not
5615 support fetching by @code{Message-ID} very well (like @code{nnspool}),
5616 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
5617 would, perhaps, be best if the @sc{nntp} server you consult is the same
5618 as the one that keeps the spool you are reading from updated, but that's
5619 not really necessary.
5620
5621 Most of the mail backends support fetching by @code{Message-ID}, but do
5622 not do a particularly excellent job of it.  That is, @code{nnmbox} and
5623 @code{nnbabyl} are able to locate articles from any groups, while
5624 @code{nnml} and @code{nnfolder} are only able to locate articles that
5625 have been posted to the current group.  (Anything else would be too time
5626 consuming.)  @code{nnmh} does not support this at all.
5627
5628
5629 @node Alternative Approaches
5630 @section Alternative Approaches
5631
5632 Different people like to read news using different methods.  This being
5633 Gnus, we offer a small selection of minor modes for the summary buffers.
5634
5635 @menu
5636 * Pick and Read::               First mark articles and then read them.
5637 * Binary Groups::               Auto-decode all articles.
5638 @end menu
5639
5640
5641 @node Pick and Read
5642 @subsection Pick and Read
5643 @cindex pick and read
5644
5645 Some newsreaders (like @code{nn} and, uhm, @code{nn}) use a two-phased
5646 reading interface.  The user first marks the articles she wants to read
5647 from a summary buffer.  Then she starts reading the articles with just
5648 an article buffer displayed.
5649
5650 @findex gnus-pick-mode
5651 @kindex M-x gnus-pick-mode
5652 Gnus provides a summary buffer minor mode that allows
5653 this---@code{gnus-pick-mode}.  This basically means that a few process
5654 mark commands become one-keystroke commands to allow easy marking, and
5655 it makes one additional command for switching to the summary buffer
5656 available. 
5657
5658 Here are the available keystrokes when using pick mode:
5659
5660 @table @kbd
5661 @item .
5662 @kindex . (Pick)
5663 @findex gnus-summary-mark-as-processable
5664 Pick the article on the current line
5665 (@code{gnus-summary-mark-as-processable}).  If given a numerical prefix,
5666 go to the article on that line and pick that article.  (The line number
5667 is normally displayed on the beginning of the summary pick lines.)
5668
5669 @item SPACE
5670 @kindex SPACE (Pick)
5671 @findex gnus-pick-next-page
5672 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
5673 at the end of the buffer, start reading the picked articles.
5674
5675 @item u
5676 @kindex u (Pick)
5677 @findex gnus-summary-unmark-as-processable
5678 Unpick the article (@code{gnus-summary-unmark-as-processable}). 
5679
5680 @item U
5681 @kindex U (Pick)
5682 @findex gnus-summary-unmark-all-processable
5683 Unpick all articles (@code{gnus-summary-unmark-all-processable}). 
5684
5685 @item t
5686 @kindex t (Pick)
5687 @findex gnus-uu-mark-thread
5688 Pick the thread (@code{gnus-uu-mark-thread}). 
5689
5690 @item T
5691 @kindex T (Pick)
5692 @findex gnus-uu-unmark-thread
5693 Unpick the thread (@code{gnus-uu-unmark-thread}). 
5694
5695 @item r
5696 @kindex r (Pick)
5697 @findex gnus-uu-mark-region
5698 Pick the region (@code{gnus-uu-mark-region}). 
5699
5700 @item R
5701 @kindex R (Pick)
5702 @findex gnus-uu-unmark-region
5703 Unpick the region (@code{gnus-uu-unmark-region}). 
5704
5705 @item e
5706 @kindex e (Pick)
5707 @findex gnus-uu-mark-by-regexp
5708 Pick articles that match a regexp (@code{gnus-uu-mark-by-regexp}). 
5709
5710 @item E
5711 @kindex E (Pick)
5712 @findex gnus-uu-unmark-by-regexp
5713 Unpick articles that match a regexp (@code{gnus-uu-unmark-by-regexp}). 
5714
5715 @item b
5716 @kindex b (Pick)
5717 @findex gnus-uu-mark-buffer
5718 Pick the buffer (@code{gnus-uu-mark-buffer}). 
5719
5720 @item B
5721 @kindex B (Pick)
5722 @findex gnus-uu-unmark-buffer
5723 Unpick the buffer (@code{gnus-uu-unmark-buffer}). 
5724
5725 @item RET
5726 @kindex RET (Pick)
5727 @findex gnus-pick-start-reading
5728 @vindex gnus-pick-display-summary
5729 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
5730 given a prefix, mark all unpicked articles as read first.  If
5731 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
5732 will still be visible when you are reading.
5733
5734 @end table
5735
5736 If this sounds like a good idea to you, you could say:
5737
5738 @lisp
5739 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
5740 @end lisp
5741
5742 @vindex gnus-pick-mode-hook
5743 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
5744
5745 @vindex gnus-mark-unpicked-articles-as-read
5746 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
5747 all unpicked articles as read.  The default is @code{nil}.
5748
5749 @vindex gnus-summary-pick-line-format
5750 The summary line format in pick mode is slightly different than the
5751 standard format.  At the beginning of each line the line number is
5752 displayed.  The pick mode line format is controlled by the
5753 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
5754 Variables}).  It accepts the same format specs that
5755 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}). 
5756
5757
5758 @node Binary Groups
5759 @subsection Binary Groups
5760 @cindex binary groups
5761
5762 @findex gnus-binary-mode
5763 @kindex M-x gnus-binary-mode
5764 If you spend much time in binary groups, you may grow tired of hitting
5765 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
5766 is a minor mode for summary buffers that makes all ordinary Gnus article
5767 selection functions uudecode series of articles and display the result
5768 instead of just displaying the articles the normal way.  
5769
5770 @kindex g (Binary)
5771 @findex gnus-binary-show-article
5772 In fact, the only way to see the actual articles if you have turned this
5773 mode on is the @kbd{g} command (@code{gnus-binary-show-article}). 
5774
5775 @vindex gnus-binary-mode-hook
5776 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
5777
5778
5779 @node Tree Display
5780 @section Tree Display
5781 @cindex trees
5782
5783 @vindex gnus-use-trees
5784 If you don't like the normal Gnus summary display, you might try setting
5785 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
5786 additional @dfn{tree buffer}.  You can execute all summary mode commands
5787 in the tree buffer.  
5788
5789 There are a few variables to customize the tree display, of course:
5790
5791 @table @code
5792 @item gnus-tree-mode-hook
5793 @vindex gnus-tree-mode-hook
5794 A hook called in all tree mode buffers.
5795
5796 @item gnus-tree-mode-line-format
5797 @vindex gnus-tree-mode-line-format
5798 A format string for the mode bar in the tree mode buffers.  The default
5799 is @samp{Gnus: %%b [%A] %Z}.  For a list of legal specs, @pxref{Summary
5800 Buffer Mode Line}. 
5801
5802 @item gnus-selected-tree-face
5803 @vindex gnus-selected-tree-face
5804 Face used for highlighting the selected article in the tree buffer.  The
5805 default is @code{modeline}.
5806
5807 @item gnus-tree-line-format
5808 @vindex gnus-tree-line-format
5809 A format string for the tree nodes.  The name is a bit of a misnomer,
5810 though---it doesn't define a line, but just the node.  The default value
5811 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
5812 the name of the poster.  It is vital that all nodes are of the same
5813 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
5814
5815 Legal specs are:
5816
5817 @table @samp
5818 @item n
5819 The name of the poster.
5820 @item f
5821 The @code{From} header.
5822 @item N
5823 The number of the article.
5824 @item [
5825 The opening bracket.
5826 @item ] 
5827 The closing bracket.
5828 @item s
5829 The subject.
5830 @end table
5831
5832 @xref{Formatting Variables}.
5833
5834 Variables related to the display are:
5835
5836 @table @code
5837 @item gnus-tree-brackets
5838 @vindex gnus-tree-brackets
5839 This is used for differentiating between ``real'' articles and
5840 ``sparse'' articles.  The format is @var{((real-open . real-close)
5841 (sparse-open . sparse-close) (dummy-open . dummy-close))}, and the
5842 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}))}.
5843
5844 @item gnus-tree-parent-child-edges
5845 @vindex gnus-tree-parent-child-edges
5846 This is a list that contains the characters used for connecting parent
5847 nodes to their children.  The default is @code{(?- ?\\ ?|)}. 
5848
5849 @end table
5850
5851 @item gnus-tree-minimize-window
5852 @vindex gnus-tree-minimize-window
5853 If this variable is non-@code{nil}, Gnus will try to keep the tree
5854 buffer as small as possible to allow more room for the other Gnus
5855 windows.  If this variable is a number, the tree buffer will never be
5856 higher than that number.  The default is @code{t}.
5857
5858 @item gnus-generate-tree-function
5859 @vindex gnus-generate-tree-function
5860 @findex gnus-generate-horizontal-tree
5861 @findex gnus-generate-vertical-tree
5862 The function that actually generates the thread tree.  Two predefined
5863 functions are available: @code{gnus-generate-horizontal-tree} and
5864 @code{gnus-generate-vertical-tree} (which is the default).
5865
5866 @end table
5867
5868 Here's and example from a horizontal tree buffer:
5869
5870 @example
5871 @{***@}-(***)-[odd]-[Gun]
5872      |     \[Jan]
5873      |     \[odd]-[Eri]
5874      |     \(***)-[Eri]
5875      |           \[odd]-[Paa]
5876      \[Bjo]
5877      \[Gun]
5878      \[Gun]-[Jor]
5879 @end example
5880
5881 Here's the same thread displayed in a vertical tree buffer:
5882
5883 @example
5884 @{***@}
5885   |--------------------------\-----\-----\
5886 (***)                         [Bjo] [Gun] [Gun]
5887   |--\-----\-----\                          |
5888 [odd] [Jan] [odd] (***)                   [Jor]
5889   |           |     |--\
5890 [Gun]       [Eri] [Eri] [odd]
5891                           |
5892                         [Paa]
5893 @end example
5894
5895
5896 @node Mail Group Commands
5897 @section Mail Group Commands
5898 @cindex mail group commands
5899
5900 Some commands only make sense in mail groups.  If these commands are
5901 illegal in the current group, they will raise a hell and let you know.
5902
5903 All these commands (except the expiry and edit commands) use the
5904 process/prefix convention (@pxref{Process/Prefix}).
5905
5906 @table @kbd
5907
5908 @item B e
5909 @kindex B e (Summary)
5910 @findex gnus-summary-expire-articles
5911 Expire all expirable articles in the group
5912 (@code{gnus-summary-expire-articles}).
5913
5914 @item B M-C-e
5915 @kindex B M-C-e (Summary)
5916 @findex gnus-summary-expire-articles-now
5917 Expunge all the expirable articles in the group
5918 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
5919 articles that are eligible for expiry in the current group will
5920 disappear forever into that big @file{/dev/null} in the sky.
5921
5922 @item B DEL
5923 @kindex B DEL (Summary)
5924 @findex gnus-summary-delete-article
5925 Delete the mail article.  This is ``delete'' as in ``delete it from your
5926 disk forever and ever, never to return again.'' Use with caution.
5927 (@code{gnus-summary-delete-article}).
5928
5929 @item B m
5930 @kindex B m (Summary)
5931 @cindex move mail
5932 @findex gnus-summary-move-article
5933 Move the article from one mail group to another
5934 (@code{gnus-summary-move-article}). 
5935
5936 @item B c
5937 @kindex B c (Summary)
5938 @cindex copy mail
5939 @findex gnus-summary-copy-article
5940 Copy the article from one group (mail group or not) to a mail group
5941 (@code{gnus-summary-copy-article}).
5942
5943 @item B C
5944 @kindex B C (Summary)
5945 @cindex crosspost mail
5946 @findex gnus-summary-crosspost-article
5947 Crosspost the current article to some other group
5948 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
5949 the article in the other group, and the Xref headers of the article will
5950 be properly updated.
5951
5952 @item B i
5953 @kindex B i (Summary)
5954 @findex gnus-summary-import-article
5955 Import an arbitrary file into the current mail newsgroup
5956 (@code{gnus-summary-import-article}).  You will be prompted for a file
5957 name, a @code{From} header and a @code{Subject} header.
5958
5959 @item B r
5960 @kindex B r (Summary)
5961 @findex gnus-summary-respool-article
5962 Respool the mail article (@code{gnus-summary-move-article}).
5963
5964 @item B w
5965 @itemx e
5966 @kindex B w (Summary)
5967 @kindex e (Summary)
5968 @findex gnus-summary-edit-article
5969 @kindex C-c C-c (Article)
5970 Edit the current article (@code{gnus-summary-edit-article}).  To finish
5971 editing and make the changes permanent, type @kbd{C-c C-c}
5972 (@kbd{gnus-summary-edit-article-done}).
5973
5974 @item B q
5975 @kindex B q (Summary)
5976 @findex gnus-summary-respool-query
5977 If you want to re-spool an article, you might be curious as to what group
5978 the article will end up in before you do the re-spooling.  This command
5979 will tell you (@code{gnus-summary-respool-query}). 
5980 @end table
5981
5982 @vindex gnus-move-split-methods
5983 @cindex moving articles
5984 If you move (or copy) articles regularly, you might wish to have Gnus
5985 suggest where to put the articles.  @code{gnus-move-split-methods} is a
5986 variable that uses the same syntax as @code{gnus-split-methods}
5987 (@pxref{Saving Articles}).  You may customize that variable to create
5988 suggestions you find reasonable.
5989
5990
5991 @node Various Summary Stuff
5992 @section Various Summary Stuff
5993
5994 @menu
5995 * Summary Group Information::         Information oriented commands.
5996 * Searching for Articles::            Multiple article commands.
5997 * Really Various Summary Commands::   Those pesky non-conformant commands.
5998 @end menu
5999
6000 @table @code
6001 @vindex gnus-summary-mode-hook
6002 @item gnus-summary-mode-hook
6003 This hook is called when creating a summary mode buffer.
6004
6005 @vindex gnus-summary-generate-hook
6006 @item gnus-summary-generate-hook
6007 This is called as the last thing before doing the threading and the
6008 generation of the summary buffer.  It's quite convenient for customizing
6009 the threading variables based on what data the newsgroup has.  This hook
6010 is called from the summary buffer after most summary buffer variables
6011 has been set.
6012
6013 @vindex gnus-summary-prepare-hook
6014 @item gnus-summary-prepare-hook
6015 Is is called after the summary buffer has been generated.  You might use
6016 it to, for instance, highlight lines or modify the look of the buffer in
6017 some other ungodly manner.  I don't care.
6018
6019 @end table
6020
6021
6022 @node Summary Group Information
6023 @subsection Summary Group Information
6024
6025 @table @kbd
6026
6027 @item H f
6028 @kindex H f (Summary)
6029 @findex gnus-summary-fetch-faq
6030 @vindex gnus-group-faq-directory
6031 Try to fetch the FAQ (list of frequently asked questions) for the
6032 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
6033 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
6034 on a remote machine.  This variable can also be a list of directories.
6035 In that case, giving a prefix to this command will allow you to choose
6036 between the various sites.  @code{ange-ftp} probably will be used for
6037 fetching the file.
6038
6039 @item H d
6040 @kindex H d (Summary)
6041 @findex gnus-summary-describe-group
6042 Give a brief description of the current group
6043 (@code{gnus-summary-describe-group}).  If given a prefix, force
6044 rereading the description from the server.
6045
6046 @item H h
6047 @kindex H h (Summary)
6048 @findex gnus-summary-describe-briefly
6049 Give a very brief description of the most important summary keystrokes
6050 (@code{gnus-summary-describe-briefly}). 
6051
6052 @item H i
6053 @kindex H i (Summary)
6054 @findex gnus-info-find-node
6055 Go to the Gnus info node (@code{gnus-info-find-node}).
6056 @end table
6057
6058
6059 @node Searching for Articles
6060 @subsection Searching for Articles
6061
6062 @table @kbd
6063
6064 @item M-s
6065 @kindex M-s (Summary)
6066 @findex gnus-summary-search-article-forward
6067 Search through all subsequent articles for a regexp
6068 (@code{gnus-summary-search-article-forward}). 
6069
6070 @item M-r
6071 @kindex M-r (Summary)
6072 @findex gnus-summary-search-article-backward
6073 Search through all previous articles for a regexp
6074 (@code{gnus-summary-search-article-backward}). 
6075
6076 @item &
6077 @kindex & (Summary)
6078 @findex gnus-summary-execute-command
6079 This command will prompt you for a header field, a regular expression to
6080 match on this field, and a command to be executed if the match is made
6081 (@code{gnus-summary-execute-command}).
6082
6083 @item M-&
6084 @kindex M-& (Summary)
6085 @findex gnus-summary-universal-argument
6086 Perform any operation on all articles that have been marked with
6087 the process mark (@code{gnus-summary-universal-argument}).
6088 @end table
6089
6090
6091 @node Really Various Summary Commands
6092 @subsection Really Various Summary Commands
6093
6094 @table @kbd
6095
6096 @item A D
6097 @kindex A D (Summary)
6098 @findex gnus-summary-enter-digest-group
6099 If the current article is a collection of other articles (for instance,
6100 a digest), you might use this command to enter a group based on the that
6101 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
6102 guess what article type is currently displayed unless you give a prefix
6103 to this command, which forces a ``digest'' interpretation.  Basically,
6104 whenever you see a message that is a collection of other messages on
6105 some format, you @kbd{A D} and read these messages in a more convenient
6106 fashion.
6107
6108 @item C-t
6109 @kindex C-t (Summary)
6110 @findex gnus-summary-toggle-truncation
6111 Toggle truncation of summary lines (@code{gnus-summary-toggle-truncation}).
6112
6113 @item =
6114 @kindex = (Summary)
6115 @findex gnus-summary-expand-window
6116 Expand the summary buffer window (@code{gnus-summary-expand-window}).
6117 If given a prefix, force an @code{article} window configuration. 
6118 @end table
6119
6120
6121 @node Exiting the Summary Buffer
6122 @section Exiting the Summary Buffer
6123 @cindex summary exit
6124 @cindex exiting groups
6125
6126 Exiting from the summary buffer will normally update all info on the
6127 group and return you to the group buffer. 
6128
6129 @table @kbd
6130
6131 @item Z Z
6132 @itemx q
6133 @kindex Z Z (Summary)
6134 @kindex q (Summary)
6135 @findex gnus-summary-exit
6136 @vindex gnus-summary-exit-hook
6137 @vindex gnus-summary-prepare-exit-hook
6138 Exit the current group and update all information on the group
6139 (@code{gnus-summary-exit}). @code{gnus-summary-prepare-exit-hook} is
6140 called before doing much of the exiting, and calls
6141 @code{gnus-summary-expire-articles} by default.
6142 @code{gnus-summary-exit-hook} is called after finishing the exiting
6143 process. 
6144
6145 @item Z E
6146 @itemx Q
6147 @kindex Z E (Summary)
6148 @kindex Q (Summary)
6149 @findex gnus-summary-exit-no-update
6150 Exit the current group without updating any information on the group
6151 (@code{gnus-summary-exit-no-update}).
6152
6153 @item Z c
6154 @itemx c
6155 @kindex Z c (Summary)
6156 @kindex c (Summary)
6157 @findex gnus-summary-catchup-and-exit
6158 Mark all unticked articles in the group as read and then exit
6159 (@code{gnus-summary-catchup-and-exit}).
6160
6161 @item Z C
6162 @kindex Z C (Summary)
6163 @findex gnus-summary-catchup-all-and-exit
6164 Mark all articles, even the ticked ones, as read and then exit
6165 (@code{gnus-summary-catchup-all-and-exit}).
6166
6167 @item Z n
6168 @kindex Z n (Summary)
6169 @findex gnus-summary-catchup-and-goto-next-group
6170 Mark all articles as read and go to the next group
6171 (@code{gnus-summary-catchup-and-goto-next-group}). 
6172
6173 @item Z R
6174 @kindex Z R (Summary)
6175 @findex gnus-summary-reselect-current-group
6176 Exit this group, and then enter it again
6177 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
6178 all articles, both read and unread.
6179
6180 @item Z G
6181 @itemx M-g
6182 @kindex Z G (Summary)
6183 @kindex M-g (Summary)
6184 @findex gnus-summary-rescan-group
6185 Exit the group, check for new articles in the group, and select the
6186 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
6187 articles, both read and unread.
6188
6189 @item Z N
6190 @kindex Z N (Summary)
6191 @findex gnus-summary-next-group
6192 Exit the group and go to the next group
6193 (@code{gnus-summary-next-group}). 
6194
6195 @item Z P
6196 @kindex Z P (Summary)
6197 @findex gnus-summary-prev-group
6198 Exit the group and go to the previous group
6199 (@code{gnus-summary-prev-group}). 
6200 @end table
6201
6202 @vindex gnus-exit-group-hook
6203 @code{gnus-exit-group-hook} is called when you exit the current
6204 group.  
6205
6206 @findex gnus-summary-wake-up-the-dead
6207 @findex gnus-dead-summary-mode
6208 @vindex gnus-kill-summary-on-exit
6209 If you're in the habit of exiting groups, and then changing your mind
6210 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
6211 If you do that, Gnus won't kill the summary buffer when you exit it.
6212 (Quelle surprise!)  Instead it will change the name of the buffer to
6213 something like @samp{*Dead Summary ... *} and install a minor mode
6214 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
6215 buffer, you'll find that all keys are mapped to a function called
6216 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
6217 summary buffer will result in a live, normal summary buffer.  
6218
6219 There will never be more than one dead summary buffer at any one time. 
6220
6221 @vindex gnus-use-cross-reference
6222 The data on the current group will be updated (which articles you have
6223 read, which articles you have replied to, etc.) when you exit the
6224 summary buffer.  If the @code{gnus-use-cross-reference} variable is
6225 @code{t} (which is the default), articles that are cross-referenced to
6226 this group and are marked as read, will also be marked as read in the
6227 other subscribed groups they were cross-posted to.  If this variable is
6228 neither @code{nil} nor @code{t}, the article will be marked as read in
6229 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
6230
6231
6232 @node Crosspost Handling
6233 @section Crosspost Handling
6234
6235 @cindex velveeta
6236 @cindex spamming
6237 Marking cross-posted articles as read ensures that you'll never have to
6238 read the same article more than once.  Unless, of course, somebody has
6239 posted it to several groups separately.  Posting the same article to
6240 several groups (not cross-posting) is called @dfn{spamming}, and you are
6241 by law required to send nasty-grams to anyone who perpetrates such a
6242 heinous crime.  You may want to try NoCeM handling to filter out spam
6243 (@pxref{NoCeM}). 
6244
6245 Remember: Cross-posting is kinda ok, but posting the same article
6246 separately to several groups is not.  Massive cross-posting (aka.
6247 @dfn{velveeta}) is to be avoided at all costs.
6248
6249 @cindex cross-posting
6250 @cindex Xref
6251 @cindex @sc{nov}
6252 One thing that may cause Gnus to not do the cross-posting thing
6253 correctly is if you use an @sc{nntp} server that supports @sc{xover}
6254 (which is very nice, because it speeds things up considerably) which
6255 does not include the @code{Xref} header in its @sc{nov} lines.  This is
6256 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
6257 even with @sc{xover} by registering the @code{Xref} lines of all
6258 articles you actually read, but if you kill the articles, or just mark
6259 them as read without reading them, Gnus will not get a chance to snoop
6260 the @code{Xref} lines out of these articles, and will be unable to use
6261 the cross reference mechanism.
6262
6263 @cindex LIST overview.fmt
6264 @cindex overview.fmt
6265 To check whether your @sc{nntp} server includes the @code{Xref} header
6266 in its overview files, try @samp{telnet your.nntp.server nntp},
6267 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
6268 overview.fmt}.  This may not work, but if it does, and the last line you
6269 get does not read @samp{Xref:full}, then you should shout and whine at
6270 your news admin until she includes the @code{Xref} header in the
6271 overview files.
6272
6273 @vindex gnus-nov-is-evil
6274 If you want Gnus to get the @code{Xref}s right all the time, you have to
6275 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
6276 considerably.
6277
6278 C'est la vie.
6279
6280 For an alternative approach, @xref{Duplicate Suppression}.
6281
6282
6283 @node Duplicate Suppression
6284 @section Duplicate Suppression
6285
6286 By default, Gnus tries to make sure that you don't have to read the same
6287 article more than once by utilizing the crossposing mechanism
6288 (@pxref{Crosspost Handling}).  However, that simple and efficient
6289 approach may not work satisfactorily for some users for various
6290 reasons.  
6291
6292 @enumerate
6293 @item 
6294 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
6295 is evil and not very common.
6296
6297 @item 
6298 The @sc{nntp} server may fail to include the @code{Xref} header in the
6299 @file{.overview} data bases.  This is evil and all too common, alas.
6300
6301 @item
6302 You may be reading the same group (or several related groups) from
6303 different @sc{nntp} servers.
6304
6305 @item
6306 You may be getting mail that duplicates articles posted to groups.
6307 @end enumerate
6308
6309 I'm sure there are other situations that @code{Xref} handling fails as
6310 well, but these four are the most common situations.
6311
6312 If, and only if, @code{Xref} handling fails for you, then you may
6313 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
6314 will remember the @code{Message-ID}s of all articles you have read or
6315 otherwise marked as read, and then, as if by magic, mark them as read
6316 all subsequent times you see them---in @emph{all} groups.  Using this
6317 mechanism is quite likely to be somewhat inefficient, but not overly
6318 so.  It's certainly preferrable to reading the same articles more than
6319 once.
6320
6321 @table @code
6322 @item gnus-suppress-duplicates
6323 @vindex gnus-suppress-duplicates
6324 If non-@code{nil}, suppress duplicates.
6325
6326 @item gnus-save-duplicate-list
6327 @vindex gnus-save-duplicate-list
6328 If non-@code{nil}, save the list of duplicates to a file.  This will
6329 make startup and shutdown take longer, so the default is @code{nil}.
6330 However, this means that only duplicate articles that is read in a
6331 single Gnus session are suppressed.  
6332
6333 @item gnus-duplicate-list-length
6334 @vindex gnus-duplicate-list-length
6335 This variables says how many @code{Message-ID}s to keep in the duplicate
6336 suppression list.  The default is 10000.  
6337
6338 @item gnus-duplicate-file
6339 @vindex gnus-duplicate-file
6340 The name of the file to store the duplicate suppression list.  The
6341 default is @file{~/News/suppression}.
6342 @end table
6343
6344 If you have a tendency to stop and start Gnus often, setting
6345 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
6346 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
6347 the other hand, saving the list makes startup and shutdown much slower,
6348 so that means that if you stop and start Gnus often, you should set
6349 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
6350 to you to figure out, I think.
6351
6352
6353 @node The Article Buffer
6354 @chapter The Article Buffer
6355 @cindex article buffer
6356
6357 The articles are displayed in the article buffer, of which there is only
6358 one.  All the summary buffers share the same article buffer unless you
6359 tell Gnus otherwise.
6360
6361 @menu
6362 * Hiding Headers::        Deciding what headers should be displayed.
6363 * Using MIME::            Pushing articles through @sc{mime} before reading them.
6364 * Customizing Articles::  Tailoring the look of the articles.
6365 * Article Keymap::        Keystrokes available in the article buffer
6366 * Misc Article::          Other stuff.
6367 @end menu
6368
6369
6370 @node Hiding Headers
6371 @section Hiding Headers
6372 @cindex hiding headers
6373 @cindex deleting headers
6374
6375 The top section of each article is the @dfn{head}.  (The rest is the
6376 @dfn{body}, but you may have guessed that already.)
6377
6378 @vindex gnus-show-all-headers
6379 There is a lot of useful information in the head: the name of the person
6380 who wrote the article, the date it was written and the subject of the
6381 article.  That's well and nice, but there's also lots of information
6382 most people do not want to see---what systems the article has passed
6383 through before reaching you, the @code{Message-ID}, the
6384 @code{References}, etc. ad nauseum---and you'll probably want to get rid
6385 of some of those lines.  If you want to keep all those lines in the
6386 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
6387
6388 Gnus provides you with two variables for sifting headers:
6389
6390 @table @code
6391
6392 @item gnus-visible-headers
6393 @vindex gnus-visible-headers
6394 If this variable is non-@code{nil}, it should be a regular expression
6395 that says what headers you wish to keep in the article buffer.  All
6396 headers that do not match this variable will be hidden.
6397
6398 For instance, if you only want to see the name of the person who wrote
6399 the article and the subject, you'd say:
6400
6401 @lisp
6402 (setq gnus-visible-headers "^From:\\|^Subject:")
6403 @end lisp
6404
6405 This variable can also be a list of regexps to match headers that are to
6406 remain visible.
6407
6408 @item gnus-ignored-headers
6409 @vindex gnus-ignored-headers
6410 This variable is the reverse of @code{gnus-visible-headers}.  If this
6411 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
6412 should be a regular expression that matches all lines that you want to
6413 hide.  All lines that do not match this variable will remain visible.
6414
6415 For instance, if you just want to get rid of the @code{References} line
6416 and the @code{Xref} line, you might say:
6417
6418 @lisp
6419 (setq gnus-ignored-headers "^References:\\|^Xref:")
6420 @end lisp
6421
6422 This variable can also be a list of regexps to match headers that are to
6423 be removed.
6424
6425 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
6426 variable will have no effect.
6427
6428 @end table
6429
6430 @vindex gnus-sorted-header-list
6431 Gnus can also sort the headers for you.  (It does this by default.)  You
6432 can control the sorting by setting the @code{gnus-sorted-header-list}
6433 variable.  It is a list of regular expressions that says in what order
6434 the headers are to be displayed.
6435
6436 For instance, if you want the name of the author of the article first,
6437 and then the subject, you might say something like:
6438
6439 @lisp
6440 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
6441 @end lisp
6442
6443 Any headers that are to remain visible, but are not listed in this
6444 variable, will be displayed in random order after all the headers that
6445 are listed in this variable.
6446
6447 @findex gnus-article-hide-boring-headers
6448 @vindex gnus-article-display-hook
6449 @vindex gnus-boring-article-headers
6450 You can hide further boring headers by entering
6451 @code{gnus-article-hide-boring-headers} into
6452 @code{gnus-article-display-hook}.  What this function does depends on
6453 the @code{gnus-boring-article-headers} variable.  It's a list, but this
6454 list doesn't actually contain header names.  Instead is lists various
6455 @dfn{boring conditions} that Gnus can check and remove from sight.
6456
6457 These conditions are:
6458 @table @code
6459 @item empty
6460 Remove all empty headers.
6461 @item newsgroups
6462 Remove the @code{Newsgroups} header if it only contains the current group
6463 name. 
6464 @item followup-to
6465 Remove the @code{Followup-To} header if it is identical to the
6466 @code{Newsgroups} header.
6467 @item reply-to
6468 Remove the @code{Reply-To} header if it lists the same address as the
6469 @code{From} header.
6470 @item date
6471 Remove the @code{Date} header if the article is less than three days
6472 old. 
6473 @end table
6474
6475 To include the four first elements, you could say something like;
6476
6477 @lisp
6478 (setq gnus-boring-article-headers 
6479       '(empty newsgroups followup-to reply-to))
6480 @end lisp
6481
6482 This is also the default value for this variable.
6483
6484
6485 @node Using MIME
6486 @section Using @sc{mime}
6487 @cindex @sc{mime}
6488
6489 Mime is a standard for waving your hands through the air, aimlessly,
6490 while people stand around yawning.
6491
6492 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
6493 while all newsreaders die of fear.
6494
6495 @sc{mime} may specify what character set the article uses, the encoding
6496 of the characters, and it also makes it possible to embed pictures and
6497 other naughty stuff in innocent-looking articles.
6498
6499 @vindex gnus-show-mime
6500 @vindex gnus-show-mime-method
6501 @vindex gnus-strict-mime
6502 @findex metamail-buffer
6503 Gnus handles @sc{mime} by shoving the articles through
6504 @code{gnus-show-mime-method}, which is @code{metamail-buffer} by
6505 default.  Set @code{gnus-show-mime} to @code{t} if you want to use
6506 @sc{mime} all the time.  However, if @code{gnus-strict-mime} is
6507 non-@code{nil}, the @sc{mime} method will only be used if there are
6508 @sc{mime} headers in the article.
6509
6510 It might be best to just use the toggling functions from the summary
6511 buffer to avoid getting nasty surprises. (For instance, you enter the
6512 group @samp{alt.sing-a-long} and, before you know it, @sc{mime} has
6513 decoded the sound file in the article and some horrible sing-a-long song
6514 comes streaming out out your speakers, and you can't find the volume
6515 button, because there isn't one, and people are starting to look at you,
6516 and you try to stop the program, but you can't, and you can't find the
6517 program to control the volume, and everybody else in the room suddenly
6518 decides to look at you disdainfully, and you'll feel rather stupid.)
6519
6520 Any similarity to real events and people is purely coincidental.  Ahem.
6521
6522
6523 @node Customizing Articles
6524 @section Customizing Articles
6525 @cindex article customization
6526
6527 @vindex gnus-article-display-hook
6528 The @code{gnus-article-display-hook} is called after the article has
6529 been inserted into the article buffer.  It is meant to handle all
6530 treatment of the article before it is displayed. 
6531
6532 @findex gnus-article-maybe-highlight
6533 By default it contains @code{gnus-article-hide-headers},
6534 @code{gnus-article-treat-overstrike}, and
6535 @code{gnus-article-maybe-highlight}, but there are thousands, nay
6536 millions, of functions you can put in this hook.  For an overview of
6537 functions @pxref{Article Highlighting}, @pxref{Article Hiding},
6538 @pxref{Article Washing}, @pxref{Article Buttons} and @pxref{Article
6539 Date}.
6540
6541 You can, of course, write your own functions.  The functions are called
6542 from the article buffer, and you can do anything you like, pretty much.
6543 There is no information that you have to keep in the buffer---you can
6544 change everything.  However, you shouldn't delete any headers.  Instead
6545 make them invisible if you want to make them go away.
6546
6547
6548 @node Article Keymap
6549 @section Article Keymap
6550
6551 Most of the keystrokes in the summary buffer can also be used in the
6552 article buffer.  They should behave as if you typed them in the summary
6553 buffer, which means that you don't actually have to have a summary
6554 buffer displayed while reading.  You can do it all from the article
6555 buffer.
6556
6557 A few additional keystrokes are available:
6558
6559 @table @kbd
6560
6561 @item SPACE
6562 @kindex SPACE (Article)
6563 @findex gnus-article-next-page
6564 Scroll forwards one page (@code{gnus-article-next-page}).
6565
6566 @item DEL
6567 @kindex DEL (Article)
6568 @findex gnus-article-prev-page
6569 Scroll backwards one page (@code{gnus-article-prev-page}).
6570
6571 @item C-c ^
6572 @kindex C-c ^ (Article)
6573 @findex gnus-article-refer-article
6574 If point is in the neighborhood of a @code{Message-ID} and you press
6575 @kbd{r}, Gnus will try to get that article from the server
6576 (@code{gnus-article-refer-article}).
6577
6578 @item C-c C-m
6579 @kindex C-c C-m (Article)
6580 @findex gnus-article-mail
6581 Send a reply to the address near point (@code{gnus-article-mail}).  If
6582 given a prefix, include the mail.
6583
6584 @item s
6585 @kindex s (Article)
6586 @findex gnus-article-show-summary
6587 Reconfigure the buffers so that the summary buffer becomes visible
6588 (@code{gnus-article-show-summary}).
6589
6590 @item ?
6591 @kindex ? (Article)
6592 @findex gnus-article-describe-briefly
6593 Give a very brief description of the available keystrokes
6594 (@code{gnus-article-describe-briefly}). 
6595
6596 @item TAB
6597 @kindex TAB (Article)
6598 @findex gnus-article-next-button
6599 Go to the next button, if any (@code{gnus-article-next-button}.  This
6600 only makes sense if you have buttonizing turned on.
6601
6602 @item M-TAB
6603 @kindex M-TAB (Article)
6604 @findex gnus-article-prev-button
6605 Go to the previous button, if any (@code{gnus-article-prev-button}.  
6606
6607 @end table
6608
6609
6610 @node Misc Article
6611 @section Misc Article
6612
6613 @table @code
6614
6615 @item gnus-single-article-buffer
6616 @vindex gnus-single-article-buffer
6617 If non-@code{nil}, use the same article buffer for all the groups.
6618 (This is the default.)  If @code{nil}, each group will have its own
6619 article buffer.
6620
6621 @vindex gnus-article-prepare-hook
6622 @item gnus-article-prepare-hook
6623 This hook is called right after the article has been inserted into the
6624 article buffer.  It is mainly intended for functions that do something
6625 depending on the contents; it should probably not be used for changing
6626 the contents of the article buffer.
6627
6628 @vindex gnus-article-display-hook
6629 @item gnus-article-display-hook
6630 This hook is called as the last thing when displaying an article, and is
6631 intended for modifying the contents of the buffer, doing highlights,
6632 hiding headers, and the like.
6633
6634 @item gnus-article-mode-hook
6635 @vindex gnus-article-mode-hook
6636 Hook called in article mode buffers.
6637
6638 @vindex gnus-article-mode-line-format
6639 @item gnus-article-mode-line-format
6640 This variable is a format string along the same lines as
6641 @code{gnus-summary-mode-line-format}.  It accepts the same
6642 format specifications as that variable, with one extension:
6643
6644 @table @samp
6645 @item w
6646 The @dfn{wash status} of the article.  This is a short string with one
6647 character for each possible article wash operation that may have been
6648 performed. 
6649 @end table
6650
6651 @vindex gnus-break-pages
6652
6653 @item gnus-break-pages
6654 Controls whether @dfn{page breaking} is to take place.  If this variable
6655 is non-@code{nil}, the articles will be divided into pages whenever a
6656 page delimiter appears in the article.  If this variable is @code{nil},
6657 paging will not be done.
6658
6659 @item gnus-page-delimiter
6660 @vindex gnus-page-delimiter
6661 This is the delimiter mentioned above.  By default, it is @samp{^L}
6662 (form linefeed).
6663 @end table
6664
6665
6666 @node Composing Messages
6667 @chapter Composing Messages
6668 @cindex reply
6669 @cindex followup
6670 @cindex post
6671
6672 @kindex C-c C-c (Post)
6673 All commands for posting and mailing will put you in a message buffer
6674 where you can edit the article all you like, before you send the article
6675 by pressing @kbd{C-c C-c}.  @xref{Top, , Top, message, The Message
6676 Manual}.  If you are in a foreign news group, and you wish to post the
6677 article using the foreign server, you can give a prefix to @kbd{C-c C-c}
6678 to make Gnus try to post using the foreign server.
6679
6680 @menu 
6681 * Mail::                 Mailing and replying.
6682 * Post::                 Posting and following up.
6683 * Posting Server::       What server should you post via?
6684 * Mail and Post::        Mailing and posting at the same time.
6685 * Archived Messages::    Where Gnus stores the messages you've sent.
6686 @c * Posting Styles::       An easier way to configure some key elements.
6687 @c * Drafts::               Postponing messages and rejected messages.
6688 @c * Rejected Articles::    What happens if the server doesn't like your article?
6689 @end menu
6690
6691 Also see @pxref{Canceling and Superseding} for information on how to
6692 remove articles you shouldn't have posted.
6693
6694
6695 @node Mail
6696 @section Mail
6697
6698 Variables for customizing outgoing mail:
6699
6700 @table @code
6701 @item gnus-uu-digest-headers
6702 @vindex gnus-uu-digest-headers
6703 List of regexps to match headers included in digested messages.  The
6704 headers will be included in the sequence they are matched.
6705
6706 @end table
6707
6708
6709 @node Post
6710 @section Post
6711
6712 Variables for composing news articles:
6713
6714 @table @code
6715 @item gnus-sent-message-ids-file
6716 @vindex gnus-sent-message-ids-file
6717 Gnus will keep a @code{Message-ID} history file of all the mails it has
6718 sent.  If it discovers that it has already sent a mail, it will ask the
6719 user whether to re-send the mail.  (This is primarily useful when
6720 dealing with @sc{soup} packets and the like where one is apt to sent the
6721 same packet multiple times.)  This variable says what the name of this
6722 history file is.  It is @file{~/News/Sent-Message-IDs} by default.  Set
6723 this variable to @code{nil} if you don't want Gnus to keep a history
6724 file.
6725
6726 @item gnus-sent-message-ids-length
6727 @vindex gnus-sent-message-ids-length
6728 This variable says how many @code{Message-ID}s to keep in the history
6729 file.  It is 1000 by default.
6730
6731 @end table
6732
6733
6734 @node Posting Server
6735 @section Posting Server
6736
6737 When you press those magical @kbd{C-c C-c} keys to ship off your latest
6738 (extremely intelligent, of course) article, where does it go?
6739
6740 Thank you for asking.  I hate you.
6741
6742 @vindex gnus-post-method
6743
6744 It can be quite complicated.  Normally, Gnus will use the same native
6745 server.  However.  If your native server doesn't allow posting, just
6746 reading, you probably want to use some other server to post your
6747 (extremely intelligent and fabulously interesting) articles.  You can
6748 then set the @code{gnus-post-method} to some other method:
6749
6750 @lisp
6751 (setq gnus-post-method '(nnspool ""))
6752 @end lisp
6753
6754 Now, if you've done this, and then this server rejects your article, or
6755 this server is down, what do you do then?  To override this variable you
6756 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
6757 the ``current'' server for posting.
6758
6759 If you give a zero prefix (i. e., @kbd{C-u 0 C-c C-c}) to that command,
6760 Gnus will prompt you for what method to use for posting.  
6761
6762 You can also set @code{gnus-post-method} to a list of select methods.
6763 If that's the case, Gnus will always prompt you for what method to use
6764 for posting. 
6765
6766
6767 @node Mail and Post
6768 @section Mail and Post
6769
6770 Here's a list of variables that are relevant to both mailing and
6771 posting:
6772
6773 @table @code
6774 @item gnus-mailing-list-groups
6775 @findex gnus-mailing-list-groups
6776 @cindex mailing lists
6777
6778 If your news server offers groups that are really mailing lists that are
6779 gatewayed to the @sc{nntp} server, you can read those groups without
6780 problems, but you can't post/followup to them without some difficulty.
6781 One solution is to add a @code{to-address} to the group parameters
6782 (@pxref{Group Parameters}).  An easier thing to do is set the
6783 @code{gnus-mailing-list-groups} to a regexp that match the groups that
6784 really are mailing lists.  Then, at least, followups to the mailing
6785 lists will work most of the time.  Posting to these groups (@kbd{a}) is
6786 still a pain, though.
6787
6788 @end table
6789
6790 You may want to do spell-checking on messages that you send out.  Or, if
6791 you don't want to spell-check by hand, you could add automatic
6792 spell-checking via the @code{ispell} package:
6793
6794 @cindex ispell
6795 @findex ispell-message
6796 @lisp
6797 (add-hook 'message-send-hook 'ispell-message) 
6798 @end lisp
6799
6800
6801 @node Archived Messages
6802 @section Archived Messages
6803 @cindex archived messages
6804 @cindex sent messages
6805
6806 Gnus provides a few different methods for storing the mail you send.
6807 The default method is to use the @dfn{archive virtual server} to store
6808 the mail.  If you want to disable this completely, you should set
6809 @code{gnus-message-archive-group} to @code{nil}.
6810
6811 @vindex gnus-message-archive-method
6812 @code{gnus-message-archive-method} says what virtual server Gnus is to
6813 use to store sent messages.  It is @code{(nnfolder "archive"
6814 (nnfolder-directory "~/Mail/archive/"))} by default, but you can use any
6815 mail select method (@code{nnml}, @code{nnmbox}, etc.).  However,
6816 @code{nnfolder} is a quite likeable select method for doing this sort of
6817 thing.  If you don't like the default directory chosen, you could say
6818 something like:
6819
6820 @lisp
6821 (setq gnus-message-archive-method
6822       '(nnfolder "archive" 
6823                  (nnfolder-inhibit-expiry t)
6824                  (nnfolder-active-file "~/News/sent-mail/active")
6825                  (nnfolder-directory "~/News/sent-mail/")))
6826 @end lisp
6827
6828 @vindex gnus-message-archive-group
6829 @cindex Gcc
6830 Gnus will insert @code{Gcc} headers in all outgoing messages that point
6831 to one or more group(s) on that server.  Which group to use is
6832 determined by the @code{gnus-message-archive-group} variable.  
6833
6834 This variable can be:
6835
6836 @itemize @bullet
6837 @item a string
6838 Messages will be saved in that group.
6839 @item a list of strings
6840 Messages will be saved in all those groups.
6841 @item an alist of regexps, functions and forms
6842 When a key ``matches'', the result is used.
6843 @item @code{nil}
6844 No message archiving will take place.  This is the default.
6845 @end itemize
6846
6847 Let's illustrate:
6848
6849 Just saving to a single group called @samp{MisK}:
6850 @lisp
6851 (setq gnus-message-archive-group "MisK")
6852 @end lisp
6853
6854 Saving to two groups, @samp{MisK} and @samp{safe}:
6855 @lisp
6856 (setq gnus-message-archive-group '("MisK" "safe"))
6857 @end lisp
6858
6859 Save to different groups based on what group you are in:
6860 @lisp
6861 (setq gnus-message-archive-group 
6862       '(("^alt" "sent-to-alt")
6863         ("mail" "sent-to-mail")
6864         (".*" "sent-to-misc")))
6865 @end lisp
6866
6867 More complex stuff:
6868 @lisp
6869 (setq gnus-message-archive-group 
6870       '((if (message-news-p)
6871             "misc-news" 
6872           "misc-mail")))
6873 @end lisp       
6874
6875 How about storing all news messages in one file, but storing all mail
6876 messages in one file per month:
6877
6878 @lisp
6879 (setq gnus-message-archive-group
6880       '((if (message-news-p)
6881             "misc-news" 
6882           (concat "mail." (format-time-string 
6883                            "%Y-%m" (current-time))))))
6884 @end lisp
6885
6886 Now, when you send a message off, it will be stored in the appropriate
6887 group.  (If you want to disable storing for just one particular message,
6888 you can just remove the @code{Gcc} header that has been inserted.)  The
6889 archive group will appear in the group buffer the next time you start
6890 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
6891 enter it and read the articles in it just like you'd read any other
6892 group.  If the group gets really big and annoying, you can simply rename
6893 if (using @kbd{G r} in the group buffer) to something
6894 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
6895 continue to be stored in the old (now empty) group.
6896
6897 That's the default method of archiving sent mail.  Gnus also offers two
6898 other variables for the people who don't like the default method.  In
6899 that case you should set @code{gnus-message-archive-group} to
6900 @code{nil}; this will disable archiving.
6901
6902 XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
6903 use a different value for @code{gnus-message-archive-group} there.
6904
6905
6906 @table @code
6907 @item gnus-outgoing-message-group 
6908 @vindex gnus-outgoing-message-group 
6909 All outgoing messages will be put in this group.  If you want to store
6910 all your outgoing mail and articles in the group @samp{nnml:archive},
6911 you set this variable to that value.  This variable can also be a list of
6912 group names.
6913
6914 If you want to have greater control over what group to put each
6915 message in, you can set this variable to a function that checks the
6916 current newsgroup name and then returns a suitable group name (or list
6917 of names).
6918 @end table
6919
6920
6921 @c @node Posting Styles
6922 @c @section Posting Styles
6923 @c @cindex posting styles
6924 @c @cindex styles
6925 @c 
6926 @c All them variables, they make my head swim.  
6927 @c 
6928 @c So what if you want a different @code{Organization} and signature based
6929 @c on what groups you post to?  And you post both from your home machine
6930 @c and your work machine, and you want different @code{From} lines, and so
6931 @c on? 
6932 @c 
6933 @c @vindex gnus-posting-styles
6934 @c One way to do stuff like that is to write clever hooks that change the
6935 @c variables you need to have changed.  That's a bit boring, so somebody
6936 @c came up with the bright idea of letting the user specify these things in
6937 @c a handy alist.  Here's an example of a @code{gnus-posting-styles}
6938 @c variable: 
6939 @c 
6940 @c @lisp
6941 @c ((".*" 
6942 @c   (signature . "Peace and happiness")
6943 @c   (organization . "What me?"))
6944 @c  ("^comp" 
6945 @c   (signature . "Death to everybody"))
6946 @c  ("comp.emacs.i-love-it" 
6947 @c   (organization . "Emacs is it")))
6948 @c @end lisp
6949 @c 
6950 @c As you might surmise from this example, this alist consists of several
6951 @c @dfn{styles}.  Each style will be applicable if the first element
6952 @c ``matches'', in some form or other.  The entire alist will be iterated
6953 @c over, from the beginning towards the end, and each match will be
6954 @c applied, which means that attributes in later styles that match override
6955 @c the same attributes in earlier matching styles.  So
6956 @c @samp{comp.programming.literate} will have the @samp{Death to everybody}
6957 @c signature and the @samp{What me?} @code{Organization} header.
6958 @c 
6959 @c The first element in each style is called the @code{match}.  If it's a
6960 @c string, then Gnus will try to regexp match it against the group name.
6961 @c If it's a function symbol, that function will be called with no
6962 @c arguments.  If it's a variable symbol, then the variable will be
6963 @c referenced.  If it's a list, then that list will be @code{eval}ed.  In
6964 @c any case, if this returns a non-@code{nil} value, then the style is said
6965 @c to @dfn{match}.
6966 @c 
6967 @c Each style may contain a arbitrary amount of @dfn{attributes}.  Each
6968 @c attribute consists of a @var{(name . value)} pair.  The attribute name
6969 @c can be one of @code{signature}, @code{organization} or @code{from}.  The
6970 @c attribute name can also be a string.  In that case, this will be used as
6971 @c a header name, and the value will be inserted in the headers of the
6972 @c article.
6973 @c 
6974 @c The attribute value can be a string (used verbatim), a function (the
6975 @c return value will be used), a variable (its value will be used) or a
6976 @c list (it will be @code{eval}ed and the return value will be used).
6977 @c 
6978 @c So here's a new example:
6979 @c 
6980 @c @lisp
6981 @c (setq gnus-posting-styles
6982 @c       '((".*" 
6983 @c           (signature . "~/.signature") 
6984 @c           (from . "user@@foo (user)")
6985 @c           ("X-Home-Page" . (getenv "WWW_HOME"))
6986 @c           (organization . "People's Front Against MWM"))
6987 @c         ("^rec.humor" 
6988 @c           (signature . my-funny-signature-randomizer))
6989 @c         ((equal (system-name) "gnarly")
6990 @c           (signature . my-quote-randomizer))
6991 @c         (posting-from-work-p
6992 @c           (signature . "~/.work-signature")
6993 @c           (from . "user@@bar.foo (user)")
6994 @c           (organization . "Important Work, Inc"))
6995 @c         ("^nn.+:" 
6996 @c           (signature . "~/.mail-signature"))))
6997 @c @end lisp
6998
6999 @c @node Drafts
7000 @c @section Drafts
7001 @c @cindex drafts
7002 @c 
7003 @c If you are writing a message (mail or news) and suddenly remember that
7004 @c you have a steak in the oven (or some pesto in the food processor, you
7005 @c craazy vegetarians), you'll probably wish there was a method to save the
7006 @c message you are writing so that you can continue editing it some other
7007 @c day, and send it when you feel its finished.
7008 @c 
7009 @c Well, don't worry about it.  Whenever you start composing a message of
7010 @c some sort using the Gnus mail and post commands, the buffer you get will
7011 @c automatically associate to an article in a special @dfn{draft} group.
7012 @c If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
7013 @c article will be saved there.  (Auto-save files also go to the draft
7014 @c group.) 
7015 @c 
7016 @c @cindex nndraft
7017 @c @vindex gnus-draft-group-directory
7018 @c The draft group is a special group (which is implemented as an
7019 @c @code{nndraft} group, if you absolutely have to know) called
7020 @c @samp{nndraft:drafts}.  The variable @code{gnus-draft-group-directory}
7021 @c controls both the name of the group and the location---the leaf element
7022 @c in the path will be used as the name of the group.  What makes this
7023 @c group special is that you can't tick any articles in it or mark any
7024 @c articles as read---all articles in the group are permanently unread.
7025 @c 
7026 @c If the group doesn't exist, it will be created and you'll be subscribed
7027 @c to it.
7028 @c 
7029 @c @findex gnus-dissociate-buffer-from-draft
7030 @c @kindex C-c M-d (Mail)
7031 @c @kindex C-c M-d (Post)
7032 @c @findex gnus-associate-buffer-with-draft
7033 @c @kindex C-c C-d (Mail)
7034 @c @kindex C-c C-d (Post)
7035 @c If you're writing some super-secret message that you later want to
7036 @c encode with PGP before sending, you may wish to turn the auto-saving
7037 @c (and association with the draft group) off.  You never know who might be
7038 @c interested in reading all your extremely valuable and terribly horrible
7039 @c and interesting secrets.  The @kbd{C-c M-d}
7040 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
7041 @c If you change your mind and want to turn the auto-saving back on again,
7042 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
7043 @c 
7044 @c @vindex gnus-use-draft
7045 @c To leave association with the draft group off by default, set
7046 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default. 
7047 @c 
7048 @c @findex gnus-summary-send-draft
7049 @c @kindex S D c (Summary)
7050 @c When you want to continue editing the article, you simply enter the
7051 @c draft group and push @kbd{S D c} (@code{gnus-summary-send-draft}) to do
7052 @c that.  You will be placed in a buffer where you left off.
7053 @c 
7054 @c Rejected articles will also be put in this draft group (@pxref{Rejected
7055 @c Articles}).
7056 @c 
7057 @c @findex gnus-summary-send-all-drafts
7058 @c If you have lots of rejected messages you want to post (or mail) without
7059 @c doing further editing, you can use the @kbd{S D a} command
7060 @c (@code{gnus-summary-send-all-drafts}).  This command understands the
7061 @c process/prefix convention (@pxref{Process/Prefix}).  
7062 @c 
7063 @c 
7064 @c @node Rejected Articles
7065 @c @section Rejected Articles
7066 @c @cindex rejected articles
7067 @c 
7068 @c Sometimes a news server will reject an article.  Perhaps the server
7069 @c doesn't like your face.  Perhaps it just feels miserable.  Perhaps
7070 @c @emph{there be demons}.  Perhaps you have included too much cited text.
7071 @c Perhaps the disk is full.  Perhaps the server is down.
7072 @c 
7073 @c These situations are, of course, totally beyond the control of Gnus.
7074 @c (Gnus, of course, loves the way you look, always feels great, has angels
7075 @c fluttering around inside of it, doesn't care about how much cited text
7076 @c you include, never runs full and never goes down.)  So Gnus saves these
7077 @c articles until some later time when the server feels better.
7078 @c 
7079 @c The rejected articles will automatically be put in a special draft group
7080 @c (@pxref{Drafts}).  When the server comes back up again, you'd then
7081 @c typically enter that group and send all the articles off.
7082 @c 
7083
7084 @node Select Methods
7085 @chapter Select Methods
7086 @cindex foreign groups
7087 @cindex select methods
7088
7089 A @dfn{foreign group} is a group that is not read by the usual (or
7090 default) means.  It could be, for instance, a group from a different
7091 @sc{nntp} server, it could be a virtual group, or it could be your own
7092 personal mail group.
7093
7094 A foreign group (or any group, really) is specified by a @dfn{name} and
7095 a @dfn{select method}.  To take the latter first, a select method is a
7096 list where the first element says what backend to use (eg. @code{nntp},
7097 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
7098 name}.  There may be additional elements in the select method, where the
7099 value may have special meaning for the backend in question.
7100
7101 One could say that a select method defines a @dfn{virtual server}---so
7102 we do just that (@pxref{The Server Buffer}).
7103
7104 The @dfn{name} of the group is the name the backend will recognize the
7105 group as.
7106
7107 For instance, the group @samp{soc.motss} on the @sc{nntp} server
7108 @samp{some.where.edu} will have the name @samp{soc.motss} and select
7109 method @code{(nntp "some.where.edu")}.  Gnus will call this group, in
7110 all circumstances, @samp{nntp+some.where.edu:soc.motss}, even though the
7111 @code{nntp} backend just knows this group as @samp{soc.motss}.
7112
7113 The different methods all have their peculiarities, of course.
7114
7115 @menu
7116 * The Server Buffer::     Making and editing virtual servers.
7117 * Getting News::          Reading USENET news with Gnus.
7118 * Getting Mail::          Reading your personal mail with Gnus.
7119 * Other Sources::         Reading directories, files, SOUP packets.
7120 * Combined Groups::       Combining groups into one group.
7121 @end menu
7122
7123
7124 @node The Server Buffer
7125 @section The Server Buffer
7126
7127 Traditionally, a @dfn{server} is a machine or a piece of software that
7128 one connects to, and then requests information from.  Gnus does not
7129 connect directly to any real servers, but does all transactions through
7130 one backend or other.  But that's just putting one layer more between
7131 the actual media and Gnus, so we might just as well say that each
7132 backend represents a virtual server.
7133
7134 For instance, the @code{nntp} backend may be used to connect to several
7135 different actual @sc{nntp} servers, or, perhaps, to many different ports
7136 on the same actual @sc{nntp} server.  You tell Gnus which backend to
7137 use, and what parameters to set by specifying a @dfn{select method}.
7138
7139 These select methods specifications can sometimes become quite
7140 complicated---say, for instance, that you want to read from the
7141 @sc{nntp} server @samp{news.funet.fi} on port number @code{13}, which
7142 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
7143 Anyways, if you had to specify that for each group that used this
7144 server, that would be too much work, so Gnus offers a way of naming
7145 select methods, which is what you do in the server buffer.
7146
7147 To enter the server buffer, user the @kbd{^}
7148 (@code{gnus-group-enter-server-mode}) command in the group buffer.
7149
7150 @menu
7151 * Server Buffer Format::      You can customize the look of this buffer.
7152 * Server Commands::           Commands to manipulate servers.
7153 * Example Methods::           Examples server specifications.
7154 * Creating a Virtual Server:: An example session.
7155 * Servers and Methods::       You can use server names as select methods.
7156 * Unavailable Servers::       Some servers you try to contact may be down.
7157 @end menu
7158
7159 @vindex gnus-server-mode-hook
7160 @code{gnus-server-mode-hook} is run when creating the server buffer.
7161
7162
7163 @node Server Buffer Format
7164 @subsection Server Buffer Format
7165 @cindex server buffer format
7166
7167 @vindex gnus-server-line-format
7168 You can change the look of the server buffer lines by changing the
7169 @code{gnus-server-line-format} variable.  This is a @code{format}-like
7170 variable, with some simple extensions:
7171
7172 @table @samp
7173
7174 @item h 
7175 How the news is fetched---the backend name.
7176
7177 @item n
7178 The name of this server.
7179
7180 @item w
7181 Where the news is to be fetched from---the address.
7182
7183 @item s
7184 The opened/closed/denied status of the server.
7185 @end table
7186
7187 @vindex gnus-server-mode-line-format
7188 The mode line can also be customized by using the
7189 @code{gnus-server-mode-line-format} variable.  The following specs are
7190 understood: 
7191
7192 @table @samp
7193 @item S
7194 Server name.
7195
7196 @item M
7197 Server method.
7198 @end table
7199
7200 Also @pxref{Formatting Variables}.
7201
7202
7203 @node Server Commands
7204 @subsection Server Commands
7205 @cindex server commands
7206
7207 @table @kbd
7208
7209 @item a
7210 @kindex a (Server)
7211 @findex gnus-server-add-server
7212 Add a new server (@code{gnus-server-add-server}).
7213
7214 @item e
7215 @kindex e (Server)
7216 @findex gnus-server-edit-server
7217 Edit a server (@code{gnus-server-edit-server}).
7218
7219 @item SPACE
7220 @kindex SPACE (Server)
7221 @findex gnus-server-read-server
7222 Browse the current server (@code{gnus-server-read-server}).
7223
7224 @item q
7225 @kindex q (Server)
7226 @findex gnus-server-exit
7227 Return to the group buffer (@code{gnus-server-exit}).
7228
7229 @item k
7230 @kindex k (Server)
7231 @findex gnus-server-kill-server
7232 Kill the current server (@code{gnus-server-kill-server}).
7233
7234 @item y
7235 @kindex y (Server)
7236 @findex gnus-server-yank-server
7237 Yank the previously killed server (@code{gnus-server-yank-server}).
7238
7239 @item c
7240 @kindex c (Server)
7241 @findex gnus-server-copy-server
7242 Copy the current server (@code{gnus-server-copy-server}).
7243
7244 @item l
7245 @kindex l (Server)
7246 @findex gnus-server-list-servers
7247 List all servers (@code{gnus-server-list-servers}).
7248
7249 @end table
7250
7251
7252 @node Example Methods
7253 @subsection Example Methods
7254
7255 Most select methods are pretty simple and self-explanatory: 
7256
7257 @lisp
7258 (nntp "news.funet.fi")
7259 @end lisp
7260
7261 Reading directly from the spool is even simpler:
7262
7263 @lisp
7264 (nnspool "")
7265 @end lisp
7266
7267 As you can see, the first element in a select method is the name of the
7268 backend, and the second is the @dfn{address}, or @dfn{name}, if you
7269 will. 
7270
7271 After these two elements, there may be a arbitrary number of
7272 @var{(variable form)} pairs.
7273
7274 To go back to the first example---imagine that you want to read from
7275 port @code{15} from that machine.  This is what the select method should
7276 look like then:
7277
7278 @lisp
7279 (nntp "news.funet.fi" (nntp-port-number 15))
7280 @end lisp
7281
7282 You should read the documentation to each backend to find out what
7283 variables are relevant, but here's an @code{nnmh} example. 
7284
7285 @code{nnmh} is a mail backend that reads a spool-like structure.  Say
7286 you have two structures that you wish to access: One is your private
7287 mail spool, and the other is a public one.  Here's the possible spec for
7288 you private mail:
7289
7290 @lisp
7291 (nnmh "private" (nnmh-directory "~/private/mail/"))
7292 @end lisp
7293
7294 (This server is then called @samp{private}, but you may have guessed
7295 that.)
7296
7297 Here's the method for a public spool:
7298
7299 @lisp
7300 (nnmh "public" 
7301       (nnmh-directory "/usr/information/spool/") 
7302       (nnmh-get-new-mail nil))
7303 @end lisp
7304
7305
7306 @node Creating a Virtual Server
7307 @subsection Creating a Virtual Server
7308
7309 If you're saving lots of articles in the cache by using persistent
7310 articles, you may want to create a virtual server to read the cache.
7311
7312 First you need to add a new server.  The @kbd{a} command does that.  It
7313 would probably be best to use @code{nnspool} to read the cache.  You
7314 could also use @code{nnml} or @code{nnmh}, though.
7315
7316 Type @kbd{a nnspool RET cache RET}.
7317
7318 You should now have a brand new @code{nnspool} virtual server called
7319 @samp{cache}.  You now need to edit it to have the right definitions.
7320 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
7321 will contain the following:
7322
7323 @lisp
7324 (nnspool "cache")
7325 @end lisp
7326
7327 Change that to:
7328
7329 @lisp
7330 (nnspool "cache"
7331          (nnspool-spool-directory "~/News/cache/")
7332          (nnspool-nov-directory "~/News/cache/")
7333          (nnspool-active-file "~/News/cache/active"))
7334 @end lisp
7335
7336 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
7337 @kbd{RET} over this virtual server, you should be entered into a browse
7338 buffer, and you should be able to enter any of the groups displayed.
7339
7340
7341 @node Servers and Methods
7342 @subsection Servers and Methods
7343
7344 Wherever you would normally use a select method
7345 (eg. @code{gnus-secondary-select-method}, in the group select method,
7346 when browsing a foreign server) you can use a virtual server name
7347 instead.  This could potentially save lots of typing.  And it's nice all
7348 over.
7349
7350
7351 @node Unavailable Servers
7352 @subsection Unavailable Servers
7353
7354 If a server seems to be unreachable, Gnus will mark that server as
7355 @code{denied}.  That means that any subsequent attempt to make contact
7356 with that server will just be ignored.  ``It can't be opened,'' Gnus
7357 will tell you, without making the least effort to see whether that is
7358 actually the case or not.
7359
7360 That might seem quite naughty, but it does make sense most of the time.
7361 Let's say you have 10 groups subscribed to the server
7362 @samp{nepholococcygia.com}.  This server is located somewhere quite far
7363 away from you, the machine is quite, so it takes 1 minute just to find
7364 out that it refuses connection from you today.  If Gnus were to attempt
7365 to do that 10 times, you'd be quite annoyed, so Gnus won't attempt to do
7366 that.  Once it has gotten a single ``connection refused'', it will
7367 regard that server as ``down''.
7368
7369 So, what happens if the machine was only feeling unwell temporarily?
7370 How do you test to see whether the machine has come up again?
7371
7372 You jump to the server buffer (@pxref{The Server Buffer}) and poke it
7373 with the following commands:
7374
7375 @table @kbd
7376
7377 @item O
7378 @kindex O (Server)
7379 @findex gnus-server-open-server
7380 Try to establish connection to the server on the current line
7381 (@code{gnus-server-open-server}).
7382
7383 @item C
7384 @kindex C (Server)
7385 @findex gnus-server-close-server
7386 Close the connection (if any) to the server
7387 (@code{gnus-server-close-server}).
7388
7389 @item D
7390 @kindex D (Server)
7391 @findex gnus-server-deny-server
7392 Mark the current server as unreachable
7393 (@code{gnus-server-deny-server}). 
7394
7395 @item R
7396 @kindex R (Server)
7397 @findex gnus-server-remove-denials
7398 Remove all marks to whether Gnus was denied connection from all servers
7399 (@code{gnus-server-remove-denials}). 
7400
7401 @end table
7402
7403
7404 @node Getting News
7405 @section Getting News
7406 @cindex reading news
7407 @cindex news backends
7408
7409 A newsreader is normally used for reading news.  Gnus currently provides
7410 only two methods of getting news---it can read from an @sc{nntp} server,
7411 or it can read from a local spool.
7412
7413 @menu
7414 * NNTP::               Reading news from an @sc{nntp} server.
7415 * News Spool::         Reading news from the local spool.
7416 @end menu
7417
7418
7419 @node NNTP
7420 @subsection @sc{nntp}
7421 @cindex nntp
7422
7423 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
7424 You just specify @code{nntp} as method and the address of the @sc{nntp}
7425 server as the, uhm, address.
7426
7427 If the @sc{nntp} server is located at a non-standard port, setting the
7428 third element of the select method to this port number should allow you
7429 to connect to the right port.  You'll have to edit the group info for
7430 that (@pxref{Foreign Groups}).
7431
7432 The name of the foreign group can be the same as a native group.  In
7433 fact, you can subscribe to the same group from as many different servers
7434 you feel like.  There will be no name collisions.
7435
7436 The following variables can be used to create a virtual @code{nntp}
7437 server: 
7438
7439 @table @code
7440
7441 @item nntp-server-opened-hook
7442 @vindex nntp-server-opened-hook
7443 @cindex @sc{mode reader}
7444 @cindex authinfo
7445 @cindex authentification
7446 @cindex nntp authentification
7447 @findex nntp-send-authinfo
7448 @findex nntp-send-mode-reader
7449 @code{nntp-server-opened-hook} is run after a connection has been made.
7450 It can be used to send commands to the @sc{nntp} server after it has
7451 been contacted.  By default is sends the command @code{MODE READER} to
7452 the server with the @code{nntp-send-mode-reader} function.  Another
7453 popular function is @code{nntp-send-authinfo}, which will prompt you for
7454 an @sc{nntp} password and stuff.
7455
7456 @item nntp-server-action-alist 
7457 @vindex nntp-server-action-alist 
7458 This is an list of regexps to match on server types and actions to be
7459 taken when matches are made.  For instance, if you want Gnus to beep
7460 every time you connect to innd, you could say something like:
7461
7462 @lisp
7463 (setq nntp-server-action-alist
7464       '(("innd" (ding))))
7465 @end lisp
7466
7467 You probably don't want to do that, though.
7468
7469 The default value is
7470
7471 @lisp
7472   '(("nntpd 1\\.5\\.11t" 
7473      (remove-hook 'nntp-server-opened-hook nntp-send-mode-reader)))
7474 @end lisp
7475
7476 This ensures that Gnus doesn't send the @code{MODE READER} command to
7477 nntpd 1.5.11t, since that command chokes that server, I've been told. 
7478
7479 @item nntp-maximum-request
7480 @vindex nntp-maximum-request
7481 If the @sc{nntp} server doesn't support @sc{nov} headers, this backend
7482 will collect headers by sending a series of @code{head} commands.  To
7483 speed things up, the backend sends lots of these commands without
7484 waiting for reply, and then reads all the replies.  This is controlled
7485 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
7486 your network is buggy, you should set this to 1.
7487
7488 @item nntp-connection-timeout
7489 @vindex nntp-connection-timeout
7490 If you have lots of foreign @code{nntp} groups that you connect to
7491 regularly, you're sure to have problems with @sc{nntp} servers not
7492 responding properly, or being too loaded to reply within reasonable
7493 time.  This is can lead to awkward problems, which can be helped
7494 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
7495 that says how many seconds the @code{nntp} backend should wait for a
7496 connection before giving up.  If it is @code{nil}, which is the default,
7497 no timeouts are done.
7498
7499 @item nntp-command-timeout
7500 @vindex nntp-command-timeout
7501 @cindex PPP connections
7502 @cindex dynamic IP addresses
7503 If you're running Gnus on a machine that has a dynamically assigned
7504 address, Gnus may become confused.  If the address of your machine
7505 changes after connecting to the @sc{nntp} server, Gnus will simply sit
7506 waiting forever for replies from the server.  To help with this
7507 unfortunate problem, you can set this command to a number.  Gnus will
7508 then, if it sits waiting longer than that number of seconds for a reply
7509 from the server, shut down the connection, start a new one, and resend
7510 the command.  This should hopefully be transparent to the user.  A
7511 likely number is 30 seconds. 
7512
7513 @item nntp-retry-on-break
7514 @vindex nntp-retry-on-break
7515 If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
7516 hangs.  This will have much the same effect as the command timeout
7517 described above.
7518
7519 @item nntp-server-hook
7520 @vindex nntp-server-hook
7521 This hook is run as the last step when connecting to an @sc{nntp}
7522 server.
7523
7524 @findex nntp-open-rlogin
7525 @findex nntp-open-network-stream
7526 @item nntp-open-server-function
7527 @vindex nntp-open-server-function
7528 This function is used to connect to the remote system.  Two pre-made
7529 functions are @code{nntp-open-network-stream}, which is the default, and
7530 simply connects to some port or other on the remote system.  The other
7531 is @code{nntp-open-rlogin}, which does an rlogin on the remote system,
7532 and then does a telnet to the @sc{nntp} server available there.
7533
7534 @item nntp-rlogin-parameters
7535 @vindex nntp-rlogin-parameters
7536 If you use @code{nntp-open-rlogin} as the
7537 @code{nntp-open-server-function}, this list will be used as the
7538 parameter list given to @code{rsh}.
7539
7540 @item nntp-end-of-line
7541 @vindex nntp-end-of-line
7542 String to use as end-of-line markers when talking to the @sc{nntp}
7543 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
7544 using @code{rlogin} to talk to the server.
7545
7546 @item nntp-rlogin-user-name
7547 @vindex nntp-rlogin-user-name
7548 User name on the remote system when using the @code{rlogin} connect
7549 function. 
7550
7551 @item nntp-address
7552 @vindex nntp-address
7553 The address of the remote system running the @sc{nntp} server.
7554
7555 @item nntp-port-number
7556 @vindex nntp-port-number
7557 Port number to connect to when using the @code{nntp-open-network-stream}
7558 connect function.
7559
7560 @item nntp-buggy-select
7561 @vindex nntp-buggy-select
7562 Set this to non-@code{nil} if your select routine is buggy.
7563
7564 @item nntp-nov-is-evil 
7565 @vindex nntp-nov-is-evil 
7566 If the @sc{nntp} server does not support @sc{nov}, you could set this
7567 variable to @code{t}, but @code{nntp} usually checks whether @sc{nov}
7568 can be used automatically.
7569
7570 @item nntp-xover-commands
7571 @vindex nntp-xover-commands
7572 @cindex nov
7573 @cindex XOVER
7574 List of strings that are used as commands to fetch @sc{nov} lines from a
7575 server.  The default value of this variable is @code{("XOVER"
7576 "XOVERVIEW")}. 
7577
7578 @item nntp-nov-gap
7579 @vindex nntp-nov-gap
7580 @code{nntp} normally sends just one big request for @sc{nov} lines to
7581 the server.  The server responds with one huge list of lines.  However,
7582 if you have read articles 2-5000 in the group, and only want to read
7583 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
7584 lines that you do not want, and will not use.  This variable says how
7585 big a gap between two consecutive articles is allowed to be before the
7586 @code{XOVER} request is split into several request.  Note that if your
7587 network is fast, setting this variable to a really small number means
7588 that fetching will probably be slower.  If this variable is @code{nil},
7589 @code{nntp} will never split requests.
7590
7591 @item nntp-prepare-server-hook
7592 @vindex nntp-prepare-server-hook
7593 A hook run before attempting to connect to an @sc{nntp} server.
7594
7595 @item nntp-async-number
7596 @vindex nntp-async-number
7597 How many articles should be pre-fetched when in asynchronous mode.  If
7598 this variable is @code{t}, @code{nntp} will pre-fetch all the articles
7599 that it can without bound.  If it is @code{nil}, no pre-fetching will be
7600 made.
7601
7602 @item nntp-warn-about-losing-connection
7603 @vindex nntp-warn-about-losing-connection
7604 If this variable is non-@code{nil}, some noise will be made when a
7605 server closes connection.
7606
7607 @end table
7608
7609
7610 @node News Spool
7611 @subsection News Spool
7612 @cindex nnspool
7613 @cindex news spool
7614
7615 Subscribing to a foreign group from the local spool is extremely easy,
7616 and might be useful, for instance, to speed up reading groups like
7617 @samp{alt.binaries.pictures.furniture}.
7618
7619 Anyways, you just specify @code{nnspool} as the method and @samp{} (or
7620 anything else) as the address.
7621
7622 If you have access to a local spool, you should probably use that as the
7623 native select method (@pxref{Finding the News}).  It is normally faster
7624 than using an @code{nntp} select method, but might not be.  It depends.
7625 You just have to try to find out what's best at your site.
7626
7627 @table @code
7628
7629 @item nnspool-inews-program
7630 @vindex nnspool-inews-program
7631 Program used to post an article.
7632
7633 @item nnspool-inews-switches
7634 @vindex nnspool-inews-switches
7635 Parameters given to the inews program when posting an article. 
7636
7637 @item nnspool-spool-directory
7638 @vindex nnspool-spool-directory
7639 Where @code{nnspool} looks for the articles.  This is normally
7640 @file{/usr/spool/news/}.
7641
7642 @item nnspool-nov-directory 
7643 @vindex nnspool-nov-directory 
7644 Where @code{nnspool} will look for @sc{nov} files.  This is normally
7645 @file{/usr/spool/news/over.view/}.
7646
7647 @item nnspool-lib-dir
7648 @vindex nnspool-lib-dir
7649 Where the news lib dir is (@file{/usr/lib/news/} by default).
7650
7651 @item nnspool-active-file
7652 @vindex nnspool-active-file
7653 The path of the active file.
7654
7655 @item nnspool-newsgroups-file
7656 @vindex nnspool-newsgroups-file
7657 The path of the group descriptions file.
7658
7659 @item nnspool-history-file
7660 @vindex nnspool-history-file
7661 The path of the news history file.
7662
7663 @item nnspool-active-times-file
7664 @vindex nnspool-active-times-file
7665 The path of the active date file.
7666
7667 @item nnspool-nov-is-evil
7668 @vindex nnspool-nov-is-evil
7669 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
7670 that it finds.
7671
7672 @item nnspool-sift-nov-with-sed
7673 @vindex nnspool-sift-nov-with-sed
7674 @cindex sed
7675 If non-@code{nil}, which is the default, use @code{sed} to get the
7676 relevant portion from the overview file.  If nil, @code{nnspool} will
7677 load the entire file into a buffer and process it there.
7678
7679 @end table
7680
7681
7682 @node Getting Mail
7683 @section Getting Mail
7684 @cindex reading mail
7685 @cindex mail
7686
7687 Reading mail with a newsreader---isn't that just plain WeIrD? But of
7688 course.
7689
7690 @menu
7691 * Getting Started Reading Mail:: A simple cookbook example.
7692 * Splitting Mail::               How to create mail groups.
7693 * Mail Backend Variables::       Variables for customizing mail handling.
7694 * Fancy Mail Splitting::         Gnus can do hairy splitting of incoming mail.
7695 * Mail and Procmail::            Reading mail groups that procmail create.
7696 * Incorporating Old Mail::       What about the old mail you have?
7697 * Expiring Mail::                Getting rid of unwanted mail.
7698 * Duplicates::                   Dealing with duplicated mail.
7699 * Not Reading Mail::             Using mail backends for reading other files.
7700 * Choosing a Mail Backend::      Gnus can read a variety of mail formats.
7701 @end menu
7702
7703
7704 @node Getting Started Reading Mail
7705 @subsection Getting Started Reading Mail
7706
7707 It's quite easy to use Gnus to read your new mail.  You just plonk the
7708 mail backend of your choice into @code{gnus-secondary-select-methods},
7709 and things will happen automatically.
7710
7711 For instance, if you want to use @code{nnml} (which is a one file per
7712 mail backend), you could put the following in your @file{.gnus} file:
7713
7714 @lisp
7715 (setq gnus-secondary-select-methods
7716       '((nnml "private")))
7717 @end lisp
7718
7719 Now, the next time you start Gnus, this backend will be queried for new
7720 articles, and it will move all the messages in your spool file to its
7721 directory, which is @code{~/Mail/} by default.  The new group that will
7722 be created (@samp{mail.misc}) will be subscribed, and you can read it
7723 like any other group.
7724
7725 You will probably want to split the mail into several groups, though:
7726
7727 @lisp
7728 (setq nnmail-split-methods
7729   '(("junk" "^From:.*Lars Ingebrigtsen")
7730     ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
7731     ("other" "")))
7732 @end lisp
7733
7734 This will result in three new mail groups being created:
7735 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
7736 mail that doesn't fit into the first two groups will be placed in the
7737 latter group.
7738
7739 This should be sufficient for reading mail with Gnus.  You might want to
7740 give the other sections in this part of the manual a perusal, though,
7741 especially @pxref{Choosing a Mail Backend} and @pxref{Expiring Mail}. 
7742
7743
7744 @node Splitting Mail
7745 @subsection Splitting Mail
7746 @cindex splitting mail
7747 @cindex mail splitting
7748
7749 @vindex nnmail-split-methods
7750 The @code{nnmail-split-methods} variable says how the incoming mail is
7751 to be split into groups.
7752
7753 @lisp
7754 (setq nnmail-split-methods
7755   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
7756     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
7757     ("mail.other" "")))
7758 @end lisp
7759
7760 This variable is a list of lists, where the first element of each of
7761 these lists is the name of the mail group (they do not have to be called
7762 something beginning with @samp{mail}, by the way), and the second
7763 element is a regular expression used on the header of each mail to
7764 determine if it belongs in this mail group.
7765
7766 The second element can also be a function.  In that case, it will be
7767 called narrowed to the headers with the first element of the rule as the
7768 argument.  It should return a non-@code{nil} value if it thinks that the
7769 mail belongs in that group.
7770
7771 The last of these groups should always be a general one, and the regular
7772 expression should @emph{always} be @samp{} so that it matches any
7773 mails that haven't been matched by any of the other regexps.
7774
7775 If you like to tinker with this yourself, you can set this variable to a
7776 function of your choice.  This function will be called without any
7777 arguments in a buffer narrowed to the headers of an incoming mail
7778 message.  The function should return a list of groups names that it
7779 thinks should carry this mail message.
7780
7781 Note that the mail backends are free to maul the poor, innocent
7782 incoming headers all they want to.  They all add @code{Lines} headers;
7783 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
7784 @code{From<SPACE>} line to something else.
7785
7786 @vindex nnmail-crosspost
7787 The mail backends all support cross-posting.  If several regexps match,
7788 the mail will be ``cross-posted'' to all those groups.
7789 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
7790 that no articles are crossposted to the general (@samp{}) group.
7791
7792 @vindex nnmail-crosspost-link-function
7793 @cindex crosspost
7794 @cindex links
7795 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
7796 the crossposted articles.  However, not all files systems support hard
7797 links.  If that's the case for you, set
7798 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
7799 variable is @code{add-name-to-file} by default.)  
7800
7801 Gnus gives you all the opportunity you could possibly want for shooting
7802 yourself in the foot.  Let's say you create a group that will contain
7803 all the mail you get from your boss.  And then you accidentally
7804 unsubscribe from the group.  Gnus will still put all the mail from your
7805 boss in the unsubscribed group, and so, when your boss mails you ``Have
7806 that report ready by Monday or you're fired!'', you'll never see it and,
7807 come Tuesday, you'll still believe that you're gainfully employed while
7808 you really should be out collecting empty bottles to save up for next
7809 month's rent money.
7810
7811
7812 @node Mail Backend Variables
7813 @subsection Mail Backend Variables
7814
7815 These variables are (for the most part) pertinent to all the various
7816 mail backends.
7817
7818 @table @code
7819 @vindex nnmail-read-incoming-hook
7820 @item nnmail-read-incoming-hook
7821 The mail backends all call this hook after reading new mail.  You can
7822 use this hook to notify any mail watch programs, if you want to.
7823
7824 @vindex nnmail-spool-file
7825 @item nnmail-spool-file
7826 @cindex POP mail
7827 @cindex MAILHOST
7828 @cindex movemail
7829 @vindex nnmail-pop-password
7830 @vindex nnmail-pop-password-required
7831 The backends will look for new mail in this file.  If this variable is
7832 @code{nil}, the mail backends will never attempt to fetch mail by
7833 themselves.  If you are using a POP mail server and your name is
7834 @samp{larsi}, you should set this variable to @samp{po:larsi}.  If
7835 your name is not @samp{larsi}, you should probably modify that
7836 slightly, but you may have guessed that already, you smart & handsome
7837 devil!  You can also set this variable to @code{pop}, and Gnus will try
7838 to figure out the POP mail string by itself.  In any case, Gnus will
7839 call @code{movemail} which will contact the POP server named in the
7840 @code{MAILHOST} environment variable.  If the POP server needs a
7841 password, you can either set @code{nnmail-pop-password-required} to
7842 @code{t} and be prompted for the password, or set
7843 @code{nnmail-pop-password} to the password itself.
7844
7845 When you use a mail backend, Gnus will slurp all your mail from your
7846 inbox and plonk it down in your home directory.  Gnus doesn't move any
7847 mail if you're not using a mail backend---you have to do a lot of magic
7848 invocations first.  At the time when you have finished drawing the
7849 pentagram, lightened the candles, and sacrificed the goat, you really
7850 shouldn't be too surprised when Gnus moves your mail.
7851
7852 @vindex nnmail-use-procmail
7853 @vindex nnmail-procmail-suffix
7854 @item nnmail-use-procmail
7855 If non-@code{nil}, the mail backends will look in
7856 @code{nnmail-procmail-directory} for incoming mail.  All the files in
7857 that directory that have names ending in @code{nnmail-procmail-suffix}
7858 will be considered incoming mailboxes, and will be searched for new
7859 mail.
7860
7861 @vindex nnmail-crash-box
7862 @item nnmail-crash-box
7863 When the mail backends read a spool file, it is first moved to this
7864 file, which is @file{~/.gnus-crash-box} by default.  If this file
7865 already exists, it will always be read (and incorporated) before any
7866 other spool files.
7867
7868 @vindex nnmail-prepare-incoming-hook
7869 @item nnmail-prepare-incoming-hook
7870 This is run in a buffer that holds all the new incoming mail, and can be
7871 used for, well, anything, really.
7872
7873 @vindex nnmail-pre-get-new-mail-hook
7874 @vindex nnmail-post-get-new-mail-hook
7875 @item nnmail-pre-get-new-mail-hook
7876 @itemx nnmail-post-get-new-mail-hook
7877 These are two useful hooks executed when treating new incoming
7878 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
7879 starting to handle the new mail) and
7880 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
7881 is done).  Here's and example of using these two hooks to change the
7882 default file modes the new mail files get:
7883
7884 @lisp
7885 (add-hook 'gnus-pre-get-new-mail-hook 
7886           (lambda () (set-default-file-modes 511)))
7887
7888 (add-hook 'gnus-post-get-new-mail-hook 
7889           (lambda () (set-default-file-modes 551)))
7890 @end lisp
7891
7892 @item nnmail-tmp-directory
7893 @vindex nnmail-tmp-directory
7894 This variable says where to move the incoming mail to while processing
7895 it.  This is usually done in the same directory that the mail backend
7896 inhabits (i.e., @file{~/Mail/}), but if this variable is non-@code{nil},
7897 it will be used instead.
7898
7899 @item nnmail-movemail-program
7900 @vindex nnmail-movemail-program
7901 This program is executed to move mail from the user's inbox to her home
7902 directory.  The default is @samp{movemail}.
7903
7904 @item nnmail-delete-incoming
7905 @vindex nnmail-delete-incoming
7906 @cindex incoming mail files
7907 @cindex deleting incoming files
7908 If non-@code{nil}, the mail backends will delete the temporary incoming
7909 file after splitting mail into the proper groups.  This is @code{t} by
7910 default for reasons of security.
7911
7912 @item nnmail-use-long-file-names
7913 @vindex nnmail-use-long-file-names
7914 If non-@code{nil}, the mail backends will use long file and directory
7915 names.  Groups like @samp{mail.misc} will end up in directories like
7916 @file{mail.misc/}.  If it is @code{nil}, the same group will end up in
7917 @file{mail/misc/}.
7918
7919 @item nnmail-delete-file-function
7920 @vindex nnmail-delete-file-function
7921 @findex delete-file
7922 Function called to delete files.  It is @code{delete-file} by default. 
7923
7924 @end table
7925
7926
7927 @node Fancy Mail Splitting
7928 @subsection Fancy Mail Splitting
7929 @cindex mail splitting
7930 @cindex fancy mail splitting
7931
7932 @vindex nnmail-split-fancy
7933 @findex nnmail-split-fancy
7934 If the rather simple, standard method for specifying how to split mail
7935 doesn't allow you to do what you want, you can set
7936 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
7937 play with the @code{nnmail-split-fancy} variable. 
7938
7939 Let's look at an example value of this variable first:
7940
7941 @lisp
7942 ;; Messages from the mailer daemon are not crossposted to any of
7943 ;; the ordinary groups.  Warnings are put in a separate group
7944 ;; from real errors.
7945 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
7946                    "mail.misc"))
7947    ;; Non-error messages are crossposted to all relevant
7948    ;; groups, but we don't crosspost between the group for the
7949    ;; (ding) list and the group for other (ding) related mail.
7950    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
7951          ("subject" "ding" "ding.misc"))
7952       ;; Other mailing lists...
7953       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
7954       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
7955       ;; People...
7956       (any "larsi@@ifi\\.uio\\.no" "people.Lars Magne Ingebrigtsen"))
7957    ;; Unmatched mail goes to the catch all group.
7958    "misc.misc"))")
7959 @end lisp
7960
7961 This variable has the format of a @dfn{split}.  A split is a (possibly)
7962 recursive structure where each split may contain other splits.  Here are
7963 the four possible split syntaxes:
7964
7965 @table @dfn
7966
7967 @item GROUP 
7968 If the split is a string, that will be taken as a group name. 
7969
7970 @item (FIELD VALUE SPLIT)
7971 If the split is a list, and the first element is a string, then that
7972 means that if header FIELD (a regexp) contains VALUE (also a regexp),
7973 then store the message as specified by SPLIT.
7974
7975 @item (| SPLIT...)
7976 If the split is a list, and the first element is @code{|} (vertical
7977 bar), then process each SPLIT until one of them matches.  A SPLIT is
7978 said to match if it will cause the mail message to be stored in one or
7979 more groups.
7980
7981 @item (& SPLIT...)
7982 If the split is a list, and the first element is @code{&}, then process
7983 all SPLITs in the list.
7984 @end table
7985
7986 In these splits, FIELD must match a complete field name.  VALUE must
7987 match a complete word according to the fundamental mode syntax table.
7988 You can use @code{.*} in the regexps to match partial field names or
7989 words.
7990
7991 @vindex nnmail-split-abbrev-alist
7992 FIELD and VALUE can also be lisp symbols, in that case they are expanded
7993 as specified by the variable @code{nnmail-split-abbrev-alist}.  This is
7994 an alist of cons cells, where the car of the cells contains the key, and
7995 the cdr contains a string.
7996
7997 @vindex nnmail-split-fancy-syntax-table
7998 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
7999 when all this splitting is performed.
8000
8001
8002 @node Mail and Procmail
8003 @subsection Mail and Procmail
8004 @cindex procmail
8005
8006 @cindex slocal
8007 @cindex elm
8008 Many people use @code{procmail} (or some other mail filter program or
8009 external delivery agent---@code{slocal}, @code{elm}, etc) to split
8010 incoming mail into groups.  If you do that, you should set
8011 @code{nnmail-spool-file} to @code{procmail} to ensure that the mail
8012 backends never ever try to fetch mail by themselves.
8013
8014 This also means that you probably don't want to set
8015 @code{nnmail-split-methods} either, which has some, perhaps, unexpected
8016 side effects.
8017
8018 When a mail backend is queried for what groups it carries, it replies
8019 with the contents of that variable, along with any groups it has figured
8020 out that it carries by other means.  None of the backends (except
8021 @code{nnmh}) actually go out to the disk and check what groups actually
8022 exist.  (It's not trivial to distinguish between what the user thinks is
8023 a basis for a newsgroup and what is just a plain old file or directory.)
8024
8025 This means that you have to tell Gnus (and the backends) what groups
8026 exist by hand.
8027
8028 Let's take the @code{nnmh} backend as an example. 
8029
8030 The folders are located in @code{nnmh-directory}, say, @file{~/Mail/}.
8031 There are three folders, @file{foo}, @file{bar} and @file{mail.baz}.
8032
8033 Go to the group buffer and type @kbd{G m}.  When prompted, answer
8034 @samp{foo} for the name and @samp{nnmh} for the method.  Repeat
8035 twice for the two other groups, @samp{bar} and @samp{mail.baz}.  Be sure
8036 to include all your mail groups.
8037
8038 That's it.  You are now set to read your mail.  An active file for this
8039 method will be created automatically.
8040
8041 @vindex nnmail-procmail-suffix
8042 @vindex nnmail-procmail-directory
8043 If you use @code{nnfolder} or any other backend that store more than a
8044 single article in each file, you should never have procmail add mails to
8045 the file that Gnus sees.  Instead, procmail should put all incoming mail
8046 in @code{nnmail-procmail-directory}.  To arrive at the file name to put
8047 the incoming mail in, append @code{nnmail-procmail-suffix} to the group
8048 name.  The mail backends will read the mail from these files.
8049
8050 @vindex nnmail-resplit-incoming
8051 When Gnus reads a file called @file{mail.misc.spool}, this mail will be
8052 put in the @code{mail.misc}, as one would expect.  However, if you want
8053 Gnus to split the mail the normal way, you could set
8054 @code{nnmail-resplit-incoming} to @code{t}.
8055
8056 @vindex nnmail-keep-last-article
8057 If you use @code{procmail} to split things directory into an @code{nnmh}
8058 directory (which you shouldn't do), you should set
8059 @code{nnmail-keep-last-article} to non-@code{nil} to prevent Gnus from
8060 ever expiring the final article in a mail newsgroup.  This is quite,
8061 quite important.
8062
8063
8064 @node Incorporating Old Mail
8065 @subsection Incorporating Old Mail
8066
8067 Most people have lots of old mail stored in various file formats.  If
8068 you have set up Gnus to read mail using one of the spiffy Gnus mail
8069 backends, you'll probably wish to have that old mail incorporated into
8070 your mail groups.
8071
8072 Doing so can be quite easy.
8073
8074 To take an example: You're reading mail using @code{nnml}
8075 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
8076 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
8077 file filled with important, but old, mail.  You want to move it into
8078 your @code{nnml} groups.
8079
8080 Here's how:
8081
8082 @enumerate
8083 @item
8084 Go to the group buffer.
8085
8086 @item 
8087 Type `G f' and give the path of the mbox file when prompted to create an
8088 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
8089
8090 @item 
8091 Type `SPACE' to enter the newly created group.
8092
8093 @item
8094 Type `M P b' to process-mark all articles in this group (@pxref{Setting
8095 Process Marks}).
8096
8097 @item 
8098 Type `B r' to respool all the process-marked articles, and answer
8099 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
8100 @end enumerate
8101
8102 All the mail messages in the mbox file will now also be spread out over
8103 all your @code{nnml} groups.  Try entering them and check whether things
8104 have gone without a glitch.  If things look ok, you may consider
8105 deleting the mbox file, but I wouldn't do that unless I was absolutely
8106 sure that all the mail has ended up where it should be.
8107
8108 Respooling is also a handy thing to do if you're switching from one mail
8109 backend to another.  Just respool all the mail in the old mail groups
8110 using the new mail backend.
8111
8112
8113 @node Expiring Mail
8114 @subsection Expiring Mail
8115 @cindex article expiry
8116
8117 Traditional mail readers have a tendency to remove mail articles when
8118 you mark them as read, in some way.  Gnus takes a fundamentally
8119 different approach to mail reading.
8120
8121 Gnus basically considers mail just to be news that has been received in
8122 a rather peculiar manner.  It does not think that it has the power to
8123 actually change the mail, or delete any mail messages.  If you enter a
8124 mail group, and mark articles as ``read'', or kill them in some other
8125 fashion, the mail articles will still exist on the system.  I repeat:
8126 Gnus will not delete your old, read mail.  Unless you ask it to, of
8127 course.
8128
8129 To make Gnus get rid of your unwanted mail, you have to mark the
8130 articles as @dfn{expirable}.  This does not mean that the articles will
8131 disappear right away, however.  In general, a mail article will be
8132 deleted from your system if, 1) it is marked as expirable, AND 2) it is
8133 more than one week old.  If you do not mark an article as expirable, it
8134 will remain on your system until hell freezes over.  This bears
8135 repeating one more time, with some spurious capitalizations: IF you do
8136 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
8137
8138 @vindex gnus-auto-expirable-newsgroups
8139 You do not have to mark articles as expirable by hand.  Groups that
8140 match the regular expression @code{gnus-auto-expirable-newsgroups} will
8141 have all articles that you read marked as expirable automatically.  All
8142 articles that are marked as expirable have an @samp{E} in the first
8143 column in the summary buffer.
8144
8145 Let's say you subscribe to a couple of mailing lists, and you want the
8146 articles you have read to disappear after a while:
8147
8148 @lisp
8149 (setq gnus-auto-expirable-newsgroups 
8150       "mail.nonsense-list\\|mail.nice-list")
8151 @end lisp
8152
8153 Another way to have auto-expiry happen is to have the element
8154 @code{auto-expire} in the group parameters of the group. 
8155
8156 @vindex nnmail-expiry-wait
8157 The @code{nnmail-expiry-wait} variable supplies the default time an
8158 expirable article has to live.  The default is seven days.  
8159
8160 Gnus also supplies a function that lets you fine-tune how long articles
8161 are to live, based on what group they are in.  Let's say you want to
8162 have one month expiry period in the @samp{mail.private} group, a one day
8163 expiry period in the @samp{mail.junk} group, and a six day expiry period
8164 everywhere else:
8165
8166 @vindex nnmail-expiry-wait-function
8167 @lisp
8168 (setq nnmail-expiry-wait-function
8169       (lambda (group)
8170        (cond ((string= group "mail.private")
8171                31)
8172              ((string= group "mail.junk")
8173                1)
8174              ((string= group "important")
8175                'never)
8176              (t
8177                6))))
8178 @end lisp
8179
8180 The group names that this function is fed are ``unadorned'' group
8181 names---no @samp{nnml:} prefixes and the like.
8182
8183 The @code{nnmail-expiry-wait} variable and
8184 @code{nnmail-expiry-wait-function} function can be either a number (not
8185 necessarily an integer) or the symbols @code{immediate} or
8186 @code{never}.  
8187
8188 You can also use the @code{expiry-wait} group parameter to selectively
8189 change the expiry period (@pxref{Group Parameters}).
8190
8191 @vindex nnmail-keep-last-article
8192 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
8193 expire the final article in a mail newsgroup.  This is to make life
8194 easier for procmail users.
8195
8196 @vindex gnus-total-expirable-newsgroups
8197 By the way, that line up there about Gnus never expiring non-expirable
8198 articles is a lie.  If you put @code{total-expire} in the group
8199 parameters, articles will not be marked as expirable, but all read
8200 articles will be put through the expiry process.  Use with extreme
8201 caution.  Even more dangerous is the
8202 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
8203 this regexp will have all read articles put through the expiry process,
8204 which means that @emph{all} old mail articles in the groups in question
8205 will be deleted after a while.  Use with extreme caution, and don't come
8206 crying to me when you discover that the regexp you used matched the
8207 wrong group and all your important mail has disappeared.  Be a
8208 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
8209 with!  So there!
8210
8211
8212 @node Duplicates
8213 @subsection Duplicates
8214
8215 @vindex nnmail-treat-duplicates
8216 @vindex nnmail-message-id-cache-length
8217 @vindex nnmail-message-id-cache-file
8218 @cindex duplicate mails
8219 If you are a member of a couple of mailing list, you will sometime
8220 receive two copies of the same mail.  This can be quite annoying, so
8221 @code{nnmail} checks for and treats any duplicates it might find.  To do
8222 this, it keeps a cache of old @code{Message-ID}s -
8223 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
8224 default.  The approximate maximum number of @code{Message-ID}s stored
8225 there is controlled by the @code{nnmail-message-id-cache-length}
8226 variable, which is 1000 by default. (So 1000 @code{Message-ID}s will be
8227 stored.) If all this sounds scary to you, you can set
8228 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
8229 default), and @code{nnmail} won't delete duplicate mails.  Instead it
8230 will generate a brand new @code{Message-ID} for the mail and insert a
8231 warning into the head of the mail saying that it thinks that this is a
8232 duplicate of a different message.  
8233
8234 This variable can also be a function.  If that's the case, the function
8235 will be called from a buffer narrowed to the message in question with
8236 the @code{Message-ID} as a parameter.  The function must return either
8237 @code{nil}, @code{warn}, or @code{delete}.
8238
8239 You can turn this feature off completely by setting the variable to
8240 @code{nil}.
8241
8242 If you want all the duplicate mails to be put into a special
8243 @dfn{duplicates} group, you could do that using the normal mail split
8244 methods:
8245
8246 @lisp
8247 (setq nnmail-split-fancy
8248       '(| ;; Messages duplicates go to a separate group.
8249           ("gnus-warning" "duplication of message" "duplicate")
8250           ;; Message from daemons, postmaster, and the like to another.
8251           (any mail "mail.misc")
8252           ;; Other rules.
8253           [ ... ] ))
8254 @end lisp
8255
8256 Or something like:
8257 @lisp
8258 (setq nnmail-split-methods 
8259       '(("duplicates" "^Gnus-Warning:")
8260         ;; Other rules.
8261         [...]))
8262 @end lisp
8263
8264 Here's a neat feature: If you know that the recipient reads her mail
8265 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
8266 @code{delete}, you can send her as many insults as you like, just by
8267 using a @code{Message-ID} of a mail that you know that she's already
8268 received.  Think of all the fun!  She'll never see any of it!  Whee!
8269
8270
8271 @node Not Reading Mail
8272 @subsection Not Reading Mail
8273
8274 If you start using any of the mail backends, they have the annoying
8275 habit of assuming that you want to read mail with them.  This might not
8276 be unreasonable, but it might not be what you want.
8277
8278 If you set @code{nnmail-spool-file} to @code{nil}, none of the backends
8279 will ever attempt to read incoming mail, which should help.
8280
8281 @vindex nnbabyl-get-new-mail
8282 @vindex nnmbox-get-new-mail
8283 @vindex nnml-get-new-mail
8284 @vindex nnmh-get-new-mail
8285 @vindex nnfolder-get-new-mail
8286 This might be too much, if, for instance, you are reading mail quite
8287 happily with @code{nnml} and just want to peek at some old @sc{rmail}
8288 file you have stashed away with @code{nnbabyl}.  All backends have
8289 variables called backend-@code{get-new-mail}.  If you want to disable
8290 the @code{nnbabyl} mail reading, you edit the virtual server for the
8291 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
8292
8293 All the mail backends will call @code{nn}*@code{-prepare-save-mail-hook}
8294 narrowed to the article to be saved before saving it when reading
8295 incoming mail.
8296
8297
8298 @node Choosing a Mail Backend
8299 @subsection Choosing a Mail Backend
8300
8301 Gnus will read the mail spool when you activate a mail group.  The mail
8302 file is first copied to your home directory.  What happens after that
8303 depends on what format you want to store your mail in.
8304
8305 @menu
8306 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
8307 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
8308 * Mail Spool::                  Store your mail in a private spool?
8309 * MH Spool::                    An mhspool-like backend.
8310 * Mail Folders::                Having one file for each group.
8311 @end menu
8312
8313
8314 @node Unix Mail Box
8315 @subsubsection Unix Mail Box
8316 @cindex nnmbox
8317 @cindex unix mail box
8318
8319 @vindex nnmbox-active-file
8320 @vindex nnmbox-mbox-file
8321 The @dfn{nnmbox} backend will use the standard Un*x mbox file to store
8322 mail.  @code{nnmbox} will add extra headers to each mail article to say
8323 which group it belongs in.
8324
8325 Virtual server settings:
8326
8327 @table @code
8328 @item nnmbox-mbox-file
8329 @vindex nnmbox-mbox-file
8330 The name of the mail box in the user's home directory. 
8331
8332 @item nnmbox-active-file
8333 @vindex nnmbox-active-file
8334 The name of the active file for the mail box.
8335
8336 @item nnmbox-get-new-mail
8337 @vindex nnmbox-get-new-mail
8338 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
8339 into groups.
8340 @end table
8341
8342
8343 @node Rmail Babyl
8344 @subsubsection Rmail Babyl
8345 @cindex nnbabyl
8346 @cindex rmail mbox
8347
8348 @vindex nnbabyl-active-file
8349 @vindex nnbabyl-mbox-file
8350 The @dfn{nnbabyl} backend will use a babyl mail box (aka. @dfn{rmail
8351 mbox}) to store mail. @code{nnbabyl} will add extra headers to each mail
8352 article to say which group it belongs in.
8353
8354 Virtual server settings:
8355
8356 @table @code
8357 @item nnbabyl-mbox-file
8358 @vindex nnbabyl-mbox-file
8359 The name of the rmail mbox file.
8360
8361 @item nnbabyl-active-file
8362 @vindex nnbabyl-active-file
8363 The name of the active file for the rmail box.
8364
8365 @item nnbabyl-get-new-mail
8366 @vindex nnbabyl-get-new-mail
8367 If non-@code{nil}, @code{nnbabyl} will read incoming mail. 
8368 @end table
8369
8370
8371 @node Mail Spool
8372 @subsubsection Mail Spool
8373 @cindex nnml
8374 @cindex mail @sc{nov} spool
8375
8376 The @dfn{nnml} spool mail format isn't compatible with any other known
8377 format.  It should be used with some caution.
8378
8379 @vindex nnml-directory
8380 If you use this backend, Gnus will split all incoming mail into files;
8381 one file for each mail, and put the articles into the correct
8382 directories under the directory specified by the @code{nnml-directory}
8383 variable.  The default value is @file{~/Mail/}.
8384
8385 You do not have to create any directories beforehand; Gnus will take
8386 care of all that.
8387
8388 If you have a strict limit as to how many files you are allowed to store
8389 in your account, you should not use this backend.  As each mail gets its
8390 own file, you might very well occupy thousands of inodes within a few
8391 weeks.  If this is no problem for you, and it isn't a problem for you
8392 having your friendly systems administrator walking around, madly,
8393 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
8394 know that this is probably the fastest format to use.  You do not have
8395 to trudge through a big mbox file just to read your new mail.
8396
8397 @code{nnml} is probably the slowest backend when it comes to article
8398 splitting.  It has to create lots of files, and it also generates
8399 @sc{nov} databases for the incoming mails.  This makes is the fastest
8400 backend when it comes to reading mail.
8401
8402 Virtual server settings:
8403
8404 @table @code
8405 @item nnml-directory
8406 @vindex nnml-directory
8407 All @code{nnml} directories will be placed under this directory. 
8408
8409 @item nnml-active-file
8410 @vindex nnml-active-file
8411 The active file for the @code{nnml} server.
8412
8413 @item nnml-newsgroups-file
8414 @vindex nnml-newsgroups-file
8415 The @code{nnml} group descriptions file.  @xref{Newsgroups File
8416 Format}. 
8417
8418 @item nnml-get-new-mail
8419 @vindex nnml-get-new-mail
8420 If non-@code{nil}, @code{nnml} will read incoming mail.
8421
8422 @item nnml-nov-is-evil
8423 @vindex nnml-nov-is-evil
8424 If non-@code{nil}, this backend will ignore any @sc{nov} files.  
8425
8426 @item nnml-nov-file-name
8427 @vindex nnml-nov-file-name
8428 The name of the @sc{nov} files.  The default is @file{.overview}. 
8429
8430 @item nnml-prepare-save-mail-hook
8431 @vindex nnml-prepare-save-mail-hook
8432 Hook run narrowed to an article before saving.
8433
8434 @end table
8435
8436 @findex nnml-generate-nov-databases
8437 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
8438 you can do a complete update by typing @kbd{M-x
8439 nnml-generate-nov-databases}.  This command will trawl through the
8440 entire @code{nnml} hierarchy, looking at each and every article, so it
8441 might take a while to complete.
8442
8443
8444 @node MH Spool
8445 @subsubsection MH Spool
8446 @cindex nnmh
8447 @cindex mh-e mail spool
8448
8449 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
8450 @sc{nov} databases and it doesn't keep an active file.  This makes
8451 @code{nnmh} a @emph{much} slower backend than @code{nnml}, but it also
8452 makes it easier to write procmail scripts for.
8453
8454 Virtual server settings:
8455
8456 @table @code
8457 @item nnmh-directory
8458 @vindex nnmh-directory
8459 All @code{nnmh} directories will be located under this directory.
8460
8461 @item nnmh-get-new-mail
8462 @vindex nnmh-get-new-mail
8463 If non-@code{nil}, @code{nnmh} will read incoming mail.
8464
8465 @item nnmh-be-safe
8466 @vindex nnmh-be-safe
8467 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
8468 sure that the articles in the folder are actually what Gnus thinks they
8469 are.  It will check date stamps and stat everything in sight, so
8470 setting this to @code{t} will mean a serious slow-down.  If you never
8471 use anything but Gnus to read the @code{nnmh} articles, you do not have
8472 to set this variable to @code{t}.
8473 @end table
8474
8475
8476 @node Mail Folders
8477 @subsubsection Mail Folders
8478 @cindex nnfolder
8479 @cindex mbox folders
8480 @cindex mail folders
8481
8482 @code{nnfolder} is a backend for storing each mail group in a separate
8483 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
8484 will add extra headers to keep track of article numbers and arrival
8485 dates.
8486
8487 Virtual server settings:
8488
8489 @table @code
8490 @item nnfolder-directory
8491 @vindex nnfolder-directory
8492 All the @code{nnfolder} mail boxes will be stored under this directory. 
8493
8494 @item nnfolder-active-file
8495 @vindex nnfolder-active-file
8496 The name of the active file.
8497
8498 @item nnfolder-newsgroups-file
8499 @vindex nnfolder-newsgroups-file
8500 The name of the group descriptions file.  @xref{Newsgroups File Format}.
8501
8502 @item nnfolder-get-new-mail
8503 @vindex nnfolder-get-new-mail
8504 If non-@code{nil}, @code{nnfolder} will read incoming mail.
8505 @end table
8506
8507 @findex nnfolder-generate-active-file
8508 @kindex M-x nnfolder-generate-active-file
8509 If you have lots of @code{nnfolder}-like files you'd like to read with
8510 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
8511 command to make @code{nnfolder} aware of all likely files in
8512 @code{nnfolder-directory}.
8513
8514
8515 @node Other Sources
8516 @section Other Sources
8517
8518 Gnus can do more than just read news or mail.  The methods described
8519 below allow Gnus to view directories and files as if they were
8520 newsgroups.
8521
8522 @menu
8523 * Directory Groups::   You can read a directory as if it was a newsgroup.
8524 * Anything Groups::    Dired?  Who needs dired?
8525 * Document Groups::    Single files can be the basis of a group.
8526 * SOUP::               Reading @sc{SOUP} packets ``offline''.
8527 @end menu
8528
8529
8530 @node Directory Groups
8531 @subsection Directory Groups
8532 @cindex nndir
8533 @cindex directory groups
8534
8535 If you have a directory that has lots of articles in separate files in
8536 it, you might treat it as a newsgroup.  The files have to have numerical
8537 names, of course.
8538
8539 This might be an opportune moment to mention @code{ange-ftp}, that most
8540 wonderful of all wonderful Emacs packages.  When I wrote @code{nndir}, I
8541 didn't think much about it---a backend to read directories.  Big deal.
8542
8543 @code{ange-ftp} changes that picture dramatically.  For instance, if you
8544 enter @file{"/ftp.hpc.uh.edu:/pub/emacs/ding-list/"} as the the
8545 directory name, ange-ftp will actually allow you to read this directory
8546 over at @samp{sina} as a newsgroup.  Distributed news ahoy!
8547
8548 @code{nndir} will use @sc{nov} files if they are present.
8549
8550 @code{nndir} is a ``read-only'' backend---you can't delete or expire
8551 articles with this method.  You can use @code{nnmh} or @code{nnml} for
8552 whatever you use @code{nndir} for, so you could switch to any of those
8553 methods if you feel the need to have a non-read-only @code{nndir}.
8554
8555
8556 @node Anything Groups
8557 @subsection Anything Groups
8558 @cindex nneething
8559
8560 From the @code{nndir} backend (which reads a single spool-like
8561 directory), it's just a hop and a skip to @code{nneething}, which
8562 pretends that any arbitrary directory is a newsgroup.  Strange, but
8563 true.
8564
8565 When @code{nneething} is presented with a directory, it will scan this
8566 directory and assign article numbers to each file.  When you enter such
8567 a group, @code{nneething} must create ``headers'' that Gnus can use.
8568 After all, Gnus is a newsreader, in case you're
8569 forgetting. @code{nneething} does this in a two-step process.  First, it
8570 snoops each file in question.  If the file looks like an article (i.e.,
8571 the first few lines look like headers), it will use this as the head.
8572 If this is just some arbitrary file without a head (eg. a C source
8573 file), @code{nneething} will cobble up a header out of thin air.  It
8574 will use file ownership, name and date and do whatever it can with these
8575 elements.
8576
8577 All this should happen automatically for you, and you will be presented
8578 with something that looks very much like a newsgroup.  Totally like a
8579 newsgroup, to be precise.  If you select an article, it will be displayed
8580 in the article buffer, just as usual.
8581
8582 If you select a line that represents a directory, Gnus will pop you into
8583 a new summary buffer for this @code{nneething} group.  And so on.  You can
8584 traverse the entire disk this way, if you feel like, but remember that
8585 Gnus is not dired, really, and does not intend to be, either.
8586
8587 There are two overall modes to this action---ephemeral or solid.  When
8588 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
8589 will not store information on what files you have read, and what files
8590 are new, and so on.  If you create a solid @code{nneething} group the
8591 normal way with @kbd{G m}, Gnus will store a mapping table between
8592 article numbers and file names, and you can treat this group like any
8593 other groups.  When you activate a solid @code{nneething} group, you will
8594 be told how many unread articles it contains, etc., etc.
8595
8596 Some variables:
8597
8598 @table @code
8599 @item nneething-map-file-directory
8600 @vindex nneething-map-file-directory
8601 All the mapping files for solid @code{nneething} groups will be stored
8602 in this directory, which defaults to @file{~/.nneething/}.
8603
8604 @item nneething-exclude-files
8605 @vindex nneething-exclude-files
8606 All files that match this regexp will be ignored.  Nice to use to exclude
8607 auto-save files and the like, which is what it does by default.
8608
8609 @item nneething-map-file
8610 @vindex nneething-map-file
8611 Name of the map files.
8612 @end table
8613
8614
8615 @node Document Groups
8616 @subsection Document Groups
8617 @cindex nndoc
8618 @cindex documentation group
8619 @cindex help group
8620
8621 @code{nndoc} is a cute little thing that will let you read a single file
8622 as a newsgroup.  Several files types are supported:
8623
8624 @table @code
8625 @cindex babyl
8626 @cindex rmail mbox
8627
8628 @item babyl
8629 The babyl (rmail) mail box.
8630 @cindex mbox
8631 @cindex Unix mbox
8632
8633 @item mbox
8634 The standard Unix mbox file.
8635
8636 @cindex MMDF mail box
8637 @item mmdf
8638 The MMDF mail box format.
8639
8640 @item news
8641 Several news articles appended into a file.
8642
8643 @item rnews
8644 @cindex rnews batch files
8645 The rnews batch transport format.
8646 @cindex forwarded messages
8647
8648 @item forward
8649 Forwarded articles.
8650
8651 @item mime-digest
8652 @cindex digest
8653 @cindex MIME digest
8654 @cindex 1153 digest
8655 @cindex RFC 1153 digest
8656 @cindex RFC 341 digest
8657 MIME (RFC 1341) digest format.
8658
8659 @item standard-digest
8660 The standard (RFC 1153) digest format.
8661
8662 @item slack-digest
8663 Non-standard digest format---matches most things, but does it badly. 
8664 @end table
8665
8666 You can also use the special ``file type'' @code{guess}, which means
8667 that @code{nndoc} will try to guess what file type it is looking at.
8668 @code{digest} means that @code{nndoc} should guess what digest type the
8669 file is.
8670
8671 @code{nndoc} will not try to change the file or insert any extra headers into
8672 it---it will simply, like, let you use the file as the basis for a
8673 group.  And that's it.
8674
8675 If you have some old archived articles that you want to insert into your
8676 new & spiffy Gnus mail backend, @code{nndoc} can probably help you with
8677 that.  Say you have an old @file{RMAIL} file with mail that you now want
8678 to split into your new @code{nnml} groups.  You look at that file using
8679 @code{nndoc}, set the process mark on all the articles in the buffer
8680 (@kbd{M P b}, for instance), and then re-spool (@kbd{B r}) using
8681 @code{nnml}.  If all goes well, all the mail in the @file{RMAIL} file is
8682 now also stored in lots of @code{nnml} directories, and you can delete
8683 that pesky @file{RMAIL} file.  If you have the guts!  
8684
8685 Virtual server variables:
8686
8687 @table @code
8688 @item nndoc-article-type
8689 @vindex nndoc-article-type
8690 This should be one of @code{mbox}, @code{babyl}, @code{digest},
8691 @code{mmdf}, @code{forward}, @code{news}, @code{rnews},
8692 @code{mime-digest}, @code{clari-briefs}, or @code{guess}.
8693
8694 @item nndoc-post-type
8695 @vindex nndoc-post-type
8696 This variable says whether Gnus is to consider the group a news group or
8697 a mail group.  There are two legal values:  @code{mail} (the default)
8698 and @code{news}.
8699 @end table
8700
8701 @menu
8702 * Document Server Internals::   How to add your own document types.
8703 @end menu
8704
8705
8706 @node Document Server Internals
8707 @subsubsection Document Server Internals
8708
8709 Adding new document types to be recognized by @code{nndoc} isn't
8710 difficult.  You just have to whip up a definition of what the document
8711 looks like, write a predicate function to recognize that document type,
8712 and then hook into @code{nndoc}.
8713
8714 First, here's an example document type definition:
8715
8716 @example
8717 (mmdf 
8718  (article-begin .  "^\^A\^A\^A\^A\n")
8719  (body-end .  "^\^A\^A\^A\^A\n"))
8720 @end example
8721
8722 The definition is simply a unique @dfn{name} followed by a series of
8723 regexp pseudo-variable settings.  Below are the possible
8724 variables---don't be daunted by the number of variables; most document
8725 types can be defined with very few settings:
8726
8727 @table @code
8728 @item first-article
8729 If present, @code{nndoc} will skip past all text until it finds
8730 something that match this regexp.  All text before this will be
8731 totally ignored. 
8732
8733 @item article-begin
8734 This setting has to be present in all document type definitions.  It
8735 says what the beginning of each article looks like.
8736
8737 @item head-begin-function
8738 If present, this should be a function that moves point to the head of
8739 the article.
8740
8741 @item nndoc-head-begin
8742 If present, this should be a regexp that matches the head of the
8743 article. 
8744
8745 @item nndoc-head-end
8746 This should match the end of the head of the article.  It defaults to
8747 @samp{"^$"}---the empty line.
8748
8749 @item body-begin-function
8750 If present, this function should move point to the beginning of the body
8751 of the article.
8752
8753 @item body-begin
8754 This should match the beginning of the body of the article.  It defaults
8755 to @samp{^\n}.
8756
8757 @item body-end-function
8758 If present, this function should move point to the end of the body of
8759 the article.
8760
8761 @item body-end
8762 If present, this should match the end of the body of the article.
8763
8764 @item nndoc-file-end
8765 If present, this should match the end of the file.  All text after this
8766 regexp will be totally ignored. 
8767
8768 @end table
8769
8770 So, using these variables @code{nndoc} is able to dissect a document
8771 file into a series of articles, each with a head and a body.  However, a
8772 few more variables are needed since not all document types are all that
8773 news-like---variables needed to transform the head or the body into
8774 something that's palatable for Gnus:
8775
8776 @table @code
8777 @item prepare-body-function
8778 If present, this function will be called when requesting an article.  It
8779 will be called with point at the start of the body, and is useful if the
8780 document has encoded some parts of its contents. 
8781
8782 @item article-transform-function
8783 If present, this function is called when requesting an article.  It's
8784 meant to be used how more wide-ranging transformation of both head and
8785 body of the article.
8786
8787 @item generate-head-function
8788 If present, this function is called to generate a head that Gnus can
8789 understand.  It is called with the article number as a parameter, and is
8790 expected to generate a nice head for the article in question.  It is
8791 called when requesting the headers of all articles.
8792
8793 @end table
8794
8795 Let's look at the most complicated example I can come up with---standard
8796 digests:
8797
8798 @example
8799 (standard-digest
8800  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
8801  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
8802  (prepare-body-function . nndoc-unquote-dashes)
8803  (body-end-function . nndoc-digest-body-end)
8804  (head-end . "^ ?$")
8805  (body-begin . "^ ?\n")
8806  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
8807  (subtype digest guess))
8808 @end example
8809
8810 We see that all text before a 70-width line of dashes is ignored; all
8811 text after a line that starts with that @samp{^End of} is also ignored;
8812 each article begins with a 30-width line of dashes; the line separating
8813 the head from the body may contain a single spcae; and that the body is
8814 run through @code{nndoc-unquote-dashes} before being delivered.
8815
8816 To hook your own document definition into @code{nndoc}, use the
8817 @code{nndoc-add-type} function.  It takes two parameters---the first is
8818 the definition itself and the second (optional) parameter says where in
8819 the document type definition alist to put this definition.  The alist is
8820 traversed sequentially, and @code{nndoc-TYPE-type-p} is called for each
8821 type.  So @code{nndoc-mmdf-type-p} is called to see whether a document
8822 is of @code{mmdf} type, and so on.  These type predicates should return
8823 @code{nil} if the document is not of the correct type; @code{t} if it is
8824 of the correct type; and a number if the document might be of the
8825 correct type.  A high number means high probability; a low number means
8826 low probability with @samp{0} being the lowest legal number.
8827
8828
8829 @node SOUP
8830 @subsection SOUP
8831 @cindex SOUP
8832 @cindex offline
8833
8834 In the PC world people often talk about ``offline'' newsreaders.  These
8835 are thingies that are combined reader/news transport monstrosities.
8836 With built-in modem programs.  Yecchh!
8837
8838 Of course, us Unix Weenie types of human beans use things like
8839 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
8840 transport things like Ghod intended.  And then we just use normal
8841 newsreaders.  
8842
8843 However, it can sometimes be convenient to do something a that's a bit
8844 easier on the brain if you have a very slow modem, and you're not really
8845 that interested in doing things properly.  
8846
8847 A file format called @sc{soup} has been developed for transporting news
8848 and mail from servers to home machines and back again.  It can be a bit
8849 fiddly.
8850
8851 @enumerate
8852
8853 @item
8854 You log in on the server and create a @sc{soup} packet.  You can either
8855 use a dedicated @sc{soup} thingie, or you can use Gnus to create the
8856 packet with the @kbd{O s} command.
8857
8858 @item 
8859 You transfer the packet home.  Rail, boat, car or modem will do fine.
8860
8861 @item
8862 You put the packet in your home directory.
8863
8864 @item
8865 You fire up Gnus using the @code{nnsoup} backend as the native server.
8866
8867 @item
8868 You read articles and mail and answer and followup to the things you
8869 want.
8870
8871 @item 
8872 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
8873 packet.
8874
8875 @item 
8876 You transfer this packet to the server.  
8877
8878 @item
8879 You use Gnus to mail this packet out with the @kbd{G s s} command.
8880
8881 @item
8882 You then repeat until you die.
8883
8884 @end enumerate
8885
8886 So you basically have a bipartite system---you use @code{nnsoup} for
8887 reading and Gnus for packing/sending these @sc{soup} packets.
8888
8889 @menu
8890 * SOUP Commands::     Commands for creating and sending @sc{soup} packets
8891 * SOUP Groups::       A backend for reading @sc{soup} packets.
8892 * SOUP Replies::      How to enable @code{nnsoup} to take over mail and news.
8893 @end menu
8894
8895
8896 @node SOUP Commands
8897 @subsubsection SOUP Commands
8898
8899 @table @kbd
8900 @item G s b
8901 @kindex G s b (Group)
8902 @findex gnus-group-brew-soup
8903 Pack all unread articles in the current group
8904 (@code{gnus-group-brew-soup}).  This command understands the
8905 process/prefix convention.
8906
8907 @item G s w
8908 @kindex G s w (Group)
8909 @findex gnus-soup-save-areas
8910 Save all data files (@code{gnus-soup-save-areas}).
8911
8912 @item G s s
8913 @kindex G s s (Group)
8914 @findex gnus-soup-send-replies
8915 Send all replies from the replies packet
8916 (@code{gnus-soup-send-replies}). 
8917
8918 @item G s p
8919 @kindex G s p (Group)
8920 @findex gnus-soup-pack-packet
8921 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}). 
8922
8923 @item G s r
8924 @kindex G s r (Group)
8925 @findex nnsoup-pack-replies
8926 Pack all replies into a replies packet (@code{nnsoup-pack-replies}). 
8927
8928 @item O s
8929 @kindex O s (Summary)
8930 @findex gnus-soup-add-article
8931 This summary-mode command adds the current article to a @sc{soup} packet
8932 (@code{gnus-soup-add-article}).  It understands the process/prefix
8933 convention. 
8934
8935 @end table
8936
8937
8938 There are a few variables to customize where Gnus will put all these
8939 thingies:  
8940
8941 @table @code
8942
8943 @item gnus-soup-directory
8944 @vindex gnus-soup-directory
8945 Directory where Gnus will save intermediate files while composing
8946 @sc{soup} packets.  The default is @file{~/SoupBrew/}. 
8947
8948 @item gnus-soup-replies-directory
8949 @vindex gnus-soup-replies-directory
8950 This is what Gnus will use as a temporary directory while sending our
8951 reply packets.  The default is @file{~/SoupBrew/SoupReplies/}. 
8952
8953 @item gnus-soup-prefix-file
8954 @vindex gnus-soup-prefix-file
8955 Name of the file where Gnus stores the last used prefix.  The default is
8956 @samp{gnus-prefix}. 
8957
8958 @item gnus-soup-packer
8959 @vindex gnus-soup-packer
8960 A format string command for packing a @sc{soup} packet.  The default is
8961 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}. 
8962
8963 @item gnus-soup-unpacker
8964 @vindex gnus-soup-unpacker
8965 Format string command for unpacking a @sc{soup} packet.  The default is
8966 @samp{gunzip -c %s | tar xvf -}.
8967
8968 @item gnus-soup-packet-directory
8969 @vindex gnus-soup-packet-directory
8970 Where Gnus will look for reply packets.  The default is @file{~/}. 
8971
8972 @item gnus-soup-packet-regexp
8973 @vindex gnus-soup-packet-regexp
8974 Regular expression matching @sc{soup} reply packets in
8975 @code{gnus-soup-packet-directory}. 
8976
8977 @end table
8978  
8979
8980 @node SOUP Groups
8981 @subsubsection @sc{soup} Groups
8982 @cindex nnsoup
8983
8984 @code{nnsoup} is the backend for reading @sc{soup} packets.  It will
8985 read incoming packets, unpack them, and put them in a directory where
8986 you can read them at leisure.
8987
8988 These are the variables you can use to customize its behavior:
8989
8990 @table @code
8991
8992 @item nnsoup-tmp-directory
8993 @vindex nnsoup-tmp-directory
8994 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
8995 directory.  (@file{/tmp/} by default.)  
8996
8997 @item nnsoup-directory
8998 @vindex nnsoup-directory
8999 @code{nnsoup} then moves each message and index file to this directory.
9000 The default is @file{~/SOUP/}.
9001
9002 @item nnsoup-replies-directory 
9003 @vindex nnsoup-replies-directory 
9004 All replies will stored in this directory before being packed into a
9005 reply packet.  The default is @file{~/SOUP/replies/"}.
9006
9007 @item nnsoup-replies-format-type
9008 @vindex nnsoup-replies-format-type
9009 The @sc{soup} format of the replies packets.  The default is @samp{?n}
9010 (rnews), and I don't think you should touch that variable.  I probably
9011 shouldn't even have documented it.  Drats!  Too late!
9012
9013 @item nnsoup-replies-index-type
9014 @vindex nnsoup-replies-index-type
9015 The index type of the replies packet.  The is @samp{?n}, which means
9016 ``none''.  Don't fiddle with this one either!
9017
9018 @item nnsoup-active-file
9019 @vindex nnsoup-active-file
9020 Where @code{nnsoup} stores lots of information.  This is not an ``active
9021 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
9022 this file or mess it up in any way, you're dead.  The default is
9023 @file{~/SOUP/active}.
9024
9025 @item nnsoup-packer
9026 @vindex nnsoup-packer
9027 Format string command for packing a reply @sc{soup} packet.  The default
9028 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}. 
9029
9030 @item nnsoup-unpacker
9031 @vindex nnsoup-unpacker
9032 Format string command for unpacking incoming @sc{soup} packets.  The
9033 default is @samp{gunzip -c %s | tar xvf -}. 
9034
9035 @item nnsoup-packet-directory
9036 @vindex nnsoup-packet-directory
9037 Where @code{nnsoup} will look for incoming packets.  The default is
9038 @file{~/}.  
9039
9040 @item nnsoup-packet-regexp
9041 @vindex nnsoup-packet-regexp
9042 Regular expression matching incoming @sc{soup} packets.  The default is
9043 @samp{Soupout}. 
9044
9045 @end table
9046
9047
9048 @node SOUP Replies
9049 @subsubsection SOUP Replies
9050
9051 Just using @code{nnsoup} won't mean that your postings and mailings end
9052 up in @sc{soup} reply packets automagically.  You have to work a bit
9053 more for that to happen.
9054
9055 @findex nnsoup-set-variables
9056 The @code{nnsoup-set-variables} command will set the appropriate
9057 variables to ensure that all your followups and replies end up in the
9058 @sc{soup} system.
9059
9060 In specific, this is what it does:
9061
9062 @lisp
9063 (setq gnus-inews-article-function 'nnsoup-request-post)
9064 (setq send-mail-function 'nnsoup-request-mail)
9065 @end lisp
9066
9067 And that's it, really.  If you only want news to go into the @sc{soup}
9068 system you just use the first line.  If you only want mail to be
9069 @sc{soup}ed you use the second.
9070
9071
9072 @node Combined Groups
9073 @section Combined Groups
9074
9075 Gnus allows combining a mixture of all the other group types into bigger
9076 groups.
9077
9078 @menu
9079 * Virtual Groups::     Combining articles from many groups.
9080 * Kibozed Groups::     Looking through parts of the newsfeed for articles.
9081 @end menu
9082
9083
9084 @node Virtual Groups
9085 @subsection Virtual Groups
9086 @cindex nnvirtual
9087 @cindex virtual groups
9088
9089 An @dfn{nnvirtual group} is really nothing more than a collection of
9090 other groups.
9091
9092 For instance, if you are tired of reading many small group, you can
9093 put them all in one big group, and then grow tired of reading one
9094 big, unwieldy group.  The joys of computing!
9095
9096 You specify @code{nnvirtual} as the method.  The address should be a
9097 regexp to match component groups.
9098
9099 All marks in the virtual group will stick to the articles in the
9100 component groups.  So if you tick an article in a virtual group, the
9101 article will also be ticked in the component group from whence it came.
9102 (And vice versa---marks from the component groups will also be shown in
9103 the virtual group.)
9104
9105 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
9106 newsgroups into one, big, happy newsgroup:
9107
9108 @lisp
9109 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
9110 @end lisp
9111
9112 The component groups can be native or foreign; everything should work
9113 smoothly, but if your computer explodes, it was probably my fault.
9114
9115 Collecting the same group from several servers might actually be a good
9116 idea if users have set the Distribution header to limit distribution.
9117 If you would like to read @samp{soc.motss} both from a server in Japan
9118 and a server in Norway, you could use the following as the group regexp:
9119
9120 @example
9121 "^nntp+some.server.jp:soc.motss$\\|^nntp+some.server.no:soc.motss$"
9122 @end example
9123
9124 This should work kinda smoothly---all articles from both groups should
9125 end up in this one, and there should be no duplicates.  Threading (and
9126 the rest) will still work as usual, but there might be problems with the
9127 sequence of articles.  Sorting on date might be an option here
9128 (@pxref{Selecting a Group}.
9129
9130 One limitation, however---all groups that are included in a virtual
9131 group has to be alive (i.e., subscribed or unsubscribed).  Killed or
9132 zombie groups can't be component groups for @code{nnvirtual} groups.
9133
9134 @vindex nnvirtual-always-rescan
9135 If the @code{nnvirtual-always-rescan} is non-@code{nil},
9136 @code{nnvirtual} will always scan groups for unread articles when
9137 entering a virtual group.  If this variable is @code{nil} (which is the
9138 default) and you read articles in a component group after the virtual
9139 group has been activated, the read articles from the component group
9140 will show up when you enter the virtual group.  You'll also see this
9141 effect if you have two virtual groups that contain the same component
9142 group.  If that's the case, you should set this variable to @code{t}.
9143 Or you can just tap @code{M-g} on the virtual group every time before
9144 you enter it---it'll have much the same effect.
9145
9146
9147 @node Kibozed Groups
9148 @subsection Kibozed Groups
9149 @cindex nnkiboze
9150 @cindex kibozing
9151
9152 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
9153 the news feed''.  @code{nnkiboze} is a backend that will do this for
9154 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
9155 with useless requests!  Oh happiness!
9156
9157 @kindex G k (Group)
9158 To create a kibozed group, use the @kbd{G k} command in the group
9159 buffer. 
9160
9161 The address field of the @code{nnkiboze} method is, as with
9162 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
9163 @code{nnkiboze} group.  There most similarities between @code{nnkiboze}
9164 and @code{nnvirtual} ends.
9165
9166 In addition to this regexp detailing component groups, an @code{nnkiboze} group
9167 must have a score file to say what articles that are to be included in
9168 the group (@pxref{Scoring}).
9169
9170 @kindex M-x nnkiboze-generate-groups
9171 @findex nnkiboze-generate-groups
9172 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
9173 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
9174 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
9175 all the articles in all the components groups and run them through the
9176 scoring process to determine if there are any articles in the groups
9177 that are to be part of the @code{nnkiboze} groups.
9178
9179 Please limit the number of component groups by using restrictive
9180 regexps.  Otherwise your sysadmin may become annoyed with you, and the
9181 @sc{nntp} site may throw you off and never let you back in again.
9182 Stranger things have happened.
9183
9184 @code{nnkiboze} component groups do not have to be alive---they can be dead,
9185 and they can be foreign.  No restrictions.
9186
9187 @vindex nnkiboze-directory
9188 The generation of an @code{nnkiboze} group means writing two files in
9189 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
9190 contains the @sc{nov} header lines for all the articles in the group,
9191 and the other is an additional @file{.newsrc} file to store information
9192 on what groups that have been searched through to find component
9193 articles.
9194
9195 Articles that are marked as read in the @code{nnkiboze} group will have their
9196 @sc{nov} lines removed from the @sc{nov} file.
9197
9198
9199 @node Scoring
9200 @chapter Scoring
9201 @cindex scoring
9202
9203 Other people use @dfn{kill files}, but we here at Gnus Towers like
9204 scoring better than killing, so we'd rather switch than fight.  They do
9205 something completely different as well, so sit up straight and pay
9206 attention!
9207
9208 @vindex gnus-summary-mark-below
9209 All articles have a default score (@code{gnus-summary-default-score}),
9210 which is 0 by default.  This score may be raised or lowered either
9211 interactively or by score files.  Articles that have a score lower than
9212 @code{gnus-summary-mark-below} are marked as read.
9213
9214 Gnus will read any @dfn{score files} that apply to the current group
9215 before generating the summary buffer.
9216
9217 There are several commands in the summary buffer that insert score
9218 entries based on the current article.  You can, for instance, ask Gnus to
9219 lower or increase the score of all articles with a certain subject.
9220
9221 There are two sorts of scoring entries: Permanent and temporary.
9222 Temporary score entries are self-expiring entries.  Any entries that are
9223 temporary and have not been used for, say, a week, will be removed
9224 silently to help keep the sizes of the score files down.
9225
9226 @menu 
9227 * Summary Score Commands::   Adding score entries for the current group.
9228 * Group Score Commands::     General score commands.
9229 * Score Variables::          Customize your scoring.  (My, what terminology).
9230 * Score File Format::        What a score file may contain.
9231 * Score File Editing::       You can edit score files by hand as well.
9232 * Adaptive Scoring::         Big Sister Gnus @emph{knows} what you read.
9233 * Home Score File::          How to say where new score entries are to go.
9234 * Followups To Yourself::    Having Gnus notice when people answer you.
9235 * Scoring Tips::             How to score effectively.
9236 * Reverse Scoring::          That problem child of old is not problem.
9237 * Global Score Files::       Earth-spanning, ear-splitting score files.
9238 * Kill Files::               They are still here, but they can be ignored.
9239 * GroupLens::                Getting predictions on what you like to read.
9240 * Advanced Scoring::         Using logical expressions to build score rules.
9241 @end menu
9242
9243
9244 @node Summary Score Commands
9245 @section Summary Score Commands
9246 @cindex score commands
9247
9248 The score commands that alter score entries do not actually modify real
9249 score files.  That would be too inefficient.  Gnus maintains a cache of
9250 previously loaded score files, one of which is considered the
9251 @dfn{current score file alist}.  The score commands simply insert
9252 entries into this list, and upon group exit, this list is saved.
9253
9254 The current score file is by default the group's local score file, even
9255 if no such score file actually exists.  To insert score commands into
9256 some other score file (eg. @file{all.SCORE}), you must first make this
9257 score file the current one.
9258
9259 General score commands that don't actually change the score file:
9260
9261 @table @kbd
9262
9263 @item V s
9264 @kindex V s (Summary)
9265 @findex gnus-summary-set-score
9266 Set the score of the current article (@code{gnus-summary-set-score}).  
9267
9268 @item V S
9269 @kindex V S (Summary)
9270 @findex gnus-summary-current-score
9271 Display the score of the current article
9272 (@code{gnus-summary-current-score}).   
9273
9274 @item V t
9275 @kindex V t (Summary)
9276 @findex gnus-score-find-trace
9277 Display all score rules that have been used on the current article
9278 (@code{gnus-score-find-trace}).   
9279
9280 @item V R
9281 @cindex V R (Summary)
9282 @findex gnus-summary-rescore
9283 Run the current summary through the scoring process
9284 (@code{gnus-summary-rescore}).  This might be useful if you're playing
9285 around with your score files behind Gnus' back and want to see the
9286 effect you're having.
9287
9288 @item V a
9289 @kindex V a (Summary)
9290 @findex gnus-summary-score-entry
9291 Add a new score entry, and allow specifying all elements 
9292 (@code{gnus-summary-score-entry}).
9293
9294 @item V c
9295 @kindex V c (Summary)
9296 @findex gnus-score-change-score-file
9297 Make a different score file the current
9298 (@code{gnus-score-change-score-file}). 
9299
9300 @item V e
9301 @kindex V e (Summary)
9302 @findex gnus-score-edit-current-scores
9303 Edit the current score file (@code{gnus-score-edit-current-scores}).
9304 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
9305 File Editing}).
9306
9307 @item V f
9308 @kindex V f (Summary)
9309 @findex gnus-score-edit-file
9310 Edit a score file and make this score file the current one
9311 (@code{gnus-score-edit-file}).
9312
9313 @item V F
9314 @kindex V F (Summary)
9315 @findex gnus-score-flush-cache
9316 Flush the score cahe (@code{gnus-score-flush-cache}).  This is useful
9317 after editing score files.
9318
9319 @item V C
9320 @kindex V C (Summary)
9321 @findex gnus-score-customize
9322 Customize a score file in a visually pleasing manner
9323 (@code{gnus-score-customize}). 
9324
9325 @item I C-i
9326 @kindex I C-i (Summary)
9327 @findex gnus-summary-raise-score
9328 Increase the score of the current article
9329 (@code{gnus-summary-raise-score}).
9330
9331 @item L C-l
9332 @kindex L C-l (Summary)
9333 @findex gnus-summary-lower-score
9334 Lower the score of the current article
9335 (@code{gnus-summary-lower-score}). 
9336 @end table
9337
9338 The rest of these commands modify the local score file.
9339
9340 @table @kbd
9341
9342 @item V m
9343 @kindex V m (Summary)
9344 @findex gnus-score-set-mark-below
9345 Prompt for a score, and mark all articles with a score below this as
9346 read (@code{gnus-score-set-mark-below}).
9347
9348 @item V x
9349 @kindex V x (Summary)
9350 @findex gnus-score-set-expunge-below
9351 Prompt for a score, and add a score rule to the current score file to
9352 expunge all articles below this score
9353 (@code{gnus-score-set-expunge-below}).
9354 @end table
9355
9356 The keystrokes for actually making score entries follow a very regular
9357 pattern, so there's no need to list all the commands.  (Hundreds of
9358 them.)  
9359
9360 @enumerate
9361 @item
9362 The first key is either @kbd{I} (upper case i) for increasing the score
9363 or @kbd{L} for lowering the score. 
9364 @item
9365 The second key says what header you want to score on.  The following
9366 keys are available:
9367 @table @kbd
9368
9369 @item a
9370 Score on the author name.
9371
9372 @item s
9373 Score on the subject line.
9374
9375 @item x
9376 Score on the Xref line---i.e., the cross-posting line.
9377
9378 @item t
9379 Score on thread---the References line.
9380
9381 @item d
9382 Score on the date.
9383
9384 @item l
9385 Score on the number of lines.
9386
9387 @item i
9388 Score on the Message-ID.
9389
9390 @item f
9391 Score on followups.
9392
9393 @item b
9394 Score on the body.
9395
9396 @item h
9397 Score on the head.
9398 @end table
9399
9400 @item
9401 The third key is the match type.  Which match types are legal depends on
9402 what headers you are scoring on.
9403
9404 @table @code
9405
9406 @item strings 
9407
9408 @table @kbd
9409
9410 @item e
9411 Exact matching.
9412
9413 @item s
9414 Substring matching.
9415
9416 @item f
9417 Fuzzy matching.
9418
9419 @item r
9420 Regexp matching
9421 @end table
9422
9423 @item date
9424 @table @kbd
9425
9426 @item b
9427 Before date.
9428
9429 @item a
9430 At date.
9431
9432 @item n
9433 This date.
9434 @end table
9435
9436 @item number
9437 @table @kbd
9438
9439 @item <
9440 Less than number.
9441
9442 @item =
9443 Equal to number.
9444
9445 @item >
9446 Greater than number.
9447 @end table
9448 @end table
9449
9450 @item 
9451 The fourth and final key says whether this is a temporary (i.e., expiring)
9452 score entry, or a permanent (i.e., non-expiring) score entry, or whether
9453 it is to be done immediately, without adding to the score file.
9454 @table @kbd
9455
9456 @item t
9457 Temporary score entry.
9458
9459 @item p
9460 Permanent score entry.
9461
9462 @item i
9463 Immediately scoring.
9464 @end table
9465
9466 @end enumerate
9467
9468 So, let's say you want to increase the score on the current author with
9469 exact matching permanently: @kbd{I a e p}.  If you want to lower the
9470 score based on the subject line, using substring matching, and make a
9471 temporary score entry: @kbd{L s s t}.  Pretty easy.
9472
9473 To make things a bit more complicated, there are shortcuts.  If you use
9474 a capital letter on either the second or third keys, Gnus will use
9475 defaults for the remaining one or two keystrokes.  The defaults are
9476 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
9477 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
9478
9479 @vindex gnus-score-mimic-keymap
9480 The @code{gnus-score-mimic-keymap} says whether these commands will
9481 pretend they are keymaps or not.
9482
9483
9484 @node Group Score Commands
9485 @section Group Score Commands
9486 @cindex group score commands
9487
9488 There aren't many of these as yet, I'm afraid.
9489
9490 @table @kbd
9491
9492 @item W f
9493 @kindex W f (Group)
9494 @findex gnus-score-flush-cache
9495 Gnus maintains a cache of score alists to avoid having to reload them
9496 all the time.  This command will flush the cache
9497 (@code{gnus-score-flush-cache}). 
9498
9499 @end table
9500
9501
9502 @node Score Variables
9503 @section Score Variables
9504 @cindex score variables
9505
9506 @table @code
9507
9508 @item gnus-use-scoring
9509 @vindex gnus-use-scoring
9510 If @code{nil}, Gnus will not check for score files, and will not, in
9511 general, do any score-related work.  This is @code{t} by default.
9512
9513 @item gnus-kill-killed
9514 @vindex gnus-kill-killed
9515 If this variable is @code{nil}, Gnus will never apply score files to
9516 articles that have already been through the kill process.  While this
9517 may save you lots of time, it also means that if you apply a kill file
9518 to a group, and then change the kill file and want to run it over you
9519 group again to kill more articles, it won't work.  You have to set this
9520 variable to @code{t} to do that.  (It is @code{t} by default.)
9521
9522 @item gnus-kill-files-directory
9523 @vindex gnus-kill-files-directory
9524 All kill and score files will be stored in this directory, which is
9525 initialized from the @code{SAVEDIR} environment variable by default.
9526 This is @file{~/News/} by default.
9527
9528 @item gnus-score-file-suffix
9529 @vindex gnus-score-file-suffix
9530 Suffix to add to the group name to arrive at the score file name
9531 (@samp{SCORE} by default.)
9532
9533 @item gnus-score-uncacheable-files
9534 @vindex gnus-score-uncacheable-files
9535 @cindex score cache
9536 All score files are normally cached to avoid excessive re-loading of
9537 score files.  However, if this might make you Emacs grow big and
9538 bloated, so this regexp can be used to weed out score files that are
9539 unlikely to be needed again.  It would be a bad idea to deny caching of
9540 @file{all.SCORE}, while it might be a good idea to not cache
9541 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
9542 variable is @samp{ADAPT$} by default, so no adaptive score files will
9543 be cached.
9544
9545 @item gnus-save-score
9546 @vindex gnus-save-score
9547 If you have really complicated score files, and do lots of batch
9548 scoring, then you might set this variable to @code{t}.  This will make
9549 Gnus save the scores into the @file{.newsrc.eld} file.
9550
9551 @item gnus-score-interactive-default-score
9552 @vindex gnus-score-interactive-default-score
9553 Score used by all the interactive raise/lower commands to raise/lower
9554 score with.  Default is 1000, which may seem excessive, but this is to
9555 ensure that the adaptive scoring scheme gets enough room to play with.
9556 We don't want the small changes from the adaptive scoring to overwrite
9557 manually entered data.
9558
9559 @item gnus-summary-default-score
9560 @vindex gnus-summary-default-score
9561 Default score of an article, which is 0 by default.
9562
9563 @item gnus-score-over-mark
9564 @vindex gnus-score-over-mark
9565 Mark (in the third column) used for articles with a score over the
9566 default.  Default is @samp{+}.
9567
9568 @item gnus-score-below-mark
9569 @vindex gnus-score-below-mark
9570 Mark (in the third column) used for articles with a score below the
9571 default.  Default is @samp{-}.
9572
9573 @item gnus-score-find-score-files-function
9574 @vindex gnus-score-find-score-files-function
9575 Function used to find score files for the current group.  This function
9576 is called with the name of the group as the argument. 
9577
9578 Predefined functions available are:
9579 @table @code
9580
9581 @item gnus-score-find-single
9582 @findex gnus-score-find-single
9583 Only apply the group's own score file.
9584
9585 @item gnus-score-find-bnews
9586 @findex gnus-score-find-bnews
9587 Apply all score files that match, using bnews syntax.  This is the
9588 default.  For instance, if the current group is @samp{gnu.emacs.gnus},
9589 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
9590 @file{gnu.all.SCORE} would all apply.  In short, the instances of
9591 @samp{all} in the score file names are translated into @samp{.*}, and
9592 then a regexp match is done.
9593
9594 This means that if you have some score entries that you want to apply to
9595 all groups, then you put those entries in the @file{all.SCORE} file. 
9596
9597 @item gnus-score-find-hierarchical
9598 @findex gnus-score-find-hierarchical
9599 Apply all score files from all the parent groups.  This means that you
9600 can't have score files like @file{all.SCORE} or @file{all.emacs.SCORE},
9601 but you can have @file{SCORE},  @file{comp.SCORE} and
9602 @file{comp.emacs.SCORE}. 
9603
9604 @end table
9605 This variable can also be a list of functions.  In that case, all these
9606 functions will be called, and all the returned lists of score files will
9607 be applied.  These functions can also return lists of score alists
9608 directly.  In that case, the functions that return these non-file score
9609 alists should probably be placed before the ``real'' score file
9610 functions, to ensure that the last score file returned is the local
9611 score file.  Phu.
9612
9613 @item gnus-score-expiry-days
9614 @vindex gnus-score-expiry-days
9615 This variable says how many days should pass before an unused score file
9616 entry is expired.  If this variable is @code{nil}, no score file entries
9617 are expired.  It's 7 by default.
9618
9619 @item gnus-update-score-entry-dates
9620 @vindex gnus-update-score-entry-dates
9621 If this variable is non-@code{nil}, matching score entries will have
9622 their dates updated.  (This is how Gnus controls expiry---all
9623 non-matching entries will become too old while matching entries will
9624 stay fresh and young.)  However, if you set this variable to @code{nil},
9625 even matching entries will grow old and will have to face that oh-so
9626 grim reaper.  
9627
9628 @item gnus-score-after-write-file-function
9629 @vindex gnus-score-after-write-file-function
9630 Function called with the name of the score file just written.
9631
9632 @end table
9633
9634
9635 @node Score File Format
9636 @section Score File Format
9637 @cindex score file format
9638
9639 A score file is an @code{emacs-lisp} file that normally contains just a
9640 single form.  Casual users are not expected to edit these files;
9641 everything can be changed from the summary buffer.
9642
9643 Anyway, if you'd like to dig into it yourself, here's an example:
9644
9645 @lisp
9646 (("from"
9647   ("Lars Ingebrigtsen" -10000)
9648   ("Per Abrahamsen")
9649   ("larsi\\|lmi" -50000 nil R))
9650  ("subject"
9651   ("Ding is Badd" nil 728373))
9652  ("xref"
9653   ("alt.politics" -1000 728372 s))
9654  ("lines"
9655   (2 -100 nil <))
9656  (mark 0)
9657  (expunge -1000)
9658  (mark-and-expunge -10)
9659  (read-only nil)
9660  (orphan -10)
9661  (adapt t)
9662  (files "/hom/larsi/News/gnu.SCORE")
9663  (exclude-files "all.SCORE")
9664  (local (gnus-newsgroup-auto-expire t)
9665         (gnus-summary-make-false-root 'empty))
9666  (eval (ding)))
9667 @end lisp
9668
9669 This example demonstrates absolutely everything about a score file. 
9670
9671 Even though this looks much like lisp code, nothing here is actually
9672 @code{eval}ed.  The lisp reader is used to read this form, though, so it
9673 has to be legal syntactically, if not semantically.
9674
9675 Six keys are supported by this alist:
9676
9677 @table @code
9678
9679 @item STRING
9680 If the key is a string, it is the name of the header to perform the
9681 match on.  Scoring can only be performed on these eight headers:
9682 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
9683 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
9684 these headers, there are three strings to tell Gnus to fetch the entire
9685 article and do the match on larger parts of the article: @code{Body}
9686 will perform the match on the body of the article, @code{Head} will
9687 perform the match on the head of the article, and @code{All} will
9688 perform the match on the entire article.  Note that using any of these
9689 last three keys will slow down group entry @emph{considerably}.  The
9690 final ``header'' you can score on is @code{Followup}.  These score
9691 entries will result in new score entries being added for all follow-ups
9692 to articles that matches these score entries.
9693
9694 Following this key is a arbitrary number of score entries, where each
9695 score entry has one to four elements.
9696 @enumerate
9697
9698 @item 
9699 The first element is the @dfn{match element}.  On most headers this will
9700 be a string, but on the Lines and Chars headers, this must be an
9701 integer. 
9702
9703 @item 
9704 If the second element is present, it should be a number---the @dfn{score
9705 element}.  This number should be an integer in the neginf to posinf
9706 interval.  This number is added to the score of the article if the match
9707 is successful.  If this element is not present, the
9708 @code{gnus-score-interactive-default-score} number will be used
9709 instead.  This is 1000 by default.
9710
9711 @item 
9712 If the third element is present, it should be a number---the @dfn{date
9713 element}.  This date says when the last time this score entry matched,
9714 which provides a mechanism for expiring the score entries.  It this
9715 element is not present, the score entry is permanent.  The date is
9716 represented by the number of days since December 31, 1 ce.
9717
9718 @item 
9719 If the fourth element is present, it should be a symbol---the @dfn{type
9720 element}.  This element specifies what function should be used to see
9721 whether this score entry matches the article.  What match types that can
9722 be used depends on what header you wish to perform the match on.
9723 @table @dfn
9724
9725 @item From, Subject, References, Xref, Message-ID
9726 For most header types, there are the @code{r} and @code{R} (regexp), as
9727 well as @code{s} and @code{S} (substring) types, and @code{e} and
9728 @code{E} (exact match), and @code{w} (word match) types.  If this
9729 element is not present, Gnus will assume that substring matching should
9730 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
9731 that the matches will be done in a case-sensitive manner.  All these
9732 one-letter types are really just abbreviations for the @code{regexp},
9733 @code{string}, @code{exact}, and @code{word} types, which you can use
9734 instead, if you feel like.
9735
9736 @item Lines, Chars
9737 These two headers use different match types: @code{<}, @code{>},
9738 @code{=}, @code{>=} and @code{<=}.
9739
9740 @item Date
9741 For the Date header we have three match types: @code{before}, @code{at}
9742 and @code{after}.  I can't really imagine this ever being useful, but,
9743 like, it would feel kinda silly not to provide this function.  Just in
9744 case.  You never know.  Better safe than sorry.  Once burnt, twice shy.
9745 Don't judge a book by its cover.  Never not have sex on a first date.
9746 (I have been told that at least one person, and I quote, ``found this
9747 function indispensable'', however.)
9748
9749 @item Head, Body, All
9750 These three match keys use the same match types as the @code{From} (etc)
9751 header uses.
9752
9753 @item Followup
9754 This match key will add a score entry on all articles that followup to
9755 some author.  Uses the same match types as the @code{From} header uses.
9756
9757 @item Thread
9758 This match key will add a score entry on all articles that are part of
9759 a thread.  Uses the same match types as the @code{References} header
9760 uses.
9761 @end table
9762 @end enumerate
9763
9764 @item mark
9765 The value of this entry should be a number.  Any articles with a score
9766 lower than this number will be marked as read.
9767
9768 @item expunge
9769 The value of this entry should be a number.  Any articles with a score
9770 lower than this number will be removed from the summary buffer.
9771
9772 @item mark-and-expunge
9773 The value of this entry should be a number.  Any articles with a score
9774 lower than this number will be marked as read and removed from the
9775 summary buffer.
9776
9777 @item thread-mark-and-expunge
9778 The value of this entry should be a number.  All articles that belong to
9779 a thread that has a total score below this number will be marked as read
9780 and removed from the summary buffer.  @code{gnus-thread-score-function}
9781 says how to compute the total score for a thread.
9782
9783 @item files
9784 The value of this entry should be any number of file names.  These files
9785 are assumed to be score files as well, and will be loaded the same way
9786 this one was.
9787
9788 @item exclude-files
9789 The clue of this entry should be any number of files.  This files will
9790 not be loaded, even though they would normally be so, for some reason or
9791 other. 
9792
9793 @item eval
9794 The value of this entry will be @code{eval}el.  This element will be
9795 ignored when handling global score files. 
9796
9797 @item read-only
9798 Read-only score files will not be updated or saved.  Global score files
9799 should feature this atom (@pxref{Global Score Files}).
9800
9801 @item orphan
9802 The value of this entry should be a number.  Articles that do not have
9803 parents will get this number added to their scores.  Imagine you follow
9804 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
9805 will only follow a few of the threads, also want to see any new threads.
9806
9807 You can do this with the following two score file entries:
9808
9809 @example
9810         (orphan -500)
9811         (mark-and-expunge -100)
9812 @end example
9813
9814 When you enter the group the first time, you will only see the new
9815 threads.  You then raise the score of the threads that you find
9816 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
9817 rest.  Next time you enter the group, you will see new articles in the
9818 interesting threads, plus any new threads.
9819
9820 I.e.---the orphan score atom is for high-volume groups where there
9821 exist a few interesting threads which can't be found automatically by
9822 ordinary scoring rules.
9823
9824 @item adapt
9825 This entry controls the adaptive scoring.  If it is @code{t}, the
9826 default adaptive scoring rules will be used.  If it is @code{ignore}, no
9827 adaptive scoring will be performed on this group.  If it is a list, this
9828 list will be used as the adaptive scoring rules.  If it isn't present,
9829 or is something other than @code{t} or @code{ignore}, the default
9830 adaptive scoring rules will be used.  If you want to use adaptive
9831 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
9832 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
9833 not want adaptive scoring.  If you only want adaptive scoring in a few
9834 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
9835 insert @code{(adapt t)} in the score files of the groups where you want
9836 it. 
9837
9838 @item adapt-file
9839 All adaptive score entries will go to the file named by this entry.  It
9840 will also be applied when entering the group.  This atom might be handy
9841 if you want to adapt on several groups at once, using the same adaptive
9842 file for a number of groups.
9843
9844 @item local
9845 @cindex local variables
9846 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
9847 Each @var{var} will be made buffer-local to the current summary buffer,
9848 and set to the value specified.  This is a convenient, if somewhat
9849 strange, way of setting variables in some groups if you don't like hooks
9850 much.
9851 @end table
9852
9853
9854 @node Score File Editing
9855 @section Score File Editing
9856
9857 You normally enter all scoring commands from the summary buffer, but you
9858 might feel the urge to edit them by hand as well, so we've supplied you
9859 with a mode for that.  
9860
9861 It's simply a slightly customized @code{emacs-lisp} mode, with these
9862 additional commands:
9863
9864 @table @kbd
9865
9866 @item C-c C-c
9867 @kindex C-c C-c (Score)
9868 @findex gnus-score-edit-done
9869 Save the changes you have made and return to the summary buffer
9870 (@code{gnus-score-edit-done}). 
9871
9872 @item C-c C-d
9873 @kindex C-c C-d (Score)
9874 @findex gnus-score-edit-insert-date
9875 Insert the current date in numerical format
9876 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
9877 you were wondering.
9878
9879 @item C-c C-p
9880 @kindex C-c C-p (Score)
9881 @findex gnus-score-pretty-print
9882 The adaptive score files are saved in an unformatted fashion.  If you
9883 intend to read one of these files, you want to @dfn{pretty print} it
9884 first.  This command (@code{gnus-score-pretty-print}) does that for
9885 you. 
9886
9887 @end table
9888
9889 Type @kbd{M-x gnus-score-mode} to use this mode.
9890
9891 @vindex gnus-score-mode-hook
9892 @code{gnus-score-menu-hook} is run in score mode buffers.
9893
9894 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
9895 e} to begin editing score files.
9896
9897
9898 @node Adaptive Scoring
9899 @section Adaptive Scoring
9900 @cindex adaptive scoring
9901
9902 If all this scoring is getting you down, Gnus has a way of making it all
9903 happen automatically---as if by magic.  Or rather, as if by artificial
9904 stupidity, to be precise.
9905
9906 @vindex gnus-use-adaptive-scoring
9907 When you read an article, or mark an article as read, or kill an
9908 article, you leave marks behind.  On exit from the group, Gnus can sniff
9909 these marks and add score elements depending on what marks it finds.
9910 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
9911 @code{t} or @code{(line)}.  If you want score adaptively on separate
9912 words appearing in the subjects, you should set this variable to
9913 @code{(word)}.  If you want to use both adaptive methods, set this
9914 variable to @code{(word line)}.
9915
9916 @vindex gnus-default-adaptive-score-alist
9917 To give you complete control over the scoring process, you can customize
9918 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
9919 might look something like this:
9920
9921 @lisp
9922 (defvar gnus-default-adaptive-score-alist
9923   '((gnus-unread-mark)
9924     (gnus-ticked-mark (from 4))
9925     (gnus-dormant-mark (from 5))
9926     (gnus-del-mark (from -4) (subject -1))
9927     (gnus-read-mark (from 4) (subject 2))
9928     (gnus-expirable-mark (from -1) (subject -1))
9929     (gnus-killed-mark (from -1) (subject -3))
9930     (gnus-kill-file-mark)
9931     (gnus-ancient-mark)
9932     (gnus-low-score-mark)
9933     (gnus-catchup-mark (from -1) (subject -1))))
9934 @end lisp
9935
9936 As you see, each element in this alist has a mark as a key (either a
9937 variable name or a ``real'' mark---a character).  Following this key is
9938 a arbitrary number of header/score pairs.  If there are no header/score
9939 pairs following the key, no adaptive scoring will be done on articles
9940 that have that key as the article mark.  For instance, articles with
9941 @code{gnus-unread-mark} in the example above will not get adaptive score
9942 entries.
9943
9944 Each article can have only one mark, so just a single of these rules
9945 will be applied to each article.
9946
9947 To take @code{gnus-del-mark} as an example---this alist says that all
9948 articles that have that mark (i.e., are marked with @samp{D}) will have a
9949 score entry added to lower based on the @code{From} header by -4, and
9950 lowered by @code{Subject} by -1.  Change this to fit your prejudices. 
9951
9952 If you have marked 10 articles with the same subject with
9953 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
9954 That means that that subject will get a score of ten times -1, which
9955 should be, unless I'm much mistaken, -10.
9956
9957 The headers you can score on are @code{from}, @code{subject},
9958 @code{message-id}, @code{references}, @code{xref}, @code{lines},
9959 @code{chars} and @code{date}.  In addition, you can score on
9960 @code{followup}, which will create an adaptive score entry that matches
9961 on the @code{References} header using the @code{Message-ID} of the
9962 current article, thereby matching the following thread.  
9963
9964 You can also score on @code{thread}, which will try to score all
9965 articles that appear in a thread.  @code{thread} matches uses a
9966 @code{Message-ID} to match on the @code{References} header of the
9967 article.  If the match is made, the @code{Message-ID} of the article is
9968 added to the @code{thread} rule.  (Think about it.  I'd recommend two
9969 aspirins afterwards.)
9970
9971 If you use this scheme, you should set the score file atom @code{mark}
9972 to something small---like -300, perhaps, to avoid having small random
9973 changes result in articles getting marked as read.
9974
9975 After using adaptive scoring for a week or so, Gnus should start to
9976 become properly trained and enhance the authors you like best, and kill
9977 the authors you like least, without you having to say so explicitly. 
9978
9979 You can control what groups the adaptive scoring is to be performed on
9980 by using the score files (@pxref{Score File Format}).  This will also
9981 let you use different rules in different groups.
9982
9983 @vindex gnus-adaptive-file-suffix
9984 The adaptive score entries will be put into a file where the name is the
9985 group name with @code{gnus-adaptive-file-suffix} appended.  The default
9986 is @samp{ADAPT}.
9987
9988 @vindex gnus-score-exact-adapt-limit
9989 When doing adaptive scoring, substring or fuzzy matching would probably
9990 give you the best results in most cases.  However, if the header one
9991 matches is short, the possibility for false positives is great, so if
9992 the length of the match is less than
9993 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
9994 this variable is @code{nil}, exact matching will always be used to avoid
9995 this problem.
9996
9997 As mentioned above, you can adapt either on individual words or entire
9998 headers.  If you adapt on words, the
9999 @code{gnus-default-adaptive-word-score-alist} says what score each
10000 instance of a word should add given a mark.
10001
10002 @lisp
10003 (setq gnus-default-adaptive-word-score-alist  
10004       `((,gnus-read-mark . 30)
10005         (,gnus-catchup-mark . -10)
10006         (,gnus-killed-mark . -20)
10007         (,gnus-del-mark . -15)))
10008 @end lisp
10009
10010 This is the default value.  If you have adaption on words enabled, every
10011 word that appears in subjects of articles that are marked with
10012 @code{gnus-read-mark} will result in a score rule that increase the
10013 score with 30 points.
10014
10015 After using this scheme for a while, it might be nice to write a
10016 @code{gnus-psychoanalyze-user} command to go through the rules and see
10017 what words you like and what words you don't like.  Or perhaps not.
10018
10019
10020 @node Home Score File
10021 @section Home Score File
10022
10023 The score file where new score file entries will go is called the
10024 @dfn{home score file}.  This is normally (and by default) the score file
10025 for the group itself.  For instance, the home score file for
10026 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
10027
10028 However, this may not be what you want.  It is often convenient to share
10029 a common home score file among many groups---all @samp{emacs} groups
10030 could perhaps use the same home score file.
10031
10032 @vindex gnus-home-score-file
10033 The variable that controls this is @code{gnus-home-score-file}.  It can
10034 be:
10035
10036 @enumerate
10037 @item
10038 A string.  Then this file will be used as the home score file for all
10039 groups. 
10040
10041 @item
10042 A function. The result of this function will be used as the home score
10043 file.  The function will be called with the name of the group as the
10044 parameter. 
10045
10046 @item
10047 A list.  The elements in this list can be:
10048
10049 @enumerate
10050 @item 
10051 @var{(regexp . file-name)}.  If the @var{regexp} matches the group name,
10052 the @var{file-name} will will be used as the home score file.
10053
10054 @item 
10055 A function. If the function returns non-nil, the result will be used as
10056 the home score file.
10057
10058 @item 
10059 A string.  Use the string as the home score file.
10060 @end enumerate
10061
10062 The list will be traversed from the beginning towards the end looking
10063 for matches.
10064
10065 @end enumerate
10066
10067 So, if you want to use just a single score file, you could say:
10068
10069 @lisp
10070 (setq gnus-home-score-file
10071       "my-total-score-file.SCORE")
10072 @end lisp
10073
10074 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
10075 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
10076
10077 @lisp
10078 (setq gnus-home-score-file
10079       'gnus-hierarchial-home-score-file)
10080 @end lisp
10081
10082 This is a ready-made function provided for your convenience.
10083
10084 If you want to have one score file for the @samp{emacs} groups and
10085 another for the @samp{comp} groups, while letting all other groups use
10086 their own home score files:
10087
10088 @lisp
10089 (setq gnus-home-score-file
10090       ;; All groups that match the regexp "\\.emacs"
10091       '("\\.emacs" . "emacs.SCORE")
10092       ;; All the comp groups in one score file
10093        ("^comp" . "comp.SCORE"))
10094 @end lisp
10095    
10096 @vindex gnus-home-adapt-file
10097 @code{gnus-home-adapt-file} works exactly the same way as
10098 @code{gnus-home-score-file}, but says what the home adaptive score file
10099 is instead.  All new adaptive file entries will go into the file
10100 specified by this variable, and the same syntax is allowed.
10101
10102 In addition to using @code{gnus-home-score-file} and
10103 @code{gnus-home-adapt-file}, you can also use group parameters
10104 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
10105 Parameters}) to achieve much the same.  Group and topic parameters take
10106 presedence over this variable.
10107
10108
10109 @node Followups To Yourself
10110 @section Followups To Yourself
10111
10112 Gnus offers two commands for picking out the @code{Message-ID} header in
10113 the current buffer.  Gnus will then add a score rule that scores using
10114 this @code{Message-ID} on the @code{References} header of other
10115 articles.  This will, in effect, increase the score of all articles that
10116 respond to the article in the current buffer.  Quite useful if you want
10117 to easily note when people answer what you've said.
10118
10119 @table @code
10120
10121 @item gnus-score-followup-article
10122 @findex gnus-score-followup-article
10123 This will add a score to articles that directly follow up your own
10124 article. 
10125
10126 @item gnus-score-followup-thread
10127 @findex gnus-score-followup-thread
10128 This will add a score to all articles that appear in a thread ``below''
10129 your own article.
10130 @end table
10131
10132 @vindex gnus-inews-article-hook
10133 These two functions are both primarily meant to be used in hooks like
10134 @code{message-send-hook}.  
10135
10136 @node Scoring Tips
10137 @section Scoring Tips
10138 @cindex scoring tips
10139
10140 @table @dfn
10141
10142 @item Crossposts
10143 @cindex crossposts
10144 @cindex scoring crossposts
10145 If you want to lower the score of crossposts, the line to match on is
10146 the @code{Xref} header.
10147 @lisp
10148 ("xref" (" talk.politics.misc:" -1000))
10149 @end lisp
10150
10151 @item Multiple crossposts
10152 If you want to lower the score of articles that have been crossposted to
10153 more than, say, 3 groups:
10154 @lisp
10155 ("xref" ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+" -1000 nil r))
10156 @end lisp
10157
10158 @item Matching on the body
10159 This is generally not a very good idea---it takes a very long time.
10160 Gnus actually has to fetch each individual article from the server.  But
10161 you might want to anyway, I guess.  Even though there are three match
10162 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
10163 and stick with it in each score file.  If you use any two, each article
10164 will be fetched @emph{twice}.  If you want to match a bit on the
10165 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
10166 the matches.  
10167
10168 @item Marking as read
10169 You will probably want to mark articles that has a score below a certain
10170 number as read.  This is most easily achieved by putting the following
10171 in your @file{all.SCORE} file:
10172 @lisp
10173 ((mark -100))
10174 @end lisp
10175 You may also consider doing something similar with @code{expunge}.  
10176
10177 @item Negated character classes
10178 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
10179 That will match newlines, which might lead to, well, The Unknown.  Say
10180 @code{[^abcd\n]*} instead.
10181 @end table
10182
10183
10184 @node Reverse Scoring
10185 @section Reverse Scoring
10186 @cindex reverse scoring
10187
10188 If you want to keep just articles that have @samp{Sex with Emacs} in the
10189 subject header, and expunge all other articles, you could put something
10190 like this in your score file:
10191
10192 @lisp
10193 (("subject"
10194   ("Sex with Emacs" 2))
10195  (mark 1)
10196  (expunge 1))
10197 @end lisp
10198
10199 So, you raise all articles that match @samp{Sex with Emacs} and mark the
10200 rest as read, and expunge them to boot.
10201
10202
10203 @node Global Score Files
10204 @section Global Score Files
10205 @cindex global score files
10206
10207 Sure, other newsreaders have ``global kill files''.  These are usually
10208 nothing more than a single kill file that applies to all groups, stored
10209 in the user's home directory.  Bah!  Puny, weak newsreaders!
10210
10211 What I'm talking about here are Global Score Files.  Score files from
10212 all over the world, from users everywhere, uniting all nations in one
10213 big, happy score file union!  Ange-score!  New and untested!
10214
10215 @vindex gnus-global-score-files
10216 All you have to do to use other people's score files is to set the
10217 @code{gnus-global-score-files} variable.  One entry for each score file,
10218 or each score file directory.  Gnus will decide by itself what score
10219 files are applicable to which group.
10220
10221 Say you want to use all score files in the
10222 @file{/ftp@@ftp.some-where:/pub/score} directory and the single score
10223 file @file{/ftp@@ftp.ifi.uio.no:/pub/larsi/ding/score/soc.motss.SCORE}:
10224
10225 @lisp
10226 (setq gnus-global-score-files
10227       '("/ftp@@ftp.ifi.uio.no:/pub/larsi/ding/score/soc.motss.SCORE"
10228         "/ftp@@ftp.some-where:/pub/score/"))
10229 @end lisp
10230
10231 @findex gnus-score-search-global-directories
10232 Simple, eh?  Directory names must end with a @samp{/}.  These
10233 directories are typically scanned only once during each Gnus session.
10234 If you feel the need to manually re-scan the remote directories, you can
10235 use the @code{gnus-score-search-global-directories} command.
10236
10237 Note that, at present, using this option will slow down group entry
10238 somewhat.  (That is---a lot.)
10239
10240 If you want to start maintaining score files for other people to use,
10241 just put your score file up for anonymous ftp and announce it to the
10242 world.  Become a retro-moderator!  Participate in the retro-moderator
10243 wars sure to ensue, where retro-moderators battle it out for the
10244 sympathy of the people, luring them to use their score files on false
10245 premises!  Yay!  The net is saved!
10246
10247 Here are some tips for the would-be retro-moderator, off the top of my
10248 head: 
10249
10250 @itemize @bullet
10251
10252 @item 
10253 Articles that are heavily crossposted are probably junk. 
10254 @item
10255 To lower a single inappropriate article, lower by @code{Message-ID}.
10256 @item
10257 Particularly brilliant authors can be raised on a permanent basis. 
10258 @item
10259 Authors that repeatedly post off-charter for the group can safely be
10260 lowered out of existence.
10261 @item
10262 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
10263 articles completely.
10264
10265 @item 
10266 Use expiring score entries to keep the size of the file down.  You
10267 should probably have a long expiry period, though, as some sites keep
10268 old articles for a long time.
10269 @end itemize
10270
10271 ... I wonder whether other newsreaders will support global score files
10272 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
10273 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
10274 holding our breath yet?
10275
10276
10277 @node Kill Files
10278 @section Kill Files
10279 @cindex kill files
10280
10281 Gnus still supports those pesky old kill files.  In fact, the kill file
10282 entries can now be expiring, which is something I wrote before Daniel
10283 Quinlan thought of doing score files, so I've left the code in there.
10284
10285 In short, kill processing is a lot slower (and I do mean @emph{a lot})
10286 than score processing, so it might be a good idea to rewrite your kill
10287 files into score files.
10288
10289 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
10290 forms into this file, which means that you can use kill files as some
10291 sort of primitive hook function to be run on group entry, even though
10292 that isn't a very good idea.
10293
10294 XCNormal kill files look like this:
10295
10296 @lisp
10297 (gnus-kill "From" "Lars Ingebrigtsen")
10298 (gnus-kill "Subject" "ding")
10299 (gnus-expunge "X")
10300 @end lisp
10301
10302 This will mark every article written by me as read, and remove them from
10303 the summary buffer.  Very useful, you'll agree.
10304
10305 Other programs use a totally different kill file syntax.  If Gnus
10306 encounters what looks like a @code{rn} kill file, it will take a stab at
10307 interpreting it. 
10308
10309 Two summary functions for editing a GNUS kill file:
10310
10311 @table @kbd
10312
10313 @item M-k
10314 @kindex M-k (Summary)
10315 @findex gnus-summary-edit-local-kill
10316 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
10317
10318 @item M-K
10319 @kindex M-K (Summary)
10320 @findex gnus-summary-edit-global-kill
10321 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
10322 @end table
10323
10324 Two group mode functions for editing the kill files:
10325
10326 @table @kbd
10327
10328 @item M-k
10329 @kindex M-k (Group)
10330 @findex gnus-group-edit-local-kill
10331 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
10332
10333 @item M-K
10334 @kindex M-K (Group)
10335 @findex gnus-group-edit-global-kill
10336 Edit the general kill file (@code{gnus-group-edit-global-kill}).
10337 @end table
10338
10339 Kill file variables:
10340
10341 @table @code
10342 @item gnus-kill-file-name
10343 @vindex gnus-kill-file-name
10344 A kill file for the group @samp{soc.motss} is normally called
10345 @file{soc.motss.KILL}.  The suffix appended to the group name to get
10346 this file name is detailed by the @code{gnus-kill-file-name} variable.
10347 The ``global'' kill file (not in the score file sense of ``global'', of
10348 course) is called just @file{KILL}.
10349
10350 @vindex gnus-kill-save-kill-file
10351 @item gnus-kill-save-kill-file
10352 If this variable is non-@code{nil}, Gnus will save the
10353 kill file after processing, which is necessary if you use expiring
10354 kills. 
10355
10356 @item gnus-apply-kill-hook
10357 @vindex gnus-apply-kill-hook
10358 @findex gnus-apply-kill-file-unless-scored
10359 @findex gnus-apply-kill-file
10360 A hook called to apply kill files to a group.  It is
10361 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
10362 kill file if you have a score file for the same group, you can set this
10363 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
10364 kill files to be processed, you should set this variable to @code{nil}.
10365
10366 @item gnus-kill-file-mode-hook
10367 @vindex gnus-kill-file-mode-hook
10368 A hook called in kill-file mode buffers.
10369
10370 @end table
10371
10372
10373 @node GroupLens
10374 @section GroupLens
10375 @cindex GroupLens
10376
10377 GroupLens is a collaborative filtering system that helps you work
10378 together with other people to find the quality news articles out of the
10379 huge volume of news articles generated every day.
10380
10381 To accomplish this the GroupLens system combines your opinions about
10382 articles you have already read with the opinions of others who have done
10383 likewise and gives you a personalized prediction for each unread news
10384 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
10385 rate articles, and finds other people that rate articles the same way.
10386 Once it has found for you some people you agree with it tells you, in
10387 the form of a prediction, what they thought of the article.  You can use
10388 this prediction to help you decide whether or not you want to read the
10389 article.
10390
10391 @menu
10392 * Using GroupLens::          How to make Gnus use GroupLens.
10393 * Rating Articles::          Letting GroupLens know how you rate articles.
10394 * Displaying Predictions::   Displaying predictions given by GroupLens.
10395 * GroupLens Variables::      Customizing GroupLens.
10396 @end menu
10397
10398
10399 @node Using GroupLens
10400 @subsection Using GroupLens
10401
10402 To use GroupLens you must register a pseudonym with your local Better
10403 Bit Bureau (BBB).  At the moment the only better bit in town is at
10404 @samp{http://www.cs.umn.edu/Research/GroupLens/bbb.html}.
10405
10406 Once you have registered you'll need to set a couple of variables.
10407
10408 @table @code
10409
10410 @item gnus-use-grouplens
10411 @vindex gnus-use-grouplens
10412 Setting this variable to a non-@code{nil} value will make Gnus hook into
10413 all the relevant GroupLens functions.
10414
10415 @item grouplens-pseudonym
10416 @vindex grouplens-pseudonym
10417 This variable should be set to the pseudonum you got when registering
10418 with the Better Bit Bureau.
10419
10420 @item grouplens-newsgroups
10421 @vindex grouplens-newsgroups
10422 A list of groups that you want to get GroupLens predictions for. 
10423
10424 @end table
10425
10426 Thats the minimum of what you need to get up and running with GroupLens.
10427 Once you've registered, GroupLens will start giving you scores for
10428 articles based on the average of what other people think.  But, to get
10429 the real benefit of GroupLens you need to start rating articles
10430 yourself.  Then the scores GroupLens gives you will be personalized for
10431 you, based on how the people you usually agree with have already rated.
10432
10433
10434 @node Rating Articles
10435 @subsection Rating Articles
10436
10437 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
10438 Where 1 means something like this article is a waste of bandwidth and 5
10439 means that the article was really good.  The basic question to ask
10440 yourself is, "on a scale from 1 to 5 would I like to see more articles
10441 like this one?"
10442
10443 There are four ways to enter a rating for an article in GroupLens.
10444
10445 @table @kbd
10446
10447 @item r
10448 @kindex r (GroupLens)
10449 @findex bbb-summary-rate-article
10450 This function will prompt you for a rating on a scale of one to five.
10451
10452 @item k
10453 @kindex k (GroupLens)
10454 @findex grouplens-score-thread
10455 This function will prompt you for a rating, and rate all the articles in
10456 the thread.  This is really useful for some of those long running giant
10457 threads in rec.humor.
10458
10459 @end table
10460
10461 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
10462 the score of the article you're reading.
10463
10464 @table @kbd
10465
10466 @item 1-5 n
10467 @kindex n (GroupLens)
10468 @findex grouplens-next-unread-article
10469 Rate the article and go to the next unread article.
10470
10471 @item 1-5 ,
10472 @kindex , (GroupLens)
10473 @findex grouplens-best-unread-article
10474 Rate the article and go to the next unread article with the highest score.
10475
10476 @end table
10477
10478 If you want to give the current article a score of 4 and then go to the
10479 next article, just type @kbd{4 n}.
10480
10481
10482 @node Displaying Predictions
10483 @subsection Displaying Predictions
10484
10485 GroupLens makes a prediction for you about how much you will like a
10486 news article.  The predictions from GroupLens are on a scale from 1 to
10487 5, where 1 is the worst and 5 is the best.  You can use the predictions
10488 from GroupLens in one of three ways controlled by the variable
10489 @code{gnus-grouplens-override-scoring}.
10490
10491 @vindex gnus-grouplens-override-scoring
10492 There are three ways to display predictions in grouplens.  You may
10493 choose to have the GroupLens scores contribute to, or override the
10494 regular gnus scoring mechanism. override is the default; however, some
10495 people prefer to see the Gnus scores plus the grouplens scores.  To get
10496 the separate scoring behavior you need to set
10497 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
10498 GroupLens predictions combined with the grouplens scores set it to
10499 @code{'override} and to combine the scores set
10500 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
10501 the combine option you will also want to set the values for
10502 @code{grouplens-prediction-offset} and
10503 @code{grouplens-score-scale-factor}.
10504
10505 @vindex grouplens-prediction-display
10506 In either case, GroupLens gives you a few choices for how you would like
10507 to see your predictions displayed.  The display of predictions is
10508 controlled by the @code{grouplens-prediction-display} variable.
10509
10510 The following are legal values for that variable.
10511
10512 @table @code
10513 @item prediction-spot
10514 The higher the prediction, the further to the right an @samp{*} is
10515 displayed. 
10516
10517 @item confidence-interval
10518 A numeric confidence interval.
10519
10520 @item prediction-bar
10521 The higher the prediction, the longer the bar.
10522
10523 @item confidence-bar
10524 Numerical confidence.
10525
10526 @item confidence-spot
10527 The spot gets bigger with more confidence.
10528
10529 @item prediction-num
10530 Plain-old numeric value.
10531
10532 @item confidence-plus-minus
10533 Prediction +/i confidence.
10534
10535 @end table
10536
10537
10538 @node GroupLens Variables
10539 @subsection GroupLens Variables
10540
10541 @table @code
10542
10543 @item gnus-summary-grouplens-line-format
10544 The summary line format used in summary buffers that are GroupLens
10545 enhanced.  It accepts the same specs as the normal summary line format
10546 (@pxref{Summary Buffer Lines}).  The default is
10547 @samp{%U%R%z%l%I%(%[%4L: %-20,20n%]%) %s\n}.
10548
10549 @item grouplens-bbb-host
10550 Host running the bbbd server.  The default is
10551 @samp{grouplens.cs.umn.edu}. 
10552
10553 @item grouplens-bbb-port
10554 Port of the host running the bbbd server.  The default is 9000.
10555
10556 @item grouplens-score-offset
10557 Offset the prediction by this value.  In other words, subtract the
10558 prediction value by this number to arrive at the effective score.  The
10559 default is 0.
10560
10561 @item grouplens-score-scale-factor 
10562 This variable allows the user to magnify the effect of GroupLens scores.
10563 The scale factor is applied after the offset.  The default is 1.
10564
10565 @end table
10566
10567
10568 @node Advanced Scoring
10569 @section Advanced Scoring
10570
10571 Scoring on Subjects and From headers is nice enough, but what if you're
10572 really interested in what a person has to say only when she's talking
10573 about a particular subject?  Or what about if you really don't want to
10574 read what person A has to say when she's following up to person B, but
10575 want to read what she says when she's following up to person C?
10576
10577 By using advanced scoring rules you may create arbitrarily complex
10578 scoring patterns.
10579
10580 @menu
10581 * Advanced Scoring Syntax::     A definition.
10582 * Advanced Scoring Examples::   What they look like.
10583 * Advanced Scoring Tips::       Getting the most out of it.
10584 @end menu
10585
10586
10587 @node Advanced Scoring Syntax
10588 @subsection Advanced Scoring Syntax
10589
10590 Ordinary scoring rules have a string as the first element in the rule.
10591 Advanced scoring rules have a list as the first element.  The second
10592 element is the score to be applied if the first element evaluated to a
10593 non-@code{nil} value.
10594
10595 These lists may consist of three logical operators, one redirection
10596 operator, and various match operators.
10597
10598 Logical operators:
10599
10600 @table @code
10601 @item &
10602 @itemx and
10603 This logical operator will evaluate each of its arguments until it finds
10604 one that evaluates to @code{false}, and then it'll stop.  If all arguments
10605 evaluate to @code{true} values, then this operator will return
10606 @code{true}. 
10607
10608 @item |
10609 @itemx or
10610 This logical operator will evaluate each of its arguments until it finds
10611 one that evaluates to @code{true}.  If no arguments are @code{true},
10612 then this operator will return @code{false}.
10613
10614 @item !
10615 @itemx not
10616 @itemx Â¬
10617 This logical operator only takes a single argument.  It returns the
10618 inverse of the value of its argument.
10619
10620 @end table
10621
10622 There is an @dfn{indirection operator} that will make its arguments
10623 apply to the ancenstors of the current article being scored.  For
10624 instance, @code{1-} will make score rules apply to the parent of the
10625 current article.  @code{2-} will make score fules apply to the
10626 grandparent of the current article.  Alternatively, you can write
10627 @code{^^}, where the number of @code{^}s (carets) say how far back into
10628 the ancestry you want to go.
10629
10630 Finally, we have the match operators.  These are the ones that do the
10631 real work.  Match operators are header name strings followed by a match
10632 and a match type.  A typical match operator looks like @samp{("from"
10633 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
10634 simple scoring, and the match types are also the same.
10635
10636
10637 @node Advanced Scoring Examples
10638 @subsection Advanced Scoring Examples
10639
10640 Let's say you want to increase the score of articles written by Lars
10641 when he's talking about Gnus:
10642
10643 @example
10644 ((& 
10645   ("from" "Lars Ingebrigtsen")
10646   ("subject" "Gnus"))
10647  1000)
10648 @end example
10649
10650 Quite simple, huh?
10651
10652 When he writes long articles, he sometimes has something nice to say: 
10653
10654 @example
10655 ((& 
10656   ("from" "Lars Ingebrigtsen")
10657   (|
10658    ("subject" "Gnus")
10659    ("lines" 100 >)))
10660  1000)
10661 @end example
10662
10663 However, when he responds to things written by Reig Eigil Logge, you
10664 really don't want to read what he's written:
10665
10666 @example
10667 ((&
10668   ("from" "Lars Ingebrigtsen")
10669   (1- ("from" "Reig Eigir Logge")))
10670  -100000)
10671 @end example
10672
10673 Everybody that follows up Redmondo when he writes about disappearing
10674 socks should have their scores raised, but only when they talk about
10675 white socks.  However, when Lars talks about socks, it's usually not
10676 very interesting:
10677
10678 @example
10679 ((&
10680   (1-
10681    (&
10682     ("from" "redmondo@@.*no" r)
10683     ("body" "disappearing.*socks" t)))
10684   (! ("from" "Lars Ingebrigtsen"))
10685   ("body" "white.*socks"))
10686  1000)
10687 @end example
10688
10689 The possibilities are endless.
10690
10691
10692 @node Advanced Scoring Tips
10693 @subsection Advanced Scoring Tips
10694
10695 The @code{&} and @code{|} logical operators do short-circuit logic.
10696 That is, they stop processing their arguments when it's clear what the
10697 result of the operation will be.  For instance, if one of the arguments
10698 of an @code{&} evaluates to @code{false}, there's no point in evaluating
10699 the rest of the arguments.  This means that you should put slow matches
10700 (@samp{body}, @code{header}) last and quick matches (@samp{from},
10701 @samp{subject}) first.
10702
10703 The indirection arguments (@code{1-} and so on) will make their
10704 arguments work on previous generations of the thread.  If you say
10705 something like:
10706
10707 @example
10708 ...
10709 (1-
10710  (1-
10711   ("from" "lars")))
10712 ...
10713 @end example
10714
10715 Then that means "score on the from header of the grandparent of the
10716 current article".  An indirection is quite fast, but it's better to say:
10717
10718 @example
10719 (1-
10720  (& 
10721   ("from" "Lars")
10722   ("subject" "Gnus")))
10723 @end example
10724
10725 than it is to say:
10726
10727 @example
10728 (&
10729  (1- ("from" "Lars"))
10730  (1- ("subject" "Gnus")))
10731 @end example
10732
10733
10734
10735 @node Various
10736 @chapter Various
10737
10738 @menu
10739 * Process/Prefix::             A convention used by many treatment commands.
10740 * Interactive::                Making Gnus ask you many questions.
10741 * Formatting Variables::       You can specify what buffers should look like.
10742 * Windows Configuration::      Configuring the Gnus buffer windows.
10743 * Compilation::                How to speed Gnus up.
10744 * Mode Lines::                 Displaying information in the mode lines.
10745 * Highlighting and Menus::     Making buffers look all nice and cozy.
10746 * Buttons::                    Get tendonitis in ten easy steps!
10747 * Daemons::                    Gnus can do things behind your back.
10748 * NoCeM::                      How to avoid spam and other fatty foods.
10749 * Picons::                     How to display pictures of what your reading.
10750 * Various Various::            Things that are really various.
10751 @end menu
10752
10753
10754 @node Process/Prefix
10755 @section Process/Prefix
10756 @cindex process/prefix convention
10757
10758 Many functions, among them functions for moving, decoding and saving
10759 articles, use what is known as the @dfn{Process/Prefix convention}.
10760
10761 This is a method for figuring out what articles that the user wants the
10762 command to be performed on.
10763
10764 It goes like this:
10765
10766 If the numeric prefix is N, perform the operation on the next N
10767 articles, starting with the current one.  If the numeric prefix is
10768 negative, perform the operation on the previous N articles, starting
10769 with the current one.
10770
10771 @vindex transient-mark-mode
10772 If @code{transient-mark-mode} in non-@code{nil} and the region is
10773 active, all articles in the region will be worked upon.
10774
10775 If there is no numeric prefix, but some articles are marked with the
10776 process mark, perform the operation on the articles that are marked with
10777 the process mark.
10778
10779 If there is neither a numeric prefix nor any articles marked with the
10780 process mark, just perform the operation on the current article.
10781
10782 Quite simple, really, but it needs to be made clear so that surprises
10783 are avoided.
10784
10785 @vindex gnus-summary-goto-unread
10786 One thing that seems to shock & horrify lots of people is that, for
10787 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
10788 Since each @kbd{d} (which marks the current article as read) by default
10789 goes to the next unread article after marking, this means that @kbd{3 d}
10790 will mark the next three unread articles as read, no matter what the
10791 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
10792 @code{nil} for a more straightforward action.
10793
10794
10795 @node Interactive
10796 @section Interactive
10797 @cindex interaction
10798
10799 @table @code
10800
10801 @item gnus-novice-user
10802 @vindex gnus-novice-user
10803 If this variable is non-@code{nil}, you are either a newcomer to the
10804 World of Usenet, or you are very cautious, which is a nice thing to be,
10805 really.  You will be given questions of the type ``Are you sure you want
10806 to do this?'' before doing anything dangerous.  This is @code{t} by
10807 default.
10808
10809 @item gnus-expert-user
10810 @vindex gnus-expert-user
10811 If this variable is non-@code{nil}, you will never ever be asked any
10812 questions by Gnus.  It will simply assume you know what you're doing, no
10813 matter how strange.
10814
10815 @item gnus-interactive-catchup
10816 @vindex gnus-interactive-catchup
10817 Require confirmation before catching up a group if non-@code{nil}.  It
10818 is @code{t} by default.
10819
10820 @item gnus-interactive-exit
10821 @vindex gnus-interactive-exit
10822 Require confirmation before exiting Gnus.  This variable is @code{t} by
10823 default. 
10824 @end table
10825
10826
10827 @node Formatting Variables
10828 @section Formatting Variables
10829 @cindex formatting variables
10830
10831 Throughout this manual you've probably noticed lots of variables that
10832 are called things like @code{gnus-group-line-format} and
10833 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
10834 output lines in the various buffers.  There's quite a lot of them.
10835 Fortunately, they all use the same syntax, so there's not that much to
10836 be annoyed by.
10837
10838 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
10839 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
10840 lots of percentages everywhere.  
10841
10842 Each @samp{%} element will be replaced by some string or other when the
10843 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
10844 spec, and pad with spaces (to the left) to get a 5-character field''.
10845 (@samp{%-5y} means the same, but pad to the right instead.)  Just like a
10846 normal format spec, almost.
10847
10848 You can also say @samp{%4,6y}, which means that the field will never be
10849 more than 6 characters wide and never less than 4 characters wide.
10850
10851 All the specs allow for inserting user defined specifiers -- @samp{u}.
10852 The next character in the format string should be a letter.  @sc{gnus}
10853 will call the function @code{gnus-user-format-function-}@samp{X}, where
10854 @samp{X} is the letter following @samp{%u}.  The function will be passed
10855 a single parameter---what the parameter means depends on what buffer
10856 it's being called from.  The function should return a string, which will
10857 be inserted into the buffer just like information from any other
10858 specifier.  This function may also be called with dummy values, so it
10859 should protect against that.
10860
10861 There are also specs for highlighting, and these are shared by all the
10862 format variables.  Text inside the @samp{%(} and @samp{%)} specifiers
10863 will get the special @code{mouse-face} property set, which means that it
10864 will be highlighted (with @code{gnus-mouse-face}) when you put the mouse
10865 pointer over it.
10866
10867 Text inside the @samp{%[} and @samp{%]} specifiers will have their
10868 normal faces set using @code{gnus-face-0}, which is @code{bold} by
10869 default.  If you say @samp{%1[} instead, you'll get @code{gnus-face-1}
10870 instead, and so on.  Create as many faces as you wish.  The same goes
10871 for the @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
10872 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
10873
10874 Here's an alternative recipe for the group buffer:
10875
10876 @lisp
10877 ;; Create three face types.
10878 (setq gnus-face-1 'bold)
10879 (setq gnus-face-3 'italic)
10880
10881 ;; We want the article count to be in 
10882 ;; a bold and green face.  So we create 
10883 ;; a new face called `my-green-bold'.
10884 (copy-face 'bold 'my-green-bold)
10885 ;; Set the color.
10886 (set-face-foreground 'my-green-bold "ForestGreen")
10887 (setq gnus-face-2 'my-green-bold)
10888
10889 ;; Set the new & fancy format.
10890 (setq gnus-group-line-format 
10891       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
10892 @end lisp
10893
10894 I'm sure you'll be able to use this scheme to create totally unreadable
10895 and extremely vulgar displays.  Have fun!
10896
10897 Currently Gnus uses the following formatting variables:
10898 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
10899 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
10900 @code{gnus-group-mode-line-format},
10901 @code{gnus-summary-mode-line-format},
10902 @code{gnus-article-mode-line-format},
10903 @code{gnus-server-mode-line-format}, and
10904 @code{gnus-summary-pick-line-format}.
10905
10906 Note that the @samp{%(} specs (and friends) do not make any sense on the
10907 mode-line variables.
10908
10909 All these format variables can also be arbitrary elisp forms.  In that
10910 case, they will be @code{eval}ed to insert the required lines.
10911
10912 @kindex M-x gnus-update-format
10913 @findex gnus-update-format
10914 Gnus includes a command to help you while creating your own format
10915 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
10916 update the spec in question and pop you to a buffer where you can
10917 examine the resulting lisp code to be run to generate the line.  
10918
10919
10920 @node Windows Configuration
10921 @section Windows Configuration
10922 @cindex windows configuration
10923
10924 No, there's nothing here about X, so be quiet.
10925
10926 @vindex gnus-use-full-window
10927 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
10928 other windows and occupy the entire Emacs screen by itself.  It is
10929 @code{t} by default.
10930
10931 @vindex gnus-buffer-configuration
10932 @code{gnus-buffer-configuration} describes how much space each Gnus
10933 buffer should be given.  Here's an excerpt of this variable:
10934
10935 @lisp
10936 ((group (vertical 1.0 (group 1.0 point)
10937                       (if gnus-carpal (group-carpal 4))))
10938  (article (vertical 1.0 (summary 0.25 point) 
10939                         (article 1.0))))
10940 @end lisp
10941
10942 This is an alist.  The @dfn{key} is a symbol that names some action or
10943 other.  For instance, when displaying the group buffer, the window
10944 configuration function will use @code{group} as the key.  A full list of
10945 possible names is listed below.
10946
10947 The @dfn{value} (i. e., the @dfn{split}) says how much space each buffer
10948 should occupy.  To take the @code{article} split as an example -
10949
10950 @lisp
10951 (article (vertical 1.0 (summary 0.25 point)
10952                        (article 1.0)))
10953 @end lisp
10954
10955 This @dfn{split} says that the summary buffer should occupy 25% of upper
10956 half of the screen, and that it is placed over the article buffer.  As
10957 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
10958 reaching for that calculator there).  However, the special number
10959 @code{1.0} is used to signal that this buffer should soak up all the
10960 rest of the space available after the rest of the buffers have taken
10961 whatever they need.  There should be only one buffer with the @code{1.0}
10962 size spec per split.
10963
10964 Point will be put in the buffer that has the optional third element
10965 @code{point}. 
10966
10967 Here's a more complicated example:
10968
10969 @lisp
10970 (article (vertical 1.0 (group 4)
10971                        (summary 0.25 point)
10972                        (if gnus-carpal (summary-carpal 4))
10973                        (article 1.0)))
10974 @end lisp
10975
10976 If the size spec is an integer instead of a floating point number, 
10977 then that number will be used to say how many lines a buffer should
10978 occupy, not a percentage.
10979
10980 If the @dfn{split} looks like something that can be @code{eval}ed (to be
10981 precise---if the @code{car} of the split is a function or a subr), this
10982 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
10983 be used as a split.  This means that there will be three buffers if
10984 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
10985 is non-@code{nil}.
10986
10987 Not complicated enough for you?  Well, try this on for size:
10988
10989 @lisp
10990 (article (horizontal 1.0 
10991              (vertical 0.5
10992                  (group 1.0)
10993                  (gnus-carpal 4))
10994              (vertical 1.0
10995                  (summary 0.25 point)
10996                  (summary-carpal 4)
10997                  (article 1.0))))
10998 @end lisp
10999
11000 Whoops.  Two buffers with the mystery 100% tag.  And what's that
11001 @code{horizontal} thingie?  
11002
11003 If the first element in one of the split is @code{horizontal}, Gnus will
11004 split the window horizontally, giving you two windows side-by-side.
11005 Inside each of these strips you may carry on all you like in the normal
11006 fashion.  The number following @code{horizontal} says what percentage of
11007 the screen is to be given to this strip.
11008
11009 For each split, there @emph{must} be one element that has the 100% tag.
11010 The splitting is never accurate, and this buffer will eat any leftover
11011 lines from the splits.
11012
11013 To be slightly more formal, here's a definition of what a legal split
11014 may look like:
11015
11016 @example
11017 split       = frame | horizontal | vertical | buffer | form
11018 frame       = "(frame " size *split ")"
11019 horizontal  = "(horizontal " size *split ")"
11020 vertical    = "(vertical " size *split ")"
11021 buffer      = "(" buffer-name " " size *[ "point" ] ")"
11022 size        = number | frame-params
11023 buffer-name = group | article | summary ...
11024 @end example
11025
11026 The limitations are that the @code{frame} split can only appear as the
11027 top-level split.  @var{form} should be an Emacs Lisp form that should
11028 return a valid split.  We see that each split is fully recursive, and
11029 may contain any number of @code{vertical} and @code{horizontal} splits. 
11030
11031 @vindex gnus-window-min-width
11032 @vindex gnus-window-min-height
11033 @cindex window height
11034 @cindex window width
11035 Finding the right sizes can be a bit complicated.  No window may be less
11036 than @code{gnus-window-min-height} (default 1) characters high, and all
11037 windows must be at least @code{gnus-window-min-width} (default 1)
11038 characters wide.  Gnus will try to enforce this before applying the
11039 splits.  If you want to use the normal Emacs window width/height limit,
11040 you can just set these two variables to @code{nil}.
11041
11042 If you're not familiar with Emacs terminology, @code{horizontal} and
11043 @code{vertical} splits may work the opposite way of what you'd expect.
11044 Windows inside a @code{horizontal} split are shown side-by-side, and
11045 windows within a @code{vertical} split are shown above each other.
11046
11047 @findex gnus-configure-frame
11048 If you want to experiment with window placement, a good tip is to call
11049 @code{gnus-configure-frame} directly with a split.  This is the function
11050 that does all the real work when splitting buffers.  Below is a pretty
11051 nonsensical configuration with 5 windows; two for the group buffer and
11052 three for the article buffer.  (I said it was nonsensical.)  If you
11053 @code{eval} the statement below, you can get an idea of how that would
11054 look straight away, without going through the normal Gnus channels.
11055 Play with it until you're satisfied, and then use
11056 @code{gnus-add-configuration} to add your new creation to the buffer
11057 configuration list. 
11058
11059 @lisp
11060 (gnus-configure-frame
11061  '(horizontal 1.0
11062     (vertical 10
11063       (group 1.0)
11064       (article 0.3 point))
11065     (vertical 1.0
11066       (article 1.0)
11067       (horizontal 4
11068         (group 1.0)
11069         (article 10)))))
11070 @end lisp
11071
11072 You might want to have several frames as well.  No prob---just use the
11073 @code{frame} split:
11074
11075 @lisp
11076 (gnus-configure-frame
11077  '(frame 1.0
11078          (vertical 1.0
11079                    (summary 0.25 point)
11080                    (article 1.0))
11081          (vertical ((height . 5) (width . 15)
11082                     (user-position . t)
11083                     (left . -1) (top . 1))
11084                    (picon 1.0))))
11085
11086 @end lisp
11087
11088 This split will result in the familiar summary/article window
11089 configuration in the first (or ``main'') frame, while a small additional
11090 frame will be created where picons will be shown.  As you can see,
11091 instead of the normal @code{1.0} top-level spec, each additional split
11092 should have a frame parameter alist as the size spec.
11093 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
11094 Reference Manual}.
11095
11096 Here's a list of all possible keys for
11097 @code{gnus-buffer-configuration}:
11098
11099 @code{group}, @code{summary}, @code{article}, @code{server},
11100 @code{browse}, @code{message}, @code{pick}, @code{info},
11101 @code{summary-faq}, @code{edit-group}, @code{edit-server},
11102 @code{edit-score}, @code{post}, @code{reply}, @code{forward},
11103 @code{reply-yank}, @code{mail-bounce}, @code{draft},
11104 @code{pipe}, @code{bug}, @code{compose-bounce}.  
11105
11106 Note that the @code{message} key is used for both
11107 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
11108 it is desireable to distinguish between the two, something like this
11109 might be used:
11110
11111 @lisp
11112 (message (horizontal 1.0
11113                      (vertical 1.0 (message 1.0 point))
11114                      (vertical 0.24
11115                                (if (buffer-live-p gnus-summary-buffer)
11116                                    '(summary 0.5))
11117                                (group 1.0)))))
11118 @end lisp
11119
11120 @findex gnus-add-configuration
11121 Since the @code{gnus-buffer-configuration} variable is so long and
11122 complicated, there's a function you can use to ease changing the config
11123 of a single setting: @code{gnus-add-configuration}.  If, for instance,
11124 you want to change the @code{article} setting, you could say:
11125
11126 @lisp
11127 (gnus-add-configuration
11128  '(article (vertical 1.0
11129                (group 4)
11130                (summary .25 point)
11131                (article 1.0))))
11132 @end lisp
11133
11134 You'd typically stick these @code{gnus-add-configuration} calls in your
11135 @file{.gnus} file or in some startup hook---they should be run after
11136 Gnus has been loaded.
11137
11138
11139 @node Compilation 
11140 @section Compilation 
11141 @cindex compilation
11142 @cindex byte-compilation
11143
11144 @findex gnus-compile
11145
11146 Remember all those line format specification variables?
11147 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
11148 on.  Now, Gnus will of course heed whatever these variables are, but,
11149 unfortunately, changing them will mean a quite significant slow-down.
11150 (The default values of these variables have byte-compiled functions
11151 associated with them, while the user-generated versions do not, of
11152 course.) 
11153
11154 To help with this, you can run @kbd{M-x gnus-compile} after you've
11155 fiddled around with the variables and feel that you're (kind of)
11156 satisfied.  This will result in the new specs being byte-compiled, and
11157 you'll get top speed again.
11158
11159
11160 @node Mode Lines
11161 @section Mode Lines
11162 @cindex mode lines
11163
11164 @vindex gnus-updated-mode-lines
11165 @code{gnus-updated-mode-lines} says what buffers should keep their mode
11166 lines updated.  It is a list of symbols.  Supported symbols include
11167 @code{group}, @code{article}, @code{summary}, @code{server},
11168 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
11169 Gnus will keep that mode line updated with information that may be
11170 pertinent.  If this variable is @code{nil}, screen refresh may be
11171 quicker.
11172
11173 @cindex display-time
11174
11175 @vindex gnus-mode-non-string-length
11176 By default, Gnus displays information on the current article in the mode
11177 lines of the summary and article buffers.  The information Gnus wishes
11178 to display (eg. the subject of the article) is often longer than the
11179 mode lines, and therefore have to be cut off at some point.  The
11180 @code{gnus-mode-non-string-length} variable says how long the other
11181 elements on the line is (i.e., the non-info part).  If you put
11182 additional elements on the mode line (eg. a clock), you should modify
11183 this variable:
11184
11185 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
11186 @lisp
11187 (add-hook 'display-time-hook
11188           (lambda () (setq gnus-mode-non-string-length
11189                            (+ 21
11190                               (if line-number-mode 5 0)
11191                               (if column-number-mode 4 0)
11192                               (length display-time-string)))))
11193 @end lisp
11194
11195 If this variable is @code{nil} (which is the default), the mode line
11196 strings won't be chopped off, and they won't be padded either.
11197
11198
11199 @node Highlighting and Menus
11200 @section Highlighting and Menus
11201 @cindex visual
11202 @cindex highlighting
11203 @cindex menus
11204
11205 @vindex gnus-visual
11206 The @code{gnus-visual} variable controls most of the prettifying Gnus
11207 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
11208 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
11209 file.
11210
11211 This variable can be a list of visual properties that are enabled.  The
11212 following elements are legal, and are all included by default:
11213
11214 @table @code
11215 @item group-highlight
11216 Do highlights in the group buffer.
11217 @item summary-highlight
11218 Do highlights in the summary buffer.
11219 @item article-highlight
11220 Do highlights in the article buffer.
11221 @item highlight
11222 Turn on highlighting in all buffers.
11223 @item group-menu
11224 Create menus in the group buffer.
11225 @item summary-menu
11226 Create menus in the summary buffers.
11227 @item article-menu
11228 Create menus in the article buffer.
11229 @item browse-menu
11230 Create menus in the browse buffer.
11231 @item server-menu
11232 Create menus in the server buffer.
11233 @item score-menu
11234 Create menus in the score buffers.
11235 @item menu
11236 Create menus in all buffers.
11237 @end table
11238
11239 So if you only want highlighting in the article buffer and menus in all
11240 buffers, you could say something like:
11241
11242 @lisp
11243 (setq gnus-visual '(article-highlight menu))
11244 @end lisp
11245
11246 If you want only highlighting and no menus whatsoever, you'd say:
11247
11248 @lisp
11249 (setq gnus-visual '(highlight))
11250 @end lisp
11251
11252 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
11253 in all Gnus buffers.
11254
11255 Other general variables that influence the look of all buffers include:
11256
11257 @table @code
11258 @item gnus-mouse-face
11259 @vindex gnus-mouse-face
11260 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
11261 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
11262
11263 @item gnus-display-type
11264 @vindex gnus-display-type
11265 This variable is symbol indicating the display type Emacs is running
11266 under.  The symbol should be one of @code{color}, @code{grayscale} or
11267 @code{mono}.  If Gnus guesses this display attribute wrongly, either set
11268 this variable in your @file{~/.emacs} or set the resource
11269 @code{Emacs.displayType} in your @file{~/.Xdefaults}.
11270
11271 @item gnus-background-mode 
11272 @vindex gnus-background-mode 
11273 This is a symbol indicating the Emacs background brightness.  The symbol
11274 should be one of @code{light} or @code{dark}.  If Gnus guesses this
11275 frame attribute wrongly, either set this variable in your @file{~/.emacs} or
11276 set the resource @code{Emacs.backgroundMode} in your @file{~/.Xdefaults}. 
11277 `gnus-display-type'.
11278 @end table
11279
11280 There are hooks associated with the creation of all the different menus:
11281
11282 @table @code
11283
11284 @item gnus-article-menu-hook
11285 @vindex gnus-article-menu-hook
11286 Hook called after creating the article mode menu.
11287
11288 @item gnus-group-menu-hook
11289 @vindex gnus-group-menu-hook
11290 Hook called after creating the group mode menu.
11291
11292 @item gnus-summary-menu-hook
11293 @vindex gnus-summary-menu-hook
11294 Hook called after creating the summary mode menu.
11295
11296 @item gnus-server-menu-hook
11297 @vindex gnus-server-menu-hook
11298 Hook called after creating the server mode menu.
11299
11300 @item gnus-browse-menu-hook
11301 @vindex gnus-browse-menu-hook
11302 Hook called after creating the browse mode menu.
11303
11304 @item gnus-score-menu-hook
11305 @vindex gnus-score-menu-hook
11306 Hook called after creating the score mode menu.
11307
11308 @end table
11309
11310
11311 @node Buttons
11312 @section Buttons
11313 @cindex buttons
11314 @cindex mouse
11315 @cindex click
11316
11317 Those new-fangled @dfn{mouse} contraptions is very popular with the
11318 young, hep kids who don't want to learn the proper way to do things
11319 these days.  Why, I remember way back in the summer of '89, when I was
11320 using Emacs on a Tops 20 system.  Three hundred users on one single
11321 machine, and every user was running Simula compilers.  Bah!
11322
11323 Right.
11324
11325 @vindex gnus-carpal
11326 Well, you can make Gnus display bufferfuls of buttons you can click to
11327 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
11328 really.  Tell the chiropractor I sent you.
11329
11330
11331 @table @code
11332
11333 @item gnus-carpal-mode-hook
11334 @vindex gnus-carpal-mode-hook
11335 Hook run in all carpal mode buffers.
11336
11337 @item gnus-carpal-button-face
11338 @vindex gnus-carpal-button-face
11339 Face used on buttons.
11340
11341 @item gnus-carpal-header-face
11342 @vindex gnus-carpal-header-face
11343 Face used on carpal buffer headers.
11344
11345 @item gnus-carpal-group-buffer-buttons
11346 @vindex gnus-carpal-group-buffer-buttons
11347 Buttons in the group buffer.
11348
11349 @item gnus-carpal-summary-buffer-buttons
11350 @vindex gnus-carpal-summary-buffer-buttons
11351 Buttons in the summary buffer.
11352
11353 @item gnus-carpal-server-buffer-buttons
11354 @vindex gnus-carpal-server-buffer-buttons
11355 Buttons in the server buffer.
11356
11357 @item gnus-carpal-browse-buffer-buttons
11358 @vindex gnus-carpal-browse-buffer-buttons
11359 Buttons in the browse buffer.
11360 @end table
11361
11362 All the @code{buttons} variables are lists.  The elements in these list
11363 is either a cons cell where the car contains a text to be displayed and
11364 the cdr contains a function symbol, or a simple string.
11365
11366
11367 @node Daemons
11368 @section Daemons
11369 @cindex demons
11370 @cindex daemons
11371
11372 Gnus, being larger than any program ever written (allegedly), does lots
11373 of strange stuff that you may wish to have done while you're not
11374 present.  For instance, you may want it to check for new mail once in a
11375 while.  Or you may want it to close down all connections to all servers
11376 when you leave Emacs idle.  And stuff like that.
11377
11378 Gnus will let you do stuff like that by defining various
11379 @dfn{handlers}.  Each handler consists of three elements:  A
11380 @var{function}, a @var{time}, and an @var{idle} parameter.
11381
11382 Here's an example of a handler that closes connections when Emacs has
11383 been idle for thirty minutes:
11384
11385 @lisp
11386 (gnus-demon-close-connections nil 30)
11387 @end lisp
11388
11389 Here's a handler that scans for PGP headers every hour when Emacs is
11390 idle: 
11391
11392 @lisp
11393 (gnus-demon-scan-pgp 60 t)
11394 @end lisp
11395
11396 This @var{time} parameter and than @var{idle} parameter works together
11397 in a strange, but wonderful fashion.  Basically, if @var{idle} is
11398 @code{nil}, then the function will be called every @var{time} minutes.
11399
11400 If @var{idle} is @code{t}, then the function will be called after
11401 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
11402 the function will never be called.  But once Emacs goes idle, the
11403 function will be called every @var{time} minutes.
11404
11405 If @var{idle} is a number and @var{time} is a number, the function will
11406 be called every @var{time} minutes only when Emacs has been idle for
11407 @var{idle} minutes.
11408
11409 If @var{idle} is a number and @var{time} is @code{nil}, the function
11410 will be called once every time Emacs has been idle for @var{idle}
11411 minutes.  
11412
11413 And if @var{time} is a string, it should look like @samp{07:31}, and
11414 the function will then be called once every day somewhere near that
11415 time.  Modified by the @var{idle} parameter, of course.
11416
11417 @vindex gnus-demon-timestep
11418 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
11419 seconds.  This is @code{60} by default.  If you change that variable,
11420 all the timings in the handlers will be affected.)
11421
11422 @vindex gnus-use-demon
11423 To set the whole thing in motion, though, you have to set
11424 @code{gnus-use-demon} to @code{t}.
11425
11426 So, if you want to add a handler, you could put something like this in
11427 your @file{.gnus} file:
11428
11429 @findex gnus-demon-add-handler
11430 @lisp
11431 (gnus-demon-add-handler 'gnus-demon-close-connections nil 30)
11432 @end lisp
11433
11434 @findex gnus-demon-add-nocem
11435 @findex gnus-demon-add-scanmail
11436 @findex gnus-demon-add-disconnection
11437 Some ready-made functions to do this has been created:
11438 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection}, and
11439 @code{gnus-demon-add-scanmail}.  Just put those functions in your
11440 @file{.gnus} if you want those abilities.
11441
11442 @findex gnus-demon-init
11443 @findex gnus-demon-cancel
11444 @vindex gnus-demon-handlers
11445 If you add handlers to @code{gnus-demon-handlers} directly, you should
11446 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
11447 daemons, you can use the @code{gnus-demon-cancel} function.
11448
11449 Note that adding daemons can be pretty naughty if you overdo it.  Adding
11450 functions that scan all news and mail from all servers every two seconds
11451 is a sure-fire way of getting booted off any respectable system.  So
11452 behave. 
11453
11454
11455 @node NoCeM
11456 @section NoCeM
11457 @cindex nocem
11458 @cindex spam
11459
11460 @dfn{Spamming} is posting the same article lots and lots of times.
11461 Spamming is bad.  Spamming is evil.  
11462
11463 Spamming is usually canceled within a day or so by various anti-spamming
11464 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
11465 NoCeM is pronounced ``no see-'em'', and means what the name
11466 implies---these are messages that make the offending articles, like, go
11467 away.  
11468
11469 What use are these NoCeM messages if the articles are canceled anyway?
11470 Some sites do not honor cancel messages and some sites just honor cancels
11471 from a select few people.  Then you may wish to make use of the NoCeM
11472 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
11473
11474 Gnus can read and parse the messages in this group automatically, and
11475 this will make spam disappear.  
11476
11477 There are some variables to customize, of course:
11478
11479 @table @code
11480 @item gnus-use-nocem
11481 @vindex gnus-use-nocem
11482 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
11483 by default. 
11484
11485 @item gnus-nocem-groups
11486 @vindex gnus-nocem-groups
11487 Gnus will look for NoCeM messages in the groups in this list.  The
11488 default is @code{("alt.nocem.misc" "news.admin.net-abuse.announce")}. 
11489
11490 @item gnus-nocem-issuers
11491 @vindex gnus-nocem-issuers
11492 There are many people issuing NoCeM messages.  This list says what
11493 people you want to listen to.  The default is @code{("Automoose-1"
11494 "clewis@@ferret.ocunix.on.ca;" "jem@@xpat.com;" "red@@redpoll.mrfs.oh.us
11495 (Richard E. Depew)")}; fine, upstanding citizens all of them.
11496
11497 Known despammers that you can put in this list include:
11498
11499 @table @samp
11500 @item clewis@@ferret.ocunix.on.ca;
11501 @cindex Chris Lewis
11502 Chris Lewis---Major Canadian despammer who has probably canceled more
11503 usenet abuse than anybody else.
11504
11505 @item Automoose-1
11506 @cindex CancelMoose[tm]
11507 The CancelMoose[tm] on autopilot.  The CancelMoose[tm] is reputed to be
11508 Norwegian, and was the person(s) who invented NoCeM.  
11509
11510 @item jem@@xpat.com;
11511 @cindex Jem
11512 Jem---Korean despammer who is getting very busy these days.
11513
11514 @item red@@redpoll.mrfs.oh.us (Richard E. Depew)
11515 Richard E. Depew---lone American despammer.  He mostly cancels binary
11516 postings to non-binary groups and removes spews (regurgitated articles).
11517 @end table
11518
11519 You do not have to heed NoCeM messages from all these people---just the
11520 ones you want to listen to.
11521
11522 @item gnus-nocem-directory
11523 @vindex gnus-nocem-directory
11524 This is where Gnus will store its NoCeM cache files.  The default is
11525 @file{~/News/NoCeM/}. 
11526
11527 @item gnus-nocem-expiry-wait
11528 @vindex gnus-nocem-expiry-wait
11529 The number of days before removing old NoCeM entries from the cache.
11530 The default is 15.  If you make it shorter Gnus will be faster, but you
11531 might then see old spam.
11532
11533 @end table
11534
11535
11536 @node Picons
11537 @section Picons
11538
11539 So...  You want to slow down your news reader even more!  This is a
11540 good way to do so.  Its also a great way to impress people staring
11541 over your shoulder as you read news.
11542
11543 @menu
11544 * Picon Basics::           What are picons and How do I get them.
11545 * Picon Requirements::     Don't go further if you aren't using XEmacs.
11546 * Easy Picons::            Displaying Picons---the easy way.
11547 * Hard Picons::            The way you should do it.  You'll learn something.
11548 * Picon Configuration::    Other variables you can trash/tweak/munge/play with.
11549 @end menu
11550
11551
11552 @node Picon Basics
11553 @subsection Picon Basics
11554
11555 What are Picons?  To quote directly from the Picons Web site
11556 (@samp{http://www.cs.indiana.edu/picons/ftp/index.html}):
11557
11558 @quotation 
11559 @dfn{Picons} is short for ``personal icons''.  They're small,
11560 constrained images used to represent users and domains on the net,
11561 organized into databases so that the appropriate image for a given
11562 e-mail address can be found.  Besides users and domains, there are picon
11563 databases for Usenet newsgroups and weather forecasts.  The picons are
11564 in either monochrome @code{XBM} format or color @code{XPM} and
11565 @code{GIF} formats.
11566 @end quotation
11567
11568 Please see the above mentioned web site for instructions on obtaining
11569 and installing the picons databases, or the following ftp site:
11570 @samp{http://www.cs.indiana.edu/picons/ftp/index.html}.
11571
11572 @vindex gnus-picons-database
11573 Gnus expects picons to be installed into a location pointed to by
11574 @code{gnus-picons-database}.
11575
11576
11577 @node Picon Requirements
11578 @subsection Picon Requirements
11579
11580 To use have Gnus display Picons for you, you must be running XEmacs
11581 19.13 or greater since all other versions of Emacs aren't yet able to
11582 display images.
11583
11584 Additionally, you must have @code{xpm} support compiled into XEmacs.
11585
11586 @vindex gnus-picons-convert-x-face
11587 If you want to display faces from @code{X-Face} headers, you must have
11588 the @code{netpbm} utilities installed, or munge the
11589 @code{gnus-picons-convert-x-face} variable to use something else.
11590
11591
11592 @node Easy Picons
11593 @subsection Easy Picons
11594
11595 To enable displaying picons, simply put the following line in your
11596 @file{~/.gnus} file and start Gnus.
11597
11598 @lisp
11599 (setq gnus-use-picons t)
11600 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
11601 (add-hook 'gnus-summary-prepare-hook 'gnus-group-display-picons t)
11602 (add-hook 'gnus-article-display-hook 'gnus-picons-article-display-x-face)
11603 @end lisp
11604
11605
11606 @node Hard Picons
11607 @subsection Hard Picons 
11608
11609 Gnus can display picons for you as you enter and leave groups and
11610 articles.  It knows how to interact with three sections of the picons
11611 database.  Namely, it can display the picons newsgroup pictures,
11612 author's face picture(s), and the authors domain.  To enable this
11613 feature, you need to first decide where to display them.
11614
11615 @table @code 
11616
11617 @item gnus-picons-display-where 
11618 @vindex gnus-picons-display-where 
11619 Where the picon images should be displayed.  It is @code{picons} by
11620 default (which by default maps to the buffer @samp{*Picons*}).  Other
11621 valid places could be @code{article}, @code{summary}, or
11622 @samp{"*scratch*"} for all I care.  Just make sure that you've made the
11623 buffer visible using the standard Gnus window configuration
11624 routines---@xref{Windows Configuration}.
11625
11626 @end table
11627
11628 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
11629 window configuration for you to include the @code{picons} buffer.
11630
11631 Now that you've made that decision, you need to add the following
11632 functions to the appropriate hooks so these pictures will get
11633 displayed at the right time.
11634
11635 @vindex gnus-article-display-hook
11636 @vindex gnus-picons-display-where
11637 @table @code
11638 @item gnus-article-display-picons
11639 @findex gnus-article-display-picons
11640 Looks up and display the picons for the author and the author's domain
11641 in the @code{gnus-picons-display-where} buffer.  Should be added to
11642 the @code{gnus-article-display-hook}.
11643
11644 @item gnus-group-display-picons
11645 @findex gnus-article-display-picons
11646 Displays picons representing the current group.  This function should
11647 be added to the @code{gnus-summary-prepare-hook} or to the
11648 @code{gnus-article-display-hook} if @code{gnus-picons-display-where}
11649 is set to @code{article}.
11650
11651 @item gnus-picons-article-display-x-face
11652 @findex gnus-article-display-picons
11653 Decodes and displays the X-Face header if present.  This function
11654 should be added to @code{gnus-article-display-hook}.
11655
11656 @end table
11657
11658 Note:  You must append them to the hook, so make sure to specify 't'
11659 to the append flag of @code{add-hook}:
11660
11661 @lisp
11662 (add-hook 'gnus-article-display-hook 'gnus-article-display-picons t)
11663 @end lisp
11664
11665
11666 @node Picon Configuration
11667 @subsection Picon Configuration
11668
11669 The following variables offer further control over how things are
11670 done, where things are located, and other useless stuff you really
11671 don't need to worry about.
11672
11673 @table @code
11674 @item gnus-picons-database
11675 @vindex gnus-picons-database
11676 The location of the picons database.  Should point to a directory
11677 containing the @file{news}, @file{domains}, @file{users} (and so on)
11678 subdirectories.  Defaults to @file{/usr/local/faces}.
11679
11680 @item gnus-picons-news-directory
11681 @vindex gnus-picons-news-directory
11682 Sub-directory of the faces database containing the icons for
11683 newsgroups.
11684
11685 @item gnus-picons-user-directories
11686 @vindex gnus-picons-user-directories
11687 List of subdirectories to search in @code{gnus-picons-database} for user
11688 faces.  Defaults to @code{("local" "users" "usenix" "misc/MISC")}.
11689
11690 @item gnus-picons-domain-directories
11691 @vindex gnus-picons-domain-directories
11692 List of subdirectories to search in @code{gnus-picons-database} for
11693 domain name faces.  Defaults to @code{("domains")}.  Some people may
11694 want to add @samp{unknown} to this list.
11695
11696 @item gnus-picons-convert-x-face
11697 @vindex gnus-picons-convert-x-face
11698 The command to use to convert the @code{X-Face} header to an X bitmap
11699 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
11700 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
11701 gnus-picons-x-face-file-name)}
11702
11703 @item gnus-picons-x-face-file-name
11704 @vindex gnus-picons-x-face-file-name
11705 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
11706 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
11707
11708 @item gnus-picons-buffer
11709 @vindex gnus-picons-buffer
11710 The name of the buffer that @code{picons} points to.  Defaults to
11711 @samp{*Icon Buffer*}.
11712
11713 @end table
11714
11715
11716 @node Various Various
11717 @section Various Various
11718 @cindex mode lines
11719 @cindex highlights
11720
11721 @table @code
11722
11723 @item gnus-verbose
11724 @vindex gnus-verbose
11725 This variable is an integer between zero and ten.  The higher the value,
11726 the more messages will be displayed.  If this variable is zero, Gnus
11727 will never flash any messages, if it is seven (which is the default),
11728 most important messages will be shown, and if it is ten, Gnus won't ever
11729 shut up, but will flash so many messages it will make your head swim.
11730
11731 @item gnus-verbose-backends
11732 @vindex gnus-verbose-backends
11733 This variable works the same way as @code{gnus-verbose}, but it applies
11734 to the Gnus backends instead of Gnus proper.
11735
11736 @item nnheader-max-head-length
11737 @vindex nnheader-max-head-length
11738 When the backends read straight heads of articles, they all try to read
11739 as little as possible.  This variable (default @code{4096}) specifies
11740 the absolute max length the backends will try to read before giving up
11741 on finding a separator line between the head and the body.  If this
11742 variable is @code{nil}, there is no upper read bound.  If it is
11743 @code{t}, the backends won't try to read the articles piece by piece,
11744 but read the entire articles.  This makes sense with some versions of
11745 @code{ange-ftp}. 
11746
11747 @item nnheader-file-name-translation-alist 
11748 @vindex nnheader-file-name-translation-alist 
11749 @cindex file names
11750 @cindex illegal characters in file names
11751 @cindex characters in file names
11752 This is an alist that says how to translate characters in file names.
11753 For instance, if @samp{:} is illegal as a file character in file names
11754 on your system (you OS/2 user you), you could say something like:
11755
11756 @lisp
11757 (setq nnheader-file-name-translation-alist 
11758       '((?: . ?_)))
11759 @end lisp
11760
11761 In fact, this is the default value for this variable on OS/2 and MS
11762 Windows (phooey) systems.
11763
11764 @item gnus-hidden-properties
11765 @vindex gnus-hidden-properties
11766 This is a list of properties to use to hide ``invisible'' text.  It is
11767 @code{(invisible t intangible t)} by default on most systems, which
11768 makes invisible text invisible and intangible.
11769
11770 @item gnus-parse-headers-hook
11771 @vindex gnus-parse-headers-hook
11772 A hook called before parsing headers.  It can be used, for instance, to
11773 gather statistics on the headers fetched, or perhaps you'd like to prune
11774 some headers.  I don't see why you'd want that, though.
11775
11776 @item gnus-shell-command-separator
11777 @vindex gnus-shell-command-separator
11778 String used to separate to shell commands.  The default is @samp{;}. 
11779
11780
11781 @end table
11782
11783
11784 @node The End
11785 @chapter The End
11786
11787 Well, that's the manual---you can get on with your life now.  Keep in
11788 touch.  Say hello to your cats from me.  
11789
11790 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
11791
11792 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
11793
11794 @quotation
11795 @strong{Te Deum}
11796 @sp 1
11797 Not because of victories @*
11798 I sing,@*
11799 having none,@*
11800 but for the common sunshine,@*
11801 the breeze,@*
11802 the largess of the spring.
11803 @sp 1
11804 Not for victory@*
11805 but for the day's work done@*
11806 as well as I was able;@*
11807 not for a seat upon the dais@*
11808 but at the common table.@*
11809 @end quotation
11810
11811
11812 @node Appendices
11813 @chapter Appendices
11814
11815 @menu
11816 * History::                        How Gnus got where it is today.
11817 * Terminology::                    We use really difficult, like, words here.
11818 * Customization::                  Tailoring Gnus to your needs.
11819 * Troubleshooting::                What you might try if things do not work.
11820 * A Programmers Guide to Gnus::    Rilly, rilly technical stuff.
11821 * Emacs for Heathens::             A short introduction to Emacsian terms.
11822 * Frequently Asked Questions::     A question-and-answer session.
11823 @end menu
11824
11825
11826 @node History
11827 @section History
11828
11829 @cindex history
11830 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
11831 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
11832
11833 If you want to investigate the person responsible for this outrage, you
11834 can point your (feh!) web browser to
11835 @file{http://www.ifi.uio.no/~larsi/}.  This is also the primary
11836 distribution point for the new and spiffy versions of Gnus, and is known
11837 as The Site That Destroys Newsrcs And Drives People Mad.
11838
11839 During the first extended alpha period of development, the new Gnus was
11840 called ``(ding) Gnus''.  @dfn{(ding)}, is, of course, short for
11841 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
11842 (Besides, the ``Gnus'' in this abbreviation should probably be
11843 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
11844 appropriate name, don't you think?)
11845
11846 In any case, after spending all that energy on coming up with a new and
11847 spunky name, we decided that the name was @emph{too} spunky, so we
11848 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
11849 ``@sc{gnus}''.  New vs. old.
11850
11851 The first ``proper'' release of Gnus 5 was done in November 1995 when it
11852 was included in the Emacs 19.30 distribution.
11853
11854 In May 1996 the next Gnus generation (aka.  ``September Gnus'') was
11855 released under the name ``Gnus 5.2''.  
11856
11857 On July 28th 1996 work on Red Gnus was begun.
11858
11859 @menu
11860 * Why?::                What's the point of Gnus?
11861 * Compatibility::       Just how compatible is Gnus with @sc{gnus}?
11862 * Conformity::          Gnus tries to conform to all standards.
11863 * Emacsen::             Gnus can be run on a few modern Emacsen.
11864 * Contributors::        Oodles of people.  
11865 * New Features::        Pointers to some of the new stuff in Gnus.
11866 * Newest Features::     Features so new that they haven't been written yet.
11867 @end menu
11868
11869
11870 @node Why?
11871 @subsection Why?
11872
11873 What's the point of Gnus?  
11874
11875 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
11876 newsreader, that lets you do anything you can think of.  That was my
11877 original motivation, but while working on Gnus, it has become clear to
11878 me that this generation of newsreaders really belong in the stone age.
11879 Newsreaders haven't developed much since the infancy of the net.  If the
11880 volume continues to rise with the current rate of increase, all current
11881 newsreaders will be pretty much useless.  How do you deal with
11882 newsgroups that have thousands of new articles each day?  How do you
11883 keep track of millions of people who post?
11884
11885 Gnus offers no real solutions to these questions, but I would very much
11886 like to see Gnus being used as a testing ground for new methods of
11887 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
11888 to separate the newsreader from the backends, Gnus now offers a simple
11889 interface for anybody who wants to write new backends for fetching mail
11890 and news from different sources.  I have added hooks for customizations
11891 everywhere I could imagine useful.  By doing so, I'm inviting every one
11892 of you to explore and invent.
11893
11894 May Gnus never be complete. @kbd{C-u 100 M-x hail-emacs}. 
11895
11896
11897 @node Compatibility
11898 @subsection Compatibility
11899
11900 @cindex compatibility
11901 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
11902 bindings have been kept.  More key bindings have been added, of course,
11903 but only in one or two obscure cases have old bindings been changed.
11904
11905 Our motto is:
11906 @quotation
11907 @cartouche
11908 @center In a cloud bones of steel.
11909 @end cartouche
11910 @end quotation
11911
11912 All commands have kept their names.  Some internal functions have changed
11913 their names.
11914
11915 The @code{gnus-uu} package has changed drastically. @pxref{Decoding
11916 Articles}. 
11917
11918 One major compatibility question is the presence of several summary
11919 buffers.  All variables that are relevant while reading a group are
11920 buffer-local to the summary buffer they belong in.  Although many
11921 important variables have their values copied into their global
11922 counterparts whenever a command is executed in the summary buffer, this
11923 change might lead to incorrect values being used unless you are careful.
11924
11925 All code that relies on knowledge of @sc{gnus} internals will probably
11926 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
11927 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
11928 maintains a hash table that points to the entries in this alist (which
11929 speeds up many functions), and changing the alist directly will lead to
11930 peculiar results.
11931
11932 @cindex hilit19
11933 @cindex highlighting
11934 Old hilit19 code does not work at all.  In fact, you should probably
11935 remove all hilit code from all Gnus hooks
11936 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
11937 Gnus provides various integrated functions for highlighting.  These are
11938 faster and more accurate.  To make life easier for everybody, Gnus will
11939 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
11940 Away!
11941
11942 Packages like @code{expire-kill} will no longer work.  As a matter of
11943 fact, you should probably remove all old @sc{gnus} packages (and other
11944 code) when you start using Gnus.  More likely than not, Gnus already
11945 does what you have written code to make @sc{gnus} do.  (Snicker.)
11946
11947 Even though old methods of doing things are still supported, only the
11948 new methods are documented in this manual.  If you detect a new method of
11949 doing something while reading this manual, that does not mean you have
11950 to stop doing it the old way.
11951
11952 Gnus understands all @sc{gnus} startup files.
11953
11954 @kindex M-x gnus-bug
11955 @findex gnus-bug
11956 @cindex reporting bugs
11957 @cindex bugs
11958 Overall, a casual user who hasn't written much code that depends on
11959 @sc{gnus} internals should suffer no problems.  If problems occur,
11960 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
11961
11962
11963 @node Conformity
11964 @subsection Conformity
11965
11966 No rebels without a clue here, ma'am.  We conform to all standards known
11967 to (wo)man.  Except for those standards and/or conventions we disagree
11968 with, of course.
11969
11970 @table @strong
11971
11972 @item RFC 822
11973 @cindex RFC 822
11974 There are no known breaches of this standard.
11975
11976 @item RFC 1036
11977 @cindex RFC 1036
11978 There are no known breaches of this standard, either.
11979
11980 @item Good Net-Keeping Seal of Approval
11981 @cindex Good Net-Keeping Seal of Approval
11982 Gnus has been through the Seal process and failed.  I think it'll pass
11983 the next inspection.
11984
11985 @item Son-of-RFC 1036
11986 @cindex Son-of-RFC 1036
11987 We do have some breaches to this one.
11988
11989 @table @emph
11990
11991 @item MIME
11992 Gnus does no MIME handling, and this standard-to-be seems to think that
11993 MIME is the bees' knees, so we have major breakage here.
11994
11995 @item X-Newsreader
11996 This is considered to be a ``vanity header'', while I consider it to be
11997 consumer information.  After seeing so many badly formatted articles
11998 coming from @code{tin} and @code{Netscape} I know not to use either of
11999 those for posting articles.  I would not have known that if it wasn't
12000 for the @code{X-Newsreader} header.
12001
12002 @item References
12003 Gnus does line breaking on this header.  I infer from RFC1036 that being
12004 conservative in what you output is not creating 5000-character lines, so
12005 it seems like a good idea to me.  However, this standard-to-be says that
12006 whitespace in the @code{References} header is to be preserved, so...  It
12007 doesn't matter one way or the other to Gnus, so if somebody tells me
12008 what The Way is, I'll change it.  Or not.
12009 @end table
12010
12011 @end table
12012
12013 If you ever notice Gnus acting non-compliantly with regards to the texts
12014 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
12015 know.
12016
12017
12018 @node Emacsen
12019 @subsection Emacsen
12020 @cindex Emacsen
12021 @cindex XEmacs
12022 @cindex Mule
12023 @cindex Emacs
12024
12025 Gnus should work on :
12026
12027 @itemize @bullet 
12028
12029 @item
12030 Emacs 19.30 and up.
12031
12032 @item
12033 XEmacs 19.13 and up.
12034
12035 @item 
12036 Mule versions based on Emacs 19.30 and up.
12037
12038 @end itemize
12039
12040 Gnus will absolutely not work on any Emacsen older than that.  Not
12041 reliably, at least. 
12042
12043 There are some vague differences between Gnus on the various platforms: 
12044
12045 @itemize @bullet
12046
12047 @item
12048 The mouse-face on Gnus lines under Emacs and Mule is delimited to
12049 certain parts of the lines while they cover the entire line under
12050 XEmacs. 
12051
12052 @item 
12053 The same with current-article marking---XEmacs puts an underline under
12054 the entire summary line while Emacs and Mule are nicer and kinder.
12055
12056 @item
12057 XEmacs features more graphics---a logo and a toolbar.
12058
12059 @item
12060 Citation highlighting us better under Emacs and Mule than under XEmacs.
12061
12062 @item
12063 Emacs 19.26-19.28 have tangible hidden headers, which can be a bit
12064 confusing. 
12065
12066 @end itemize
12067
12068
12069 @node Contributors
12070 @subsection Contributors
12071 @cindex contributors
12072
12073 The new Gnus version couldn't have been done without the help of all the
12074 people on the (ding) mailing list.  Every day for over a year I have
12075 gotten billions of nice bug reports from them, filling me with joy,
12076 every single one of them.  Smooches.  The people on the list have been
12077 tried beyond endurance, what with my ``oh, that's a neat idea <type
12078 type>, yup, I'll release it right away <ship off> no wait, that doesn't
12079 work at all <type type>, yup, I'll ship that one off right away <ship
12080 off> no, wait, that absolutely does not work'' policy for releases.
12081 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
12082 ``worser''? ``much worser''?  ``worsest''?)
12083
12084 I would like to take this opportunity to thank the Academy for...  oops,
12085 wrong show.
12086
12087 @itemize @bullet
12088
12089 @item Masanobu @sc{Umeda}
12090 The writer of the original @sc{gnus}.
12091
12092 @item Per Abrahamsen
12093 Custom, scoring, highlighting and @sc{soup} code (as well as numerous
12094 other things).
12095
12096 @item Luis Fernandes
12097 Design and graphics.
12098
12099 @item Wes Hardaker
12100 @file{gnus-picon.el} and the manual section on @dfn{picons}
12101 (@pxref{Picons}). 
12102
12103 @item Brad Miller
12104 @file{gnus-gl.el} and the GroupLens manual section (@pxref{GroupLens}). 
12105
12106 @item Sudish Joseph
12107 Innumerable bug fixes.
12108
12109 @item Ilja Weis
12110 @file{gnus-topic.el}.
12111
12112 @item Steven L. Baur
12113 Lots and lots of bugs detections and fixes.
12114
12115 @item Vladimir Alexiev
12116 The refcard and reference booklets.
12117
12118 @item Felix Lee & JWZ
12119 I stole some pieces from the XGnus distribution by Felix Lee and JWZ.
12120
12121 @item Scott Byer
12122 @file{nnfolder.el} enhancements & rewrite.
12123
12124 @item Peter Mutsaers
12125 Orphan article scoring code.
12126
12127 @item Ken Raeburn
12128 POP mail support.
12129
12130 @item Hallvard B Furuseth
12131 Various bits and pieces, especially dealing with .newsrc files.
12132
12133 @item Brian Edmonds
12134 @file{gnus-bbdb.el}.
12135
12136 @item Ricardo Nassif and Mark Borges
12137 Proof-reading.
12138
12139 @item Kevin Davidson
12140 Came up with the name @dfn{ding}, so blame him.
12141
12142 @end itemize
12143
12144 Peter Arius, Stainless Steel Rat, Ulrik Dickow, Jack Vinson, Daniel
12145 Quinlan, Frank D. Cringle, Geoffrey T. Dairiki, Fabrice Popineau and
12146 Andrew Eskilsson have all contributed code and suggestions.
12147
12148
12149 @node New Features
12150 @subsection New Features
12151 @cindex new features
12152
12153 @itemize @bullet
12154
12155 @item
12156 The look of all buffers can be changed by setting format-like variables
12157 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}). 
12158  
12159 @item 
12160 Local spool and several @sc{nntp} servers can be used at once
12161 (@pxref{Select Methods}).  
12162
12163 @item 
12164 You can combine groups into virtual groups (@pxref{Virtual Groups}).
12165
12166 @item 
12167 You can read a number of different mail formats (@pxref{Getting Mail}).
12168 All the mail backends implement a convenient mail expiry scheme
12169 (@pxref{Expiring Mail}). 
12170
12171 @item
12172 Gnus can use various strategies for gathering threads that have lost
12173 their roots (thereby gathering loose sub-threads into one thread) or it
12174 can go back and retrieve enough headers to build a complete thread
12175 (@pxref{Customizing Threading}).
12176
12177 @item 
12178 Killed groups can be displayed in the group buffer, and you can read
12179 them as well (@pxref{Listing Groups}).
12180
12181 @item 
12182 Gnus can do partial group updates---you do not have to retrieve the
12183 entire active file just to check for new articles in a few groups
12184 (@pxref{The Active File}).
12185
12186 @item 
12187 Gnus implements a sliding scale of subscribedness to groups
12188 (@pxref{Group Levels}).
12189
12190 @item 
12191 You can score articles according to any number of criteria
12192 (@pxref{Scoring}).  You can even get Gnus to find out how to score
12193 articles for you (@pxref{Adaptive Scoring}).
12194
12195 @item 
12196 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
12197 manner, so it should be difficult to lose much data on what you have
12198 read if your machine should go down (@pxref{Auto Save}). 
12199
12200 @item 
12201 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
12202 the @file{.emacs} file.
12203
12204 @item 
12205 You can set the process mark on both groups and articles and perform
12206 operations on all the marked items (@pxref{Process/Prefix}).
12207
12208 @item 
12209 You can grep through a subset of groups and create a group from the
12210 results (@pxref{Kibozed Groups}). 
12211
12212 @item 
12213 You can list subsets of groups according to, well, anything
12214 (@pxref{Listing Groups}). 
12215
12216 @item 
12217 You can browse foreign servers and subscribe to groups from those
12218 servers (@pxref{Browse Foreign Server}). 
12219
12220 @item 
12221 Gnus can fetch articles asynchronously on a second connection to the
12222 server (@pxref{Asynchronous Fetching}).
12223
12224 @item 
12225 You can cache articles locally (@pxref{Article Caching}). 
12226
12227 @item 
12228 The uudecode functions have been expanded and generalized
12229 (@pxref{Decoding Articles}). 
12230
12231 @item
12232 You can still post uuencoded articles, which was a little-known feature
12233 of @sc{gnus}' past (@pxref{Uuencoding and Posting}). 
12234
12235 @item
12236 Fetching parents (and other articles) now actually works without
12237 glitches (@pxref{Finding the Parent}). 
12238
12239 @item
12240 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
12241
12242 @item
12243 Digests (and other files) can be used as the basis for groups
12244 (@pxref{Document Groups}).
12245
12246 @item 
12247 Articles can be highlighted and customized (@pxref{Customizing
12248 Articles}). 
12249
12250 @item 
12251 URLs and other external references can be buttonized (@pxref{Article
12252 Buttons}). 
12253
12254 @item
12255 You can do lots of strange stuff with the Gnus window & frame
12256 configuration (@pxref{Windows Configuration}).
12257
12258 @item
12259 You can click on buttons instead of using the keyboard
12260 (@pxref{Buttons}). 
12261
12262 @item 
12263 Gnus can use NoCeM files to weed out spam (@pxref{NoCeM}). 
12264
12265 @end itemize
12266
12267 This is, of course, just a @emph{short} overview of the @emph{most}
12268 important new features.  No, really.  There are tons more.  Yes, we have
12269 feeping creaturism in full effect, but nothing too gratuitous, I would
12270 hope. 
12271
12272
12273 @node Newest Features
12274 @subsection Newest Features
12275 @cindex todo
12276
12277 Also known as the @dfn{todo list}.  Sure to be implemented before the
12278 next millennium. 
12279
12280 Be afraid.  Be very afraid.
12281
12282 @itemize @bullet
12283 @item
12284 Native @sc{mime} support is something that should be done.  
12285 @item
12286 A better and simpler method for specifying mail composing methods. 
12287 @item
12288 Allow posting through mail-to-news gateways.
12289 @item
12290 Really do unbinhexing.
12291 @end itemize
12292
12293 And much, much, much more.  There is more to come than has already been
12294 implemented.  (But that's always true, isn't it?)
12295
12296 @code{<URL:http://www.ifi.uio.no/~larsi/sgnus/todo>} is where the actual
12297 up-to-the-second todo list is located, so if you're really curious, you
12298 could point your Web browser over that-a-way.
12299
12300
12301 @node Terminology
12302 @section Terminology
12303
12304 @cindex terminology
12305 @table @dfn
12306
12307 @item news
12308 @cindex news
12309 This is what you are supposed to use this thing for---reading news.
12310 News is generally fetched from a nearby @sc{nntp} server, and is
12311 generally publicly available to everybody.  If you post news, the entire
12312 world is likely to read just what you have written, and they'll all
12313 snigger mischievously.  Behind your back.
12314
12315 @item mail
12316 @cindex mail
12317 Everything that's delivered to you personally is mail.  Some news/mail
12318 readers (like Gnus) blur the distinction between mail and news, but
12319 there is a difference.  Mail is private.  News is public.  Mailing is
12320 not posting, and replying is not following up.
12321
12322 @item reply
12323 @cindex reply
12324 Send a mail to the person who has written what you are reading.
12325
12326 @item follow up
12327 @cindex follow up
12328 Post an article to the current newsgroup responding to the article you
12329 are reading.
12330
12331 @item backend
12332 @cindex backend
12333 Gnus gets fed articles from a number of backends, both news and mail
12334 backends.  Gnus does not handle the underlying media, so to speak---this
12335 is all done by the backends.
12336
12337 @item native
12338 @cindex native
12339 Gnus will always use one method (and backend) as the @dfn{native}, or
12340 default, way of getting news.
12341
12342 @item foreign
12343 @cindex foreign
12344 You can also have any number of foreign groups active at the same time.
12345 These are groups that use different backends for getting news.
12346
12347 @item secondary
12348 @cindex secondary
12349 Secondary backends are somewhere half-way between being native and being
12350 foreign, but they mostly act like they are native.
12351
12352 @item article
12353 @cindex article
12354 A nessage that has been posted as news.
12355
12356 @item mail message
12357 @cindex mail message
12358 A message that has been mailed.
12359
12360 @item message 
12361 @cindex message
12362 A mail message or news article
12363
12364 @item head
12365 @cindex head
12366 The top part of a message, where administrative information (etc.) is
12367 put.
12368
12369 @item body
12370 @cindex body
12371 The rest of an article.  Everything that is not in the head is in the
12372 body. 
12373
12374 @item header
12375 @cindex header
12376 A line from the head of an article. 
12377
12378 @item headers
12379 @cindex headers
12380 A collection of such lines, or a collection of heads.  Or even a
12381 collection of @sc{nov} lines.
12382
12383 @item @sc{nov}
12384 @cindex nov
12385 When Gnus enters a group, it asks the backend for the headers of all
12386 unread articles in the group.  Most servers support the News OverView
12387 format, which is more compact and much faster to read and parse than the
12388 normal @sc{head} format.
12389
12390 @item level
12391 @cindex levels
12392 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
12393 that have a lower level are ``more'' subscribed than the groups with a
12394 higher level.  In fact, groups on levels 1-5 are considered
12395 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
12396 are @dfn{killed}.  Commands for listing groups and scanning for new
12397 articles will all use the numeric prefix as @dfn{working level}.
12398
12399 @item killed groups
12400 @cindex killed groups
12401 No information on killed groups is stored or updated, which makes killed
12402 groups much easier to handle than subscribed groups.
12403
12404 @item zombie groups
12405 @cindex zombie groups
12406 Just like killed groups, only slightly less dead.
12407
12408 @item active file
12409 @cindex active file
12410 The news server has to keep track of what articles it carries, and what
12411 groups exist.  All this information in stored in the active file, which
12412 is rather large, as you might surmise.
12413
12414 @item bogus groups
12415 @cindex bogus groups
12416 A group that exists in the @file{.newsrc} file, but isn't known to the
12417 server (i. e.,  it isn't in the active file), is a @emph{bogus group}.
12418 This means that the group probably doesn't exist (any more).
12419
12420 @item server 
12421 @cindex server
12422 A machine than one can connect to and get news (or mail) from.
12423
12424 @item select method
12425 @cindex select method
12426 A structure that specifies the backend, the server and the virtual
12427 server parameters.
12428
12429 @item virtual server
12430 @cindex virtual server
12431 A named select method.  Since a select methods defines all there is to
12432 know about connecting to a (physical) server, taking the who things as a
12433 whole is a virtual server.
12434
12435 @end table
12436
12437
12438 @node Customization
12439 @section Customization
12440 @cindex general customization
12441
12442 All variables are properly documented elsewhere in this manual.  This
12443 section is designed to give general pointers on how to customize Gnus
12444 for some quite common situations.
12445
12446 @menu
12447 * Slow/Expensive Connection:: You run a local Emacs and get the news elsewhere.
12448 * Slow Terminal Connection::  You run a remote Emacs.
12449 * Little Disk Space::         You feel that having large setup files is icky.
12450 * Slow Machine::              You feel like buying a faster machine.
12451 @end menu
12452
12453
12454 @node Slow/Expensive Connection
12455 @subsection Slow/Expensive @sc{nntp} Connection
12456
12457 If you run Emacs on a machine locally, and get your news from a machine
12458 over some very thin strings, you want to cut down on the amount of data
12459 Gnus has to get from the @sc{nntp} server.
12460
12461 @table @code
12462
12463 @item gnus-read-active-file
12464 Set this to @code{nil}, which will inhibit Gnus from requesting the
12465 entire active file from the server.  This file is often v.  large.  You
12466 also have to set @code{gnus-check-new-news} and
12467 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
12468 doesn't suddenly decide to fetch the active file anyway.
12469
12470 @item gnus-nov-is-evil
12471 This one has to be @code{nil}.  If not, grabbing article headers from
12472 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
12473 support @sc{xover}; Gnus will detect this by itself.
12474 @end table
12475
12476
12477 @node Slow Terminal Connection
12478 @subsection Slow Terminal Connection
12479
12480 Let's say you use your home computer for dialing up the system that
12481 runs Emacs and Gnus.  If your modem is slow, you want to reduce the
12482 amount of data that is sent over the wires as much as possible.
12483
12484 @table @code
12485
12486 @item gnus-auto-center-summary
12487 Set this to @code{nil} to inhibit Gnus from re-centering the summary
12488 buffer all the time.  If it is @code{vertical}, do only vertical
12489 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
12490 horizontal and vertical recentering.
12491
12492 @item gnus-visible-headers
12493 Cut down on the headers that are included in the articles to the
12494 minimum.  You can, in fact, make do without them altogether---most of the
12495 useful data is in the summary buffer, anyway.  Set this variable to
12496 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
12497
12498 @item gnus-article-display-hook
12499 Set this hook to all the available hiding commands:
12500 @lisp
12501 (setq gnus-article-display-hook 
12502       '(gnus-article-hide-headers gnus-article-hide-signature
12503         gnus-article-hide-citation))
12504 @end lisp
12505
12506 @item gnus-use-full-window
12507 By setting this to @code{nil}, you can make all the windows smaller.
12508 While this doesn't really cut down much generally, it means that you
12509 have to see smaller portions of articles before deciding that you didn't
12510 want to read them anyway.
12511
12512 @item gnus-thread-hide-subtree
12513 If this is non-@code{nil}, all threads in the summary buffer will be
12514 hidden initially.
12515
12516 @item gnus-updated-mode-lines
12517 If this is @code{nil}, Gnus will not put information in the buffer mode
12518 lines, which might save some time.
12519 @end table
12520
12521
12522 @node Little Disk Space
12523 @subsection Little Disk Space
12524 @cindex disk space
12525
12526 The startup files can get rather large, so you may want to cut their
12527 sizes a bit if you are running out of space.
12528
12529 @table @code
12530
12531 @item gnus-save-newsrc-file
12532 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
12533 only save @file{.newsrc.eld}.  This means that you will not be able to
12534 use any other newsreaders than Gnus.  This variable is @code{t} by
12535 default. 
12536
12537 @item gnus-save-killed-list
12538 If this is @code{nil}, Gnus will not save the list of dead groups.  You
12539 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
12540 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
12541 variable to @code{nil}.  This variable is @code{t} by default.
12542
12543 @end table
12544
12545
12546 @node Slow Machine
12547 @subsection Slow Machine
12548 @cindex slow machine
12549
12550 If you have a slow machine, or are just really impatient, there are a
12551 few things you can do to make Gnus run faster.
12552
12553 Set@code{gnus-check-new-newsgroups} and
12554 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
12555
12556 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
12557 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
12558 summary buffer faster.
12559
12560 Set @code{gnus-article-display-hook} to @code{nil} to make article
12561 processing a bit faster.
12562
12563
12564 @node Troubleshooting
12565 @section Troubleshooting
12566 @cindex troubleshooting
12567
12568 Gnus works @emph{so} well straight out of the box---I can't imagine any
12569 problems, really.
12570
12571 Ahem.
12572
12573 @enumerate
12574
12575 @item
12576 Make sure your computer is switched on.
12577
12578 @item
12579 Make sure that you really load the current Gnus version.  If you have
12580 been running @sc{gnus}, you need to exit Emacs and start it up again before
12581 Gnus will work.
12582
12583 @item
12584 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
12585 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
12586 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
12587 flee}, you have some old @file{.el} files lying around.  Delete these.
12588
12589 @item
12590 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
12591 how-to. 
12592 @end enumerate
12593
12594 If all else fails, report the problem as a bug.
12595
12596 @cindex bugs
12597 @cindex reporting bugs
12598
12599 @kindex M-x gnus-bug
12600 @findex gnus-bug
12601 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
12602 command. @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
12603 me the backtrace.  I will fix bugs, but I can only fix them if you send
12604 me a precise description as to how to reproduce the bug.
12605
12606 You really can never be too detailed in a bug report.  Always use the
12607 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
12608 a 10Kb mail each time you use it, and even if you have sent me your
12609 environment 500 times before.  I don't care.  I want the full info each
12610 time.  
12611
12612 It is also important to remember that I have no memory whatsoever.  If
12613 you send a bug report, and I send you a reply, and then you send back
12614 just ``No, it's not! Moron!'', I will have no idea what you are
12615 insulting me about.  Always over-explain everything.  It's much easier
12616 for all of us---if I don't have all the information I need, I will just
12617 mail you and ask for more info, and everything takes more time.
12618
12619 If the problem you're seeing is very visual, and you can't quite explain
12620 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
12621 it somewhere it can be reached, and include the URL of the picture in
12622 the bug report.a
12623
12624 If you just need help, you are better off asking on
12625 @samp{gnu.emacs.gnus}.  I'm not very helpful.
12626
12627 @cindex gnu.emacs.gnus
12628 @cindex ding mailing list
12629 You can also ask on the ding mailing list---@samp{ding@@ifi.uio.no}.
12630 Write to @samp{ding-request@@ifi.uio.no} to subscribe.
12631
12632
12633 @node A Programmers Guide to Gnus
12634 @section A Programmer's Guide to Gnus
12635
12636 It is my hope that other people will figure out smart stuff that Gnus
12637 can do, and that other people will write those smart things as well.  To
12638 facilitate that I thought it would be a good idea to describe the inner
12639 workings of Gnus.  And some of the not-so-inner workings, while I'm at
12640 it.
12641
12642 You can never expect the internals of a program not to change, but I
12643 will be defining (in some details) the interface between Gnus and its
12644 backends (this is written in stone), the format of the score files
12645 (ditto), data structures (some are less likely to change than others)
12646 and general method of operations.
12647
12648 @menu 
12649 * Backend Interface::        How Gnus communicates with the servers.
12650 * Score File Syntax::        A BNF definition of the score file standard.
12651 * Headers::                  How Gnus stores headers internally.
12652 * Ranges::                   A handy format for storing mucho numbers.
12653 * Group Info::               The group info format.
12654 * Emacs/XEmacs Code::        Gnus can be run under all modern Emacsen.
12655 * Various File Formats::     Formats of files that Gnus use.
12656 @end menu
12657
12658
12659 @node Backend Interface
12660 @subsection Backend Interface
12661
12662 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
12663 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
12664 server is a @dfn{backend} and some @dfn{backend variables}.  As examples
12665 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
12666 examples of the latter we have @code{nntp-port-number} and
12667 @code{nnmbox-directory}.
12668
12669 When Gnus asks for information from a backend---say @code{nntp}---on
12670 something, it will normally include a virtual server name in the
12671 function parameters.  (If not, the backend should use the ``current''
12672 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
12673 server as its only (optional) parameter.  If this virtual server hasn't
12674 been opened, the function should fail.
12675
12676 Note that a virtual server name has no relation to some physical server
12677 name.  Take this example:
12678
12679 @lisp
12680 (nntp "odd-one" 
12681       (nntp-address "ifi.uio.no") 
12682       (nntp-port-number 4324))
12683 @end lisp
12684
12685 Here the virtual server name is @samp{odd-one} while the name of
12686 the physical server is @samp{ifi.uio.no}. 
12687
12688 The backends should be able to switch between several virtual servers.
12689 The standard backends implement this by keeping an alist of virtual
12690 server environments that it pulls down/pushes up when needed.  
12691
12692 There are two groups of interface functions: @dfn{required functions},
12693 which must be present, and @dfn{optional functions}, which Gnus will
12694 always check whether are present before attempting to call.
12695
12696 All these functions are expected to return data in the buffer
12697 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
12698 unfortunately named, but we'll have to live with it.  When I talk about
12699 @dfn{resulting data}, I always refer to the data in that buffer.  When I
12700 talk about @dfn{return value}, I talk about the function value returned by
12701 the function call.  Functions that fail should return @code{nil} as the
12702 return value.
12703
12704 Some backends could be said to be @dfn{server-forming} backends, and
12705 some might be said to not be.  The latter are backends that generally
12706 only operate on one group at a time, and have no concept of ``server''
12707 -- they have a group, and they deliver info on that group and nothing
12708 more.
12709
12710 In the examples and definitions I will refer to the imaginary backend
12711 @code{nnchoke}. 
12712
12713 @cindex @code{nnchoke}
12714
12715 @menu
12716 * Required Backend Functions::        Functions that must be implemented.
12717 * Optional Backend Functions::        Functions that need not be implemented.
12718 * Writing New Backends::              Extending old backends.
12719 * Hooking New Backends Into Gnus::    What has to be done on the Gnus end.
12720 @end menu
12721
12722
12723 @node Required Backend Functions
12724 @subsubsection Required Backend Functions
12725
12726 @table @code
12727
12728 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
12729
12730 @var{articles} is either a range of article numbers or a list of
12731 @code{Message-ID}s.  Current backends do not fully support either---only
12732 sequences (lists) of article numbers, and most backends do not support
12733 retrieval of @code{Message-ID}s.  But they should try for both. 
12734
12735 The result data should either be HEADs or NOV lines, and the result
12736 value should either be @code{headers} or @code{nov} to reflect this.
12737 This might later be expanded to @code{various}, which will be a mixture
12738 of HEADs and NOV lines, but this is currently not supported by Gnus.  
12739
12740 If @var{fetch-old} is non-@code{nil} it says to try to fetch "extra
12741 headers, in some meaning of the word.  This is generally done by
12742 fetching (at most) @var{fetch-old} extra headers less than the smallest
12743 article number in @code{articles}, and fill in the gaps as well.  The
12744 presence of this parameter can be ignored if the backend finds it
12745 cumbersome to follow the request.  If this is non-@code{nil} and not a
12746 number, do maximum fetches.
12747
12748 Here's an example HEAD:
12749
12750 @example
12751 221 1056 Article retrieved.
12752 Path: ifi.uio.no!sturles
12753 From: sturles@@ifi.uio.no (Sturle Sunde)
12754 Newsgroups: ifi.discussion
12755 Subject: Re: Something very droll
12756 Date: 27 Oct 1994 14:02:57 +0100
12757 Organization: Dept. of Informatics, University of Oslo, Norway
12758 Lines: 26
12759 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
12760 References: <38jdmq$4qu@@visbur.ifi.uio.no>
12761 NNTP-Posting-Host: holmenkollen.ifi.uio.no
12762 .
12763 @end example
12764
12765 So a @code{headers} return value would imply that there's a number of
12766 these in the data buffer.
12767
12768 Here's a BNF definition of such a buffer:
12769
12770 @example
12771 headers        = *head
12772 head           = error / valid-head
12773 error-message  = [ "4" / "5" ] 2number " " <error message> eol
12774 valid-head     = valid-message *header "." eol
12775 valid-message  = "221 " <number> " Article retrieved." eol
12776 header         = <text> eol
12777 @end example
12778
12779 If the return value is @code{nov}, the data buffer should contain
12780 @dfn{network overview database} lines.  These are basically fields
12781 separated by tabs. 
12782
12783 @example
12784 nov-buffer = *nov-line
12785 nov-line   = 8*9 [ field <TAB> ] eol
12786 field      = <text except TAB>
12787 @end example
12788
12789 For a closer explanation what should be in those fields,
12790 @pxref{Headers}. 
12791
12792
12793 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
12794
12795 @var{server} is here the virtual server name.  @var{definitions} is a
12796 list of @code{(VARIABLE VALUE)} pairs that defines this virtual server. 
12797
12798 If the server can't be opened, no error should be signaled.  The backend
12799 may then choose to refuse further attempts at connecting to this
12800 server.  In fact, it should do so. 
12801
12802 If the server is opened already, this function should return a
12803 non-@code{nil} value.  There should be no data returned.
12804
12805
12806 @item (nnchoke-close-server &optional SERVER)
12807
12808 Close connection to @var{server} and free all resources connected
12809 to it.  Return @code{nil} if the server couldn't be closed for some
12810 reason.
12811
12812 There should be no data returned.
12813
12814
12815 @item (nnchoke-request-close)
12816
12817 Close connection to all servers and free all resources that the backend
12818 have reserved.  All buffers that have been created by that backend
12819 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
12820 function is generally only called when Gnus is shutting down.
12821
12822 There should be no data returned. 
12823
12824
12825 @item (nnchoke-server-opened &optional SERVER)
12826
12827 If @var{server} is the current virtual server, and the connection to the
12828 physical server is alive, then this function should return a
12829 non-@code{nil} vlue.  This function should under no circumstances
12830 attempt to reconnect to a server that is has lost connection to.
12831
12832 There should be no data returned.
12833
12834
12835 @item (nnchoke-status-message &optional SERVER)
12836
12837 This function should return the last error message from @var{server}. 
12838
12839 There should be no data returned.
12840
12841
12842 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
12843
12844 The result data from this function should be the article specified by
12845 @var{article}.  This might either be a @code{Message-ID} or a number.
12846 It is optional whether to implement retrieval by @code{Message-ID}, but
12847 it would be nice if that were possible.
12848
12849 If @var{to-buffer} is non-@code{nil}, the result data should be returned
12850 in this buffer instead of the normal data buffer.  This is to make it
12851 possible to avoid copying large amounts of data from one buffer to
12852 another, and Gnus mainly request articles to be inserted directly into
12853 its article buffer.
12854
12855 If it is at all possible, this function should return a cons cell where
12856 the car is the group name the article was fetched from, and the cdr is
12857 the article number.  This will enable Gnus to find out what the real
12858 group and article numbers are when fetching articles by
12859 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
12860 on successful article retrievement.
12861
12862
12863 @item (nnchoke-open-group GROUP &optional SERVER)
12864
12865 Make @var{group} the current group.  
12866
12867 There should be no data returned by this function.
12868
12869
12870 @item (nnchoke-request-group GROUP &optional SERVER FAST)
12871
12872 Get data on @var{group}.  This function also has the side effect of
12873 making @var{group} the current group. 
12874
12875 If @var{FAST}, don't bother to return useful data, just make @var{group}
12876 the current group.
12877
12878 Here's an example of some result data and a definition of the same:
12879
12880 @example
12881 211 56 1000 1059 ifi.discussion
12882 @end example
12883
12884 The first number is the status, which should be @code{211}.  Next is the
12885 total number of articles in the group, the lowest article number, the
12886 highest article number, and finally the group name.  Note that the total
12887 number of articles may be less than one might think while just
12888 considering the highest and lowest article numbers, but some articles
12889 may have been canceled.  Gnus just discards the total-number, so
12890 whether one should take the bother to generate it properly (if that is a
12891 problem) is left as an exercise to the reader.
12892
12893 @example
12894 group-status = [ error / info ] eol
12895 error        = [ "4" / "5" ] 2<number> " " <Error message>
12896 info         = "211 " 3* [ <number> " " ] <string>
12897 @end example
12898
12899
12900 @item (nnchoke-close-group GROUP &optional SERVER)
12901
12902 Close @var{group} and free any resources connected to it.  This will be
12903 a no-op on most backends. 
12904
12905 There should be no data returned.
12906
12907
12908 @item (nnchoke-request-list &optional SERVER)
12909
12910 Return a list of all groups available on @var{server}.  And that means
12911 @emph{all}. 
12912
12913 Here's an example from a server that only carries two groups:
12914
12915 @example
12916 ifi.test 0000002200 0000002000 y
12917 ifi.discussion 3324 3300 n
12918 @end example
12919
12920 On each line we have a group name, then the highest article number in
12921 that group, the lowest article number, and finally a flag.
12922
12923 @example
12924 active-file = *active-line
12925 active-line = name " " <number> " " <number> " " flags eol
12926 name        = <string>
12927 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
12928 @end example
12929
12930 The flag says whether the group is read-only (@samp{n}), is moderated
12931 (@samp{m}), is dead (@samp{x}), is aliased to some other group
12932 (@samp{=other-group} or none of the above (@samp{y}). 
12933
12934
12935 @item (nnchoke-request-post &optional SERVER)
12936
12937 This function should post the current buffer.  It might return whether
12938 the posting was successful or not, but that's not required.  If, for
12939 instance, the posting is done asynchronously, it has generally not been
12940 completed by the time this function concludes.  In that case, this
12941 function should set up some kind of sentinel to beep the user loud and
12942 clear if the posting could not be completed.
12943
12944 There should be no result data from this function. 
12945
12946 @end table
12947
12948
12949 @node Optional Backend Functions
12950 @subsubsection Optional Backend Functions
12951
12952 @table @code
12953
12954 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
12955
12956 @var{groups} is a list of groups, and this function should request data
12957 on all those groups.  How it does it is of no concern to Gnus, but it
12958 should attempt to do this in a speedy fashion.
12959
12960 The return value of this function can be either @code{active} or
12961 @code{group}, which says what the format of the result data is.  The
12962 former is in the same format as the data from
12963 @code{nnchoke-request-list}, while the latter is a buffer full of lines
12964 in the same format as @code{nnchoke-request-group} gives.
12965
12966 @example
12967 group-buffer = *active-line / *group-status
12968 @end example
12969
12970
12971 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
12972
12973 A Gnus group info (@pxref{Group Info}) is handed to the backend for
12974 alterations.  This comes in handy if the backend really carries all the
12975 information (as is the case with virtual an imap groups).  This function
12976 may alter the info in any manner it sees fit, and should return the
12977 (altered) group info.  This function may alter the group info
12978 destructively, so no copying is needed before boogeying. 
12979
12980 There should be no result data from this function.
12981
12982
12983 @item (nnchoke-request-type GROUP &optional ARTICLE)
12984
12985 When the user issues commands for ``sending news'' (@kbd{F} in the
12986 summary buffer, for instance), Gnus has to know whether the article the
12987 user is following up is news or mail.  This function should return
12988 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
12989 is mail and @code{unknown} if the type can't be decided.  (The
12990 @var{article} parameter is necessary in @code{nnvirtual} groups which
12991 might very well combine mail groups and news groups.)
12992
12993 There should be no result data from this function.
12994
12995
12996 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
12997
12998 If the user tries to set a mark that the backend doesn't like, this
12999 function may change the mark.  Gnus will use whatever this function
13000 returns as the mark for @var{article} instead of the original
13001 @var{mark}.  If the backend doesn't care, it must return the original
13002 @var{mark}, and not @code{nil} or any other type of garbage.  
13003
13004 The only use for this that I can see is what @code{nnvirtual} does with
13005 it---if a component group is auto-expirable, marking an article as read
13006 in the virtual group should result in the article being marked as
13007 expirable. 
13008
13009 There should be no result data from this function.
13010
13011
13012 @item (nnchoke-request-scan &optional GROUP SERVER)
13013
13014 This function may be called at any time (by Gnus or anything else) to
13015 request that the backend check for incoming articles, in one way or
13016 another.  A mail backend will typically read the spool file or query the
13017 POP server when this function is invoked.  The @var{group} doesn't have
13018 to be heeded---if the backend decides that it is too much work just
13019 scanning for a single group, it may do a total scan of all groups.  It
13020 would be nice, however, to keep things local if that's practical.
13021
13022 There should be no result data from this function.
13023
13024
13025 @item (nnchoke-request-asynchronous GROUP &optional SERVER ARTICLES)
13026
13027 This is a request to fetch articles asynchronously later.
13028 @var{articles} is an alist of @var{(article-number line-number)}.  One
13029 would generally expect that if one later fetches article number 4, for
13030 instance, some sort of asynchronous fetching of the articles after 4
13031 (which might be 5, 6, 7 or 11, 3, 909 depending on the order in that
13032 alist) would be fetched asynchronously, but that is left up to the
13033 backend.  Gnus doesn't care.
13034
13035 There should be no result data from this function.
13036  
13037
13038 @item (nnchoke-request-group-description GROUP &optional SERVER)
13039
13040 The result data from this function should be a description of
13041 @var{group}. 
13042
13043 @example
13044 description-line = name <TAB> description eol
13045 name             = <string>
13046 description      = <text>
13047 @end example
13048
13049 @item (nnchoke-request-list-newsgroups &optional SERVER)
13050
13051 The result data from this function should be the description of all
13052 groups available on the server.
13053
13054 @example
13055 description-buffer = *description-line
13056 @end example
13057
13058
13059 @item (nnchoke-request-newgroups DATE &optional SERVER)
13060
13061 The result data from this function should be all groups that were
13062 created after @samp{date}, which is in normal human-readable date
13063 format.  The data should be in the active buffer format.
13064
13065
13066 @item (nnchoke-request-create-group GROUP &optional SERVER)
13067
13068 This function should create an empty group with name @var{group}.  
13069
13070 There should be no return data.
13071
13072
13073 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
13074
13075 This function should run the expiry process on all articles in the
13076 @var{articles} range (which is currently a simple list of article
13077 numbers.)  It is left up to the backend to decide how old articles
13078 should be before they are removed by this function.  If @var{force} is
13079 non-@code{nil}, all @var{articles} should be deleted, no matter how new
13080 they are. 
13081
13082 This function should return a list of articles that it did not/was not
13083 able to delete.
13084
13085 There should be no result data returned.
13086
13087
13088 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
13089 &optional LAST)
13090
13091 This function should move @var{article} (which is a number) from
13092 @var{group} by calling @var{accept-form}.  
13093
13094 This function should ready the article in question for moving by
13095 removing any header lines it has added to the article, and generally
13096 should ``tidy up'' the article.  Then it should @code{eval}
13097 @var{accept-form} in the buffer where the ``tidy'' article is.  This
13098 will do the actual copying.  If this @code{eval} returns a
13099 non-@code{nil} value, the article should be removed.
13100
13101 If @var{last} is @code{nil}, that means that there is a high likelihood
13102 that there will be more requests issued shortly, so that allows some
13103 optimizations. 
13104
13105 The function should return a cons where the car is the group name and
13106 the cdr is the article number that the article was entered as.
13107
13108 There should be no data returned. 
13109
13110
13111 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
13112
13113 This function takes the current buffer and inserts it into @var{group}.
13114 If @var{last} in @code{nil}, that means that there will be more calls to
13115 this function in short order.
13116
13117 The function should return a cons where the car is the group name and
13118 the cdr is the article number that the article was entered as.
13119
13120 There should be no data returned.
13121
13122
13123 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
13124
13125 This function should remove @var{article} (which is a number) from
13126 @var{group} and insert @var{buffer} there instead.
13127
13128 There should be no data returned.
13129
13130
13131 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
13132
13133 This function should delete @var{group}.  If @var{force}, it should
13134 really delete all the articles in the group, and then delete the group
13135 itself.  (If there is such a thing as ``the group itself''.)
13136
13137 There should be no data returned.
13138
13139
13140 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
13141
13142 This function should rename @var{group} into @var{new-name}.  All
13143 articles that are in @var{group} should move to @var{new-name}.
13144
13145 There should be no data returned.
13146
13147 @end table
13148
13149
13150 @node Writing New Backends
13151 @subsubsection Writing New Backends
13152
13153 The various backends share many similarities.  @code{nnml} is just like
13154 @code{nnspool}, but it allows you to edit the articles on the server.
13155 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
13156 and it doesn't maintain overview databases.  @code{nndir} is just like
13157 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
13158 editing articles.
13159
13160 It would make sense if it were possible to ``inherit'' functions from
13161 backends when writing new backends.  And, indeed, you can do that if you
13162 want to.  (You don't have to if you don't want to, of course.)  
13163
13164 All the backends declare their public variables and functions by using a
13165 package called @code{nnoo}.  
13166
13167 To inherit functions from other backends (and allow other backends to
13168 inherit functions from the current backend), you should use the
13169 following macros:
13170 following. 
13171
13172 @table @code
13173
13174 @item nnoo-declare
13175 This macro declares the first parameter to be a child of the subsequent
13176 parameters.  For instance:
13177
13178 @lisp
13179 (nnoo-declare nndir
13180   nnml nnmh)
13181 @end lisp
13182
13183 @code{nndir} has here declared that it intends to inherit functions from
13184 both @code{nnml} and @code{nnmh}.
13185
13186 @item defvoo
13187 This macro is equivalent to @code{defvar}, but registers the variable as
13188 a public server variable.  Most state-oriented variables should be
13189 declared with @code{defvoo} instead of @code{defvar}.  
13190
13191 In addition to the normal @code{defvar} parameters, it takes a list of
13192 variables in the parent backends to map the variable to when executing
13193 a function in those backends.
13194
13195 @lisp
13196 (defvoo nndir-directory nil
13197   "Where nndir will look for groups."
13198   nnml-current-directory nnmh-current-directory)
13199 @end lisp
13200
13201 This means that @code{nnml-current-directory} will be set to
13202 @code{nndir-directory} when an @code{nnml} function is called on behalf
13203 of @code{nndir}.  (The same with @code{nnmh}.)  
13204
13205 @item nnoo-define-basics
13206 This macro defines some common functions that almost all backends should
13207 have.
13208
13209 @example
13210 (nnoo-define-basics nndir)
13211 @end example
13212
13213 @item deffoo
13214 This macro is just like @code{defun} and takes the same parameters.  In
13215 addition to doing the normal @code{defun} things, it registers the
13216 function as being public so that other backends can inherit it.
13217
13218 @item nnoo-map-functions
13219 This macro allows mapping of functions from the current backend to
13220 functions from the parent backends.
13221
13222 @example
13223 (nnoo-map-functions nndir
13224   (nnml-retrieve-headers 0 nndir-current-group 0 0)
13225   (nnmh-request-article 0 nndir-current-group 0 0))
13226 @end example
13227
13228 This means that when @code{nndir-retrieve-headers} is called, the first,
13229 third, and fourth parameters will be passed on to
13230 @code{nnml-retrieve-headers}, while the second parameter is set to the
13231 value of @code{nndir-current-group}.
13232
13233 @item nnoo-import
13234 This macro allows importing functions from backends.  It should be the
13235 last thing in the source file, since it will only define functions that
13236 haven't already been defined.
13237
13238 @example
13239 (nnoo-import nndir
13240   (nnmh
13241    nnmh-request-list
13242    nnmh-request-newgroups)
13243   (nnml))
13244 @end example
13245
13246 This means that calls to @code{nndir-request-list} should just be passed
13247 on to @code{nnmh-request-list}, while all public functions from
13248 @code{nnml} that haven't been defined in @code{nndir} yet should be
13249 defined now.
13250
13251 @end table
13252
13253 Below is a slightly shortened version of the @code{nndir} backend.
13254
13255 @lisp
13256 ;;; nndir.el --- single directory newsgroup access for Gnus
13257 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
13258
13259 ;;; Code:
13260
13261 (require 'nnheader)
13262 (require 'nnmh)
13263 (require 'nnml)
13264 (require 'nnoo)
13265 (eval-when-compile (require 'cl))
13266
13267 (nnoo-declare nndir
13268   nnml nnmh)
13269
13270 (defvoo nndir-directory nil
13271   "Where nndir will look for groups."
13272   nnml-current-directory nnmh-current-directory)
13273
13274 (defvoo nndir-nov-is-evil nil
13275   "*Non-nil means that nndir will never retrieve NOV headers."
13276   nnml-nov-is-evil)
13277
13278 (defvoo nndir-current-group "" nil nnml-current-group nnmh-current-group)
13279 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
13280 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
13281
13282 (defvoo nndir-status-string "" nil nnmh-status-string)
13283 (defconst nndir-version "nndir 1.0")
13284
13285 ;;; Interface functions.
13286
13287 (nnoo-define-basics nndir)
13288
13289 (deffoo nndir-open-server (server &optional defs)
13290   (setq nndir-directory
13291         (or (cadr (assq 'nndir-directory defs))
13292             server))
13293   (unless (assq 'nndir-directory defs)
13294     (push `(nndir-directory ,server) defs))
13295   (push `(nndir-current-group
13296           ,(file-name-nondirectory (directory-file-name nndir-directory)))
13297         defs)
13298   (push `(nndir-top-directory
13299           ,(file-name-directory (directory-file-name nndir-directory)))
13300         defs)
13301   (nnoo-change-server 'nndir server defs))
13302
13303 (nnoo-map-functions nndir
13304   (nnml-retrieve-headers 0 nndir-current-group 0 0)
13305   (nnmh-request-article 0 nndir-current-group 0 0)
13306   (nnmh-request-group nndir-current-group 0 0)
13307   (nnmh-close-group nndir-current-group 0))
13308
13309 (nnoo-import nndir
13310   (nnmh
13311    nnmh-status-message
13312    nnmh-request-list
13313    nnmh-request-newgroups))
13314
13315 (provide 'nndir)
13316 @end lisp
13317
13318
13319 @node Hooking New Backends Into Gnus
13320 @subsubsection Hooking New Backends Into Gnus
13321
13322 @vindex gnus-valid-select-methods
13323 Having Gnus start using your new backend is rather easy---you just
13324 declare it with the @code{gnus-declare-backend} functions.  This will
13325 enter the backend into the @code{gnus-valid-select-methods} variable.
13326
13327 @code{gnus-declare-backend} takes two parameters---the backend name and
13328 an arbitrary number of @dfn{abilities}.
13329
13330 Here's an example:
13331
13332 @lisp
13333 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
13334 @end lisp
13335
13336 The abilities can be:
13337
13338 @table @code
13339 @item mail
13340 This is a mailish backend---followups should (probably) go via mail.
13341 @item post
13342 This is a newsish backend---followups should (probably) go via news. 
13343 @item post-mail
13344 This backend supports both mail and news.
13345 @item none
13346 This is neither a post or mail backend---it's something completely
13347 different. 
13348 @item respool
13349 It supports respooling---or rather, it is able to modify its source
13350 articles and groups.
13351 @item address
13352 The name of the server should be in the virtual server name.  This is
13353 true for almost all backends.
13354 @item prompt-address
13355 The user should be prompted for an address when doing commands like
13356 @kbd{B} in the group buffer.  This is true for backends like
13357 @code{nntp}, but not @code{nnmbox}, for instance. 
13358 @end table
13359
13360
13361
13362 @node Score File Syntax
13363 @subsection Score File Syntax
13364
13365 Score files are meant to be easily parsable, but yet extremely
13366 mallable.   It was decided that something that had the same read syntax
13367 as an Emacs Lisp list would fit that spec.
13368
13369 Here's a typical score file:
13370
13371 @lisp
13372 (("summary"
13373   ("win95" -10000 nil s)
13374   ("Gnus"))
13375  ("from"
13376   ("Lars" -1000))
13377  (mark -100))
13378 @end lisp
13379
13380 BNF definition of a score file:
13381
13382 @example
13383 score-file       = "" / "(" *element ")"
13384 element          = rule / atom
13385 rule             = string-rule / number-rule / date-rule
13386 string-rule      = "(" quote string-header quote space *string-match ")"
13387 number-rule      = "(" quote number-header quote space *number-match ")"
13388 date-rule        = "(" quote date-header quote space *date-match ")"
13389 quote            = <ascii 34>
13390 string-header    = "subject" / "from" / "references" / "message-id" / 
13391                    "xref" / "body" / "head" / "all" / "followup"
13392 number-header    = "lines" / "chars"
13393 date-header      = "date"
13394 string-match     = "(" quote <string> quote [ "" / [ space score [ "" / 
13395                    space date [ "" / [ space string-match-t ] ] ] ] ] ")"
13396 score            = "nil" / <integer>
13397 date             = "nil" / <natural number>
13398 string-match-t   = "nil" / "s" / "substring" / "S" / "Substring" / 
13399                    "r" / "regex" / "R" / "Regex" /
13400                    "e" / "exact" / "E" / "Exact" /
13401                    "f" / "fuzzy" / "F" / "Fuzzy"
13402 number-match     = "(" <integer> [ "" / [ space score [ "" / 
13403                    space date [ "" / [ space number-match-t ] ] ] ] ] ")"
13404 number-match-t   = "nil" / "=" / "<" / ">" / ">=" / "<="
13405 date-match       = "(" quote <string> quote [ "" / [ space score [ "" / 
13406                    space date [ "" / [ space date-match-t ] ] ] ] ")"
13407 date-match-t     = "nil" / "at" / "before" / "after"
13408 atom             = "(" [ required-atom / optional-atom ] ")"
13409 required-atom    = mark / expunge / mark-and-expunge / files /
13410                    exclude-files / read-only / touched
13411 optional-atom    = adapt / local / eval 
13412 mark             = "mark" space nil-or-number
13413 nil-or-number    = "nil" / <integer>
13414 expunge          = "expunge" space nil-or-number
13415 mark-and-expunge = "mark-and-expunge" space nil-or-number
13416 files            = "files" *[ space <string> ]
13417 exclude-files    = "exclude-files" *[ space <string> ]
13418 read-only        = "read-only" [ space "nil" / space "t" ]
13419 adapt            = "adapt" [ space "nil" / space "t" / space adapt-rule ]
13420 adapt-rule       = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
13421 local            = "local" *[ space "(" <string> space <form> ")" ]
13422 eval             = "eval" space <form>
13423 space            = *[ " " / <TAB> / <NEWLINE> ]
13424 @end example
13425
13426 Any unrecognized elements in a score file should be ignored, but not
13427 discarded.  
13428
13429 As you can see, white space is needed, but the type and amount of white
13430 space is irrelevant.  This means that formatting of the score file is
13431 left up to the programmer---if it's simpler to just spew it all out on
13432 one looong line, then that's ok.
13433
13434 The meaning of the various atoms are explained elsewhere in this
13435 manual. 
13436
13437
13438 @node Headers
13439 @subsection Headers
13440
13441 Gnus uses internally a format for storing article headers that
13442 corresponds to the @sc{nov} format in a mysterious fashion.  One could
13443 almost suspect that the author looked at the @sc{nov} specification and
13444 just shamelessly @emph{stole} the entire thing, and one would be right.
13445
13446 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
13447 RFC1036 to talk about lines in the head of an article (eg.,
13448 @code{From}).  It is used by many people as a synonym for
13449 ``head''---``the header and the body''.  (That should be avoided, in my
13450 opinion.)  And Gnus uses a format internally that it calls ``header'',
13451 which is what I'm talking about here.  This is a 9-element vector,
13452 basically, with each header (ouch) having one slot.
13453
13454 These slots are, in order: @code{number}, @code{subject}, @code{from},
13455 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
13456 @code{xref}.  There are macros for accessing and setting these
13457 slots---they all have predictable names beginning with
13458 @code{mail-header-} and @code{mail-header-set-}, respectively.
13459
13460 The @code{xref} slot is really a @code{misc} slot.  Any extra info will
13461 be put in there.
13462
13463
13464 @node Ranges
13465 @subsection Ranges
13466
13467 @sc{gnus} introduced a concept that I found so useful that I've started
13468 using it a lot and have elaborated on it greatly. 
13469
13470 The question is simple: If you have a large amount of objects that are
13471 identified by numbers (say, articles, to take a @emph{wild} example)
13472 that you want to callify as being ``included'', a normal sequence isn't
13473 very useful.  (A 200,000 length sequence is a bit long-winded.)
13474
13475 The solution is as simple as the question: You just collapse the
13476 sequence. 
13477
13478 @example
13479 (1 2 3 4 5 6 10 11 12)
13480 @end example
13481
13482 is transformed into
13483
13484 @example
13485 ((1 . 6) (10 . 12))
13486 @end example
13487
13488 To avoid having those nasty @samp{(13 . 13)} elements to denote a
13489 lonesome object, a @samp{13} is a valid element:
13490
13491 @example
13492 ((1 . 6) 7 (10 . 12))
13493 @end example
13494
13495 This means that comparing two ranges to find out whether they are equal
13496 is slightly tricky:
13497
13498 @example
13499 ((1 . 5) 7 8 (10 . 12))
13500 @end example
13501
13502 and
13503
13504 @example
13505 ((1 . 5) (7 . 8) (10 . 12))
13506 @end example
13507
13508 are equal.  In fact, any non-descending list is a range:
13509
13510 @example
13511 (1 2 3 4 5)
13512 @end example
13513
13514 is a perfectly valid range, although a pretty long-winded one.  This is
13515 also legal:
13516
13517 @example
13518 (1 . 5)
13519 @end example
13520
13521 and is equal to the previous range.
13522
13523 Here's a BNF definition of ranges.  Of course, one must remember the
13524 semantic requirement that the numbers are non-descending.  (Any number
13525 of repetition of the same number is allowed, but apt to disappear in
13526 range handling.)
13527
13528 @example
13529 range           = simple-range / normal-range
13530 simple-range    = "(" number " . " number ")"
13531 normal-range    = "(" start-contents ")"
13532 contents        = "" / simple-range *[ " " contents ] / 
13533                   number *[ " " contents ]
13534 @end example
13535
13536 Gnus currently uses ranges to keep track of read articles and article
13537 marks.  I plan on implementing a number of range operators in C if The
13538 Powers That Be are willing to let me.  (I haven't asked yet, because I
13539 need to do some more thinking on what operators I need to make life
13540 totally range-based without ever having to convert back to normal
13541 sequences.) 
13542
13543
13544 @node Group Info
13545 @subsection Group Info
13546
13547 Gnus stores all permanent info on groups in a @dfn{group info} list.
13548 This list is from three to six elements (or more) long and exhaustively
13549 describes the group.
13550
13551 Here are two example group infos; one is a very simple group while the
13552 second is a more complex one:
13553
13554 @example
13555 ("no.group" 5 (1 . 54324))
13556
13557 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
13558                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
13559                 (nnml "")
13560                 (auto-expire (to-address "ding@@ifi.uio.no")))
13561 @end example
13562
13563 The first element is the group name as Gnus knows the group; the second
13564 is the group level; the third is the read articles in range format; the
13565 fourth is a list of article marks lists; the fifth is the select method;
13566 and the sixth contains the group parameters.
13567
13568 Here's a BNF definition of the group info format:
13569
13570 @example
13571 info          = "(" group space level space read 
13572                 [ "" / [ space marks-list [ "" / [ space method [ "" /
13573                 space parameters ] ] ] ] ] ")" 
13574 group         = quote <string> quote
13575 level         = <integer in the range of 1 to inf>
13576 read          = range
13577 marks-lists   = nil / "(" *marks ")"
13578 marks         = "(" <string> range ")"
13579 method        = "(" <string> *elisp-forms ")"
13580 parameters    = "(" *elisp-forms ")"
13581 @end example
13582
13583 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
13584 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
13585 in pseudo-BNF.
13586
13587
13588 @node Emacs/XEmacs Code
13589 @subsection Emacs/XEmacs Code
13590 @cindex XEmacs
13591 @cindex Emacsen
13592
13593 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
13594 platforms must be the primary one.  I chose Emacs.  Not because I don't
13595 like XEmacs or Mule, but because it comes first alphabetically.
13596
13597 This means that Gnus will byte-compile under Emacs with nary a warning,
13598 while XEmacs will pump out gigabytes of warnings while byte-compiling.
13599 As I use byte-compilation warnings to help me root out trivial errors in
13600 Gnus, that's very useful.  
13601
13602 I've also consistently used Emacs function interfaces, but have used
13603 Gnusey aliases for the functions.  To take an example:  Emacs defines a
13604 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
13605 function.  I then define a function called @code{gnus-run-at-time} that
13606 takes the same parameters as the Emacs @code{run-at-time}.  When running
13607 Gnus under Emacs, the former function is just an alias for the latter.
13608 However, when running under XEmacs, the former is an alias for the
13609 following function:
13610
13611 @lisp
13612 (defun gnus-xmas-run-at-time (time repeat function &rest args)
13613   (start-itimer
13614    "gnus-run-at-time"
13615    `(lambda ()
13616       (,function ,@@args))
13617    time repeat))
13618 @end lisp
13619
13620 This sort of thing has been done for bunches of functions.  Gnus does
13621 not redefine any native Emacs functions while running under XEmacs---it
13622 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
13623 all over.
13624
13625 Of course, I could have chosen XEmacs as my native platform and done
13626 mapping functions the other way around.  But I didn't.  The performance
13627 hit these indirections impose on Gnus under XEmacs should be slight.
13628
13629
13630 @node Various File Formats
13631 @subsection Various File Formats
13632
13633 @menu
13634 * Active File Format::      Information on articles and groups available.
13635 * Newsgroups File Format::  Group descriptions.
13636 @end menu
13637
13638
13639 @node Active File Format
13640 @subsubsection Active File Format
13641
13642 The active file lists all groups that are available on the server in
13643 question.  It also lists the highest and lowest current article numbers
13644 in each group.  
13645
13646 Here's an excerpt from a typical active file:
13647
13648 @example
13649 soc.motss 296030 293865 y
13650 alt.binaries.pictures.fractals 3922 3913 n
13651 comp.sources.unix 1605 1593 m
13652 comp.binaries.ibm.pc 5097 5089 y
13653 no.general 1000 900 y
13654 @end example
13655
13656 Here's a pseudo-BNF definition of this file:
13657
13658 @example
13659 active      = *group-line
13660 group-line  = group space high-number space low-number space flag <NEWLINE>
13661 group       = <non-white-space string>
13662 space       = " "
13663 high-number = <non-negative integer>
13664 low-number  = <positive integer>
13665 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
13666 @end example
13667
13668
13669 @node Newsgroups File Format
13670 @subsubsection Newsgroups File Format
13671
13672 The newsgroups file lists groups along with their descriptions.  Not all
13673 groups on the server have to be listed,  and not all groups in the file
13674 have to exist on the server.  The file is meant purely as information to
13675 the user.
13676
13677 The format is quite simple; a group name, a tab, and the description.
13678 Here's the definition:
13679
13680 @example
13681 newsgroups    = *line
13682 line          = group tab description <NEWLINE>
13683 group         = <non-white-space string>
13684 tab           = <TAB>
13685 description   = <string>
13686 @end example
13687
13688
13689 @node Emacs for Heathens
13690 @section Emacs for Heathens
13691
13692 Believe it or not, but some people who use Gnus haven't really used
13693 Emacs much before they embarked on their journey on the Gnus Love Boat.
13694 If you are one of those unfortunates whom ``@kbd{M-C-a}'', ``kill the
13695 region'', and ``set @code{gnus-flargblossen} to an alist where the key
13696 is a regexp that is used for matching on the group name'' are magical
13697 phrases with little or no meaning, then this appendix is for you.  If
13698 you are already familiar with Emacs, just ignore this and go fondle your
13699 cat instead.
13700
13701 @menu
13702 * Keystrokes::      Entering text and executing commands.
13703 * Emacs Lisp::      The built-in Emacs programming language.
13704 @end menu
13705
13706
13707 @node Keystrokes
13708 @subsection Keystrokes
13709
13710 @itemize @bullet
13711 @item
13712 Q: What is an experienced Emacs user?
13713
13714 @item 
13715 A: A person who wishes that the terminal had pedals.
13716 @end itemize
13717
13718 Yes, when you use Emacs, you are apt to use the control key, the shift
13719 key and the meta key a lot.  This is very annoying to some people
13720 (notably @code{vi}le users), and the rest of us just love the hell out
13721 of it.  Just give up and submit.  Emacs really does stand for
13722 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
13723 may have heard from other disreputable sources (like the Emacs author).
13724
13725 The shift key is normally located near your pinky fingers, and are
13726 normally used to get capital letters and stuff.  You probably use it all
13727 the time.  The control key is normally marked ``CTRL'' or something like
13728 that.  The meta key is, funnily enough, never marked as such on any
13729 keyboards.  The one I'm currently at has a key that's marked ``Alt'',
13730 which is the meta key on this keyboard.  It's usually located somewhere
13731 to the left hand side of the keyboard, usually on the bottom row.
13732
13733 Now, us Emacs people doesn't say ``press the meta-control-m key'',
13734 because that's just too inconvenient.  We say ``press the @kbd{M-C-m}
13735 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
13736 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
13737 down the control key, and hold it down while you press @kbd{k}''.
13738 ``Press @kbd{M-C-k}'' means ``press down and hold down the meta key and
13739 the control key and then press @kbd{k}''.  Simple, ay?
13740
13741 This is somewhat complicated by the fact that not all keyboards have a
13742 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
13743 means ``press escape, release escape, press @kbd{k}''.  That's much more
13744 work than if you have a meta key, so if that's the case, I respectfully
13745 suggest you get a real keyboard with a meta key.  You can't live without
13746 it.
13747
13748
13749
13750 @node Emacs Lisp
13751 @subsection Emacs Lisp
13752
13753 Emacs is the King of Editors because it's really a Lisp interpreter.
13754 Each and every key you tap runs some Emacs Lisp code snippet, and since
13755 Emacs Lisp is an interpreted language, that means that you can configure
13756 any key to run any arbitrary code.  You just, like, do it.
13757
13758 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
13759 functions.  (These are byte-compiled for speed, but it's still
13760 interpreted.)  If you decide that you don't like the way Gnus does
13761 certain things, it's trivial to have it do something a different way.
13762 (Well, at least if you know how to write Lisp code.)  However, that's
13763 beyond the scope of this manual, so we are simply going to talk about
13764 some common constructs that you normally use in your @file{.emacs} file
13765 to customize Gnus.
13766
13767 If you want to set the variable @code{gnus-florgbnize} to four (4), you
13768 write the following:
13769
13770 @lisp
13771 (setq gnus-florgbnize 4)
13772 @end lisp
13773
13774 This function (really ``special form'') @code{setq} is the one that can
13775 set a variable to some value.  This is really all you need to know.  Now
13776 you can go and fill your @code{.emacs} file with lots of these to change
13777 how Gnus works.
13778
13779 If you have put that thing in your @code{.emacs} file, it will be read
13780 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
13781 start Emacs.  If you want to change the variable right away, simply say
13782 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
13783 previous ``form'', which here is a simple @code{setq} statement.
13784
13785 Go ahead---just try it, if you're located at your Emacs.  After you
13786 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
13787 is the return value of the form you @code{eval}ed.
13788
13789 Some pitfalls:
13790
13791 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
13792 that means:
13793
13794 @lisp
13795 (setq gnus-read-active-file 'some)
13796 @end lisp
13797
13798 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
13799 @samp{nntp.ifi.uio.no}'', that means:
13800
13801 @lisp
13802 (setq gnus-nntp-server "nntp.ifi.uio.no")
13803 @end lisp
13804
13805 So be careful not to mix up strings (the latter) with symbols (the
13806 former).  The manual is unambiguous, but it can be confusing.
13807
13808
13809 @include gnus-faq.texi
13810
13811 @node Index
13812 @chapter Index
13813 @printindex cp
13814
13815 @node Key Index
13816 @chapter Key Index
13817 @printindex ky
13818
13819 @summarycontents
13820 @contents
13821 @bye
13822
13823 @iftex
13824 @iflatex
13825 \end{document}
13826 @end iflatex
13827 @end iftex
13828
13829 @c End:
13830