8c932b48dc9c8af29a39cf5444e20285c524724d
[gnus] / texi / gnus.texi
1 \input texinfo                  @c -*-texinfo-*-
2 @comment %**start of header (This is for running Texinfo on a region.)
3 @setfilename gnus.info
4 @settitle (ding) Gnus 0.84 Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @iftex
9 @finalout
10 @end iftex
11 @setchapternewpage odd
12 @c      @smallbook
13 @comment %**end of header (This is for running Texinfo on a region.)
14 @tex
15 \overfullrule=0pt
16 %\global\baselineskip 30pt      % For printing in double spaces
17 @end tex
18
19 @ifinfo
20
21 This file documents Gnus, the GNU Emacs newsreader.
22
23 Copyright (C) 1995 Free Software Foundation, Inc.
24
25 Permission is granted to make and distribute verbatim copies of
26 this manual provided the copyright notice and this permission notice
27 are preserved on all copies.
28
29 @ignore
30 Permission is granted to process this file through Tex and print the
31 results, provided the printed document carries copying permission
32 notice identical to this one except for the removal of this paragraph
33 (this paragraph not being relevant to the printed manual).
34
35 @end ignore
36 Permission is granted to copy and distribute modified versions of this
37 manual under the conditions for verbatim copying, provided also that the
38 entire resulting derived work is distributed under the terms of a
39 permission notice identical to this one.
40
41 Permission is granted to copy and distribute translations of this manual
42 into another language, under the above conditions for modified versions.
43 @end ifinfo
44
45 @iftex
46
47 @titlepage
48 @title (ding) Gnus Manual
49
50 @author by Lars Magne Ingebrigtsen
51 @page
52 @vskip 0pt plus 1filll
53 Copyright @copyright{} 1995 Free Software Foundation, Inc. 
54
55 Permission is granted to make and distribute verbatim copies of
56 this manual provided the copyright notice and this permission notice
57 are preserved on all copies.
58
59 Permission is granted to copy and distribute modified versions of this
60 manual under the conditions for verbatim copying, provided that the
61 entire resulting derived work is distributed under the terms of a
62 permission notice identical to this one.
63
64 Permission is granted to copy and distribute translations of this manual
65 into another language, under the above conditions for modified versions.
66
67 Cover art by Etienne Suvasa.
68 @end titlepage
69 @page
70
71 @end iftex
72
73 @node Top
74 @top The Gnus Newsreader
75
76 You can read news (and mail) from within Emacs by using Gnus.  The news
77 can be gotten by any nefarious means you can think of - @sc{nntp}, local
78 spool or your mbox file.  All at the same time, if you want to push your
79 luck.
80
81 @menu
82 * History::                 How Gnus got where it is today.
83 * Terminology::             We use really difficult, like, words here.
84 * Starting Up::             Finding news can be a pain.
85 * The Group Buffer::        Selecting, subscribing and killing groups.
86 * The Summary Buffer::      Reading, saving and posting articles.
87 * The Article Buffer::      Displaying and handling articles.
88 * The Server Buffer::       Making and editing virtual servers.
89 * Various::                 General purpose settings.
90 * Customization::           Tailoring Gnus to your needs.
91 * Troubleshooting::         What you might try if things do not work.
92 * The End::                 Farewell, and goodbye.
93 * Index::                   Variable, function and concept index.
94 * Key Index::               Key Index.
95 @end menu
96
97 @node History
98 @chapter History
99
100 @cindex history
101 @sc{gnus} was written by Masanobu UMEDA.  When autumn crept up in '94,
102 Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
103
104 The recommended pronunciation of the name this program is "ding
105 guh-noose", with "ding" being half-sung in a loud, high-pitched voice,
106 and "guh-noose" being grumbled and a disaffected fashion.  Any
107 irritation and/or damage this name may cause you is not the
108 responsibility of the author, even though you might like to strangle him
109 for the stupid idea.
110
111 If you want to investigate the person responsible for this outrage, you
112 can point your (feh!) web browser to
113 @file{http://www.ifi.uio.no/~larsi/}.  This is also the primary
114 distribution point for the new and spiffy versions of Gnus, also know as
115 The Site That Destroys Newsrcs And Drives People Mad.
116
117 @dfn{(ding)}, is, of course, short for @dfn{ding is not Gnus}, which is
118 a total and utter lie, but who cares? (Besides, the "Gnus" in this
119 abbreviation should probably be pronounced "news" as UMEDA intended,
120 which makes it a more appropriate name, don't you think?)
121
122 @menu
123 * Why?::                What's the point of Gnus?
124 * Compatibility::       Just how compatible is (ding) Gnus with @sc{gnus}?
125 * Contributors::        Oodles of people.  
126 * New Features::        A short description of all the new stuff in Gnus.
127 * Newest Features::     Features so new that they haven't been written yet.
128 @end menu
129
130 @node Why?
131 @section Why?
132
133 What's the point of Gnus?  
134
135 I want to provide a "rad", "happening", "way cool" and "hep" newsreader,
136 that lets you do anything you can think of.  That was my original
137 motivation, but while working on Gnus, it has become clear to me that
138 this generation of newsreaders really belong in the stone age.
139 Newsreaders haven't developed much since the infancy of the net.  If the
140 volume continues to rise with the current rate of increase, all current
141 newsreaders will be pretty much useless.  How do you deal with
142 newsgroups that have hundreds (or thousands) of new articles each day? 
143
144 (ding) Gnus offer no real solutions to these questions, but I would very
145 much like to see Gnus being used as a testing ground for new methods of
146 reading and fetching news.  Expanding on Umeda-san's wise decision to
147 separate the newsreader from the backends, (ding) Gnus now offers a
148 simple interface for anybody who wants to write new backends for
149 fetching mail and news from different sources.  I have added hooks for
150 customizations everywhere I can imagine useful.  By doing so, I'm
151 inviting every one of you to explore and invent new ways of reading
152 news. 
153
154 May Gnus never be complete. @kbd{C-u 100 M-x hail-emacs}. 
155
156 @node Compatibility
157 @section Compatibility
158
159 @cindex compatibility
160 (ding) Gnus was designed to be fully compatible with @sc{gnus}.  Almost
161 all key bindings have been kept.  More key bindings have been added, of
162 course, but only in one or two obscure cases have old bindings been
163 changed.
164
165 Our motto is:
166 @quotation
167 @cartouche
168 @center In a cloud bones of steel.
169 @end cartouche
170 @end quotation
171
172 All commands have kept their names.  Some internal functions have changed
173 their names.
174
175 The @code{gnus-uu} package has changed drastically. @xref{Decoding
176 Articles}. 
177
178 One major compatibility question if the presence of several summary
179 buffers.  All variables that are relevant while reading a group are
180 buffer-local to the summary buffer they belong in.  Although most
181 important variables have their values copied into their global
182 counterparts whenever a command is executed in the summary buffer, this
183 change might lead to incorrect values being used unless you are careful.
184
185 All code that relies on knowledge of @sc{gnus} internals will probably
186 fail.  To take two examples: Sorting @code{gnus-newsrc-assoc} (or
187 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
188 maintains a hash table that points to the entries in this assoc (which
189 speeds up many functions), and changing the assoc directly will lead to
190 peculiar results.
191
192 @cindex hilit19
193 @cindex highlighting
194 Old hilit19 code does not work at all.  In fact, you should probably
195 remove all hilit code from all Gnus hooks
196 (@code{gnus-group-prepare-hook}, @code{gnus-summary-prepare-hook} and
197 @code{gnus-summary-article-hook}).  (Well, at the very least the first
198 two.)  Gnus provides various integrated functions for highlighting.
199 These are faster and more accurate.  To make life easier for everybody,
200 Gnus will by default remove all hilit calls from all hilit hooks.
201 Uncleanliness!  Away!
202
203 Packages like @code{expire-kill} will no longer work.  As a matter of
204 fact, you should probably remove all old @sc{gnus} packages (and other
205 code) when you start using (ding) Gnus.  More likely than not, (ding)
206 Gnus already does what you have written code to make @sc{gnus} do.
207 (Snicker.)
208
209 Even though old methods of doing things are still supported, only the
210 new methods are documented in this manual.  If you detect a new method of
211 doing something while reading this manual, that does not mean you have
212 to stop doing it the old way.
213
214 (ding) Gnus understands all @sc{gnus} startup files.
215
216 @kindex M-x gnus-bug
217 Overall, a casual user who hasn't written much code that depends on
218 @sc{gnus} internals should suffer no problems.  If problems occur,
219 please let me know (@kbd{M-x gnus-bug}).
220
221 Problems specific to GNU XEmacs can be reported to popineau@@ese-metz.fr
222 (Fabrice Popineau).  I will just forward any such questions to him,
223 anyway, so you might have to wait longer if you mail XEmacs questions to
224 me.
225
226 @node Contributors
227 @section Contributors
228 @cindex contributors
229
230 The new Gnus version couldn't have been done without the help of all the
231 people on the (ding) mailing list.  Every day for months I have gotten
232 tens of nice bug reports from them, filling me with joy, every single
233 one of them.  Smooches.  The people on the list have been tried beyond
234 endurance, what with my "oh, that's a neat idea <type type>, yup, I'll
235 release it right away <ship off> no wait, that doesn't work at all <type
236 type>, yup, I'll ship that one off right away <ship off> no, wait, that
237 absolutely does not work" policy for releases.  Microsoft - bah.  I'm
238 @emph{much} worse.
239
240 I would like to take this opportunity to thank the Academy for...  oops,
241 wrong show.
242
243 @itemize @bullet
244 @item
245 Of course, GNUS was written by Masanobu UMEDA.
246 @item 
247 Many excellent functions, especially dealing with scoring and
248 highlighting (as well as the soon-to-come @sc{soup} support) was written
249 by Per Abrahamsen.
250 @item
251 Innumerable bug fixes were written by Sudish Joseph.
252 @item
253 I stole some pieces from the XGnus distribution by Felix Lee and JWZ.
254 @item 
255 nnfolder has been much enhanced by Scott Byer.
256 @item
257 The orphan scoring was written by Peter Mutsaers.
258 @item 
259 GNU XEmacs support has been added by Fabrice Popineau. 
260 @item 
261 Various bits and pieces, especially dealing with .newsrc files, was
262 suggested and added by Hallvard B Furuseth.
263 @item 
264 Brian Edmonds has written @code{gnus-bbdb}, as well as other bits and
265 pieces. 
266 @item 
267 Ricardo Nassif did the proof-reading.
268 @item
269 Kevin Davidson came up with the name @dfn{ding}, so blame him.
270 @item 
271 Stainless Steel Rat, Ulrik Dickow, Jack Vinson, Daniel Quinlan, Ilja
272 Weis, Frank D. Cringle, Geoffrey T. Dairiki and Andrew Eskilsson have
273 all contributed code and suggestions.
274 @end itemize
275
276
277 @node New Features
278 @section New Features
279 @cindex new features
280
281 The look of all buffers can be changed by setting format-like variables.
282  
283 Local spool and several @sc{nntp} servers can be used at once.  Virtual
284 groups and private mail groups are featured.
285
286 Gnus can use various strategies for gathering threads that have lost
287 their roots (thereby gathering loose sub-threads in one thread) or it
288 can go back and retrieve enough headers to build a complete thread.
289
290 Killed groups can be displayed in the group buffer, and you can read
291 them as well.
292
293 Gnus can do partial group updates - you do not have to retrieve the
294 entire active file just to check for new articles in a few groups.
295
296 Gnus implements a sliding scale of subscribedness to groups.
297
298 The approach to killing has been changed.  Instead of simply killing or
299 not, you can score articles for easier reading.
300
301 @node Newest Features
302 @section Newest Features
303 @cindex todo
304
305 Also known as the @dfn{todo list}.  Sure to be implemented before the
306 next millennium.
307
308 @itemize @bullet
309 @item
310 Native @sc{mime} support is something that should be done.  I was hoping
311 I could steal code from @code{Mew}, the @sc{mime} mail reader for Emacs,
312 but I'm not quite sure what the status of that project is.  (ding) might
313 support @sc{mime} quite soon, and it might not.
314 @item
315 When the user references the parent of an article, some sort of
316 re-threading should be done to build a proper tree.  The same goes for
317 article expunging.  However, as it stands, it's not a trivial issue to
318 re-generate parts of the summary buffer.  Generating the entire buffer
319 is very easy, but slow.
320 @end itemize
321
322 @node Terminology
323 @chapter Terminology
324
325 @cindex terminology
326 @table @dfn
327 @item news
328 @cindex news
329 This is what you are supposed to use this thing for - reading news.
330 News is generally fetched from a nearby @sc{nntp} server, and is
331 generally publicly available to everybody.  If you post news, the entire
332 world is likely to read just what you have written, and they'll all
333 snigger mischievously.  Behind your back.
334 @item mail
335 @cindex mail
336 Everything that's delivered to you personally is mail.  Some news/mail
337 readers (like Gnus) blur the distinction between mail and news, but
338 there is a difference.  Mail is private.  News is public.  Mailing is
339 not posting, and replying is not following up.
340 @item reply
341 Send a mail to the person who has written what you are reading.
342 @item follow up
343 Post an article to the current newsgroup responding to the article you
344 are reading.
345 @item backend
346 Gnus gets fed articles from a number of backends, both news and mail
347 backends.  Gnus does not handle the underlying media, so to speak - this
348 is all done by the backends.
349 @item native
350 Gnus will always use one method (and backend) as the @dfn{native}, or
351 default, way of getting news.
352 @item foreign
353 You can also have any number of foreign groups at the same time.  These
354 are groups that use different backends for getting news.
355 @item head
356 @cindex head
357 The top part of an article, where administration information (etc.) is
358 put. 
359 @item body
360 @cindex body
361 The rest of an article. Everything that is not in the head is in the
362 body. 
363 @item header
364 @cindex header
365 A line from the head of an article. 
366 @item headers
367 @cindex headers
368 A collection of such lines, or a collection of heads.  Or even a
369 collection of @sc{nov} lines.
370 @item @sc{nov}
371 @cindex nov
372 When Gnus enters a group, it asks the backend for the headers for all
373 the unread articles in the group.  Most servers support the News OverView
374 format, which is much smaller and much faster to read than the normal
375 HEAD format. 
376 @item level
377 @cindex levels
378 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
379 that have a lower level are "more" subscribed than the groups with a
380 higher level.  In fact, groups on levels 1-5 are considered
381 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
382 are @dfn{killed}.  Commands for listing groups and scanning for new
383 articles will all use the numeric prefix as @dfn{working level}.
384 @item killed groups
385 @cindex killed groups
386 No information on killed groups is stored or updated, which makes killed
387 groups much easier to handle than subscribed groups.
388 @item zombie groups
389 @cindex zombie groups
390 Just like killed groups, only slightly less dead.
391 @item active file
392 @cindex active file
393 The news server has to keep track of what articles it carries, and what
394 groups exist.  All this information in stored in the active file, which
395 is rather large, as you might surmise.
396 @end table
397
398 @node Starting Up
399 @chapter Starting Gnus
400 @cindex starting up
401
402 @kindex M-x gnus
403 If your system administrator has set things up properly, starting Gnus
404 and reading news is extremely easy - you just type @kbd{M-x gnus}.
405
406 If things do not go smoothly at startup, you have to twiddle some
407 variables. 
408
409 @menu
410 * Finding the News::    Choosing a method for getting news.
411 * The First Time::      What does Gnus do the first time you start it?
412 * The Server is Down::  How can I read my mail then?
413 * New Groups::          What is Gnus supposed to do with new groups?
414 * Startup Files::       Those pesky startup files - @file{.newsrc}.
415 * Auto Save::           Recovering from a crash.
416 * The Active File::     Reading the active file over a slow line Takes Time.
417 * Startup Variables::   Other variables you might change.
418 @end menu
419
420 @node Finding the News
421 @section Finding the News
422
423 @vindex gnus-select-method
424 The @code{gnus-select-method} variable controls how Gnus finds news.
425 This variable should be a list where the first element says @dfn{how}
426 and the second element says @dfn{where}.  This method is is your native
427 method.  All groups that are not fetched with this method are foreign
428 groups.
429
430 For instance, if you want to get your daily dosage of news from the
431 @samp{news.somewhere.edu} @sc{nntp} server, you'd say:
432
433 @lisp
434 (setq gnus-select-method '(nntp "news.somewhere.edu"))
435 @end lisp
436
437 If you want to read directly from the local spool, say:
438
439 @lisp
440 (setq gnus-select-method '(nnspool ""))
441 @end lisp
442
443 If you can use a local spool, you probably should, as it will almost
444 certainly be much faster.
445
446 If this variable is not set, Gnus will take a look at the
447 @code{NNTPSERVER} environment variable.  If that isn't set either, it
448 will try to use the machine that is running Emacs as an @sc{nntp}
449 server.
450
451 @vindex gnus-nntp-server
452 If @code{gnus-nntp-server} is set, this variable will override
453 @code{gnus-select-method}.  You should therefore set
454 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
455
456 @vindex gnus-secondary-servers
457 You can also make Gnus prompt you interactively for the name of an
458 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
459 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
460 in the @code{gnus-secondary-servers} list (if any).  You can also just
461 type in the name of any server you feel like visiting.
462
463 However, if you use one @sc{nntp} server regularly, and are just
464 interested in a couple of groups from a different server, you would be
465 better served by using the @code{gnus-group-browse-foreign-server}
466 command from the group buffer.  It will let you have a look at what
467 groups are available, and you can subscribe to any of the groups you
468 want to.  This also makes @file{.newsrc} maintenance much tidier.
469 @xref{Foreign Groups}.
470
471 @vindex gnus-secondary-select-methods
472 A slightly different approach to foreign groups is to set the
473 @code{gnus-secondary-select-methods} variable.  The select methods
474 listed in this variable are in many ways just as native as the
475 @code{gnus-select-method} server.  They will also be queried for active
476 files during startup (if that's required), and new newsgroups that
477 appear on these servers will be subscribed (or not) just as native
478 groups are.
479
480 For instance, if you use the @code{nnmbox} backend to read you mail, you
481 would typically set this variable to
482
483 @lisp
484 (setq gnus-secondary-select-methods '((nnmbox "")))
485 @end lisp
486
487 @node The First Time
488 @section The First Time
489 @cindex first time usage
490
491 If no startup files exist, Gnus will try to determine what groups should
492 be subscribed by default.
493
494 @vindex gnus-default-subscribed-newsgroups
495 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
496 will subscribe you to just those groups in that list, leaving the rest
497 killed.  Your system administrator should have set this variable to
498 something useful.
499
500 Since she hasn't, Gnus will just subscribe you to a few randomly picked
501 groups (i.e., @samp{*.newusers}).  (@dfn{Random} is here defined as
502 "whatever Lars thinks you should read".)
503
504 You'll also be subscribed to the Gnus documentation group, which should
505 help you with most common problems.  
506
507 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
508 use the normal functions for handling new groups, and not do anything
509 special.
510
511 @node The Server is Down
512 @section The Server is Down
513 @cindex server errors
514
515 If the default server is down, Gnus will understandably have some
516 problems starting.  However, if you have some mail groups in addition to
517 the news groups, you may want to start Gnus anyway.
518
519 Gnus, being the trusting sort of program, will ask whether to proceed
520 without a native select method if that server can't be contacted.  This
521 will happen whether the server doesn't actually exist (i.e., you have
522 given the wrong address) or the server has just momentarily taken ill
523 for some reason or other.  
524
525 If Gnus says "nntp server on <your server> can't be opened. Continue?",
526 you do not want to continue unless you have some foreign groups that you
527 want to read.  Even if you don't, Gnus will let you continue, but you'll
528 find it difficult to actually do anything in the group buffer.  But,
529 hey, that's your problem.  Blllrph!
530
531 @node New Groups
532 @section New Groups
533 @cindex new groups
534
535 @vindex gnus-subscribe-newsgroup-method
536 What Gnus does when it encounters a new group is determined by the
537 @code{gnus-subscribe-newsgroup-method} variable.
538
539 This variable should contain a function.  Some handy pre-fab values
540 are:
541
542 @table @code
543 @item gnus-subscribe-randomly
544 @vindex gnus-subscribe-randomly
545 Subscribe all new groups randomly.
546 @item gnus-subscribe-alphabetically
547 @vindex gnus-subscribe-alphabetically
548 Subscribe all new groups alphabetically.
549 @item gnus-subscribe-hierarchically
550 @vindex gnus-subscribe-hierarchically
551 Subscribe all new groups hierarchically.
552 @item gnus-subscribe-interactively
553 @vindex gnus-subscribe-interactively
554 Subscribe new groups interactively.  This means that Gnus will ask
555 you about @strong{all} new groups.
556 @item gnus-subscribe-zombies
557 @vindex gnus-subscribe-zombies
558 Make all new groups zombies.  You can browse the zombies later and
559 either kill them all off properly, or subscribe to them.  This is the
560 default.
561 @end table
562
563 @vindex gnus-subscribe-hierarchical-interactive
564 A closely related variable is
565 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
566 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
567 hierarchical fashion whether to subscribe to new groups or not.  Gnus
568 will ask you for each sub-hierarchy whether you want to descend the
569 hierarchy or not.
570
571 One common way to control which new newsgroups should be subscribed or
572 ignored is to put an @dfn{options} line at the start of the
573 @file{.newsrc} file.  Here's an example:
574
575 @example
576 options -n !alt.all !rec.all sci.all
577 @end example
578
579 @vindex gnus-subscribe-options-newsgroup-method
580 This line obviously belongs to a serious-minded intellectual scientific
581 person (or she may just be plain old boring), because it says that all
582 groups that have names beginning with @samp{alt} and @samp{rec} should
583 be ignored, and all groups with names beginning with @samp{sci} should
584 be subscribed.  Gnus will not use the normal subscription method for
585 subscribing these groups.
586 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
587 variable defaults to @code{gnus-subscribe-alphabetically}.
588
589 @vindex gnus-options-not-subscribe
590 @vindex gnus-options-subscribe
591 If you don't want to mess with your @file{.newsrc} file, you can just
592 set the two variables @code{gnus-options-subscribe} and
593 @code{gnus-options-not-subscribe}.  These two variables do exactly the
594 same as the @file{.newsrc} options -n trick.  Both are regexps, and if
595 the the new group matches the first, it will be unconditionally
596 subscribed, and if it matches the latter, it will be ignored.
597
598 @vindex gnus-check-new-newsgroups
599 If you are satisfied that you really never want to see any new groups,
600 you could set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
601 also save you some time at startup.  Even if this variable is
602 @code{nil}, you can always subscribe to the new groups just by pressing
603 @kbd{U} in the group buffer (@pxref{Group Maintenance}).
604
605 Gnus normally determines whether a group is new or not by comparing the
606 list of groups from the active file(s) with the lists of subscribed and
607 dead groups.  This isn't a particularly fast method.  If
608 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
609 server for new groups since the last time.  This is both faster &
610 cheaper.  This also means that you can get rid of the list of killed
611 groups altogether, so you may set @code{gnus-save-killed-list} to
612 @code{nil}, which will save time both at startup, at exit, and all over.
613 Saves disk space, too.  Why isn't this the default, then?
614 Unfortunately, not all servers support this function.
615
616 This variable can also be a list of select methods.  If so, Gnus will
617 issue an @code{ask-server} command to each of the select methods, and
618 subscribe them (or not) using the normal methods.  This might be handy
619 if you are monitoring a few servers for new groups.  A side effect is
620 that startup will take much longer, so you can meditate while waiting.
621 Use the mantra "dingnusdingnusdingnus" to achieve permanent happiness.
622
623 @node Startup Files
624 @section Startup Files
625 @cindex startup files
626 @cindex .newsrc
627
628 Now, you all know about the @file{.newsrc} file.  All subscription
629 information is traditionally stored in this file.
630
631 Things got a bit more complicated with @sc{gnus}.  In addition to
632 keeping the @file{.newsrc} file updated, it also used a file called
633 @file{.newsrc.el} for storing all the information that didn't fit into
634 the @file{.newsrc} file.  (Actually, it duplicated everything in the
635 @file{.newsrc} file.)  @sc{gnus} would read whichever one of these files
636 that were the most recently saved, which enabled people to swap between
637 @sc{gnus} and other newsreaders.
638
639 That was kinda silly, so (ding) Gnus went one better: In addition to the
640 @file{.newsrc} and @file{.newsrc.el} files, (ding) Gnus also has a file
641 called @file{.newsrc.eld}.  It will read whichever of these files that
642 are most recent, but it will never write a @file{.newsrc.el} file.
643
644 @vindex gnus-save-newsrc-file
645 You can also turn off writing the @file{.newsrc} file by setting
646 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
647 the file and save some space, as well as making exit from Gnus faster.
648 However, this will make it impossible to use other newsreaders than
649 Gnus.  But hey, who would want to, right?
650
651 @vindex gnus-save-killed-list
652 If @code{gnus-save-killed-list} is @code{nil}, Gnus will not save the
653 list of killed groups to the startup file.  This will save both time
654 (when starting and quitting) and space (on disk).  It will also means
655 that Gnus has no record of what groups are new or old, so the automatic
656 new groups subscription methods become meaningless.  You should always
657 set @code{gnus-check-new-newsgroups} to @code{nil} or @code{ask-server}
658 if you set this variable to @code{nil} (@pxref{New Groups}).
659
660 @vindex gnus-startup-file
661 The @code{gnus-startup-file} variable says where the startup files are.
662 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
663 file being whatever that one is with a @samp{.eld} appended.
664
665 @vindex gnus-save-newsrc-hook
666 @code{gnus-save-newsrc-hook} is called before saving the @file{.newsrc}
667 file.
668
669 @node Auto Save
670 @section Auto Save
671 @cindex dribble file
672 @cindex auto-save
673
674 Whenever you do something that changes the Gnus data (reading articles,
675 catching up, killing/subscribing groups), the change is added to a
676 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
677 Emacs way.  If your Emacs should crash before you have saved the
678 @file{.newsrc} files, all changes you have made can be recovered from
679 this file.
680
681 If Gnus detects this file at startup, it will ask the user whether to
682 read it. The auto save file is deleted whenever the real startup file is
683 saved.
684
685 @vindex gnus-use-dribble-file
686 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
687 maintain a dribble buffer.
688
689 @node The Active File
690 @section The Active File
691 @cindex active file
692 @cindex ignored groups
693
694 When Gnus starts, or indeed whenever it tries to determine whether new
695 articles have arrived, it reads the active file.  This is a very large
696 file that lists all the active groups and articles on the @sc{nntp}
697 server.
698
699 @vindex gnus-ignored-newsgroups
700 Before examining the active file, Gnus deletes all lines that match the
701 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
702 any groups with bogus names, but you can use this variable to make Gnus
703 ignore hierarchies you aren't ever interested in.  This variable is
704 @code{nil} by default, and will slow down active file handling somewhat
705 if you set it to anything else.
706
707 @vindex gnus-read-active-file
708 The active file can be rather Huge, so if you have a slow network, you
709 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
710 reading the active file.
711
712 Gnus will try to make do by just getting information on the groups
713 that you actually subscribe to.
714
715 Note that if you subscribe to lots and lots of groups, setting this
716 variable to @code{nil} will probably make Gnus slower, not faster.  At
717 present, having this variable @code{nil} will slow Gnus down
718 considerably, unless you read news over a 2400 baud modem.  
719
720 This variable can also have the value @code{some}.  Gnus will then
721 attempt to read active info only on the subscribed groups.  On some
722 servers this is quite fast (on sparkling, brand new INN servers that
723 support the @samp{LIST ACTIVE group} command), on others this is not
724 fast at all.  In any case, @code{some} should be faster than @code{nil},
725 and is certainly faster than @code{t} over slow lines.
726
727 If this variable is @code{nil}, Gnus will as for group info in total
728 lock-step, which isn't very fast.  If it is @code{some} and you use an
729 NNTP server, Gnus will pump out commands as fast as it can, and read all
730 the replies in one swoop.  This will normally result in better
731 performance, but if the server does not support the aforementioned
732 @samp{LIST ACTIVE group} command, this isn't very nice to the server. 
733
734 In any case, if you use @code{some} or @code{nil}, you should kill all
735 groups that you aren't interested in.
736
737 @node Startup Variables
738 @section Startup Variables
739
740 @table @code
741 @item gnus-check-bogus-newsgroups
742 @vindex gnus-check-bogus-newsgroups
743 If non-@code{nil}, Gnus will check for and delete all bogus groups at
744 startup.  A @dfn{bogus group} is a group that you have in your
745 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
746 bogus groups isn't very quick, so to save time and resources, it's best
747 to leave this option off, and instead do the checking for bogus groups
748 once in a while from the group buffer (@pxref{Group Maintenance}).
749 @item gnus-inhibit-startup-message
750 @vindex gnus-inhibit-startup-message
751 If non-@code{nil}, the startup message won't be displayed.  That way,
752 your boss might not notice that you are reading news instead of doing
753 your job.
754 @item gnus-no-groups-message
755 @vindex gnus-no-groups-message
756 Message displayed by Gnus when no groups are available.
757 @end table
758
759 @node The Group Buffer
760 @chapter The Group Buffer
761 @cindex group buffer
762
763 The @dfn{group buffer} lists all (or parts) of the available groups.  It
764 is the first buffer shown when Gnus starts, and will never be killed as
765 long as Gnus is active.
766
767 @menu
768 * Group Buffer Format::    Information listed and how you can change it.
769 * Group Maneuvering::      Commands for moving in the group buffer.
770 * Selecting a Group::      Actually reading news.
771 * Group Subscribing::      Unsubscribing, killing, subscribing.
772 * Group Levels::           Levels? What are those, then?
773 * Marking Groups::         You can mark groups for later processing.
774 * Foreign Groups::         How to create foreign groups.
775 * Group Parameters::       Each group may have different parameters set.
776 * Listing Groups::         Gnus can list various subsets of the groups.
777 * Group Maintenance::      Maintaining a tidy @file{.newsrc} file.
778 * Browse Foreign Server::  You can browse a server.  See what if has to offer.
779 * Exiting Gnus::           Stop reading news and get some work done.
780 * Misc Group Stuff::       Other stuff that you can to do.
781 @end menu
782
783 @node Group Buffer Format
784 @section Group Buffer Format
785 @cindex group buffer format
786
787 The default format of the group buffer is nice and dull, but you can
788 make it as exciting and ugly as you feel like.
789
790 Here's a couple of example group lines:
791
792 @example
793      25: news.announce.newusers
794  *    0: alt.fan.andrea-dworkin
795 @end example
796
797 Quite simple, huh?
798
799 You can see that there are 25 unread articles in
800 @samp{news.announce.newusers}.  There are no unread articles, but some
801 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
802 asterisk at the beginning of the line?)
803
804 @vindex gnus-group-line-format
805 You can fuck that up to your heart's delight by fiddling with the
806 @code{gnus-group-line-format} variable.  This variable works along the
807 lines of a @code{format} specification, which is pretty much the same as
808 a @code{printf} specifications, for those of you who use (feh!) C.
809
810 In addition to the normal "padding" specs that @code{format} supports
811 (eg. @samp{%7d}), specifications like @samp{%7,12s} are allowed.  A spec
812 of this type means that the field will be at least 7 characters long,
813 and never more that 12 characters long.
814
815 The default value that produced those lines above is 
816 @samp{"%M%S%5y: %(%g%)\n"}.
817
818 There should always be a colon on the line; the cursor always moves to
819 the colon after performing an operation.  Nothing else is required - not
820 even the group name.  All displayed text is just window dressing, and is
821 never examined by Gnus.  Gnus stores all real information it needs using
822 text properties.
823
824 (Note that if you make a really strange, wonderful, spreadsheet-like
825 layout, everybody will believe you are hard at work with the accounting
826 instead of wasting time reading news.)
827
828 Here's a list of all available format characters:
829
830 @table @samp
831 @item M    
832 Only marked articles.
833 @item S
834 Whether the group is subscribed.
835 @item L    
836 Level of subscribedness.
837 @item N
838 Number of unread articles.
839 @item I
840 Number of dormant articles.
841 @item T
842 Number of ticked articles.
843 @item R
844 Number of read articles.
845 @item t
846 Total number of articles.
847 @item y
848 Number of unread, unticked, non-dormant articles.
849 @item i
850 Number of ticked and dormant articles.
851 @item g
852 Full group name.
853 @item G
854 Group name.
855 @item D
856 Newsgroup description.
857 @item o
858 Moderated.
859 @item O
860 Moderated.
861 @item s
862 Select method.
863 @item n
864 Select from where.
865 @item z
866 A string that looks like @samp{<%s:%n>} if a foreign select method is
867 used.
868 @item u
869 User defined specifier.  The next character in the format string should
870 be a letter.  @sc{gnus} will call the function
871 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
872 following @samp{%u}.  The function will be passed the current headers as
873 argument.  The function should return a string, which will be inserted
874 into the buffer just like information from any other specifier.
875 @end table
876
877 @cindex *
878 All the "number-of" specs will be filled with an asterisk (@samp{*}) if
879 no info is available - for instance, if it is a non-activated foreign
880 group, or a bogus (or semi-bogus) native group.
881
882 @vindex gnus-group-mode-line-format
883 The mode line can be changed by setting
884 (@code{gnus-group-mode-line-format}).  It doesn't understand that many
885 format specifiers:
886
887 @table @samp
888 @item S
889 Default news server.
890 @item M
891 Default select method.
892 @end table
893
894 @node Group Maneuvering
895 @section Group Maneuvering
896 @cindex group movement
897
898 All movement commands understand the numeric prefix and will behave as
899 expected, hopefully. 
900
901 @table @kbd
902 @item n
903 @kindex n (Group)
904 @findex gnus-group-next-unread-group
905 Go to the next group that has unread articles
906 (@code{gnus-group-next-unread-group}).
907 @item p
908 @itemx DEL
909 @kindex DEL (Group)
910 @kindex p (Group)
911 @findex gnus-group-prev-unread-group
912 Go to the previous group group that has unread articles
913 (@code{gnus-group-prev-unread-group}).
914 @item N
915 @kindex N (Group)
916 @findex gnus-group-next-group
917 Go to the next group (@code{gnus-group-next-group}).
918 @item P
919 @kindex P (Group)
920 @findex gnus-group-prev-group
921 Go to the previous group (@code{gnus-group-prev-group}).
922 @item M-p
923 @kindex M-p (Group)
924 @findex gnus-group-next-unread-group-same-level
925 Go to the next unread group on the same level (or lower)
926 (@code{gnus-group-next-unread-group-same-level}). 
927 @item M-n
928 @kindex M-n (Group)
929 @findex gnus-group-prev-unread-group-same-level
930 Go to the previous unread group on the same level (or lower)
931 (@code{gnus-group-prev-unread-group-same-level}). 
932 @end table
933
934 Three commands for jumping to groups:
935
936 @table @kbd
937 @item j
938 @kindex j (Group)
939 @findex gnus-group-jump-to-group
940 Jump to a group (and make it visible if it isn't already)
941 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
942 like living groups.
943 @item ,
944 @kindex , (Group)
945 @findex gnus-group-best-unread-group
946 Jump to the unread group with the lowest level
947 (@code{gnus-group-best-unread-group}). 
948 @item .
949 @kindex . (Group)
950 @findex gnus-group-first-unread-group
951 Jump to the first group with unread articles
952 (@code{gnus-group-first-unread-group}).  
953 @end table
954
955 @vindex gnus-group-goto-unread
956 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
957 commands will move to the next group, not the next unread group.  Even
958 the commands that say they move to the next unread group. 
959
960 @node Selecting a Group
961 @section Selecting a Group
962 @cindex group selection
963
964 @table @kbd
965 @item SPACE
966 @kindex SPACE (Group)
967 @findex gnus-group-read-group
968 Select the current group, switch to the summary buffer and display the
969 first unread article (@code{gnus-group-read-group}).  If there are no
970 unread articles in the group, or if you give a non-numerical prefix to
971 this command, Gnus will offer to fetch all the old articles in this
972 group from the server.  If you give a numerical prefix @var{N}, Gnus
973 will fetch @var{N} number of articles.  If @var{N} is positive, fetch
974 the @var{N} newest articles, if @var{N} is negative, fetch the
975 @var{abs(N)} oldest articles.
976 @item RET
977 @kindex RET (Group)
978 @findex gnus-group-select-group
979 Select the current group and switch to the summary buffer
980 (@code{gnus-group-select-group}).  Takes the same arguments as
981 @code{gnus-group-read-group} - the only difference is that this command
982 does not display the first unread article automatically upon group
983 entry. 
984 @item c
985 @kindex c (Group)
986 @findex gnus-group-catchup-current
987 Mark all unticked articles in this group as read
988 (@code{gnus-group-catchup-current}). 
989 @item C
990 @kindex C (Group)
991 @findex gnus-group-catchup-current-all
992 Mark all articles in this group, even the ticked ones, as read
993 (@code{gnus-group-catchup-current-all}). 
994 @end table
995
996 @vindex gnus-large-newsgroup
997 The @code{gnus-large-newsgroup} variable says what Gnus should consider
998 to be a big group.  If the group has more unread articles than this,
999 Gnus will query the user before entering the group.  The user can then
1000 specify how many articles should be fetched from the server.  If the
1001 user specifies a negative number (@samp{-n}), the @samp{n} oldest
1002 articles will be fetched.  If it is positive, the @samp{n} articles that
1003 have arrived most recently will be fetched.
1004
1005 @vindex gnus-select-group-hook
1006 @vindex gnus-auto-select-newsgroup
1007 If @code{gnus-auto-select-newsgroup} is non-@code{nil}, the first unread
1008 article in the group will be displayed when you enter the group.  If you
1009 want to prevent automatic selection in some group (say, in a binary
1010 group with Huge articles) you can set this variable to @code{nil} in
1011 @code{gnus-select-group-hook}, which is called when a group is selected.
1012
1013 @findex gnus-thread-sort-by-total-score
1014 @findex gnus-thread-sort-by-date
1015 @findex gnus-thread-sort-by-score
1016 @findex gnus-thread-sort-by-subject
1017 @findex gnus-thread-sort-by-author
1018 @findex gnus-thread-sort-by-number
1019 @vindex gnus-thread-sort-functions
1020 If you are using a threaded summary display, you can sort the threads by
1021 setting @code{gnus-thread-sort-functions}, which is a list of functions.
1022 By default, sorting is done on article numbers.  Ready-made sorting
1023 functions include @code{gnus-thread-sort-by-number},
1024 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
1025 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
1026 @code{gnus-thread-sort-by-total-score}.
1027
1028 Each function takes two threads and return non-@code{nil} if the first
1029 thread should be sorted before the other.  If you use more than one
1030 function, the primary sort key should be the last function in the list.
1031
1032 If you would like to sort by score, then by subject, and finally by
1033 date, you could do something like:
1034
1035 @lisp
1036 (setq gnus-thread-sort-functions 
1037       '(gnus-thread-sort-by-date
1038         gnus-thread-sort-by-subject
1039         gnus-thread-sort-by-score))
1040 @end lisp
1041
1042 @vindex gnus-thread-score-function
1043 The function in the @code{gnus-thread-score-function} variable (default
1044 @code{+}) is used for calculating the total score of a thread.  Useful
1045 functions might be @code{max}, @code{min}, or squared means, or whatever
1046 tickles you fancy.
1047
1048 @node Group Subscribing
1049 @section Group Subscribing
1050 @cindex subscribing
1051
1052 @table @kbd
1053 @item S t
1054 @itemx u
1055 @kindex S t (Group)
1056 @kindex u (Group)
1057 @findex gnus-group-unsubscribe-current-group
1058 Toggle subscription to the current group
1059 (@code{gnus-group-unsubscribe-current-group}).  
1060 @item S s
1061 @itemx U
1062 @kindex S s (Group)
1063 @kindex U (Group)
1064 @findex gnus-group-unsubscribe-group
1065 Prompt for a group to subscribe, and then subscribe it.  If it was
1066 subscribed already, unsubscribe it instead
1067 (@code{gnus-group-unsubscribe-group}).
1068 @item S k
1069 @itemx C-k
1070 @kindex S k (Group)
1071 @kindex C-k (Group)
1072 @findex gnus-group-kill-group
1073 Kill the current group (@code{gnus-group-kill-group}).
1074 @item S y
1075 @itemx C-y
1076 @kindex S y (Group)
1077 @kindex C-y (Group)
1078 @findex gnus-group-yank-group
1079 Yank the last killed group (@code{gnus-group-yank-group}).
1080 @item S w
1081 @itemx C-w
1082 @kindex S w (Group)
1083 @kindex C-w (Group)
1084 @findex gnus-group-kill-region
1085 Kill all groups in the region (@code{gnus-group-kill-region}). 
1086 @item S z
1087 @kindex S z (Group)
1088 @findex gnus-group-kill-all-zombies
1089 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
1090 @end table
1091
1092 @node Group Levels
1093 @section Group Levels
1094 @cindex group level
1095
1096 All groups have a level of @dfn{subscribedness}.  For instance, if a
1097 group is on level 2, it is more subscribed than a group on level 5.  You
1098 can ask Gnus to just list groups on a given level or lower
1099 (@pxref{Listing Groups}), or to just check for new articles in groups on
1100 a given level or lower (@pxref{Misc Group Stuff}).
1101
1102 @table @kbd
1103 @item S l
1104 @kindex S l (Group)
1105 @findex gnus-group-set-current-level
1106 Set the level of the current group.  If a numeric prefix is given, the
1107 next @var{n} groups will have their levels set.  The user will be
1108 prompted for a level.
1109 @end table
1110
1111 @vindex gnus-level-killed
1112 @vindex gnus-level-zombie
1113 @vindex gnus-level-unsubscribed
1114 @vindex gnus-level-subscribed
1115 Gnus considers groups on between levels 1 and
1116 @code{gnus-level-subscribed} (inclusive) to be subscribed,
1117 @code{gnus-level-subscribed} (exclusive) and
1118 @code{gnus-level-unsubscribed} (inclusive) to be unsubscribed,
1119 @code{gnus-level-zombie} to be zombies (walking dead) and
1120 @code{gnus-level-killed} to be killed, completely dead.  Gnus treats
1121 subscribed and unsubscribed groups exactly the same, but zombie and
1122 killed groups have no information on what articles you have read, etc,
1123 stored.  This distinction between dead and living groups isn't done
1124 because it is nice or clever, it is done purely for reasons of
1125 efficiency. 
1126
1127 It is recommended that you keep all your mail groups (if any) on quite
1128 low levels (eg. 1 or 2).
1129
1130 If you want to play with the level variables, you should show some care.
1131 Set them once, and don't touch them ever again.  
1132
1133 @vindex gnus-level-default-unsubscribed
1134 @vindex gnus-level-default-subscribed
1135 Two closely related variables are @code{gnus-level-default-subscribed}
1136 and @code{gnus-level-default-unsubscribed}, which are the levels that new
1137 groups will be put on if they are (un)subscribed.  These two variables
1138 should, of course, be inside the relevant legal ranges.
1139
1140 @vindex gnus-keep-same-level
1141 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
1142 will only move to groups that are of the same level (or lower).  In
1143 particular, going from the last article in one group to the next group
1144 will go to the next group of the same level (or lower).  This might be
1145 handy if you want to read the most important groups before you read the
1146 rest.
1147
1148 @vindex gnus-group-default-list-level
1149 All groups with a level less than or equal to
1150 @code{gnus-group-default-list-level} will be listed in the group buffer
1151 by default.
1152
1153 @vindex gnus-group-use-permament-levels
1154 If @code{gnus-group-use-permament-levels} is non-@code{nil}, once you
1155 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
1156 use this level as the "work" level.
1157
1158 @node Marking Groups
1159 @section Marking Groups
1160 @cindex marking groups
1161
1162 If you want to perform some action on several groups, and they appear
1163 subsequently in the group buffer, you would normally just give a
1164 numerical prefix to the command.  Most group commands will then do your
1165 bidding on those groups.
1166
1167 However, if the groups are not in sequential order, you can still
1168 perform an action on several groups.  You simply mark the groups first,
1169 and then execute the command.  
1170
1171 @table @kbd
1172 @item #
1173 @kindex # (Group)
1174 @item G m
1175 @kindex G m (Group)
1176 @findex gnus-group-mark-group
1177 Set the mark on the current group (@code{gnus-group-mark-group}). 
1178 @item M-#
1179 @kindex M-# (Group)
1180 @item G u
1181 @kindex G u (Group)
1182 @findex gnus-group-unmark-group
1183 Remove the mark from the current group
1184 (@code{gnus-group-unmark-group}). 
1185 @item G w
1186 @kindex G w (Group)
1187 @findex gnus-group-mark-region
1188 Mark all groups between point and mark (@code{gnus-group-mark-region}). 
1189 @end table
1190
1191 @node Foreign Groups
1192 @section Foreign Groups
1193 @cindex foreign groups
1194
1195 A @dfn{foreign group} is a group that is not read by the usual (or
1196 default) means.  It could be, for instance, a group from a different
1197 @sc{nntp} server, it could be a virtual group, or it could be your own
1198 personal mail group.
1199
1200 A foreign group (or any group, really) is specified by a @dfn{name} and
1201 a @dfn{select method}.  To take the latter first, a select method is a
1202 list where the first element says what backend to use (eg. @code{nntp},
1203 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
1204 name}.  There may be additional elements in the select method, where the
1205 value may have special meaning for the backend in question.
1206
1207 One could say that a select method defines a @dfn{virtual server} - so
1208 we do just that (@pxref{The Server Buffer}).
1209
1210 The @dfn{name} of the group is the name the backend will recognize the
1211 group as.
1212
1213 For instance, the group @samp{soc.motss} on the @sc{nntp} server
1214 @samp{some.where.edu} will have the name @samp{soc.motss} and select
1215 method @code{(nntp "some.where.edu")}.  Gnus will call this group, in
1216 all circumstances, @samp{nntp+some.where.edu:soc.motss}, even though the
1217 nntp backend just knows this group as @samp{soc.motss}.
1218
1219 Here are some commands for making and editing general foreign groups,
1220 and some commands to ease the creation of some special-purpose groups:
1221
1222 @table @kbd
1223 @item G m
1224 @kindex G m (Group)
1225 @findex gnus-group-make-group
1226 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
1227 for a name, a method and possibly an @dfn{address}.  For an easier way
1228 to subscribe to @sc{nntp} groups, @xref{Browse Foreign Server}.
1229
1230 @item G e
1231 @kindex G e (Group)
1232 @findex gnus-group-edit-group-method
1233 Enter a buffer where you can edit the select method of the current
1234 group (@code{gnus-group-edit-group-method}).
1235
1236 @item G p
1237 @kindex G p (Group)
1238 @findex gnus-group-edit-group-parameters
1239 Enter a buffer where you can edit the group parameters
1240 (@code{gnus-group-edit-group-parameters}). 
1241
1242 @item G E
1243 @kindex G E (Group)
1244 @findex gnus-group-edit-group
1245 Enter a buffer where you can edit the group info
1246 (@code{gnus-group-edit-group}).
1247
1248 @item G d
1249 @kindex G d (Group)
1250 @findex gnus-group-make-directory-group
1251 Make a directory group.  You will be prompted for a directory name
1252 (@code{gnus-group-make-directory-group}).  
1253
1254 @item G h 
1255 @kindex G h (Group)
1256 @findex gnus-group-make-help-group
1257 Make the (ding) Gnus help group (@code{gnus-group-make-help-group}).
1258
1259 @item G a
1260 @kindex G a (Group)
1261 @findex gnus-group-make-archive-group
1262 @vindex gnus-group-archive-directory
1263 Make the (ding) Gnus archive group
1264 (@code{gnus-group-make-archive-group}).  The archive group will be
1265 fetched from @code{gnus-group-archive-directory}.
1266
1267 @item G k
1268 @kindex G k (Group)
1269 @findex gnus-group-make-kiboze-group
1270 Make a kiboze group.  You will be prompted for a name, for a regexp to
1271 match groups to be "included" in the kiboze group, and a series of
1272 strings to match on headers (@code{gnus-group-make-kiboze-group}).
1273
1274 @item G D
1275 @kindex G D (Group)
1276 @findex gnus-group-enter-directory
1277 Read a random directory as if with were a newsgroup with the
1278 @code{nneething} backend (@code{gnus-group-enter-directory}).
1279
1280 @item G f
1281 @kindex G f (Group)
1282 @findex gnus-group-make-doc-group
1283 Make a group based on some file or other
1284 (@code{gnus-group-make-doc-group}).  You will be prompted for a file
1285 name and a file type.  Currently supported types are @code{babyl},
1286 @code{mbox} and @code{digest}.
1287
1288 @item G V
1289 @kindex G V (Group)
1290 @findex gnus-group-make-empty-virtual
1291 Make a new, fresh, empty @code{nnvirtual} group
1292 (@code{gnus-group-make-empty-virtual}).
1293
1294 @item G v
1295 @kindex G v (Group)
1296 @findex gnus-group-add-to-virtual
1297 Add the current group to an @code{nnvirtual} group
1298 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
1299 @end table
1300
1301 The different methods all have their peculiarities, of course.
1302
1303 @menu
1304 * nntp::             Reading news from a different @sc{nntp} server.
1305 * nnspool::          Reading news from the local spool.
1306 * nnvirtual::        Combining articles from many groups.
1307 * nnkiboze::         Looking through parts of the newsfeed for articles.
1308 * nndir::            You can read a directory as if it was a newsgroup.
1309 * nneething::          Dired? Who needs dired?
1310 * nndoc::            Single files can be the basis of a group.
1311 * Reading Mail::     Reading your personal mail with Gnus.
1312 @end menu
1313
1314 @vindex gnus-activate-foreign-newsgroups
1315 If the @code{gnus-activate-foreign-newsgroups} is a positive number,
1316 Gnus will check all foreign groups with this level or lower at startup.
1317 This might take quite a while, especially if you subscribe to lots of
1318 groups from different @sc{nntp} servers.  It is @code{nil} by default,
1319 which means that you won't be told whether there are new articles in
1320 these groups.  How many unread articles there are will be determined
1321 when, or if, you decide to enter them.  You can also activate any group
1322 with @kbd{M-g} to see how many unread articles there are.
1323
1324 @node nntp
1325 @subsection nntp
1326 @cindex @sc{nntp}
1327
1328 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
1329 You just specify @code{nntp} as method and the address of the @sc{nntp}
1330 server as the, uhm, address.
1331
1332 If the @sc{nntp} server is located at a non-standard port, setting the
1333 third element of the select method to this port number should allow you
1334 to connect to the right port.  You'll have to edit the group info for
1335 that (@pxref{Foreign Groups}).
1336
1337 The name of the foreign group can be the same as a native group.  In
1338 fact, you can subscribe to the same group from as many different servers
1339 you feel like.  There will be no name collisions.
1340
1341 The following variables can be used to create a virtual @code{nntp}
1342 server: 
1343
1344 @table @code
1345 @item nntp-server-opened-hook
1346 @vindex nntp-server-opened-hook
1347 @cindex @sc{mode reader}
1348 @cindex authinfo
1349 @findex nntp-send-authinfo
1350 @findex nntp-send-mode-reader
1351 @code{nntp-server-opened-hook} is run after a connection has been made.
1352 It can be used to send commands to the @sc{nntp} server after it has
1353 been contacted.  By default is sends the command @samp{MODE READER} to
1354 the server with the @code{nntp-send-mode-reader} function.  Another
1355 popular function is @code{nntp-send-authinfo}, which will prompt you for
1356 an @sc{nntp} password and stuff.
1357
1358 @item nntp-maximum-request
1359 @vindex nntp-maximum-request
1360 If the @sc{nntp} server doesn't support @sc{nov} headers, this backend
1361 will collect headers by sending a series of @code{head} commands.  To
1362 speed things up, the backend sends lots of these commands without
1363 waiting for reply, and then reads all the replies.  This is controlled
1364 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
1365 your network is buggy, you should set this to 1.
1366
1367 @item nntp-connection-timeout
1368 @vindex nntp-connection-timeout
1369 If you have lots of foreign @code{nntp} groups that you connect to
1370 regularly, you're sure to have problems with @sc{nntp} servers not
1371 responding properly, or being too loaded to reply within reasonable
1372 time.  This is can lead to awkward problems, which can be helped
1373 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
1374 that says how many seconds the @code{nntp} backend should wait for a
1375 connection before giving up.  If it is @code{nil}, which is the default,
1376 no timeouts are done.
1377
1378 @item nntp-server-hook
1379 @vindex nntp-server-hook
1380 This hook is run as the last step when connecting to an @sc{nntp}
1381 server.
1382
1383 @findex nntp-open-rlogin
1384 @findex nntp-open-network-stream
1385 @item nntp-open-server-function
1386 @vindex nntp-open-server-function
1387 This function is used to connect to the remote system.  Two pre-made
1388 functions are @code{nntp-open-network-stream}, which is the default, and
1389 simply connects to some port or other on the remote system.  The other
1390 is @code{nntp-open-rlogin}, which does an rlogin on the remote system,
1391 and then does a telnet to the @sc{nntp} server available there.
1392
1393 @item nntp-rlogin-parameters
1394 @vindex nntp-rlogin-parameters
1395 If you use @code{nntp-open-rlogin} as the
1396 @code{nntp-open-server-function}, this list will be used as the
1397 parameter list given to @code{rsh}.
1398
1399 @item nntp-rlogin-user-name
1400 @vindex nntp-rlogin-user-name
1401 User name on the remote system when using the @code{rlogin} connect
1402 function. 
1403
1404 @item nntp-address
1405 @vindex nntp-address
1406 The address of the remote system running the @sc{nntp} server.
1407
1408 @item nntp-port-number
1409 @vindex nntp-port-number
1410 Port number to connect to when using the @code{nntp-open-network-stream}
1411 connect function.
1412
1413 @item nntp-buggy-select
1414 @vindex nntp-buggy-select
1415 Set this to non-@code{nil} if your select routine is buggy.
1416
1417 @item nntp-nov-is-evil 
1418 @vindex nntp-nov-is-evil 
1419 If the @sc{nntp} server does not support @sc{nov}, you could set this
1420 variable to @code{t}, but @code{nntp} usually checks whether @sc{nov}
1421 can be used automatically.
1422
1423 @item nntp-xover-commands
1424 @vindex nntp-xover-commands
1425 List of strings that are used as commands to fetch @sc{nov} lines from a
1426 server.  The default value of this variable is @code{("XOVER"
1427 "XOVERVIEW")}. 
1428
1429 @item nntp-nov-gap
1430 @vindex nntp-nov-gap
1431 @code{nntp} normally sends just one big request for @sc{nov} lines to
1432 the server.  The server responds with one huge list of lines.  However,
1433 if you have read articles 2-5000 in the group, and only want to read
1434 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
1435 lines that you do not want, and will not use.  This variable says how
1436 big a gap between two consecutive articles is allowed to be before the
1437 @code{XOVER} request is split into several request.  Note that if your
1438 network is fast, setting this variable to a really small number means
1439 that fetching will probably be slower.  If this variable is @code{nil},
1440 @code{nntp} will never split requests.
1441
1442 @item nntp-prepare-server-hook
1443 @vindex nntp-prepare-server-hook
1444 A hook run before attempting to connect to an @sc{nntp} server.
1445
1446 @item nntp-async-number
1447 @vindex nntp-async-number
1448 How many articles should be pre-fetched when in asynchronous mode.  If
1449 this variable is @code{t}, @code{nntp} will pre-fetch all the articles
1450 that it can without bound.  If it is @code{nil}, no pre-fetching will be
1451 made.
1452
1453 @end table
1454
1455 @node nnspool
1456 @subsection nnspool
1457 @cindex nnspool
1458 @cindex news spool
1459
1460 Subscribing to a foreign group from the local spool is extremely easy,
1461 and might be useful, for instance, to speed up reading groups like
1462 @samp{alt.binaries.pictures.furniture}.
1463
1464 Anyways, you just specify @code{nnspool} as the method and @samp{""} (or
1465 anything else) as the address.
1466
1467 If you have access to a local spool, you should probably use that as the
1468 native select method (@pxref{Finding the News}).
1469
1470 @table @code
1471 @item nnspool-inews-program
1472 @vindex nnspool-inews-program
1473 Program used to post an article.
1474
1475 @item nnspool-inews-switches
1476 @vindex nnspool-inews-switches
1477 Parameters given to the inews program when posting an article. 
1478
1479 @item nnspool-spool-directory
1480 @vindex nnspool-spool-directory
1481 Where nnspool looks for the articles.  This is normally
1482 @file{/usr/spool/news/}.
1483
1484 @item nnspool-nov-directory 
1485 @vindex nnspool-nov-directory 
1486 Where nnspool will look for @sc{nov} files.  This is normally
1487 @file{/usr/spool/news/over.view/}.
1488
1489 @item nnspool-lib-dir
1490 @vindex nnspool-lib-dir
1491 Where the news lib dir is (@file{/usr/lib/news/} by default).
1492
1493 @item nnspool-active-file
1494 @vindex nnspool-active-file
1495 The path of the active file.
1496
1497 @item nnspool-newsgroups-file
1498 @vindex nnspool-newsgroups-file
1499 The path of the group description file.
1500
1501 @item nnspool-history-file
1502 @vindex nnspool-history-file
1503 The path of the news history file.
1504
1505 @item nnspool-active-times-file
1506 @vindex nnspool-active-times-file
1507 The path of the active date file.
1508
1509 @item nnspool-nov-is-evil
1510 @vindex nnspool-nov-is-evil
1511 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
1512 that it finds.
1513
1514 @item nnspool-sift-nov-with-sed
1515 @vindex nnspool-sift-nov-with-sed
1516 If non-@code{nil}, which is the default, use @code{sed} to get the
1517 relevant portion from the overview file.  If nil, @code{nnspool} will
1518 load the entire file into a buffer and process it there.
1519
1520 @end table
1521
1522 @node nnvirtual
1523 @subsection nnvirtual
1524 @cindex nnvirtual
1525 @cindex virtual groups
1526
1527 An @dfn{nnvirtual group} is really nothing more than a collection of
1528 other groups.
1529
1530 For instance, if you are tired of reading many small group, you can
1531 put them all in one big group, and then grow tired of reading one
1532 big, unwieldy group.  The joys of computing!
1533
1534 You specify @code{nnvirtual} as the method.  The address should be a
1535 regexp to match component groups.
1536
1537 All marks in the virtual group will stick to the articles in the
1538 component groups.  So if you tick an article in a virtual group, the
1539 article will also be ticked in the component group from whence it came.
1540 (And vice versa - marks from the component groups will also be shown in
1541 the virtual group.)
1542
1543 Here's an example nnvirtual method that collects all Andrea Dworkin
1544 newsgroups into one, big, happy newsgroup:
1545
1546 @lisp
1547 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
1548 @end lisp
1549
1550 The component groups can be native or foreign; everything should work
1551 smoothly, but if your computer explodes, it was probably my fault.
1552
1553 Collecting the same group from several servers might actually be a good
1554 idea if users have set the Distribution header to limit distribution.
1555 If you would like to read @samp{soc.motss} both from a server in Japan
1556 and a server in Norway, you could use the following as the group regexp:
1557
1558 @example
1559 "^nntp+some.server.jp:soc.motss$\\|^nntp+some.server.no:soc.motss$"
1560 @end example
1561
1562 This should work kinda smoothly - all articles from both groups should
1563 end up in this one, and there should be no duplicates.  Threading (and
1564 the rest) will still work as usual, but there might be problems with the
1565 sequence of articles.  Sorting on date might be an option here
1566 (@pxref{Selecting a Group}.
1567
1568 One limitation, however - all groups that are included in a virtual
1569 group has to be alive (i.e., subscribed or unsubscribed).  Killed or
1570 zombie groups can't be component groups for nnvirtual groups.
1571
1572 @node nnkiboze
1573 @subsection nnkiboze
1574 @cindex nnkiboze
1575 @cindex kibozing
1576
1577 @dfn{Kibozing} is defined by OED as "grepping through (parts of) the
1578 news feed".  nnkiboze is a backend that will do this for you.  Oh joy!
1579 Now you can grind any @sc{nntp} server down to a halt with useless
1580 requests!  Oh happiness!
1581
1582 The address field of the nnkiboze method is, as with nnvirtual, a regexp
1583 to match groups to be "included" in the nnkiboze group.  There most
1584 similarities between nnkiboze and nnvirtual ends.
1585
1586 In addition to this regexp detailing component groups, an nnkiboze group
1587 must have a score file to say what articles that are to be included in
1588 the group (@pxref{Score Files}).
1589
1590 @kindex M-x nnkiboze-generate-groups
1591 @findex nnkiboze-generate-groups
1592 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
1593 nnkiboze groups you want to have.  This command will take time.  Lots of
1594 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
1595 all the articles in all the components groups and run them through the
1596 scoring process to determine if there are any articles in the groups
1597 that are to be part of the nnkiboze groups.
1598
1599 Please limit the number of component groups by using restrictive
1600 regexps.  Otherwise your sysadmin may become annoyed with you, and the
1601 @sc{nntp} site may throw you off and never let you back in again.
1602 Stranger things have happened.
1603
1604 nnkiboze component groups do not have to be alive - they can be dead,
1605 and they can be foreign.  No restrictions.
1606
1607 @vindex nnkiboze-directory
1608 The generation of an nnkiboze group means writing two files in
1609 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
1610 contains the @sc{nov} header lines for all the articles in the group,
1611 and the other is an additional @file{.newsrc} file to store information
1612 on what groups that have been searched through to find component
1613 articles.
1614
1615 Articles that are marked as read in the nnkiboze group will have their
1616 @sc{nov} lines removed from the @sc{nov} file.
1617
1618 @node nndir
1619 @subsection nndir
1620 @cindex nndir
1621 @cindex directory groups
1622
1623 If you have a directory that has lots of articles in separate files in
1624 it, you might treat it as a newsgroup.  The files have to have numerical
1625 names, of course.
1626
1627 This might be an opportune moment to mention @code{ange-ftp}, that most
1628 wonderful of all wonderful Emacs packages.  When I wrote @code{nndir}, I
1629 didn't think much about it - a backend to read directories.  Big deal.
1630
1631 @code{ange-ftp} changes that picture dramatically.  For instance, if you
1632 enter @file{"/ftp@@sina.tcamc.uh.edu:/pub/emacs/ding-list/"} as the the
1633 directory name, ange-ftp will actually allow you to read this directory
1634 over at @samp{sina} as a newsgroup.  Distributed news ahoy!
1635
1636 @code{nndir} will use @sc{nov} files if they are present.
1637
1638 @code{nndir} is a "read-only" backend - you can't delete or expire
1639 articles with this method.  You can use @code{nnmh} or @code{nnml} for
1640 whatever you use @code{nndir} for, so you could switch to any of those
1641 methods if you feel the need to have a non-read-only @code{nndir}.
1642
1643 @node nneething
1644 @subsection nneething
1645 @cindex nneething
1646
1647 From the @code{nndir} backend (which reads a single spool-like
1648 directory), it's just a hop and a skip to @code{nneething}, which
1649 pretends that any random directory is a newsgroup. Strange, but true.
1650
1651 When @code{nneething} is presented with a directory, it will scan this
1652 directory and assign article numbers to each file. When you enter such a
1653 group, @code{nneething} must create "headers" that Gnus can use. After
1654 all, Gnus is a newsreader, in case you're forgetting. @code{nneething}
1655 does this in a two-step process. First, it snoops each file in question.
1656 If the file looks like an article (i.e., the first few lines look like
1657 headers), it will use this as the head. If this is just some random file
1658 without a head (eg. a C source file), @code{nneething} will cobble up a
1659 header out of thin air. It will use file ownership, name and date and do
1660 whatever it can with these elements.
1661
1662 All this should happen automatically for you, and you will be presented
1663 with something that looks very much like a newsgroup. Totally like a
1664 newsgroup, to be precise. If you select an article, it will be displayed
1665 in the article buffer, just as usual.
1666
1667 If you select a line that represents a directory, Gnus will pop you into
1668 a new summary buffer for this @code{nneething} group. And so on. You can
1669 traverse the entire disk this way, if you feel like, but remember that
1670 Gnus is not dired, really, and does not intend to be, either.
1671
1672 There are two overall modes to this action - ephemeral or solid. When
1673 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
1674 will not store information on what files you have read, and what files
1675 are new, and so on. If you create a solid @code{nneething} group the
1676 normal way with @kbd{G m}, Gnus will store a mapping table between
1677 article numbers and file names, and you can treat this group like any
1678 other groups. When you activate a solid @code{nneething} group, you will
1679 be told how many unread articles it contains, etc., etc.
1680
1681 Some variables:
1682
1683 @table @code
1684 @item nneething-map-file-directory
1685 @vindex nneething-map-file-directory
1686 All the mapping files for solid @code{nneething} groups will be stored
1687 in this directory, which defaults to @file{~/.nneething/}.
1688
1689 @item nneething-exclude-files
1690 @vindex nneething-exclude-files
1691 All files that match this regexp will be ignored. Nice to use to exclude
1692 auto-save files and the like, which is what it does by default.
1693
1694 @item nneething-map-file
1695 @vindex nneething-map-file
1696 Name of the map files.
1697 @end table
1698
1699
1700 @node nndoc
1701 @subsection nndoc
1702 @cindex nndoc
1703 @cindex documentation group
1704 @cindex help group
1705
1706 nndoc is a cute little thing that will let you read a single file as a
1707 newsgroup.  Currently supported file types are @code{babyl}, @code{mbox}
1708 and @code{digest}. 
1709
1710 nndoc will not try to change the file or insert any extra headers into
1711 it - it will simply, like, let you use the file as the basis for a
1712 group.  And that's it.
1713
1714 Virtual server variables:
1715
1716 @table @code
1717 @item nndoc-article-type
1718 @vindex nndoc-article-type
1719 This should be one of @code{mbox}, @code{babyl} or @code{digest}. 
1720 @end table
1721
1722 @node Reading Mail
1723 @subsection Reading Mail
1724 @cindex reading mail
1725 @cindex mail
1726
1727 Reading mail with a newsreader - isn't that just plain WeIrD? But of
1728 course.
1729
1730 @menu
1731 * Creating Mail Groups::         How to create mail groups.
1732 * Fancy Mail Splitting::         Gnus can do hairy splitting of incoming mail.
1733 * Mail & Procmail::              Reading mail groups that procmail create.
1734 * Expiring Old Mail Articles::   Getting rid of unwanted mail.
1735 * Not Reading Mail::             Using mail backends for reading other files.
1736 @end menu
1737
1738 Gnus will read the mail spool when you activate a mail group.  The mail
1739 file is first copied to your home directory.  What happens after that
1740 depends on what format you want to store your mail in.
1741
1742 @menu
1743 * nnmbox::    Using the (quite) standard Un*x mbox.
1744 * nnbabyl::   Many Emacs programs use the rmail babyl format.
1745 * nnml::      Store your mail in a private spool?
1746 * nnmh::      An mhspool-like backend useful for procmail people.
1747 * nnfolder::  Having one file for each group.
1748 @end menu
1749
1750 @vindex nnmail-read-incoming-hook
1751 The mail backends all call @code{nnmail-read-incoming-hook} after
1752 reading new mail.  You can use this hook to notify any mail watch
1753 programs, if you want to.
1754
1755 @vindex nnmail-spool-file
1756 @code{nnmail-spool-file} says where to look for new mail.  If this
1757 variable is @code{nil}, the mail backends will never attempt to fetch
1758 mail by themselves.  It is quite likely that Gnus supports POP-mail.
1759 Set this variable to begin with the string @samp{po:}, and everything
1760 should go smoothly, even though I have never tested this.
1761
1762 @vindex nnmail-use-procmail
1763 If @code{nnmail-use-procmail} is non-@code{nil}, the mail backends will
1764 look in @code{nnmail-procmail-directory} for incoming mail.  All the
1765 files in that directory that have names ending in
1766 @code{gnus-procmail-suffix} will be considered incoming mailboxes, and
1767 will be searched for new mail.
1768
1769 @vindex nnmail-prepare-incoming-hook
1770 @code{nnmail-prepare-incoming-hook} is run in a buffer that holds all
1771 the new incoming mail, and can be used for, well, anything, really.
1772
1773 @vindex nnmail-tmp-directory
1774 @code{nnmail-tmp-directory} says where to move the incoming mail to
1775 while processing it.  This is usually done in the same directory that
1776 the mail backend inhabits (i.e., @file{~/Mail/}), but if this variable is
1777 non-@code{nil}, it will be used instead.
1778
1779 @vindex nnmail-delete-incoming
1780 If @code{nnmail-delete-incoming} is non-@code{nil}, the mail backends
1781 will delete the temporary incoming file after splitting mail into the
1782 proper groups.  This is @code{nil} by default for reasons of security. 
1783
1784 Gnus gives you all the opportunity you could possibly want for shooting
1785 yourself in the foot.  Let's say you create a group that will contain
1786 all the mail you get from your boss.  And then you accidentally
1787 unsubscribe from the group.  Gnus will still put all the mail from your
1788 boss in the unsubscribed group, and so, when your boss mails you "Have
1789 that report ready by Monday or you're fired!", you'll never see it and,
1790 come Tuesday, you'll still believe that you're gainfully employed while
1791 you really should be out collecting empty bottles to save up for next
1792 month's rent money.
1793
1794 @node Creating Mail Groups
1795 @subsubsection Creating Mail Groups
1796 @cindex creating mail groups
1797
1798 You can make Gnus read your personal, private, secret mail.
1799
1800 You should first set @code{gnus-secondary-select-methods} to, for
1801 instance, @code{((nnmbox ""))}.  When you start up Gnus, Gnus will ask
1802 this backend for what groups it carries (@samp{mail.misc} by default)
1803 and subscribe it the normal way.  (Which means you may have to look for
1804 it among the zombie groups, I guess, all depending on your
1805 @code{gnus-subscribe-newsgroup-method} variable.)
1806
1807 @vindex nnmail-split-methods
1808 Then you should set the variable @code{nnmail-split-methods} to specify
1809 how the incoming mail is to be split into groups.
1810
1811 @lisp
1812 (setq nnmail-split-methods
1813   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
1814     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
1815     ("mail.other" "")))
1816 @end lisp
1817
1818 This variable is a list of lists, where the first element of each of
1819 these lists is the name of the mail group (they do not have to be called
1820 something beginning with @samp{mail}, by the way), and the second
1821 element is a regular expression used on the header of each mail to
1822 determine if it belongs in this mail group.
1823
1824 The second element can also be a function.  In that case, it will be
1825 called narrowed to the headers with the first element of the rule as the
1826 argument.  It should return a non-@code{nil} value if it thinks that the
1827 mail belongs in that group.
1828
1829 The last of these groups should always be a general one, and the regular
1830 expression should @emph{always} be @samp{""} so that it matches any
1831 mails that haven't been matched by any of the other regexps.
1832
1833 If you like to tinker with this yourself, you can set this variable to a
1834 function of your choice. This function will be called without any
1835 arguments in a buffer narrowed to the headers of an incoming mail
1836 message. The function should return a list of groups names that it
1837 thinks should carry this mail message.
1838
1839 @vindex nnmail-crosspost
1840 The mail backends all support cross-posting.  If several regexps match,
1841 the mail will be "cross-posted" to all those groups.
1842 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
1843 that no articles are crossposted to the general (@samp{""}) group. 
1844
1845 @node Fancy Mail Splitting
1846 @subsubsection Fancy Mail Splitting
1847 @cindex mail splitting
1848 @cindex fancy mail splitting
1849
1850 @vindex nnmail-split-fancy
1851 @findex nnmail-split-fancy
1852 If the rather simple, standard method for specifying how to split mail
1853 doesn't allow you to do what you want, you can set
1854 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
1855 play with the @code{nnmail-split-fancy} variable. 
1856
1857 Let's look at an example value of this variable first:
1858
1859 @lisp
1860 ;; Messages from the mailer daemon are not crossposted to any of
1861 ;; the ordinary groups.  Warnings are put in a separate group
1862 ;; from real errors.
1863 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
1864                    "mail.misc"))
1865    ;; Non-error messages are crossposted to all relevant
1866    ;; groups, but we don't crosspost between the group for the
1867    ;; (ding) list and the group for other (ding) related mail.
1868    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
1869          ("subject" "ding" "ding.misc"))
1870       ;; Other mailing lists...
1871       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
1872       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
1873       ;; People...
1874       (any "larsi@@ifi\\.uio\\.no" "people.Lars Magne Ingebrigtsen"))
1875    ;; Unmatched mail goes to the catch all group.
1876    "misc.misc"))")
1877 @end lisp
1878
1879 This variable has the format of a @dfn{split}.  A split is a (possibly)
1880 recursive structure where each split may contain other splits.  Here are
1881 the four possible split syntaxes:
1882
1883 @table @dfn
1884 @item GROUP 
1885 If the split is a string, that will be taken as a group name. 
1886 @item (FIELD VALUE SPLIT)
1887 If the split is a list, and the first element is a string, then that
1888 means that if header FIELD (a regexp) contains VALUE (also a regexp),
1889 then store the message as specified by SPLIT.
1890 @item (| SPLIT...)
1891 If the split is a list, and the first element is @code{|} (vertical
1892 bar), then process each SPLIT until one of them matches.  A SPLIT is
1893 said to match if it will cause the mail message to be stored in one or
1894 more groups.
1895 @item (& SPLIT...)
1896 If the split is a list, and the first element is @code{&}, then process
1897 all SPLITs in the list.
1898 @end table
1899
1900 In these splits, FIELD must match a complete field name.  VALUE must
1901 match a complete word according to the fundamental mode syntax table.
1902 You can use @code{.*} in the regexps to match partial field names or
1903 words.
1904
1905 @vindex nnmail-split-abbrev-alist
1906 FIELD and VALUE can also be lisp symbols, in that case they are expanded
1907 as specified by the variable @code{nnmail-split-abbrev-alist}.  This is
1908 an alist of cons cells, where the car of the cells contains the key, and
1909 the cdr contains a string.
1910
1911 @node Mail & Procmail
1912 @subsubsection Mail & Procmail
1913 @cindex procmail
1914
1915 Many people use @code{procmail} to split incoming mail into groups.  If
1916 you do that, you should set @code{nnmail-spool-file} to @code{procmail}
1917 to ensure that the mail backends never ever try to fetch mail by
1918 themselves.
1919
1920 This also means that you probably don't want to set
1921 @code{nnmail-split-methods} either, which has some, perhaps, unexpected
1922 side effects.
1923
1924 When a mail backend is queried for what groups it carries, it replies
1925 with the contents of that variable, along with any groups it has figured
1926 out that it carries by other means.  None of the backends (except
1927 @code{nnmh}) actually go out to the disk and check what groups actually
1928 exist.  (It's not trivial to distinguish between what the user thinks is
1929 a basis for a newsgroup and what is just a plain old file or directory.)
1930
1931 This means that you have to tell Gnus (and the backends) what groups
1932 exist by hand.
1933
1934 Let's take the @code{nnmh} backend as an example. 
1935
1936 The folders are located in @code{nnmh-directory}, say, @file{~/Mail/}.
1937 There are three folders, @file{foo}, @file{bar} and @file{mail.baz}.
1938
1939 Go to the group buffer and type @kbd{G m}.  When prompted, answer
1940 @samp{foo} for the name and @samp{nnmh} for the method.  Repeat
1941 twice for the two other groups, @samp{bar} and @samp{mail.baz}.  Be sure
1942 to include all your mail groups.
1943
1944 That's it.  You are now set to read your mail.  An active file for this
1945 method will be created automatically.
1946
1947 @vindex nnmail-procmail-suffix
1948 @vindex nnmail-procmail-directory
1949 If you use @code{nnfolder} or any other backend that store more than a
1950 single article in each file, you should never have procmail add mails to
1951 the file that Gnus sees.  Instead, procmail should put all incoming mail
1952 in @code{nnmail-procmail-directory}.  To arrive at the file name to put
1953 the incoming mail in, append @code{nnmail-procmail-suffix} to the group
1954 name.  The mail backends will read the mail from these files.
1955
1956 @vindex nnmail-resplit-incoming
1957 When Gnus reads a file called @file{mail.misc.spool}, this mail will be
1958 put in the @code{mail.misc}, as one would expect.  However, if you want
1959 Gnus to split the mail the normal way, you could set
1960 @code{nnmail-resplit-incoming} to @code{t}.
1961
1962 @vindex nnmail-keep-last-article
1963 If you use @code{procmail}, you should set
1964 @code{nnmail-keep-last-article} to non-@code{nil}, to prevent Gnus from
1965 ever expiring the final article in a mail newsgroup. This is quite,
1966 quite important.
1967
1968
1969 @node Expiring Old Mail Articles
1970 @subsubsection Expiring Old Mail Articles
1971 @cindex article expiry
1972
1973 Traditional mail readers have a tendency to remove mail articles when
1974 you mark them as read, in some way.  Gnus takes a fundamentally
1975 different approach to mail reading.
1976
1977 Gnus basically considers mail just to be news that has been received in
1978 a rather peculiar manner.  It does not think that it has the power to
1979 actually change the mail, or delete any mail messages.  If you enter a
1980 mail group, and mark articles as "read", or kill them in some other
1981 fashion, the mail articles will still exist on the system.  I repeat:
1982 Gnus will not delete your old, read mail.  Unless you ask it to, of
1983 course.
1984
1985 To make Gnus get rid of your unwanted mail, you have to mark the
1986 articles as @dfn{expirable}.  This does not mean that the articles will
1987 disappear right away, however.  In general, a mail article will be
1988 deleted from your system if, 1) it is marked as expirable, AND 2) it is
1989 more than one week old.  If you do not mark an article as expirable, it
1990 will remain on your system until hell freezes over.  This bears
1991 repeating one more time, with some spurious capitalizations: IF you do
1992 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
1993
1994 @vindex gnus-auto-expirable-newsgroups
1995 You do not have to mark articles as expirable by hand.  Groups that
1996 match the regular expression @code{gnus-auto-expirable-newsgroups} will
1997 have all articles that you read marked as expirable automatically.  All
1998 articles that are marked as expirable have an @samp{E} in the first
1999 column in the summary buffer.
2000
2001 Let's say you subscribe to a couple of mailing lists, and you want the
2002 articles you have read to disappear after a while:
2003
2004 @lisp
2005 (setq gnus-auto-expirable-newsgroups 
2006       "mail.nonsense-list\\|mail.nice-list")
2007 @end lisp
2008
2009 Another way to have auto-expiry happen is to have the element
2010 @code{auto-expire} in the select method of the group. 
2011
2012 @vindex nnmail-expiry-wait
2013 The @code{nnmail-expiry-wait} variable supplies the default time an
2014 expirable article has to live.  The default is seven days.
2015
2016 Gnus also supplies a function that lets you fine-tune how long articles
2017 are to live, based on what group they are in.  Let's say you want to
2018 have one month expiry period in the @samp{mail.private} group, a one day
2019 expiry period in the @samp{mail.junk} group, and a six day expiry period
2020 everywhere else:
2021
2022 @lisp
2023 (setq nnmail-expiry-wait-function
2024       (lambda (group)
2025        (cond ((string= group "mail.private")
2026                31)
2027              ((string= group "mail.junk")
2028                1)
2029              (t
2030                6))))
2031 @end lisp
2032
2033 @vindex nnmail-keep-last-article
2034 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
2035 expire the final article in a mail newsgroup.  This is to make life
2036 easier for procmail users.
2037
2038 By the way, that line up there about Gnus never expiring non-expirable
2039 articles is a lie.  If you put @code{total-expire} in the group
2040 parameters, articles will not be marked as expirable, but all read
2041 articles will be put through the expiry process.  Use with extreme
2042 caution. 
2043
2044 Note that at present, Gnus will not actually delete any expirable
2045 articles automatically.  You have to enter one of the expiry functions
2046 (eg. `C-c M-c-x' in the group buffer) to actually run articles through
2047 the expiry process.  Or you can add a call to the expiry function in the
2048 group exit hook.  Gnus will probably do all this automatically in the
2049 future. 
2050
2051 @node Not Reading Mail
2052 @subsubsection Not Reading Mail
2053
2054 If you start using any of the mail backends, they have the annoying
2055 habit of assuming that you want to read mail with them.  This might not
2056 be unreasonable, but it might not be what you want.
2057
2058 If you set @code{nnmail-spool-file} to @code{nil}, none of the backends
2059 will ever attempt to read incoming mail, which should help.
2060
2061 @vindex nnbabyl-get-new-mail
2062 @vindex nnmbox-get-new-mail
2063 @vindex nnml-get-new-mail
2064 @vindex nnmh-get-new-mail
2065 @vindex nnfolder-get-new-mail
2066 This might be too much, if, for instance, you are reading mail quite
2067 happily with @code{nnml} and just want to peek at some old @sc{rmail}
2068 file you have stashed away with @code{nnbabyl}.  All backends have
2069 variables called backend-@code{get-new-mail}.  If you want to disable
2070 the @code{nnbabyl} mail reading, you edit the virtual server for the
2071 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
2072
2073 All the mail backends will call @code{nn}*@code{-prepare-save-mail-hook}
2074 narrowed to the article to be saved before saving it when reading
2075 incoming mail.
2076
2077 @node nnmbox
2078 @subsubsection nnmbox
2079 @cindex nnmbox
2080 @cindex unix mail box
2081
2082 @vindex nnmbox-active-file
2083 @vindex nnmbox-mbox-file
2084 The @dfn{nnmbox} backend will use the standard Un*x mbox file to store
2085 mail.  @code{nnmbox} will add extra headers to each mail article to say
2086 which group it belongs in.
2087
2088 Virtual server settings:
2089
2090 @table @code
2091 @item nnmbox-mbox-file
2092 @vindex nnmbox-mbox-file
2093 The name of the mail box in the user's home directory. 
2094
2095 @item nnmbox-active-file
2096 @vindex nnmbox-active-file
2097 The name of the active file for the mail box.
2098
2099 @item nnmbox-get-new-mail
2100 @vindex nnmbox-get-new-mail
2101 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
2102 into groups.
2103 @end table
2104
2105 @node nnbabyl
2106 @subsubsection nnbabyl
2107 @cindex nnbabyl
2108 @cindex rmail mbox
2109
2110 @vindex nnbabyl-active-file
2111 @vindex nnbabyl-mbox-file
2112 The @dfn{nnbabyl} backend will use a babyl mail box to store mail.
2113 @code{nnbabyl} will add extra headers to each mail article to say which
2114 group it belongs in.
2115
2116 Virtual server settings:
2117
2118 @table @code
2119 @item nnbabyl-mbox-file
2120 @vindex nnbabyl-mbox-file
2121 The name of the rmail mbox file.
2122
2123 @item nnbabyl-active-file
2124 @vindex nnbabyl-active-file
2125 The name of the active file for the rmail box.
2126
2127 @item nnbabyl-get-new-mail
2128 @vindex nnbabyl-get-new-mail
2129 If non-@code{nil}, @code{nnbabyl} will read incoming mail. 
2130 @end table
2131
2132 @node nnml
2133 @subsubsection nnml
2134 @cindex nnml
2135 @cindex mail @sc{nov} spool
2136
2137 The @dfn{nnml} spool mail format isn't compatible with any other known
2138 format.  It should be used with some caution.
2139
2140 @vindex nnml-directory
2141 If you use this backend, Gnus will split all incoming mail into files;
2142 one file for each mail, and put the articles into the correct
2143 directories under the directory specified by the @code{nnml-directory}
2144 variable.  The default value is @file{~/Mail/}.
2145
2146 You do not have to create any directories beforehand; Gnus will take
2147 care of all that.
2148
2149 If you have a strict limit as to how many files you are allowed to store
2150 in your account, you should not use this backend.  As each mail gets its
2151 own file, you might very well occupy thousands of inodes within a few
2152 weeks.  If this is no problem for you, and it isn't a problem for you
2153 having your friendly systems administrator walking around, madly,
2154 shouting "Who is eating all my inodes?! Who? Who!?!", then you should
2155 know that this is probably the fastest format to use.  You do not have
2156 to trudge through a big mbox file just to read your new mail.
2157
2158 @code{nnml} is probably the slowest backend when it comes to article
2159 splitting.  It has to create lots of files, and it also generates
2160 @sc{nov} databases for the incoming mails.  This makes is the fastest
2161 backend when it comes to reading mail.
2162
2163 Virtual server settings:
2164
2165 @table @code
2166 @item nnml-directory
2167 @vindex nnml-directory
2168 All @code{nnml} directories will be placed under this directory. 
2169
2170 @item nnml-active-file
2171 @vindex nnml-active-file
2172 The active file for the @code{nnml} server.
2173
2174 @item nnml-newsgroups-file
2175 @vindex nnml-newsgroups-file
2176 The @code{nnml} group description file.
2177
2178 @item nnml-get-new-mail
2179 @vindex nnml-get-new-mail
2180 If non-@code{nil}, @code{nnml} will read incoming mail.
2181
2182 @item nnml-nov-is-evil
2183 @vindex nnml-nov-is-evil
2184 If non-@code{nil}, this backend will ignore any @sc{nov} files.  
2185
2186 @item nnml-nov-file-name
2187 @vindex nnml-nov-file-name
2188 The name of the @sc{nov} files.  The default is @file{.overview}. 
2189
2190 @end table
2191
2192 @findex nnml-generate-nov-databases
2193 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
2194 you can do a complete update by typing @kbd{M-x
2195 nnml-generate-nov-databases}.  This command will trawl through the
2196 entire @code{nnml} hierarchy, looking at each and every article, so it
2197 might take a while to complete.
2198
2199 @node nnmh
2200 @subsubsection nnmh
2201 @cindex nnmh
2202 @cindex mh-e mail spool
2203
2204 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
2205 @sc{nov} databases and it doesn't keep an active file.  This makes
2206 @code{nnmh} a @emph{much} slower backend than @code{nnml}, but it also
2207 makes it easier to write procmail scripts for.
2208
2209 Virtual server settings:
2210
2211 @table @code
2212 @item nnmh-directory
2213 @vindex nnmh-directory
2214 All @code{nnmh} directories will be located under this directory.
2215
2216 @item nnmh-get-new-mail
2217 @vindex nnmh-get-new-mail
2218 If non-@code{nil}, @code{nnmh} will read incoming mail.
2219
2220 @item nnmh-be-safe
2221 @vindex nnmh-be-safe
2222 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
2223 sure that the articles in the folder is actually what Gnus think they
2224 are.  It will check date stamps, and stat everything in sight, so
2225 setting this to @code{t} will mean a serious slow-down.  If you never
2226 use anything by Gnus to read the nnmh articles, you do not have to set
2227 this variable to @code{t}. 
2228 @end table
2229
2230 @node nnfolder
2231 @subsubsection nnfolder
2232 @cindex nnfolder
2233 @cindex mbox folders
2234
2235 @code{nnfolder} is a backend for storing each mail group in a separate
2236 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
2237 will add extra headers to keep track of article numbers and arrival
2238 dates.
2239
2240 Virtual server settings:
2241
2242 @table @code
2243 @item nnfolder-directory
2244 @vindex nnfolder-directory
2245 All the @code{nnfolder} mail boxes will be stored under this directory. 
2246
2247 @item nnfolder-active-file
2248 @vindex nnfolder-active-file
2249 The name of the active file.
2250
2251 @item nnfolder-newsgroups-file
2252 @vindex nnfolder-newsgroups-file
2253 The name of the group description file.
2254
2255 @item nnfolder-get-new-mail
2256 @vindex nnfolder-get-new-mail
2257 If non-@code{nil}, @code{nnfolder} will read incoming mail.
2258 @end table
2259
2260 @node Group Parameters
2261 @section Group Parameters
2262 @cindex group parameters
2263
2264 Gnus stores all information on a group in a list that is usually known
2265 as the @dfn{group info}.  This list has from three to six elements.
2266 Here's an example info.
2267
2268 @lisp
2269 ("nnml:mail.ding" 3 ((1 . 232) 244 (256 . 270)) ((tick 246 249))
2270                   (nnml "private") ((to-address . "ding@@ifi.uio.no")))
2271 @end lisp
2272
2273 The first element is the @dfn{group name}, as Gnus knows the group,
2274 anyway.  The second element is the @dfn{subscription level}, which
2275 normally is a small integer.  The third element is a list of ranges of
2276 read articles.  The fourth element is a list of lists of article marks
2277 of various kinds.  The fifth element is the select method (or virtual
2278 server, if you like).  The sixth element is a list of @dfn{group
2279 parameters}, which is what this section is about.
2280
2281 Any of the last three elements may be missing if they are not required.
2282 In fact, the vast majority of groups will normally only have the first
2283 three elements, which saves quite a lot of cons cells.
2284
2285 At present, there's not much you can put in the group parameters list: 
2286
2287 @table @code
2288 @item to-address
2289 @cindex to-address
2290 If the group parameter list contains an element that looks like
2291 @samp{(to-address .  "some@@where.com")}, that address will be used by
2292 the backend when doing followups and posts.  This is primarily useful in
2293 mail groups that represent mailing lists.  You just set this address to
2294 whatever the list address is.
2295
2296 This trick will actually work whether the group is foreign or not.
2297 Let's say there's a group on the server that is called @samp{fa.4ad-l}.
2298 This is a real newsgroup, but the server has gotten the articles from a
2299 mail-to-news gateway.  Posting directly to this group is therefore
2300 impossible - you have to send mail to the mailing list address instead.
2301
2302 @item to-group
2303 @cindex to-group
2304 IF the group parameter list contains an element like @code{(to-group
2305 . "some.group.name")}, all posts will be sent to that groups.
2306
2307 @item auto-expire
2308 @cindex auto-expire
2309 If this symbol is present in the group parameter list, all articles that
2310 are read will be marked as expirable.  For an alternative approach,
2311 @xref{Expiring Old Mail Articles}.
2312
2313 @item total-expire
2314 @cindex total-expire
2315 If this symbol is present, all read articles will be put through the
2316 expiry process, even if they are not marked as expirable.  Use with
2317 caution. 
2318 @end table
2319
2320 If you want to change the group parameters (or anything else of the
2321 group info) you can use the @kbd{G E} to edit enter a buffer where you
2322 can edit the group info.
2323
2324 You usually don't want to edit the entire group info, so you'd be better
2325 off using the @kbd{G p} command to just edit the group parameters.
2326
2327 @node Listing Groups
2328 @section Listing Groups
2329 @cindex group listing
2330
2331 These commands all list various slices of the groups that are available.
2332
2333 @table @kbd
2334 @item l
2335 @itemx A s
2336 @kindex A s (Group)
2337 @kindex l (Group)
2338 @findex gnus-group-list-groups
2339 List all groups that have unread articles
2340 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
2341 command will list only groups of level ARG and lower.  By default, it
2342 only lists groups of level five or lower (i.e., just subscribed groups).
2343 @item L
2344 @itemx A u
2345 @kindex A u (Group)
2346 @kindex L (Group)
2347 @findex gnus-group-list-all-groups
2348 List all groups, whether they have unread articles or not
2349 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
2350 this command will list only groups of level ARG and lower.  By default,
2351 it lists groups of level seven or lower (i.e., just subscribed and
2352 unsubscribed groups).
2353 @item A k
2354 @kindex A k (Group)
2355 @findex gnus-group-list-killed